-
Notifications
You must be signed in to change notification settings - Fork 1
Home
vimer edited this page Oct 18, 2024
·
14 revisions
Welcome to the yubos riscv32 wiki!
- git clone git://git.busybox.net/buildroot
- make qemu_riscv32_virt_defconfig
- make
- cd output/images/
- Download Debian riscv32 image(Step 1)
- modify
start-qemu.sh
(Step 2)
You can downlaod: pre-built Debian riscv32 ext2 image
[Update: now below the URL is 404, so it is not recommended to use this method] Or to make an ext2/4 format image by hand:
0. wget https://mirror.iscas.ac.cn/vimeros/yubos-extra/sid-riscv32-yubos-rootfs.tar.gz
1. sudo apt install e2fsprogs
2. sudo dd if=/dev/zero of=debian_rootfs.ext2 bs=1M count=1024
3. sudo mkfs.ext2 debian_rootfs.ext2
4. sudo mkdir /tmp/temp
5. sudo mount -o loop debian_rootfs.ext2 /tmp/temp/
6. sudo tar zxvf sid-riscv32-yubos-rootfs.tar.gz -C /tmp/temp
7. sudo umount /tmp/temp
Modify start-qemu.sh
as following:
Change
-append "rootwait root=/dev/vda ro"
into
-append "init=/lib/systemd/systemd console=ttyS0 rw root=/dev/vda earlycon=sbi systemd.unit=runlevel1.target"
then execute:
sudo bash start-qemu.sh
user: root
passwd: debian
qemu-system-riscv32 \
-nographic -machine virt \
-m 2G \
-bios fw_jump.elf \
-kernel Image \
-drive file=debian_rootfs.ext2,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0 \
-append "init=/lib/systemd/systemd console=ttyS0 rw root=/dev/vda earlycon=sbi" \
-device virtio-net-device,netdev=usernet \
-netdev user,id=usernet,hostfwd=tcp::"$ssh_port"-:22
user:root
passwd: debian