代码拉取完成,页面将自动刷新
#!/bin/bash
source ./envsetup
if [[ -z "${DEV}" ]]; then
DEV=sdb1
fi
UDISK=$WS/u-disk
OUT_ZSBL=$WS_LINUX/out-zsbl
OUT_SBI=$WS_LINUX/out-sbi
OUT_LINUX=$WS_LINUX/out-linux
sudo umount $UDISK
sudo mount /dev/$DEV $UDISK
if [ $? -ne 0 ]; then
echo "ERROR: mount failed"
exit 1
fi
if [ ! -f $UDISK/FLAG_MINIMAL ]; then
echo "ERROR: not mininal sdcard, pleaes double-check!"
exit 1
fi
if [ "$1" == "-a" ]; then
echo "Removing zsbl and sbi ......"
sudo rm $UDISK/zsbl.bin
sudo rm $UDISK/riscv64/fw_dynamic.bin
echo "Removing Done!"
echo "Copying zsbl and sbi to sd-card"
sudo cp $OUT_ZSBL/zsbl.bin $UDISK/zsbl.bin
sudo cp $OUT_SBI/platform/generic/firmware/fw_dynamic.bin $UDISK/riscv64/fw_dynamic.bin
echo "Copying Done!"
fi
echo "Removing dtb and kernel ......"
sudo rm $UDISK/riscv64/mango-milkv-pioneer.dtb
sudo rm $UDISK/riscv64/riscv64_Image
echo "Removing Done!"
echo "Copying dtb and kernel to sd-card"
sudo cp $OUT_LINUX/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dtb $UDISK/riscv64/mango-milkv-pioneer.dtb
sudo cp $OUT_LINUX/arch/riscv/boot/Image $UDISK/riscv64/riscv64_Image
echo "Copying Done!"
sudo umount $UDISK
echo "Done!"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。