Noob needs help to try microkernel [Phoenix-RTOS]


I am able to build and test the Phoenix-RTOS microkernel under qemu on Raspberry Pi 4/Raspian, as well as to build the VF2 Debian Kernel.

I would like to package the microkernel on a SD card but my understanding of build and boot mechanics is very weak.

I presume I need to package the VF2 u-boot and OpenSBI with the Phoenix-RTOS kernel and some configuration file, but am a bit lost in the complexities of u-boot/SBI/… documentation and examples.

Hints and pointers to simplified docs or examples much appreciated!

This might help if you haven’t seen it:

Ah! Thanks much!
Theory of operation WRT VF2 is much better than the u-boot and OPenSBI readme’s & code!
Back to reading… :slight_smile:

1 Like

I have made progress but still have holes in my understanding of what information is passed between u-boot+OpenSBI and a booting kernel.

Boot log prints:
*** Bad Linux RISCV Image magic! ***

I have not found the sw component reporting the above (grepped through u-boot, and OpenSBI code).

vvv From Boot Log: vvv
U-Boot menu
1: Debian GNU/Linux bookworm/sid 5.15.0-starfive
2: Debian GNU/Linux bookworm/sid 5.15.0-starfive (rescue target)
3: Phoenix-RTOS
Enter choice: 3
3: Phoenix-RTOS
Retrieving file: /rootfs.ext2
71657472 bytes read in 3093 ms (22.1 MiB/s)
Retrieving file: /phoenix-kernel.img
379928 bytes read in 23 ms (15.8 MiB/s)
append: root=/dev/mmcblk1p3 rw console=tty0 console=ttyS0,115200 debug earlycon rootwait selinux=0
Retrieving file: /dtbs/starfive/jh7110-visionfive-v2.dtb
50235 bytes read in 11 ms (4.4 MiB/s)
Bad Linux RISCV Image magic!
^^^ ^^^

OK. How I got here and what I am doing.

I am placing a Phoenix-RTOS Kernel and initramfs onto the boot directory in /dev/mmcblk1p3 and adding to the extlinux.conf.

vvv vvv
root@starfive:~# cd /boot

root@starfive:/boot# ls -F*

root@starfive:/boot# lsblk
mmcblk1p1 179:1 0 2M 0 part
mmcblk1p2 179:2 0 4M 0 part
mmcblk1p3 179:3 0 100M 0 part /boot
mmcblk1p4 179:4 0 14.7G 0 part /
^^^ ^^^
vvv extlinux.conf added: vvv
label 10s
menu label Phoenix-RTOS
linux /phoenix-kernel.img
initrd /rootfs.ext2
fdtdir /dtbs
append root=/dev/mmcblk1p3 rw console=tty0 console=ttyS0,115200 debug earlycon rootwait selinux=0
^^^ ^^^

What should I be looking at/for here?
Kernel code packaging?
Address passing?
DTB setup?

Thanks again for any ideas, suggestions, theory of operation, …

VF2+Phoenix-refs.txt (656 Bytes)

VisionFive2-Phoenix.txt (4.5 KB)

Much good information in Star64 bootstrap. Works to boot NuttX on vf2.