unikernelLinux / ukl

Unikernel Linux
GNU Lesser General Public License v2.1
165 stars 12 forks source link

how to boot the ukl-base kernel #29

Closed Gege-Wang closed 9 months ago

Gege-Wang commented 10 months ago

I see a test program written in /linux/samples/ukl, so I do the following to start the kernel, but I don't get the right results. step1: make in /linux/sample/ukl generates the UKL.a static library, and then I copy the UKL.a file into the /linux directory step2: make menuconfig, then configure unikernelLinux and set path to ./UKL.a. exec target is the default /UKL, I'm not sure what that means. The rest of the configuration is default because I can't find any basis for changing it. step3:make create a kernel image, make install will appear initrd.img in /boot step4: Use qemu to start the kernel. qemu-system-x86_64 -cpu host-accel kvm -m 1G -nographic-kernel arch/x86/boot/ bzImage-initrd /boot/initrd.img-6.3.0+ -nographic -append "init=/UKL console=ttyS0" I don't know if this command is correct, but the result is: [15.126278] Run /init as init process Loading, please wait... Failed to create manager:Function not implemented Begin: Loading essential drivers ... done. ... No root device specified. Boot arguments must include a root= parameter.

BusyBox v1.30.1 ... (initramfs)

khers commented 9 months ago

If you are interested in working with the sample program, there is documentation for how to get it working in the kernel tree that is up to date. You will need an initramfs that is not generated by the linux install where you are building the kernel, but is packed by the tools in the initrd directory from the UKL repo.

The sample program is a really simple proof of concept, for more interesting options follow the directions in the UKL repo readme.