Boot linux instead
This commit is contained in:
parent
6f6e735ba7
commit
0b512ba9d1
17
boot.sh
17
boot.sh
@ -23,9 +23,8 @@ fi
|
||||
# Create a directory for exchanging data with the VM.
|
||||
mkdir -p "$TMPDIR/xchg"
|
||||
|
||||
#system=$(readlink -f ./current-system)
|
||||
#echo $system
|
||||
#sleep 1
|
||||
system="$NIXOS_SYSTEM_TOPLEVEL"
|
||||
echo "Booting $system"
|
||||
|
||||
cd "$TMPDIR"
|
||||
|
||||
@ -34,9 +33,9 @@ cd "$TMPDIR"
|
||||
#QEMU_KERNEL_PARAMS="boot.trace boot.debug1"
|
||||
|
||||
# Trap the CPU on compressed instructions?
|
||||
TRAP_COMPRESSED="-cpu rv64,c=false"
|
||||
#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 $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"
|
||||
@ -44,6 +43,7 @@ CUSTOM_BIOS="-bios $OPENSBI/share/opensbi/lp64/generic/firmware/fw_payload.bin"
|
||||
DEBUG_CPU="-d cpu_reset"
|
||||
#DEBUG_CPU="-d in_asm,cpu,cpu_reset"
|
||||
|
||||
|
||||
# Start QEMU.
|
||||
exec qemu-system-riscv64 \
|
||||
$DEBUG_GDB \
|
||||
@ -63,13 +63,12 @@ exec qemu-system-riscv64 \
|
||||
-device virtio-keyboard \
|
||||
-drive "file=$NIX_DISK_IMAGE,if=none,id=hd0" \
|
||||
-device virtio-blk-device,drive=hd0 \
|
||||
-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" \
|
||||
|
||||
# -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user