Skip to content

Commit

Permalink
script: Update BM1690 TPU scalar build helper
Browse files Browse the repository at this point in the history
  • Loading branch information
SophgoChaoWei committed Nov 22, 2024
1 parent 7ad757c commit bc3c4cc
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions scripts/envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -313,45 +313,22 @@ function clean_rv_bootrom()

function build_rv_pcie_zsbl()
{
local err

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

if [ $err -ne 0 ]; then
echo "making pcie 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

build_rv_zsbl
cp $RV_ZSBL_BUILD_DIR/zsbl.bin $RV_FIRMWARE_INSTALL_DIR/pcie_zsbl.bin
}

function clean_rv_pcie_zsbl()
{
clean_rv_zsbl
rm -rf $RV_FIRMWARE_INSTALL_DIR/pcie_zsbl.bin
rm -rf $RV_ZSBL_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
make CROSS_COMPILE=$RISCV64_LINUX_CROSS_COMPILE O=$RV_ZSBL_BUILD_DIR ARCH=riscv bm1690tp_defconfig
err=$?
popd

Expand Down

0 comments on commit bc3c4cc

Please sign in to comment.