I recently picked up a BPI-R3 Mini to have a travel size router device. I’d like to change up a bit how the partitions are laid out and was seeking some advice on doing so.
I’ve ported my project Tomato64 to run on this device and it seems to be working very well. I’ve just copied the way OpenWrt does things, so I have the kernel, dtb, and squashfs image rolled into an sysupgrade.itb file that I then flash to the device instead of the OpenWrt image. I also am using an overlay with f2fs, just straight ripoff of OpenWrt. My final image build script is here.
Before the BPI-R3 Mini I had ported my project to the GL-MT6000. Once again I just observed what OpenWrt was doing and did the same. But in the case of this other router it’s done a little differently. The kernel and the dtb are stored on one partition while the OS filesystem is on another partition. OpenWrt still may use squashfs but in my case I use an ext4 file system.
I really like the way this layout it done because I prefer to have ext4 instead of an overlay which can conflict with docker. I also like how the ext4 is its own partition, where f2fs sort of shares the same partition as the squashfs image.
My project isn’t sysupgrade aware, but on the GL-MT6000 I can update the kernel by dd’ing the appropriate partition while the system is still running. On the BPI-R3 Mini where the kernel, dtb, and squashfs all live on the same active partition, it’s probably not a good idea and I doubt would work, didn’t actually attempt tbh.
Looking through the database of Filogic 830 devices there are many that seem to support the sysupgrade.bin method, as opposed to the sysupgrade.itb in the BPI-R3 Mini. I’d don’t think I’d have a problem creating the appropriate framework of partitions, creating a kernel+tdb image file and an ext4 rootfs, but I’m not sure what it would entail to tell the system to use a rootfs on say mmcblk0p6. Is this just a kernel change, a change to the dts file, or a u-boot change?
Also I have no idea how the hex values that are used when runing mkits.sh and mkimage are derived, but seem important. I also wish OpenWrt page on the BPI-R3 Mini wasn’t so scant, but this site does have some great resources as well. I’ll likely be working on a port to one of the R4 boards, but I haven’t even looked to see how those images are set up.
thanks! tldr, I need advice to move to an ext4 filesystem on separate partition.