1 Star 0 Fork 0

unicornx/ilovelinux

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mkmini.sh 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
unicornx 提交于 2024-10-09 14:43 . add flags for mkmini & mkboot script
#!/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!"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/unicornx/ilovelinux.git
[email protected]:unicornx/ilovelinux.git
unicornx
ilovelinux
ilovelinux
master

搜索帮助