From 607e5ded7aca26de12447079552166e39b8369a5 Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Wed, 25 Apr 2018 22:21:06 +0200 Subject: [PATCH] using binary boot loader by risc-v fedora for now. --- boot.sh | 2 +- src/qemu.sh | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/boot.sh b/boot.sh index 66eb1cf..41295f4 100755 --- a/boot.sh +++ b/boot.sh @@ -94,7 +94,7 @@ qemu_setargs_riscv64() { -nographic -machine virt -m 2G - -kernel bbl + -kernel "$1"/bbl -append "console=ttyS0 rw root=/dev/vda" -drive file="${3}p3",format=raw,id=hd0 -device virtio-blk-device,drive=hd0 diff --git a/src/qemu.sh b/src/qemu.sh index 4d0f6a9..4ac36de 100644 --- a/src/qemu.sh +++ b/src/qemu.sh @@ -1,6 +1,6 @@ #!/bin/bash ############################################################################## - # parabola-arm-imagebuilder # + # parabola-imagebuilder # # # # Copyright (C) 2018 Andreas Grapentin # # # @@ -104,6 +104,16 @@ qemu_cleanup_user_static() { rm -f "$1"/usr/bin/qemu-* } +qemu_img_finalize_for_arm() { + true +} + +qemu_img_finalize_for_riscv64() { + # for the time being, use fedora bbl to boot + wget https://fedorapeople.org/groups/risc-v/disk-images/bbl \ + -O "$1"/boot/bbl +} + qemu_make_image() { msg "preparing parabola qemu image for $ARCH" @@ -144,6 +154,8 @@ EOF qemu_setup_user_static "$TOPBUILDDIR"/mnt || return pacstrap -GMcd -C "$TOPBUILDDIR/pacman.conf.$ARCH" "$TOPBUILDDIR"/mnt || return + + "qemu_img_finalize_for_$ARCH" "$TOPBUILDDIR"/mnt || return ) || return mv "$tmpfile" "$1"