open-power / petitboot

GNU General Public License v2.0
205 stars 56 forks source link

petiboot as a coreboot payload boot failure. #61

Closed hanetzer closed 5 years ago

hanetzer commented 5 years ago

So, I've taken upstream buildroot and added petitboot to it, built a kernel, initramfs, and dtb for the samsung chromebook plus (rk3399-gru-kevin), packed them together in a fit image and embedded them in coreboot as a payload. After some tinkering with coreboot's own code I got it to run and get me to petitboot-nc, but attempting to load and boot the gentoo linux on the emmc fails.

The pertinent log snippet is:

Booting 5.0.7-gentoo
Loaded linux kernel image from file:///var/petitboot/mnt/dev/mmcblk1p2/boot/vmlinuz-5.0.7-gentoo
Running boot hooks
Performing kexec load
Cannot read /tmp/tmp.XXXXXX

/etc/kboot.conf 5.0.7-gentoo='/boot/vmlinuz-5.0.7-gentoo console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd crashkernel=256M

If you need more info please let me know.

hanetzer commented 5 years ago

oh, and this is petitboot-1.10.3, latest version of this writing.

hanetzer commented 5 years ago

Further update. I've changed from kboot.conf to the native petitboot.conf, this seems to work, but it hangs (I can still ctrl+c out of it) at 'Performing kexec reboot'

sammj commented 5 years ago

Once it appears to hang, drop to the shell and run pb-sos. This collects up some logs to see where that's failing; possibly kexec is hitting an issue in the background with the payload.

oohal commented 5 years ago

You can also try dropping to the shell and invoking kexec manually.

hanetzer commented 5 years ago

@sammj @oohal actually got to a workingish point. passing a dtb is apparently borked atm for arm64 kexec, so pass none and it will reuse the current one.

Current issue is as follows: https://bpaste.net/show/a4bae13675a2

hanetzer commented 5 years ago

Fixed. Was probably some missing kernel config bit.