[PATCH] populate_sdk_base.bbclass: make failure to find ld-linux.so a hard error

Subsystems: the rest

STALE5062d

2 messages, 1 author, 2012-12-01 · open the first message on its own page

[PATCH] populate_sdk_base.bbclass: make failure to find ld-linux.so a hard error

From: Jason Wessel <jason.wessel@windriver.com>
Date: 2012-11-30 20:14:33

The shell archive that populates the external SDK should fail if it
cannot find the ld-linux.so else it will corrupt all binaries because
a random path will be used from the list of executables when dl_path
is empty.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 meta/classes/populate_sdk_base.bbclass |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index ac34c32..73bd44d 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -176,6 +176,10 @@ done
 # fix dynamic loader paths in all ELF SDK binaries
 native_sysroot=$(cat $env_setup_script |grep OECORE_NATIVE_SYSROOT|cut -d'=' -f2|tr -d '"')
 dl_path=$(find $native_sysroot/lib -name "ld-linux*")
+if [ "$dl_path" = "" ] ; then
+	echo "SDK could not be set up. Relocate script to find ld-linux.so. Abort!"
+	exit 1
+fi
 executable_files=$(find $native_sysroot -type f -perm +111)
 ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files
 if [ $? -ne 0 ]; then
-- 
1.7.1


Re: [PATCH] populate_sdk_base.bbclass: make failure to find ld-linux.so a hard error

From: Jason Wessel <jason.wessel@windriver.com>
Date: 2012-12-01 00:14:23

On 11/30/2012 01:34 PM, Jason Wessel wrote:
quoted hunk
The shell archive that populates the external SDK should fail if it
cannot find the ld-linux.so else it will corrupt all binaries because
a random path will be used from the list of executables when dl_path
is empty.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
meta/classes/populate_sdk_base.bbclass | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index ac34c32..73bd44d 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -176,6 +176,10 @@ done
# fix dynamic loader paths in all ELF SDK binaries
native_sysroot=$(cat $env_setup_script |grep OECORE_NATIVE_SYSROOT|cut -d'=' -f2|tr -d '"')
dl_path=$(find $native_sysroot/lib -name "ld-linux*")
+if [ "$dl_path" = "" ] ; then
+ echo "SDK could not be set up. Relocate script to find ld-linux.so. Abort!"
Ooops   Should be.

+    echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!"


+ exit 1
+fi
executable_files=$(find $native_sysroot -type f -perm +111)
${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files
if [ $? -ne 0 ]; then

Jason.


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help