From ffff37f8f911af44eb18dabb053605fb6badcd1f Mon Sep 17 00:00:00 2001 From: "Brian A. Lloyd" Date: Thu, 24 Jan 2013 14:57:38 -0600 Subject: yocto-bsp: qualify user files with machine name The bblayer abstraction makes it where multiple layers can be configured and used at the same time. Some layers make changes to support a specific machine, and should not have any affect when other machines are in use. For linux-yocto, all bsps are created with a user-config.cfg and user-config.cfg and user-patches.scc. This means that those files will be pulled from the first location found, which might correspond to files customized for a different machine. Instead of using the names user-config.cfg and user-patches.scc, I propose a machine specific name be used such as {{=machine}}user-patches.scc and {{=machine}}user-config.cfg. This would necessitate that all references changed to these new names, which would affect the yocto-bsp and yocto-kernel scripts. With this change, it would be possible to have multiple machine BSPs searched at the same time and to select which to build against by using a command like MACHINE=qmeux86 bitbake core-image-sato to override the default. Note many of the standard BSPs do not seem to suffer this problem as they do not use the common files user-config.cfg and user-patches.scc that the yocto-* scripts depend upon. Additions by Tom Zanussi: - renamed user-config.cfg to {{=machine}}-user-config.cfg everywhere - renamed user-patches.scc to {{=machine}}-user-patches.scc everywhere - added the user-config/patches SRC_URI items to the qemu -rt kernel recipes - fixed conflicts due to the new open_user_file() helper function - updated user filename conflicts caused by directory renaming - updated custom kernel files to match Fixes [YOCTO #3731] (From meta-yocto rev: c20bef60aa8d52971fb061d4b8d473ad19c03180) Signed-off-by: Brian A. Lloyd Signed-off-by: Tom Zanussi Signed-off-by: Richard Purdie --- .../{{ if kernel_choice != \"custom\": }} files/user-config.cfg" | 0 .../{{ if kernel_choice != \"custom\": }} files/user-patches.scc" | 0 .../{{=machine}}-user-config.cfg" | 0 .../{{=machine}}-user-patches.scc" | 0 ...hoice == \"linux-yocto-rt_3.2\": }} linux-yocto-rt_3.2.bbappend" | 6 +++--- ...hoice == \"linux-yocto-rt_3.4\": }} linux-yocto-rt_3.4.bbappend" | 6 +++--- ...rnel_choice == \"linux-yocto_3.2\": }} linux-yocto_3.2.bbappend" | 6 +++--- ...rnel_choice == \"linux-yocto_3.4\": }} linux-yocto_3.4.bbappend" | 6 +++--- 8 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 "scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/user-config.cfg" delete mode 100644 "scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/user-patches.scc" create mode 100644 "scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/{{=machine}}-user-config.cfg" create mode 100644 "scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/{{=machine}}-user-patches.scc" (limited to 'scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel') diff --git "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/user-config.cfg" "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/user-config.cfg" deleted file mode 100644 index e69de29bb2..0000000000 diff --git "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/user-patches.scc" "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/user-patches.scc" deleted file mode 100644 index e69de29bb2..0000000000 diff --git "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/{{=machine}}-user-config.cfg" "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/{{=machine}}-user-config.cfg" new file mode 100644 index 0000000000..e69de29bb2 diff --git "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/{{=machine}}-user-patches.scc" "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice != \"custom\": }} files/{{=machine}}-user-patches.scc" new file mode 100644 index 0000000000..e69de29bb2 diff --git "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto-rt_3.2\": }} linux-yocto-rt_3.2.bbappend" "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto-rt_3.2\": }} linux-yocto-rt_3.2.bbappend" index 8af3549fc5..296eb65f61 100644 --- "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto-rt_3.2\": }} linux-yocto-rt_3.2.bbappend" +++ "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto-rt_3.2\": }} linux-yocto-rt_3.2.bbappend" @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS_prepend_{{=machine}} := "${THISDIR}/files:" PR := "${PR}.1" @@ -27,8 +27,8 @@ KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" SRC_URI += "file://{{=machine}}-preempt-rt.scc \ file://{{=machine}}.scc \ file://{{=machine}}.cfg \ - file://user-config.cfg \ - file://user-patches.scc \ + file://{{=machine}}-user-config.cfg \ + file://{{=machine}}-user-patches.scc \ " # uncomment and replace these SRCREVs with the real commit ids once you've had diff --git "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto-rt_3.4\": }} linux-yocto-rt_3.4.bbappend" "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto-rt_3.4\": }} linux-yocto-rt_3.4.bbappend" index f11bfa5833..1ae5ceee18 100644 --- "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto-rt_3.4\": }} linux-yocto-rt_3.4.bbappend" +++ "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto-rt_3.4\": }} linux-yocto-rt_3.4.bbappend" @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS_prepend_{{=machine}} := "${THISDIR}/files:" PR := "${PR}.1" @@ -27,8 +27,8 @@ KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" SRC_URI += "file://{{=machine}}-preempt-rt.scc \ file://{{=machine}}.scc \ file://{{=machine}}.cfg \ - file://user-config.cfg \ - file://user-patches.scc \ + file://{{=machine}}-user-config.cfg \ + file://{{=machine}}-user-patches.scc \ " # uncomment and replace these SRCREVs with the real commit ids once you've had diff --git "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto_3.2\": }} linux-yocto_3.2.bbappend" "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto_3.2\": }} linux-yocto_3.2.bbappend" index c617070b46..277aa9e780 100644 --- "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto_3.2\": }} linux-yocto_3.2.bbappend" +++ "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto_3.2\": }} linux-yocto_3.2.bbappend" @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS_prepend_{{=machine}} := "${THISDIR}/files:" PR := "${PR}.1" @@ -27,8 +27,8 @@ KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" SRC_URI += "file://{{=machine}}-standard.scc \ file://{{=machine}}.scc \ file://{{=machine}}.cfg \ - file://user-config.cfg \ - file://user-patches.scc \ + file://{{=machine}}-user-config.cfg \ + file://{{=machine}}-user-patches.scc \ " # uncomment and replace these SRCREVs with the real commit ids once you've had diff --git "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto_3.4\": }} linux-yocto_3.4.bbappend" "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto_3.4\": }} linux-yocto_3.4.bbappend" index 5b20babe77..07aa9d1e8b 100644 --- "a/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto_3.4\": }} linux-yocto_3.4.bbappend" +++ "b/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/{{ if kernel_choice == \"linux-yocto_3.4\": }} linux-yocto_3.4.bbappend" @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS_prepend_{{=machine}} := "${THISDIR}/files:" PR := "${PR}.1" @@ -27,8 +27,8 @@ KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc" SRC_URI += "file://{{=machine}}-standard.scc \ file://{{=machine}}.scc \ file://{{=machine}}.cfg \ - file://user-config.cfg \ - file://user-patches.scc \ + file://{{=machine}}-user-config.cfg \ + file://{{=machine}}-user-patches.scc \ " # uncomment and replace these SRCREVs with the real commit ids once you've had -- cgit v1.2.3-54-g00ecf