Skip to content

Commit 2d0e6e8

Browse files
committed
go.sh: Handle creating toolchain tarballs
Create the toolchain tarballs in go.sh. Also rename build.log so its unique and easy to find. Signed-off-by: Kumar Gala <[email protected]>
1 parent e012106 commit 2d0e6e8

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

go.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,27 @@ for t in ${TARGETS}; do
131131
mkdir -p ${TARGET_BUILD_DIR}
132132
pushd ${TARGET_BUILD_DIR}
133133

134+
export CT_PREFIX=${OUTPUT_DIR}
135+
TARGET_DIR=""
134136
case "${t}" in
135137
xtensa_*)
136138
cp -a ${GITDIR}/overlays ${TARGET_BUILD_DIR}
137-
export CT_PREFIX=${OUTPUT_DIR}/xtensa/${t#xtensa_}
139+
TRIPLET=xtensa-zephyr-elf
140+
TARGET_DIR="xtensa/${t#xtensa_}/"
141+
export CT_PREFIX=${OUTPUT_DIR}/${TARGET_DIR}
138142
mkdir -p ${CT_PREFIX}
139143
;;
144+
x86_64-zephyr-elf)
145+
TRIPLET="x86_64-zephyr-elf"
146+
;;
147+
arm64)
148+
TRIPLET="aarch64-zephyr-elf"
149+
;;
150+
arm)
151+
TRIPLET="arm-zephyr-eabi"
152+
;;
140153
*)
141-
export CT_PREFIX=${OUTPUT_DIR}
154+
TRIPLET="${t}-zephyr-elf"
142155
;;
143156
esac
144157

@@ -164,4 +177,6 @@ for t in ${TARGETS}; do
164177

165178
popd
166179
rm -fr ${TARGET_BUILD_DIR}
180+
mv ${CT_PREFIX}/${TRIPLET}/build.log.bz2 ${OUTPUT_DIR}/build.${t}.${os}.${machine}.log.bz2
181+
tar -jcvf ${TARBALL_DIR}/${t}.${os}.${machine}.tar.bz2 -C ${OUTPUT_DIR} ${TARGET_DIR}${TRIPLET}
167182
done

0 commit comments

Comments
 (0)