MACHINE: rework INITRD configuration

Change-Id: Id5028c42d5add160982b4657b6e486e4510a0f45
Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
This commit is contained in:
Romuald JEANNE authored and Lionel VITTE committed 2021-11-16 17:56:04 +01:00
1 parent 197f0c1a3c
commit 5245abf2c7
8 files changed
+17 -16

No files matched your search

+2 -2
View File
@@ -168,7 +168,7 @@ python __anonymous () {
# Init RAMFS image if any
initramfs = d.getVar('INITRAMFS_IMAGE') or ""
# Init INITRD image if any
initrd = d.getVar('INITRD_IMAGE') or ""
initrd = d.getVar('INITRD_IMAGE_ALL') or d.getVar('INITRD_IMAGE') or ""
# Init partition list from PARTITIONS_CONFIG
image_partitions = []
# Append image_partitions list with all configured partition images:
@@ -193,7 +193,7 @@ python __anonymous () {
break
# We need to clearly identify ROOTFS build, not InitRAMFS/initRD one (if any), not partition one either
if current_image_name not in image_partitions and current_image_name != initramfs and current_image_name != initrd:
if current_image_name not in image_partitions and current_image_name != initramfs and current_image_name not in initrd:
# We add the flashlayout file creation task just after the do_image_complete for ROOTFS build
bb.build.addtask('do_create_flashlayout_config', 'do_build', 'do_image_complete', d)
# We add also the function that feeds the FLASHLAYOUT_PARTITION_* vars from PARTITIONS_CONFIG
+2 -2
View File
@@ -108,11 +108,11 @@ python __anonymous () {
# Init RAMFS image if any
initramfs = d.getVar('INITRAMFS_IMAGE') or ""
# Init INITRD image if any
initrd = d.getVar('INITRD_IMAGE') or ""
initrd = d.getVar('INITRD_IMAGE_ALL') or d.getVar('INITRD_IMAGE') or ""
# We need to append partition images generation only to image
# that are not one of the defined partitions and not the InitRAMFS image.
# Without this check we would create circular dependency
if current_image_name not in image_partitions and current_image_name != initramfs and current_image_name != initrd:
if current_image_name not in image_partitions and current_image_name != initramfs and current_image_name not in initrd:
for partition in image_partitions:
bb.debug(1, "Appending %s image build to 'do_image' depends tasks." % partition)
# We need to make sure the manifest file is deployed as we need it for 'image_rootfs_image_clean_task'