From b0ac481dda99d8f4be8015964fcb2cb01afce08c Mon Sep 17 00:00:00 2001 From: Nitin A Kamble Date: Tue, 29 Jul 2014 11:34:45 -0700 Subject: INITRD var: make it a list of filesystem images The initrd image used by the Linux kernel is list of file system images concatenated together and presented as a single initrd file at boot time. So far the initrd is a single filesystem image. But in cases like to support early microcode loading, the initrd image need to have multiple filesystem images concatenated together. This commit is extending the INITRD variable from a single filesystem image to a list of filesystem images to satisfy the need mentioned above. Signed-off-by: Nitin A Kamble Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/classes/boot-directdisk.bbclass | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'meta/classes/boot-directdisk.bbclass') diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass index 0da9932f4f..995d3e7fc6 100644 --- a/meta/classes/boot-directdisk.bbclass +++ b/meta/classes/boot-directdisk.bbclass @@ -71,10 +71,17 @@ boot_direct_populate() { # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use. install -m 0644 ${STAGING_KERNEL_DIR}/bzImage $dest/vmlinuz - if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then - install -m 0644 ${INITRD} $dest/initrd + # initrd is made of concatenation of multiple filesystem images + if [ -n "${INITRD}" ]; then + rm -f $dest/initrd + for fs in ${INITRD} + do + if [ -n "${fs}" ] && [ -s "${fs}" ]; then + cat ${fs} >> $dest/initrd + fi + done + chmod 0644 $dest/initrd fi - } build_boot_dd() { -- cgit v1.2.3