Feature #1022
closedRPi4 kernel build
100%
Description
Toolchain is ready, now build the kernel and see if it will boot.
Related issues
Updated by Hammel over 1 year ago
- Related to Feature #870: Toolchain for RPi4 added
Updated by Hammel over 1 year ago
- % Done changed from 0 to 30
Kernel build + busybox and rpifw is ready for testing.
The mkinstall script can push to an SD card without the rootfs, just to validate the kernel boot but the usage message needed to be updated to reflect that (use -d none).
I have to wait for a new HDMI cable before testing. The RPi4 has a micro HDMI. Although I plan to use this with pistore and pisentry (and the associated TFT touchscreen) I need to test with HDMI during board bring up.
Adapter cable has been ordered from Amazon.
Updated by Hammel over 1 year ago
The kernel does not boot - it generates stack traces. However, the last thing it says is it can't find a working init. I need to enable the initramfs stepping feature to see if it boots into the initramfs okay.
Updated by Hammel over 1 year ago
Correction - the kernel boots cleanly if you tell the config.txt that we're using an initramfs. But when it tries to run init nothing seems to happen. I've enabled pdebug and pstep but I don't see any output. I think the problem is with the initramfs but I don't as yet know what that is.
Updated by Hammel over 1 year ago
Try removing the TFT display and booting again. Maybe it's switching automatically to the TFT but it's not actually displaying anything.
Updated by Hammel over 1 year ago
No change - it's not the TFT.
It does load /init but I'm not getting any debug output from it even though pdebug and pstep are in the cmdline.txt.
Updated by Hammel over 1 year ago
Ugh. For some reason the init script debugging has started working. I've been fiddling with config.txt and cmdline.txt to get a serial console working but that never worked (RPi4 is not as simple as RPi3 in this respect, apparently). What I changed that may have helped is to change the console=tty3 to console=tty0.
In any case, what's not working is that the initramfs is missing the overlay and squashfs modules.
Rebuilding busybox to see if they get picked up this time or if something else is wrong.
Updated by Hammel over 1 year ago
- % Done changed from 30 to 50
Found it - For rpi and rpi2 I disabled compressed kernel modules (CONFIG_MODULE_COMPRESS_NONE=y and CONFIG_MODULE_COMPRESS_XZ change to "not set"). Just need to do that with RPi4 kernel config.
Updated by Hammel over 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
That fixed it. Kernel boots to initramfs, which runs up to mounting the squashfs/overlay. It stops there because I haven't tested the rest of the build on RPi4 yet.
Changes committed and pushed.
Closing issue.