Re: How can I create a truly minimal distribution that runs entirely from RAM?


BBB example:

The line:
DISTRO_FEATURES_append = " ram"

Should be:
DISTRO_FEATURES_append = " nfs"

BSP Traces for BBB (YOCTO Warrior):

And the ash script in the U-Boot supporting above written:

Line 3 to 10.

Please, pay attention to line 1 as well!


On Thu, Mar 11, 2021 at 12:32 AM p32 via
<> wrote:

Hello everyone,

I am currently using this Yocto-based build setup provided by NXP to create a custom Linux distribution for one of the i.MX boards. My custom image is based on the core-image-minimal recipe and works fine, i.e., runs on the platform as expected. However, I have to following two issues:

Although core-image-minimal is documented as "A small image just capable of allowing a device to boot", I can tell from the running system that it contains a huge number of components that I think are not be strictly necessary to boot the device. For instance, the boot log contains entries about an FPGA manager framework, Bluetooth, Ethernet, KVM, USB, and a lot of i.MX-specific modules such as for DMA or power management. For evaluation purposes, I want to get rid of all of these and end up with a truly minimal Linux system that is able to boot, schedule its tasks, and to communicate via UART. How can I achieve this without losing the i.MX support, i.e., the generation of a bootloader and suitable device tree files?

Furthermore, I would like the minimal system to run entirely from RAM. More specifically: After being started from the SD card, U-Boot should start the Linux distribution via initramfs. I am able to generate some kind of initramfs binary using the following changes:
# local.conf
INITRAMFS_IMAGE = "recipe-name"

However, this does not affect the generated U-Boot, which means that U-Boot still tries to boot from an SD card partition. What is the "right way" to make use of the Image-initramfs-board.bin or the image-board.cpio.gz files that Yocto creates in this case?

Any help yould be greatly appreciated.

Kind regards!

Join { to automatically receive all group messages.