aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/conf/mkimage.sh
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-17 19:34:03 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-17 19:34:03 +0300
commit83f8e82c421fa9013ac813b1560abf1c749822ca (patch)
tree5fefb1b90896af039274ce6184efdb741f6679ad /arch/riscv64/conf/mkimage.sh
parentbe82edec47b20164c0e8a9917fa2c9b8b9999fdf (diff)
downloadkmi-83f8e82c421fa9013ac813b1560abf1c749822ca.tar.gz
kmi-83f8e82c421fa9013ac813b1560abf1c749822ca.zip
cleanup riscv64/conf
Diffstat (limited to 'arch/riscv64/conf/mkimage.sh')
-rwxr-xr-xarch/riscv64/conf/mkimage.sh38
1 files changed, 0 insertions, 38 deletions
diff --git a/arch/riscv64/conf/mkimage.sh b/arch/riscv64/conf/mkimage.sh
deleted file mode 100755
index fbad869..0000000
--- a/arch/riscv64/conf/mkimage.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-XLEN=$(echo "$1" | cut -c '6-7')
-
-if [ ! -e fs ]; then
- mkdir fs
-fi
-
-if [ ! -e rootfs.img ]; then
- virt-make-fs --partition=mbr --type=vfat --size=10M fs rootfs.img
-fi
-
-SSIZE=$(fdisk -l rootfs.img | awk '$1=="Units:" {print $8}')
-OFFSET=$(fdisk -l rootfs.img | awk '$1=="rootfs.img1" {print $2}')
-mount -o loop,offset=$((${SSIZE}*${OFFSET})) rootfs.img fs
-
-# copy over files outside the .itb to mess around with manual booting
-cp kmi.bin fs
-cp arch/riscv64/conf/initrd fs
-
-# not entirely pleased with this solution, although eventually I should probably
-# move `run` out of the kernel repo and into some `kmios` repo with a runtime
-# and proper initrd etc. so this is good enough for now
-../rv${XLEN}/u-boot-kmi/tools/mkimage -f arch/riscv${XLEN}/conf/kmi.its fs/kmi.itb
-../rv${XLEN}/u-boot-kmi/tools/mkimage -A riscv -O kmi -T script \
- -d arch/riscv64/conf/boot.cmd fs/boot.scr
-
-umount -l fs
-
-qemu-system-riscv${XLEN} \
- -machine virt \
- -kernel ../rv${XLEN}/u-boot-kmi/u-boot \
- -bios ../rv${XLEN}/opensbi/build/platform/generic/firmware/fw_jump.elf \
- -device virtio-blk-device,drive=hd0 \
- -drive file=rootfs.img,format=raw,id=hd0 \
- -S -s -m 2G \
- -smp 2 \
- -serial stdio