cd $KESTREL/firmware/gcc/libgcc/soft-fp
# Ignore expected errors
set +e
-gcc -c -O2 -msoft-float -mno-string -mno-multiple -mno-vsx -mno-altivec -mlittle-endian -mstrict-align -fno-stack-protector -m64 -mabi=elfv2 -mcmodel=small -I../config/rs6000/ -I../../include -I.. *.c &> /dev/null
+gcc -c -O2 -msoft-float -mno-string -mno-multiple -mno-vsx \
+ -mno-altivec -mlittle-endian -mstrict-align \
+ -fno-stack-protector -m64 -mabi=elfv2 -mcmodel=small \
+ -I../config/rs6000/ -I../../include -I.. *.c &> /dev/null
set -e
ar -crv libsoft-fp.a *.o
cp -Rp libsoft-fp.a ../../../
rm -rf build
mkdir build
cd build
-ZEPHYR_BASE=${SOURCE_ROOT_DIR}/zephyr-rtos ZEPHYR_TOOLCHAIN_VARIANT=host cmake -DZEPHYR_MODULES="${SOURCE_ROOT_DIR}/zephyr-littlefs;${SOURCE_ROOT_DIR}/zephyr-mbedtls;${SOURCE_ROOT_DIR}/zephyr-civetweb" -DBOARD=litex_kestrel ${SOURCE_ROOT_DIR}/zephyr-firmware
+export ZEPHYR_MODULES="${SOURCE_ROOT_DIR}/zephyr-littlefs"
+export ZEPHYR_MODULES="${ZEPHYR_MODULES};${SOURCE_ROOT_DIR}/zephyr-mbedtls;"
+export ZEPHYR_MODULES="${ZEPHYR_MODULES};${SOURCE_ROOT_DIR}/zephyr-civetweb"
+ZEPHYR_BASE=${SOURCE_ROOT_DIR}/zephyr-rtos \
+ ZEPHYR_TOOLCHAIN_VARIANT=host \
+ cmake -DZEPHYR_MODULES="${ZEPHYR_MODULES}" \
+ -DBOARD=litex_kestrel ${SOURCE_ROOT_DIR}/zephyr-firmware
cp -Rp ../../libsoft-fp.a zephyr/
make -j32
-echo "Zephyr firmware binary now in $KESTREL/firmware/zephyr-rtos/build/zephyr/zephyr.bin"
+echo -n "Zephyr firmware binary now in "
+echo "$KESTREL/firmware/zephyr-rtos/build/zephyr/zephyr.bin"