diff options
author | Qi.Chen@windriver.com <Qi.Chen@windriver.com> | 2015-09-07 13:42:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-09 14:27:43 +0100 |
commit | ad959638c0def49661d87fe5b7435cebe63897b9 (patch) | |
tree | 61068cc810cbaa474c1c691c7df87684d7881208 | |
parent | 9f670d18ba5e8e8d75ceca3ab1709d5ba4a5adb3 (diff) | |
download | poky-ad959638c0def49661d87fe5b7435cebe63897b9.tar.gz |
Extensible SDK: allow for installation without preparing build system
When publishing SDK, what we want is basically its metadata and sstate
cache objects. We don't want the SDK to be prepared with running bitbake
as it takes time which reproduces meaningless output for the published SDK.
So this patch adds an option to allow for SDK to be extracted without
preparing the build system.
(From OE-Core rev: 7511862faad1c28804e2410ff42747c8706c5207)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 12 | ||||
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 7 |
2 files changed, 13 insertions, 6 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index fc2d96f855..0b012ebfc2 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -228,11 +228,13 @@ sdk_ext_postinst() { | |||
228 | # For now this is where uninative.bbclass expects the tarball | 228 | # For now this is where uninative.bbclass expects the tarball |
229 | mv *-nativesdk-libc.tar.* $target_sdk_dir/`dirname ${oe_init_build_env_path}` | 229 | mv *-nativesdk-libc.tar.* $target_sdk_dir/`dirname ${oe_init_build_env_path}` |
230 | 230 | ||
231 | printf "Preparing build system...\n" | 231 | if [ "$prepare_buildsystem" != "no" ]; then |
232 | # dash which is /bin/sh on Ubuntu will not preserve the | 232 | printf "Preparing build system...\n" |
233 | # current working directory when first ran, nor will it set $1 when | 233 | # dash which is /bin/sh on Ubuntu will not preserve the |
234 | # sourcing a script. That is why this has to look so ugly. | 234 | # current working directory when first ran, nor will it set $1 when |
235 | sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && bitbake ${SDK_TARGETS} >> preparing_build_system.log" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; } | 235 | # sourcing a script. That is why this has to look so ugly. |
236 | sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && bitbake ${SDK_TARGETS} >> preparing_build_system.log" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; } | ||
237 | fi | ||
236 | echo done | 238 | echo done |
237 | } | 239 | } |
238 | 240 | ||
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh index 3624940430..cd0a547f86 100644 --- a/meta/files/toolchain-shar-extract.sh +++ b/meta/files/toolchain-shar-extract.sh | |||
@@ -32,7 +32,7 @@ answer="" | |||
32 | relocate=1 | 32 | relocate=1 |
33 | savescripts=0 | 33 | savescripts=0 |
34 | verbose=0 | 34 | verbose=0 |
35 | while getopts ":yd:DRS" OPT; do | 35 | while getopts ":yd:nDRS" OPT; do |
36 | case $OPT in | 36 | case $OPT in |
37 | y) | 37 | y) |
38 | answer="Y" | 38 | answer="Y" |
@@ -40,6 +40,9 @@ while getopts ":yd:DRS" OPT; do | |||
40 | d) | 40 | d) |
41 | target_sdk_dir=$OPTARG | 41 | target_sdk_dir=$OPTARG |
42 | ;; | 42 | ;; |
43 | n) | ||
44 | prepare_buildsystem="no" | ||
45 | ;; | ||
43 | D) | 46 | D) |
44 | verbose=1 | 47 | verbose=1 |
45 | ;; | 48 | ;; |
@@ -54,6 +57,8 @@ while getopts ":yd:DRS" OPT; do | |||
54 | echo "Usage: $(basename $0) [-y] [-d <dir>]" | 57 | echo "Usage: $(basename $0) [-y] [-d <dir>]" |
55 | echo " -y Automatic yes to all prompts" | 58 | echo " -y Automatic yes to all prompts" |
56 | echo " -d <dir> Install the SDK to <dir>" | 59 | echo " -d <dir> Install the SDK to <dir>" |
60 | echo "======== Extensible SDK only options ============" | ||
61 | echo " -n Do not prepare the build system" | ||
57 | echo "======== Advanced DEBUGGING ONLY OPTIONS ========" | 62 | echo "======== Advanced DEBUGGING ONLY OPTIONS ========" |
58 | echo " -S Save relocation scripts" | 63 | echo " -S Save relocation scripts" |
59 | echo " -R Do not relocate executables" | 64 | echo " -R Do not relocate executables" |