Mail archive

[alpine-user] What is the best install type for embedded projects on the Raspberry Pi Zero?

From: East <>
Date: Sun, 19 May 2019 11:54:20 +0000


I am working on a project that I want to use Alpine as the base for, however I am running into problems with resource usage. Specifically, I have limited constraints on RAM. Normally, a diskless install just loads everything into memory. Now, that may work for some platforms, but I only have 512MB of RAM, and I need to install relatively large dependencies and an X server. 512MB goes by fast.

Normally, I would just do a sys install. The problem is, this is complicated on the Pi 1/Zero. From [here](

"Beware, though, that the contents of /boot will be ignored when the Pi boots: it will use the kernel, initramfs, and modloop images from the FAT32 boot partition. To update the kernel, initfs or modules, you will need to manually (generate and) copy these to the boot partition or you could use bind mount so that manually copy the files to boot partition is not needed."

I am dealing with relatively low level stuff, and while I can't be sure, having the kernel and other core components not existing on the same partition as the rest of the filesystem is likely to cause problems. For example: how do I enable I2C with a setup like that? IIRC that requires a kernel module to be enabled, and if the wiki is to be believed, then that means I have to copy over files to the FAT32 partition if I do that. It just seems messy, and that is a headache I would like to avoid. It also throws a wrench into the works when--once I finally have a way to build the images that I will ship--this kludgy method randomly breaks.

Maybe I am misunderstanding this. Nonetheless:

How exactly does diskless mode work? I know that it loads everything into RAM, but if I create an APKOVL and then use it to store state, that loads everything into RAM on boot, right? Is there a way to reduce the RAM footprint by only loading the Alpine base into RAM, while storing the contents of the APKOVL on disk? If so, that is the most convenient solution.

Is there a better way to handle a sys install on RPi Zero than is documented in the wiki?

Is there a better way to achieve this, period?

Received on Sun May 19 2019 - 11:54:20 UTC