Skip to content

Commit

Permalink
ACPI WIP
Browse files Browse the repository at this point in the history
Allow to hack w/o edk2.

Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
  • Loading branch information
bjorn-rivos committed Apr 18, 2024
1 parent 90c98e6 commit c0c6201
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mkfirmware_rv64_uboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ tmp=$(mktemp -d -p "$PWD")

trap 'rm -rf "$tmp"' EXIT

git clone https://github.com/u-boot/u-boot.git $tmp -b v2024.01
make -C $tmp ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- qemu-riscv64_smode_defconfig
git clone https://github.com/u-boot/u-boot.git $tmp -b v2024.04
make -C $tmp ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- qemu-riscv64_smode_defconfig acpi.config

cat <<EOF >>$tmp/.config
CONFIG_CMD_KASLRSEED=y
Expand Down
2 changes: 1 addition & 1 deletion mkimage_rv64_uefi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trap cleanup EXIT

kernel=
modpath=
cmdline='root=/dev/vda2 rw earlycon console=tty0 console=ttyS0 efi=debug'
cmdline='root=/dev/vda2 rw earlycon console=tty0 console=ttyS0 efi=debug acpi=force'

while getopts k:m: name ; do
case $name in
Expand Down
2 changes: 1 addition & 1 deletion mkrootfs_rv64_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -euo pipefail

d=$(dirname "${BASH_SOURCE[0]}")

distro=${1:-mantic}
distro=${1:-noble}

packages=(
automake
Expand Down
2 changes: 1 addition & 1 deletion qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [[ ! -f $d/firmware/rv64-u-boot.bin ]]; then
fi

/home/bjorn/src/qemu/qemu/build/qemu-system-riscv64 \
-machine virt \
-machine virt,acpi=on,aia=aplic-imsic \
-cpu rv64,v=true,vlen=256,elen=64,h=true,zbkb=on,zbkc=on,zbkx=on,zkr=on,zkt=on,svinval=on,svnapot=on,svpbmt=on \
-nographic -m 16G -smp 8 -kernel $d/firmware/rv64-u-boot.bin \
-device virtio-net-device,netdev=net0 -netdev user,hostfwd=tcp::10022-:22,id=net0,tftp=tftp \
Expand Down
5 changes: 3 additions & 2 deletions updimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: Apache-2.0

set -x
set -euo pipefail

d=$(dirname "${BASH_SOURCE[0]}")
Expand All @@ -16,7 +17,7 @@ trap cleanup EXIT

kernel=
modpath=
cmdline='root=/dev/vda2 rw earlycon console=tty0 console=ttyS0 efi=debug'
cmdline='root=/dev/vda2 rw earlycon console=tty0 console=ttyS0 efi=debug acpi=force'

while getopts k:m:n name ; do
case $name in
Expand All @@ -35,7 +36,7 @@ shift $(($OPTIND -1))

imagename=$1

imsz=1
imsz=2
if [[ $modpath ]]; then
imsz=$(du -B 1G -s "$modpath" | awk '{print $1}')
fi
Expand Down

0 comments on commit c0c6201

Please sign in to comment.