MACHINE: rework INITRD configuration
Change-Id: Id5028c42d5add160982b4657b6e486e4510a0f45 Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
This commit is contained in:
parent
197f0c1a3c
commit
5245abf2c7
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -38,9 +38,14 @@ MACHINE_FEATURES = "usbhost usbgadget alsa screen ext2"
|
|||
MACHINE_FEATURES_append = " ${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'optee', '', d)} "
|
||||
MACHINE_FEATURES_append = " tpm2 "
|
||||
|
||||
# Remove autoresize package from DISTRO_EXTRA_RRECOMMENDS to add it explicitly
|
||||
# in our bootfs image instead of rootfs
|
||||
DISTRO_EXTRA_RRECOMMENDS_remove = "${@bb.utils.contains('COMBINED_FEATURES', 'autoresize', '${AUTORESIZE}', '', d)}"
|
||||
# Enable installation of INITRD image on bootfs side
|
||||
MACHINE_FEATURES_append = " initrd "
|
||||
# Remove InitRD package install from DISTRO_EXTRA_RRECOMMENDS to add it explicitly
|
||||
# in our bootfs image (this avoid dependency loops as rootfs depends on bootfs...)
|
||||
DISTRO_EXTRA_RRECOMMENDS_remove = " ${@bb.utils.contains('COMBINED_FEATURES', 'initrd', '${INITRD_PACKAGE}', '', d)} "
|
||||
|
||||
# Configure autoresize for any of the 'ext4' storage devices (through InitRD image)
|
||||
MACHINE_FEATURES_append = " ${@bb.utils.contains_any('BOOTDEVICE_LABELS', ['emmc', 'sdcard'], 'autoresize', '', d)} "
|
||||
|
||||
# Use Little Kernel loader to program storage device
|
||||
MACHINE_FEATURES += "kloader"
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ UBOOT_EXTLINUX_FDTDIR = "/"
|
|||
# Define default boot config for all config
|
||||
UBOOT_EXTLINUX_DEFAULT_LABEL ?= "OpenSTLinux"
|
||||
# Define default INITRD for all configs
|
||||
INITRD_SHORTNAME ??= ""
|
||||
UBOOT_EXTLINUX_INITRD ?= "${@bb.utils.contains('COMBINED_FEATURES', 'autoresize', '/${INITRD_SHORTNAME}', '', d)}"
|
||||
INITRD_IMAGE ??= ""
|
||||
UBOOT_EXTLINUX_INITRD ?= "${@bb.utils.contains('COMBINED_FEATURES', 'initrd', '/${INITRD_IMAGE}', '', d)}"
|
||||
|
||||
UBOOT_EXTLINUX_KERNEL_ARGS ?= "rootwait rw"
|
||||
UBOOT_EXTLINUX_KERNEL_ARGS_append += " ${@bb.utils.contains('ST_DEBUG_TRACE', '1', '', '${ST_CMD_LINE_DEBUG_TRACE}', d)} "
|
||||
|
|
|
|||
|
|
@ -55,8 +55,6 @@ BLUETOOTH_LIST += "linux-firmware-bluetooth-bcm4343"
|
|||
# Wifi
|
||||
WIFI_LIST += "linux-firmware-bcm43430"
|
||||
|
||||
MACHINE_FEATURES += " ${@bb.utils.contains_any('BOOTDEVICE_LABELS', ['emmc', 'sdcard'], 'autoresize', '', d)} "
|
||||
|
||||
# =========================================================================
|
||||
# Kernel
|
||||
# =========================================================================
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ BLUETOOTH_LIST += "linux-firmware-bluetooth-bcm4343"
|
|||
# Wifi
|
||||
WIFI_LIST += "linux-firmware-bcm43430"
|
||||
|
||||
MACHINE_FEATURES += " ${@bb.utils.contains_any('BOOTDEVICE_LABELS', ['emmc', 'sdcard'], 'autoresize', '', d)} "
|
||||
# =========================================================================
|
||||
# Kernel
|
||||
# =========================================================================
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ MACHINE_FEATURES_remove = "fip"
|
|||
# Wifi
|
||||
#WIFI_LIST += "linux-firmware-bcm43430"
|
||||
|
||||
MACHINE_FEATURES += " ${@bb.utils.contains_any('BOOTDEVICE_LABELS', ['emmc', 'sdcard'], 'autoresize', '', d)} "
|
||||
# =========================================================================
|
||||
# Kernel
|
||||
# =========================================================================
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ PACKAGE_INSTALL += " \
|
|||
${@bb.utils.contains('MACHINE_FEATURES', 'splashscreen', 'u-boot-stm32mp-splash', '', d)} \
|
||||
"
|
||||
|
||||
# Add specific autoresize package to bootfs
|
||||
AUTORESIZE ?= ""
|
||||
# Add specific initrd package to bootfs
|
||||
INITRD_PACKAGE ?= ""
|
||||
PACKAGE_INSTALL += " \
|
||||
${@bb.utils.contains('COMBINED_FEATURES', 'autoresize', '${AUTORESIZE}', '', d)} \
|
||||
${@bb.utils.contains('MACHINE_FEATURES', 'initrd', '${INITRD_PACKAGE}', '', d)} \
|
||||
"
|
||||
|
|
|
|||
Loading…
Reference in New Issue