View previous topic :: View next topic |
Author |
Message |
BennyP Guru
Joined: 09 May 2003 Posts: 503 Location: Jerusalem, Israel
|
Posted: Tue Feb 06, 2024 5:08 pm Post subject: [SOLVED] Compiling downstream kernel for RPI5 |
|
|
I followed the steps at https://wiki.gentoo.org/wiki/User:NeddySeagoon/Raspberry_PI_Install_Guide to install, and things ran fine. I then wanted to compile a newer kernel so I followed the steps at https://www.raspberrypi.com/documentation/computers/linux_kernel.html#building-the-kernel-locally, building the rpi-6.6.y branch. (i tried rpi-6.7.y branch as well, no difference)
Code: | cd linux
KERNEL=kernel_2712
make bcm2712_defconfig
make -j4 Image.gz modules dtbs
sudo make modules_install
sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/firmware/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/firmware/overlays/
sudo cp arch/arm64/boot/dts/overlays/README /boot/firmware/overlays/
sudo cp arch/arm64/boot/Image.gz /boot/firmware/$KERNEL.img
|
Then i rebooted. I expected to boot the 6.6 kernel, instead I booted into 6.1.72-v8-16k+. Feels like i must be missing something simple. Here's my config.txt
Code: | hdmi_enable_4kp60=1
hdmi_group=2
hdmi_drive=2
hdmi_pixel_encoding=2
disable_overscan=1
bootcode_delay=1
dtoverlay=vc4-kms-v3d
dtparam=audio=on
max_framebuffers=2
disable_fw_kms_setup=1
arm_64bit=1
arm_boost=1
auto_initramfs=1
pwm_sample_bits=24
|
and here's cmdline.txt
Code: | dwc_otg.lpm_enable=0 console=tty root=/dev/mmcblk0p3 rootfstype=ext4 fsck.repair=yes rootwait cma=256M@256M net.ifnames=0 quiet
|
How come i'm not booting into the new kernel, and how should I troubleshoot? _________________ Could it be?
Last edited by BennyP on Tue Feb 06, 2024 8:10 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54605 Location: 56N 3W
|
Posted: Tue Feb 06, 2024 5:46 pm Post subject: |
|
|
BennyP,
The present Pi5 kernel is 6.1.y
To get something newer, you need to check it out in git.
6.6.y, 6.7.y and 6.8.y are all there. On kernel.org 6.8 is still a -rc.
As all the action takes place in 6.1.y, expect 6.6 and 6.7 to be a bit rough round the edges.
Do Code: | git clone https://github.com/raspberrypi/linux
git checkout rpi-.6.6.y | to work with 6.6.y _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
antonellocaroli Guru
Joined: 11 Aug 2016 Posts: 510
|
Posted: Tue Feb 06, 2024 5:55 pm Post subject: |
|
|
I believe that
Code: | sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/firmware/ |
bcm2712-rpi-5-b.dtb
go into /boot/ |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54605 Location: 56N 3W
|
Posted: Tue Feb 06, 2024 6:10 pm Post subject: |
|
|
antonellocaroli,
Well spotted!
PIOS mounts the vfat partition at /boot/firmware/ now. That's new.
On Gentoo, it would still be /boot
As long as everything goes into the right places in the vfat partition, it doesn't matter where its mounted in the kernel filesystem tree.
The kernel filesystem tree is not available at boot time. The GPU finds and reads the vfat partition for itself.
Copying things to /boot/firmware/ with the vfat partition mounted at /boot may well work, from the kernels point of view but the GPU would not find files in the firmware directory.
BennyP,
When you boot your new kernel, what does uname -a show?
On my desktop, Code: | $ uname -a
Linux neddy_static 6.7.3-gentoo #1 SMP PREEMPT_DYNAMIC Sun Feb 4 10:24:32 GMT 2024 x86_64 AMD Ryzen 9 5950X 16-Core Processor AuthenticAMD GNU/Linux |
The important thing here is Sun Feb 4 10:24:32 GMT 2024 which is the build time of the running kernel.
Are you running the kernel you think you are? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
gentoo_ram Guru
Joined: 25 Oct 2007 Posts: 502 Location: San Diego, California USA
|
Posted: Tue Feb 06, 2024 6:41 pm Post subject: |
|
|
Go into your kernel source directory and double-check the status of the files checked out using 'git status'. In my case, it looks like:
Code: | genpi-ext # git status
On branch rpi-6.7.y
Your branch is up to date with 'origin/rpi-6.7.y'.
nothing to commit, working tree clean |
Check out which ever branch you'd like.
You can also look at the top of the Makefile. That will have the kernel version:
Code: | genpi-ext # head -5 Makefile
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 7
SUBLEVEL = 2
EXTRAVERSION =
|
|
|
Back to top |
|
|
BennyP Guru
Joined: 09 May 2003 Posts: 503 Location: Jerusalem, Israel
|
Posted: Tue Feb 06, 2024 8:09 pm Post subject: |
|
|
Thanks all. the git branch wasn't the issue, and anyways my prompt tells me what branch I'm on. Indeed, the problem was that I followed the guide to install into the firmware subdir. This is the correct sequence of commands for a gentoo install, afaict:
Code: | make -j4 Image.gz modules dtbs
sudo make modules_install
sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm64/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm64/boot/Image.gz /boot/kernel_2712.img |
_________________ Could it be? |
|
Back to top |
|
|
|