occlum/demos/bash/prepare_busybox.sh
Zheng, Qi 597f8c9080 Update bash demo with bom tool and add musl version
Signed-off-by: Zheng, Qi <huaiqing.zq@antgroup.com>
2021-10-08 12:34:38 +08:00

25 lines
509 B
Bash
Executable File

#! /bin/bash
set -e
current=$(pwd)
busybox_src="$current/busybox"
busybox_config="$current/../fish/.config"
rm -rf $busybox_src
git clone -b 1_31_1 --depth 1 https://github.com/mirror/busybox.git
pushd $busybox_src
make clean
make defconfig
cp $busybox_config .
if [[ $1 == "musl" ]]; then
echo "Building musl-libc version of busybox"
sed -e 's/.*CONFIG_CROSS_COMPILER_PREFIX.*/CONFIG_CROSS_COMPILER_PREFIX="occlum-"/' -i .config
else
echo "Building glibc version of busybox"
fi
make -j
popd