mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 14:16:47 +00:00
* feat(ci): additional dadk manifest for CI, add container capable rv64 run arg and gendisk cmd * feat(build): kernel compiling(linking) from diff-arch nolonger needs to make clean * breaking: use ci-command to run targets, enable both arch to build together * fix: specify toolchains and the dadk menifest for user program, and add nessesary toolchain. Now riscv64 ver of DragonOS can run into user mode. * fix(env): cleanup dirty configs, add make clean back * fix(build): update permission with whoami, and nolonger compile grub in rv64 building. * feat(ide): support for vscode debuging, using lldb plugin * feat(ci): automate u-boot download and installation for riscv64
28 lines
1.4 KiB
Bash
28 lines
1.4 KiB
Bash
# uboot版本
|
|
UBOOT_VERSION="v2023.10"
|
|
RISCV64_UBOOT_PATH="../tools/arch/riscv64/u-boot-${UBOOT_VERSION}-riscv64"
|
|
|
|
if [ ! -d ${RISCV64_UBOOT_PATH} ]; then
|
|
echo "正在下载u-boot..."
|
|
uboot_tar_name="u-boot-${UBOOT_VERSION}-riscv64.tar.xz"
|
|
|
|
uboot_parent_path=$(dirname ${RISCV64_UBOOT_PATH}) || (echo "获取riscv u-boot 版本 ${UBOOT_VERSION} 的父目录失败" && exit 1)
|
|
|
|
if [ ! -f ${uboot_tar_name} ]; then
|
|
wget https://mirrors.dragonos.org.cn/pub/third_party/u-boot/${uboot_tar_name} || (echo "下载riscv u-boot 版本 ${UBOOT_VERSION} 失败" && exit 1)
|
|
fi
|
|
echo "下载完成"
|
|
echo "正在解压u-boot到 '$uboot_parent_path'..."
|
|
mkdir -p $uboot_parent_path
|
|
tar xvf u-boot-${UBOOT_VERSION}-riscv64.tar.xz -C ${uboot_parent_path} || (echo "解压riscv u-boot 版本 ${UBOOT_VERSION} 失败" && exit 1)
|
|
echo "解压完成"
|
|
rm -rf u-boot-${UBOOT_VERSION}-riscv64.tar.xz
|
|
fi
|
|
echo "riscv u-boot 版本 ${UBOOT_VERSION} 已经安装"
|
|
|
|
qemu-system-riscv64 -machine virt -kernel ../tools/arch/riscv64/u-boot-v2023.10-riscv64/u-boot.bin \
|
|
-m 512M -nographic -smp 2,cores=2,threads=1,sockets=1 -bios default \
|
|
-no-reboot -device virtio-net-device,netdev=net -netdev user,id=net \
|
|
-rtc base=utc \
|
|
-drive file=../bin/riscv64/disk.img,if=none,format=raw,id=x1 \
|
|
-device virtio-blk-device,drive=x1,bus=virtio-mmio-bus.1 -s |