Re: build a custom installation image for ARM RBPI

From: Karl Denninger <karl_at_denninger.net>
Date: Tue, 21 Sep 2021 14:32:30 UTC
On 9/21/2021 10:18, Stefan Parvu wrote:
> Hi,
>
> I have a RBPI 3B+ running FreeBSD 13 RELEASE. On top of this I have added some software
> and configurations we are developing for FreeBSD to capture data from different industrial devices.
>
> Now, I would like to take and package this installation, like a ready image which I can burn to
> a new MicroSD and boot another system off. And that means it should be small in size, as the original
> ARM64 FreeBSD Raspberry PI image.
>
> I had a look to release.sh under /usr/src/release but this means I should rebuild the kernel and userland
> , right? I dont want to do that.
>
> Is there anything simpler, to take for example a 32GB FreeBSD 13 vanilla + sfw installation and make it
> like a generic image for RBPI3B+?
>
> Thanks,
> Stefan

I would strongly recommend looking into Crochet for this purpose; it is 
what I use for similar applications.

You /can /do it with the base "nanobsd" tools in the source distribution 
but Crochet is IMHO the better environment for the Pi series.  You 
definitely want, in such an environment, a "runs with everything mounted 
r/o EXCEPT volatile data which is on ramdisk or similar" as there is 
severe risk of unbootable damage to SD cards if you take an unsolicited 
power loss.

I've been doing this for several years now and while there are some 
quirks with Crochet on the RPI3 series at the moment due to unfortunate 
issues with both the loader and the u-boot package both are things you 
can work around and, at least for u-boot, you have to no matter how you 
decide to build the image.

Right now my embedded stuff is on 12.2 but I am looking at moving it to 
13.x, probably after 13.1 drops.

Straight "nanobsd" works just fine for the AMD-based pcEngines boards; I 
have a bunch of those out in the field and they can properly exploit the 
dual-partition property which is nice as it means they can be updated 
"in place" and then rebooted into the update without doing anything 
particularly fiddly.

-- 
Karl Denninger
karl@denninger.net <mailto:karl@denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/