On Mon, Dec 11, 2017 at 3:10 PM, Daniel Kulp <[email protected]> wrote: > > For my application, the space on the eMMC is beginning to get a little > tight. I decided to write a new "flash" script that would flash the eMMC, > but set it up using btrfs with compression for the root. It's a bit tricky > since the uboot stuff doesn't support it so the /boot needs to be ext2/4 and > all the device tree files it needs also needs to be on that partition. > Anyway, I did get it all working. I've attached my script.
btrfs got added in u-boot v2017.11... ;) https://github.com/u-boot/u-boot/commit/0c936ee3194ac5b533a18fcd08e5d285853af5fe#diff-09d710108823b360adf225b17cef57f9 > Basically, it creates a 128MB /boot (/dev/mmcblk1p1) to hold the kernel and > initial filesystem and a /lib/firmware that just houses the various > Beaglebone devicetree files. It then uses the rest of the eMMC > (/dev/mmcblk1p2) as a btrfs filesystem with zlib compression for the flash. > It then rsyncs everything over and creates a new /etc/fstab file, updates > the boot/uEnv.txt to mark the root as btrfs, and builds and copies all the > bb overlay dts things over. For the fstab, I have it mounting with > compression=lzo as the data for my app works very well for that (I need the > extra CPU when loading/saving my files), but you could keep that as zlib as > well. > > For my app, this leaves well over 2GB of free space on the eMMC as compared > to about 500MB before. Performance is about the same. Anyway, I > thought I'd share it with others in case they want to try it out, play with > it, suggest enhancements, etc.... Careful around v4.14.x+ "I" dropped btrfs, it saves a good second or two on bootup, from all the raid6 calculations that are done. (if we could force it to always use one mode, and thus not waste bootup time, i'll gladly reenable it) Regards, -- Robert Nelson https://rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYjWryj16F66Sd7o5Z-Yb-47zFCzj788ApAB2khFgjz46w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
