>From 92bc2f0a25336245cd7d07f80ea7c24e07d6a5c6 Mon Sep 17 00:00:00 2001
From: fvo <[email protected]>
Date: Tue, 10 Dec 2019 09:41:10 +0100
Subject: [PATCH] kernel recipes: reorder merge_delta_config task

I've tried build linux-variscite where the maintainers seem to have
copied the 'merge_delta_config' task from the linux-qoriq recipe from
meta-freescale.

When i tried to use that task to add some linux kernel config flags it
did not work. It seems like the 'do_preconfigure' task inherited by the
'fsl-kernel-localversion' class deletes all content of the '.config'
file AFTER it has been merged by the 'merge_delta_config' task.

I reordered the tasks so that merge_delta_config is run after
preconfigure:

addtask merge_delta_config before do_configure after do_patch
do_preconfigure

which solved the problem for me. The flags were then added and compiled
into the kernel.
---
 recipes-kernel/linux/linux-qoriq-rt_4.14.bb | 4 ++--
 recipes-kernel/linux/linux-qoriq_4.14.bb    | 2 +-
 recipes-kernel/linux/linux-qoriq_4.19.bb    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/recipes-kernel/linux/linux-qoriq-rt_4.14.bb b/recipes-kernel/linux/linux-qoriq-rt_4.14.bb
index e880081..5a1147e 100644
--- a/recipes-kernel/linux/linux-qoriq-rt_4.14.bb
+++ b/recipes-kernel/linux/linux-qoriq-rt_4.14.bb
@@ -37,7 +37,7 @@ do_merge_delta_config[dirs] = "${B}"
 do_merge_delta_config() {
     # create config with make config
     oe_runmake  -C ${S} O=${B} ${KERNEL_DEFCONFIG}
-    
+
     # check if bigendian is enabled
     if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
         echo "CONFIG_CPU_BIG_ENDIAN=y" >> .config
@@ -56,7 +56,7 @@ do_merge_delta_config() {
     done
     cp .config ${WORKDIR}/defconfig
 }
-addtask merge_delta_config before do_preconfigure after do_patch
+addtask merge_delta_config before do_configure after do_patch do_preconfigure
 
 # The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b)
 do_compile_prepend_fsl-lsch2-32b() {
diff --git a/recipes-kernel/linux/linux-qoriq_4.14.bb b/recipes-kernel/linux/linux-qoriq_4.14.bb
index f2e0a4b..8a28918 100644
--- a/recipes-kernel/linux/linux-qoriq_4.14.bb
+++ b/recipes-kernel/linux/linux-qoriq_4.14.bb
@@ -56,7 +56,7 @@ do_merge_delta_config() {
     done
     cp .config ${WORKDIR}/defconfig
 }
-addtask merge_delta_config before do_preconfigure after do_patch
+addtask merge_delta_config before do_configure after do_patch do_preconfigure
 
 # The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b)
 do_compile_prepend_fsl-lsch2-32b() {
diff --git a/recipes-kernel/linux/linux-qoriq_4.19.bb b/recipes-kernel/linux/linux-qoriq_4.19.bb
index aed29df..7812535 100644
--- a/recipes-kernel/linux/linux-qoriq_4.19.bb
+++ b/recipes-kernel/linux/linux-qoriq_4.19.bb
@@ -57,7 +57,7 @@ do_merge_delta_config() {
     done
     cp .config ${WORKDIR}/defconfig
 }
-addtask merge_delta_config before do_preconfigure after do_patch
+addtask merge_delta_config before do_configure after do_patch do_preconfigure
 
 # The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b)
 do_compile_prepend_fsl-lsch2-32b() {
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#24154): 
https://lists.yoctoproject.org/g/meta-freescale/message/24154
Mute This Topic: https://lists.yoctoproject.org/mt/67968134/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-freescale/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to