linux-dey: ccmp1: rework defconfig logic to avoid using defualt defconfig

Commit d3f3cfdb62 removed the inclusion of STM's
linux-stm32mp.inc from meta-st-stm32mp in our linux-dey recipe, but this
inadvertently removed the logic in do_configure() necessary to use our custom
ccmp1_defconfig. Since this commit, the kernel was being built with the default
ARM defconfig, which is very different from our custom defconfig and doesn't
even boot on MP1 platforms.

Rework the logic used to copy our platform's defconfigs to prevent this.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2023-12-13 16:14:39 +01:00
parent aa2480d1de
commit bfbe078a3f
3 changed files with 9 additions and 5 deletions

View File

@ -112,8 +112,7 @@ OPTEE_CONF = "ccmp13-dvk"
KERNEL_IMAGETYPE = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'fitImage', 'zImage', d)}" KERNEL_IMAGETYPE = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'fitImage', 'zImage', d)}"
KERNEL_CLASSES = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'kernel-fitimage', 'kernel-uimage', d)}" KERNEL_CLASSES = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'kernel-fitimage', 'kernel-uimage', d)}"
KERNEL_ALT_IMAGETYPE = "Image vmlinux" KERNEL_ALT_IMAGETYPE = "Image vmlinux"
KERNEL_DEFCONFIG ?= "ccmp1_defconfig" KERNEL_DEFCONFIG ?= "arch/arm/configs/ccmp1_defconfig"
KERNEL_EXTERNAL_DEFCONFIG ?= "defconfig"
# ========================================================================= # =========================================================================
# DEY settings # DEY settings

View File

@ -120,8 +120,7 @@ OPTEE_CONF = "ccmp15-dvk"
KERNEL_IMAGETYPE = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'fitImage', 'zImage', d)}" KERNEL_IMAGETYPE = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'fitImage', 'zImage', d)}"
KERNEL_CLASSES = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'kernel-fitimage', 'kernel-uimage', d)}" KERNEL_CLASSES = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'kernel-fitimage', 'kernel-uimage', d)}"
KERNEL_ALT_IMAGETYPE = "Image vmlinux" KERNEL_ALT_IMAGETYPE = "Image vmlinux"
KERNEL_DEFCONFIG ?= "ccmp1_defconfig" KERNEL_DEFCONFIG ?= "arch/arm/configs/ccmp1_defconfig"
KERNEL_EXTERNAL_DEFCONFIG ?= "defconfig"
# ========================================================================= # =========================================================================
# DEY settings # DEY settings

View File

@ -46,7 +46,13 @@ do_copy_defconfig () {
cp -f ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig cp -f ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
fi fi
} }
addtask copy_defconfig after do_patch before do_kernel_localversion
python () {
if d.getVar('DEY_SOC_VENDOR') == "STM":
bb.build.addtask('copy_defconfig', 'do_configure', 'do_patch', d)
elif d.getVar('DEY_SOC_VENDOR') == "NXP":
bb.build.addtask('copy_defconfig', 'do_kernel_localversion', 'do_patch', d)
}
# This is needed because kernel_localversion (in fsl-kernel-localversion.bbclass) # This is needed because kernel_localversion (in fsl-kernel-localversion.bbclass)
# creates a basic ${B}/.config file and because that file exists, kernel_do_configure # creates a basic ${B}/.config file and because that file exists, kernel_do_configure