mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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. (From OE-Core rev: b0ac481dda99d8f4be8015964fcb2cb01afce08c) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
463c9f4d3a
commit
3b19f90bdf
@@ -18,7 +18,7 @@
|
||||
# an hdd)
|
||||
|
||||
# External variables (also used by syslinux.bbclass)
|
||||
# ${INITRD} - indicates a filesystem image to use as an initrd (optional)
|
||||
# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
|
||||
# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
|
||||
# ${NOISO} - skip building the ISO image if set to 1
|
||||
# ${NOHDD} - skip building the HDD image if set to 1
|
||||
@@ -67,9 +67,17 @@ 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 [ -s "${fs}" ]; then
|
||||
cat ${fs} >> ${DEST}/initrd
|
||||
fi
|
||||
done
|
||||
chmod 0644 ${DEST}/initrd
|
||||
fi
|
||||
|
||||
if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
|
||||
@@ -80,10 +88,19 @@ populate() {
|
||||
|
||||
build_iso() {
|
||||
# Only create an ISO if we have an INITRD and NOISO was not set
|
||||
if [ -z "${INITRD}" ] || [ ! -s "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
|
||||
if [ -z "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
|
||||
bbnote "ISO image will not be created."
|
||||
return
|
||||
fi
|
||||
# ${INITRD} is a list of multiple filesystem images
|
||||
for fs in ${INITRD}
|
||||
do
|
||||
if [ ! -s "${fs}" ]; then
|
||||
bbnote "ISO image will not be created. ${fs} is invalid."
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
populate ${ISODIR}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user