Zigford
Posts: 3
Joined: Sun Nov 08, 2015 7:30 am

Pi4 64bit Mainline Kernel USB issue

Sun Sep 19, 2021 4:11 am

Hi there,

Hoping to get some tips about getting mainline kernel running on my Pi4.
I'm trying to compile 5.14.4 at the moment and using `make defconfig`.
After that, a few tweaks like enabling the Simple_FB for HDMI and it boots, but gets stuck waiting for the root device.

BTRFS support is built into the kernel, but it seems like the usb devices are not being seen on boot. I have compiled in support for everything I can see that should be built in to the kernel, but I must be missing something. Appreciate any advice or help.

My setup is the SD card has the kernel, config.txt and cmdline.txt and I have a USB HDD connected for rootfs.
This setup works fine using a kernel compiled from the raspberrypi github repo, but I'm wanting to move to mainline. My Pi is just used as a simple server and doesn't need audio, video or desktop related things.

Here are the relevant files:
https://zigford.org/pi/cmdline.txt
https://zigford.org/pi/config.txt
https://zigford.org/pi/kernel-5.14.4.config.txt

Andresayang
Posts: 45
Joined: Fri Jun 05, 2020 1:10 pm

Re: Pi4 64bit Mainline Kernel USB issue

Sun Sep 19, 2021 2:24 pm

Zigford wrote:
Sun Sep 19, 2021 4:11 am
Hi there,

Hoping to get some tips about getting mainline kernel running on my Pi4.
I'm trying to compile 5.14.4 at the moment and using `make defconfig`.
After that, a few tweaks like enabling the Simple_FB for HDMI and it boots, but gets stuck waiting for the root device.

BTRFS support is built into the kernel, but it seems like the usb devices are not being seen on boot. I have compiled in support for everything I can see that should be built in to the kernel, but I must be missing something. Appreciate any advice or help.

My setup is the SD card has the kernel, config.txt and cmdline.txt and I have a USB HDD connected for rootfs.
This setup works fine using a kernel compiled from the raspberrypi github repo, but I'm wanting to move to mainline. My Pi is just used as a simple server and doesn't need audio, video or desktop related things.

Here are the relevant files:
https://zigford.org/pi/cmdline.txt
https://zigford.org/pi/config.txt
https://zigford.org/pi/kernel-5.14.4.config.txt
Hi,

What's if you install system on SD card ?
Did it boot correctly ?

(Well, my personal opinion is that there is no advantage to boot on usb disk if you need SD card)

What's the content of your cmdline.txt file ?


Cheers

Zigford
Posts: 3
Joined: Sun Nov 08, 2015 7:30 am

Re: Pi4 64bit Mainline Kernel USB issue

Sat Sep 25, 2021 5:35 am

So I installed rootfs on an SD card to check and it halts at the same place.
I have console setup via serial and there are no errors or hints at what is going wrong.
Any ideas on how to increase verbosity of initial boot?

Zigford
Posts: 3
Joined: Sun Nov 08, 2015 7:30 am

Re: Pi4 64bit Mainline Kernel USB issue

Sun Sep 26, 2021 11:21 pm

For anyone else hitting this issue, I believe I have found it:

https://lore.kernel.org/linux-arm-kerne ... ail.com/T/

This thread describes a change in 5.14 where the CONFIG_RESET_RASPBERRYPI config option is set to module instead of built in.
This might be fine with an initramfs, but if your not using one, it needs to be built in for the USB controller stuff to work and find USB or SD card at boot.

I have done a very quick test before work this morning and it didn't boot but it did recognize the USB attached storage. I think I just have to fiddle with the the root= cmdline parameter.

Return to “Advanced users”