Project

General

Profile

Actions

Feature #1022

closed

RPi4 kernel build

Added by Hammel 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
03 - Linux Kernel
Target version:
Start date:
14 Aug 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

Toolchain is ready, now build the kernel and see if it will boot.


Related issues

Related to PiBox - Feature #870: Toolchain for RPi4ClosedHammel08 Nov 2021

Actions
Actions #1

Updated by Hammel 9 months ago

Actions #2

Updated by Hammel 9 months 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.

Actions #3

Updated by Hammel 9 months 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.

Actions #4

Updated by Hammel 8 months 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.

Actions #5

Updated by Hammel 8 months ago

Try removing the TFT display and booting again. Maybe it's switching automatically to the TFT but it's not actually displaying anything.

Actions #6

Updated by Hammel 8 months 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.

Actions #7

Updated by Hammel 8 months 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.

Actions #8

Updated by Hammel 8 months 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.

Actions #9

Updated by Hammel 8 months 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.

Actions

Also available in: Atom PDF