kernel-yocto: relax BSP definition test
PATCH 1/1 kernel-yocto: relax BSP definition test
commit 44aea7b873 [kernel-yocto: ensure that only valid BSPs are built] introduced a new check to ensure that a valid BSP definition was found, rather than building something that 'closely' matched the current MACHINE.
This check breaks valid configurations which do not have a bsp definition but are otherwise completely configured machines.
To allow both elements to co-exist (and not add warnings or errors to otherwise valid builds), we first check to see if an empty bsp definition was found, but then check to see if a defconfig was provided.
If a defconfig has been provided, that is a sign that the board configuration is complete and we should continue the build without otherwise bothering the user.
Tested on meta-raspberrypi and linux-yocto*
--- meta/classes/kernel-yocto.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/classes/kernel-yocto.bbclass +5 -2
@@ -143,8 +143,11 @@ do_kernel_metadata() { # expand kernel features into their full path equivalents bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE}) - if [ $? -ne 0 ] || [ -z "${bsp_definition}" ]; then - bbfatal_log "Could not locate BSP definiton for ${KMACHINE}/${LINUX_KERNEL_TYPE}." + if [ -z "$bsp_definition" ]; then + echo -q "$sccs" | grep defconfig + if [ $? -ne 0 ]; then + bberror "Could not locate BSP definition for ${KMACHINE}/${LINUX_KERNEL_TYPE} and no defconfig was provided" + fi fi meta_dir=$(kgit --meta)
Signature · 1 line
2.5.0
Quoted 29 lines · Bruce Ashfield
commit
44aea7b873[kernel-yocto: ensure that only valid BSPs are built] introduced a new check to ensure that a valid BSP definition was found, rather than building something that 'closely' matched the current MACHINE.This check breaks valid configurations which do not have a bsp definition but are otherwise completely configured machines.
To allow both elements to co-exist (and not add warnings or errors to otherwise valid builds), we first check to see if an empty bsp definition was found, but then check to see if a defconfig was provided.
If a defconfig has been provided, that is a sign that the board configuration is complete and we should continue the build without otherwise bothering the user.
Tested on meta-raspberrypi and linux-yocto*
Signed-off-by Bruce Ashfield <[email protected]>--- meta/classes/kernel-yocto.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)meta/classes/kernel-yocto.bbclass +0
-0
meta/classes/kernel-yocto.bbclass do_kernel_metadata() { · line 147
Quoted 7 lines
meta/classes/kernel-yocto.bbclass +2
-2@@ -143,8 +143,11 @@ do_kernel_metadata() { # expand kernel features into their full path equivalents bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE}) - if [ $? -ne 0 ] || [ -z "${bsp_definition}" ]; then - bbfatal_log "Could not locate BSP definiton for ${KMACHINE}/${LINUX_KERNEL_TYPE}." + if [ -z "$bsp_definition" ]; then + echo -q "$sccs" | grep defconfig
echo -q ?
Quoted 14 lines
meta/classes/kernel-yocto.bbclass +3
-1+ if [ $? -ne 0 ]; then + bberror "Could not locate BSP definition for ${KMACHINE}/${LINUX_KERNEL_TYPE} and no defconfig was provided" + fi fi meta_dir=$(kgit --meta) --2.5.0
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 32 lines · Andre McCurdy
Quoted 30 lines · Bruce Ashfield
commit
44aea7b873[kernel-yocto: ensure that only valid BSPs are built] introduced a new check to ensure that a valid BSP definition was found, rather than building something that 'closely' matched the current MACHINE.This check breaks valid configurations which do not have a bsp definition but are otherwise completely configured machines.
To allow both elements to co-exist (and not add warnings or errors to otherwise valid builds), we first check to see if an empty bsp definition was found, but then check to see if a defconfig was provided.
If a defconfig has been provided, that is a sign that the board configuration is complete and we should continue the build without otherwise bothering the user.
Tested on meta-raspberrypi and linux-yocto*
Signed-off-by Bruce Ashfield <[email protected]>--- meta/classes/kernel-yocto.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)meta/classes/kernel-yocto.bbclass +0
-0@@ -143,8 +143,11 @@ do_kernel_metadata() {
Quoted 8 lines
meta/classes/kernel-yocto.bbclass do_kernel_metadata() { · line 147
Quoted 6 lines
meta/classes/kernel-yocto.bbclass +2
-2# expand kernel features into their full path equivalents bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE}) - if [ $? -ne 0 ] || [ -z "${bsp_definition}" ]; then - bbfatal_log "Could not locate BSP definiton for ${KMACHINE}/${LINUX_KERNEL_TYPE}." + if [ -z "$bsp_definition" ]; then + echo -q "$sccs" | grep defconfigecho -q ?
gah!
v2 coming. that should be grep -q ...
Thanks for catching that :D
Bruce
Quoted 15 lines
Quoted 15 lines
meta/classes/kernel-yocto.bbclass +3
-1+ if [ $? -ne 0 ]; then + bberror "Could not locate BSP definition for ${KMACHINE}/${LINUX_KERNEL_TYPE} and no defconfig was provided" + fi fi meta_dir=$(kgit --meta) --2.5.0
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core