cdsteinkuehler / br2rauc

Buildroot + RAUC
Other
52 stars 18 forks source link

rauc install http://* doesn't work #18

Closed colin-foster-in-advantage closed 2 years ago

colin-foster-in-advantage commented 2 years ago

At least for the Pi B branch I recently worked on, the bundle size is pretty huge (~50MB due to all the modules) and the default max bundle size for rauc is 8MB to pull over http.

I added max-bundle-download-size=104857600 to my rauc config and was able to run rauc install http://my-ip/rootfs.raucb without issue.

I assume this is an issue for the other boards as well.

cdsteinkuehler commented 2 years ago

This is essentially "as designed". The update process is one of the things that is likely to be specific to a particular platform or product depending on available resources (network, storage, display, keyboard, etc), some, all, or none of which might be present.

My intention with the setup of the br2rauc examples is the upload partition is a temporary storage location that can be used for performing firmware updates (if you aren't just directly connecting a USB flash disk or other storage device that holds the update bundle) but it's up to the user to figure out what makes sense for actual delivery and installation of updates. Note that I believe if you simply increase the download size as you have done the download will be stored in /tmp which is a ramdisk.

The "real" system I'm building based on br2rauc supports a webui to upload/install firmware updates (using the upload partition for storage) as well as a button combination held on power-up which will automatically scan attached block devices and install the first valid (signed) update bundle targeting the proper RAUC compatible= system.

colin-foster-in-advantage commented 2 years ago

Fair point. And I suppose anyone who is poking around this repository is savvy enough to be able to figure it out. I was a bit surprised to learn the only way to update by default was to copy the raucb to the SD card directly before running install. But I suppose that's implied by the TODOs in the documentation.

Anyway, thanks for all the heavy lifting on this project! It helped me get up and running pretty quickly. If I get other hardware up and running (Beaglebone, for example) I'll be sure to send more PRs

cdsteinkuehler commented 2 years ago

You don't necessarily have to copy the update to the SD card before install. As mentioned, you can connect a storage device (eg: USB flash drive or similar) and I believe RAUC has support for network block devices and http-streaming which I believe eliminates the need for a local copy. https://rauc.readthedocs.io/en/latest/advanced.html#http-streaming

The casync technology also looks very interesting.

My particular use case does not require updates via the network, so I haven't really looked into them. If you get something working and need to make any changes to the basic RAUC setup (eg: perhaps adding --enable-streaming when building?) let me know.

jluebbe commented 1 year ago

Yes, streaming would avoid the need for downloading the bundle before installation. Configuring with --enable-streaming and the necessary kernel features will still support the existing workflows.