Reviving the Raspberry Pi 3B
I bought a Raspberry Pi 3B way back in Jan'2017. I actually completely forgot when I bought it, that I had to search in my posts. This is June'2024, that Pi is still alive and it can run the latest Raspberry Pi OS.
Anyway this hardware is more than 7 years old and it shows. I tried to launch the browser and it hanged. Turns out 7 years newer browsers need way more RAM than the paltry 1GB available here(907MB really excluding VRAM). Anyway so using SD Card was quite miserable. But thankfully the task for which I dug out the Raspberry Pi from hibernation, was soon done.
Let me talk a bit about the task. I have some R&D work where I wanted to compile a set of libraries from our current product. And extend them using Raspberry Pi hardware. Anyway the first phase was configuring the Raspberry Pi toolchain and then compile the existing code. Thankfully a guy named abhiTronix on github had some readymade toolchain versions and a script for manually building the toolchain. Since I was using the latest version of Raspberry Pi OS that is codename bookworm, so I modified his build script a bit and got the toolchain built in couple of days. Compiling the existing codebase was quite straightforward, because abhiTronix provided a compatible cmake file.
Once I compiled everything, I wrote a script to deploy everything to RPi using tar & scp. Then I spent another couple of days trying to solve DBUS permissions issues, and after frustrating couple of days, I just overrode the permissions for whole system and then got the whole thing to work as expected. It's not the most secure way but we can fix it properly in production. Haha!
Anyway once all this was done and the RPi was no more actively needed, I decided to spend some of my own time tinkering with it. I tried all my usual use-cases like browers, text-editing, multimedia etc. Turns out this 7 years old hardware can't handle HEVC video, browsers don't work, and too much multitasking makes you quickly run out of RAM.
That's fine. There's fun in trying to extract the last bit of performance. So I did some digging on the net. Found out there's a better way to USB boot a HDD - I have 2-3 HDD's from some laptops. I basically replaced all HDDs with SSD's few years back. And bought 2-3 SATA enclosures and that gave me a bunch of slow HDDs to be used as backup-storage. They are not fast - max 35MBPS. But for backup usage, it works.
Anyway I formatted one HDD and tried 2-3 USB booting methods. Found out I need to have an empty SD card formatted with FAT FS and I can put "bootcode.bin" with an empty "timeout" file. This would allow the RPi to boot from SD Card and mount and load the rootfs from the HDD.
By the way I checked prices of latest models 4 & 5 and they are costing 8000 to 10000 INR. That's crazy!! I don't know if post pandemic chip shortage is to blame for this or something else like plain old inflation. Anyway, once I had Raspberry PI OS booting from the HDD, I did some more testing and tried few more tweaks like increasing swap to 2GB. This actually allowed me to launch the web browsers. But media playback did not have much improvement as expected. Anyway I found out some older low-res videos like - up to 480p - played fine.
Anyway with 100MBps unlimited data optical-fiber connection in home, I don't remember the last time I watched a 480p video. So yeah, like my 2 old laptops, the Raspberry Pi is not to be useful for my current activities. But yeah for tinkering work, it's still perfectly capable single board - and very small system.
I wish there was something like it in mobiles world. Because I really need a smaller phone, and smartphones are getting bigger and laptops are getting smaller. In fact I could not find any smartphone with less than 6" screen. Anyway rant over.
So now with the dev work done, the RPi will return to the box of misc. IT hardware. But yeah I can safely say I got my money's worth out of the little fella!! Cheers!
Comments
Post a Comment