Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bm1690: add build_rv_tp_zsbl to compile zsbl for tpu-scalar. #106

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions scripts/envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,41 @@ function clean_rv_bootrom()
rm -rf $RV_BOOTROM_BUILD_DIR
}

function build_rv_tp_zsbl()
{
local err

pushd $RV_ZSBL_SRC_DIR
make CROSS_COMPILE=$RISCV64_LINUX_CROSS_COMPILE O=$RV_ZSBL_BUILD_DIR ARCH=riscv bm1690_tpu_defconfig
err=$?
popd

if [ $err -ne 0 ]; then
echo "making zsbl config failed"
return $err
fi

pushd $RV_ZSBL_BUILD_DIR
make -j$(nproc) CROSS_COMPILE=$RISCV64_LINUX_CROSS_COMPILE ARCH=riscv
err=$?
popd

if [ $err -ne 0 ]; then
echo "making zsbl failed"
return $err
fi

mkdir -p $RV_FIRMWARE_INSTALL_DIR

cp $RV_ZSBL_BUILD_DIR/zsbl.bin $RV_FIRMWARE_INSTALL_DIR/tp_zsbl.bin
}

function clean_rv_tp_zsbl()
{
rm -rf $RV_FIRMWARE_INSTALL_DIR/tp_zsbl.bin
rm -rf $RV_ZSBL_BUILD_DIR
}

function build_rv_zsbl()
{
local err
Expand Down
Loading