Skip to content

Commit c37adff

Browse files
galaknashif
authored andcommitted
Update go.sh to support building host tools
Add a 'tools' target to go.sh to build host tools from meta-zephyr-sdk. Update .shippable to use go.sh to build the host tools. Signed-off-by: Kumar Gala <[email protected]>
1 parent 53f6716 commit c37adff

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.shippable.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,7 @@ build:
3232
- sudo apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential libtool-bin
3333
- sudo apt-get install -y libreadline-dev gperf flex bison libncurses5-dev texinfo help2man
3434
- unset CC
35-
- >
36-
if [ "${TARGET}" == 'tools' ]; then
37-
./meta-zephyr-sdk/scripts/meta-zephyr-sdk-clone.sh;
38-
./meta-zephyr-sdk/scripts/meta-zephyr-sdk-build-split.sh tools || ./meta-zephyr-sdk/scripts/meta-zephyr-sdk-build-split.sh tools || ./meta-zephyr-sdk/scripts/meta-zephyr-sdk-build-split.sh tools;
39-
mv ./meta-zephyr-sdk/scripts/toolchains/zephyr-sdk-x86_64-hosttools-standalone-0.9.sh .
40-
else
41-
./go.sh ${TARGET};
42-
fi
35+
- ./go.sh ${TARGET}
4336
- >
4437
if [ "$IS_PULL_REQUEST" = "false" ]; then
4538
sudo -E sh -c 'echo "IS_GIT_TAG=${IS_GIT_TAG}" >> $JOB_STATE/sdk.env';

go.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ if [ -z "$TARGETS" ]; then
99
fi
1010
if [ "$TARGETS" == "all" ]; then
1111
TARGETS=$(ls -1 configs/ | sed 's/.config//')
12+
TARGETS=${TARGETS}" tools"
1213
fi
1314

1415
REQUIRED_VERSION=1.23.0
@@ -41,6 +42,14 @@ fi
4142

4243
export SDK_NG_HOME=${PWD}
4344

45+
for t in ${TARGETS}; do
46+
if [ "${t}" = "tools" ]; then
47+
./meta-zephyr-sdk/scripts/meta-zephyr-sdk-clone.sh;
48+
./meta-zephyr-sdk/scripts/meta-zephyr-sdk-build.sh tools || ./meta-zephyr-sdk/scripts/meta-zephyr-sdk-build.sh tools || ./meta-zephyr-sdk/scripts/meta-zephyr-sdk-build.sh tools;
49+
mv ./meta-zephyr-sdk/scripts/toolchains/zephyr-sdk-x86_64-hosttools-standalone-0.9.sh .
50+
fi
51+
done
52+
4453
if [ ! -d "crosstool-ng" ]; then
4554
git clone https://github.com/crosstool-ng/crosstool-ng.git
4655
echo "Patching tree"
@@ -66,6 +75,10 @@ cd build
6675
export CT_PREFIX=`pwd`/output
6776
mkdir -p ${CT_PREFIX}/sources
6877
for t in ${TARGETS}; do
78+
if [ "${t}" = "tools" ]; then
79+
# We handled tools above, so skip it here
80+
continue
81+
fi
6982
if [ ! -f ${GITDIR}/configs/${t}.config ]; then
7083
echo "Target configuration does not exist"
7184
exit 1

0 commit comments

Comments
 (0)