Try to load the kernel from u-boot

This commit is contained in:
Rodrigo Arias 2024-01-18 17:58:55 +01:00
parent af26facae4
commit 5e2f6fcd0e

16
boot.sh
View File

@ -35,7 +35,8 @@ cd "$TMPDIR"
# Trap the CPU on compressed instructions?
#TRAP_COMPRESSED="-cpu rv64,c=false"
#CUSTOM_BIOS="-bios $OPENSBI/share/opensbi/lp64/generic/firmware/fw_payload.bin"
CUSTOM_BIOS="-bios $OPENSBI/share/opensbi/lp64/generic/firmware/fw_payload.bin"
#CUSTOM_BIOS="-bios $OPENSBI/share/opensbi/lp64/generic/firmware/fw_jump.elf"
#CUSTOM_BIOS="-bios $CDIR/bios-nc.bin"
#CUSTOM_BIOS="-bios $CDIR/bios.bin"
#CUSTOM_BIOS="-bios opensbi-1.4-rv-bin/share/opensbi/lp64/generic/firmware/fw_payload.bin"
@ -63,12 +64,25 @@ exec qemu-system-riscv64 \
-device virtio-keyboard \
-drive "file=$NIX_DISK_IMAGE,if=none,id=hd0" \
-device virtio-blk-device,drive=hd0 \
-device loader,addr=0x40000000,file=$system/kernel \
-kernel $system/kernel \
-initrd $system/initrd \
-append "$(cat $system/kernel-params) init=$system/init regInfo=/nix/store/x3zpwfbk2wkiisxhgi7zwsfwbdfxk0w1-closure-info-riscv64-unknown-linux-gnu/registration console=ttyS0,115200n8 loglevel=7 $QEMU_KERNEL_PARAMS"
$QEMU_OPTS \
"$@"
# -kernel $system/kernel \
# -initrd $system/initrd \
# -append "$(cat $system/kernel-params) init=$system/init regInfo=/nix/store/x3zpwfbk2wkiisxhgi7zwsfwbdfxk0w1-closure-info-riscv64-unknown-linux-gnu/registration console=ttyS0,115200n8 loglevel=7 $QEMU_KERNEL_PARAMS"
-kernel ${NIXPKGS_QEMU_KERNEL_visionfive_nix:-/nix/store/8n5fakqq44nsmbcn0vdm3mzsvcq9ihbi-nixos-system-visionfive-nix-24.05.20240115.c3e128f/kernel} \
-initrd /nix/store/96058frp51dn0xxfci4kyvzz0rvd5ngy-initrd-linux-riscv64-unknown-linux-gnu-6.1.72/initrd \
-append "$(cat /nix/store/8n5fakqq44nsmbcn0vdm3mzsvcq9ihbi-nixos-system-visionfive-nix-24.05.20240115.c3e128f/kernel-params) init=/nix/store/8n5fakqq44nsmbcn0vdm3mzsvcq9ihbi-nixos-system-visionfive-nix-24.05.20240115.c3e128f/init regInfo=/nix/store/bgqa92gznhcr9aryx6ac4ycx4s2385cr-closure-info-riscv64-unknown-linux-gnu/registration console=ttyS0,115200n8 console=tty0 $QEMU_KERNEL_PARAMS" \
# -drive "file=$NIX_DISK_IMAGE,if=virtio,id=hd0" \
# -hda "$NIX_DISK_IMAGE" \
#-net nic,model=virtio,macaddr=16:da:11:b4:44:c9 -net user \