WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Use the last linux kernel on piCore arm64  (Read 8340 times)

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Use the last linux kernel on piCore arm64
« on: January 24, 2023, 04:20:38 AM »
How can I use the latest stable linux kernel from kernel.org, for piCore 64 ?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Use the last linux kernel on piCore arm64
« Reply #1 on: January 24, 2023, 05:16:42 AM »
The latest stable kernel for kernel.org is 6.1.x

The latest stable kernel for the Pi OS is 5.15.x

As per the RPi forums, there are still many issues with 6.1.x for RPi.

@bmarkus and @paul_123 can confirm, but I understand they are using the Pi OS kernel.

The above notwithstanding, I believe you can compile the kernel for piCore64 using "make ARCH=arm64 bcm2711_defconfig"
« Last Edit: January 24, 2023, 07:31:33 AM by Juanito »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 724
Re: Use the last linux kernel on piCore arm64
« Reply #2 on: January 24, 2023, 05:18:04 AM »
I think picore is based on raspberrypi os kernel source.
Not the mainline kernel source.

I think also if you want to compile your own latest mainline kernel, you should take a look at BuildRoot, i think BuildRoot using the mainline kernel source, maybe there also so behind the latest kernel version i don't know.

I could be wrong.

https://buildroot.org/
« Last Edit: January 24, 2023, 05:30:23 AM by patrikg »

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: Use the last linux kernel on piCore arm64
« Reply #3 on: January 24, 2023, 01:17:56 PM »
Ok,I manage to compile the last kernel from Raspberry OS repository

Now, when I try to boot, it says: modprobe: can't change directory to '5.15.89-v8+'


Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1270
Re: Use the last linux kernel on piCore arm64
« Reply #4 on: January 24, 2023, 05:35:26 PM »
Building a new kernel and remastering the image is quite technical.

As a quick test, you can download the kernel and modules direct from https://github.com/raspberrypi/firmware/tree/next/boot

But you will have to package your initrd, and all of the module extension..... figuring out what you need in the initrd, and what can be in an extension is where the expertise is needed to keep the images small.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Use the last linux kernel on piCore arm64
« Reply #5 on: January 24, 2023, 11:23:20 PM »
For 32-bit version of piCore now I'm using the stock RPi OS kernel, not a dedicated one as before. It has all option enabled by default we needed.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: Use the last linux kernel on piCore arm64
« Reply #6 on: January 25, 2023, 06:11:29 AM »
Building a new kernel and remastering the image is quite technical.

As a quick test, you can download the kernel and modules direct from https://github.com/raspberrypi/firmware/tree/next/boot

But you will have to package your initrd, and all of the module extension..... figuring out what you need in the initrd, and what can be in an extension is where the expertise is needed to keep the images small.

thanks

I see that in boot partition for piCore 64 13.1 is the archive rootfs-piCore64-13.1.gz. It will work on the new version (6.18) or should be use another?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Use the last linux kernel on piCore arm64
« Reply #7 on: January 25, 2023, 07:49:31 AM »
You would need to create alternatives to kernel51077v8.img and modules-5.10.77-piCore-v8.gz and would probably need to create a new /lib/modules/$KERNEL folder in rootfs-piCore64-13.1.gz

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: Use the last linux kernel on piCore arm64
« Reply #8 on: January 25, 2023, 07:58:48 AM »
You would need to create alternatives to kernel51077v8.img and modules-5.10.77-piCore-v8.gz and would probably need to create a new /lib/modules/$KERNEL folder in rootfs-piCore64-13.1.gz

I already do so, but at boot it says modprobe: can't find folder

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Use the last linux kernel on piCore arm64
« Reply #9 on: January 25, 2023, 08:34:29 AM »
Did you run depmod -a in the new modules directory?

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: Use the last linux kernel on piCore arm64
« Reply #10 on: January 25, 2023, 09:14:53 AM »
Did you run depmod -a in the new modules directory?

No,

I use kubuntu with 5.10.15.0-58 generic kernel. If I run depmod -a in modules directory, nothing is changed there...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Use the last linux kernel on piCore arm64
« Reply #11 on: January 25, 2023, 09:35:36 AM »
I'm speaking of your replacement for modules-5.10.77-piCore-v8.gz

Assuming you unpacked it in /tmp/extract, you need something analogous to this:
Code: [Select]
sudo rm /tmp/extract/lib/modules/4.19.10-tinycore/kernel.tclocal
sudo depmod -a -b /tmp/extract 4.19.10-tinycore
cd /tmp/extract/lib/modules/4.19.10-tinycore
sudo rm modules.symbols
sudo ln -s /usr/local/lib/modules/4.19.10-tinycore/kernel/ kernel.tclocal

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: Use the last linux kernel on piCore arm64
« Reply #12 on: January 25, 2023, 11:52:05 AM »
The last line of code points to /usr/local/lib/modules/ but it’s the folder from my local ubuntu, there is no modules folder here

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Use the last linux kernel on piCore arm64
« Reply #13 on: January 25, 2023, 12:31:40 PM »
Once your new initrd boots, it will be present there.
« Last Edit: January 25, 2023, 12:37:22 PM by Juanito »

Offline cosminbro

  • Jr. Member
  • **
  • Posts: 68
Re: Use the last linux kernel on piCore arm64
« Reply #14 on: January 25, 2023, 01:07:24 PM »
Once your new initrd boots, it will be present there.

I think it's a missunderstanding here :)

I boot using kubuntu 64 bit on a PC, and I do cross compile kernel for rpi.

I don't boot on rpi device