Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

[SOLVED] Raspberry Pi4 how to Kernel upgrade

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
10 posts • Page 1 of 1
Author
Message
ROGA
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Sat Feb 17, 2018 1:59 pm
Location: Zurich, Switzerland
Contact:
Contact ROGA
Website

[SOLVED] Raspberry Pi4 how to Kernel upgrade

  • Quote

Post by ROGA » Fri Dec 27, 2019 3:42 pm

Hi,

I could successful install Gentoo on a Raspberry Pi 4 with this guide and this guide.

For my first installation I Fetched the Kernel Version rspi-4.19.y from the Git-Hub Repository and cross-compiled it. All worked well and my Pi could afterwards boot successfully.


Later I saw that there are other branch version of the kernel so I would tried to upgrade the kernel to the version rpi-4.20.y.

I did following on my pc:

Code: Select all

root@gentoo ~/RaspberryPi/linux # git checkout rpi-4.20.y
Checking out files: 100% (12834/12834), done.
Switched to a new branch 'rpi-4.20.y'
then I updated the .config file

Code: Select all

root@gentoo ~/RaspberryPi/linux # ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- make olddefconfig
after that I compiled and installed the new kernel

Code: Select all

root@gentoo ~/RaspberryPi/linux # ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- make -j9
root@gentoo ~/RaspberryPi/linux # cp ~/RaspberryPi/linux/arch/arm64/boot/Image /mnt/gentoo/boot/kernel8.img
and installed the associated kernel-modules.

Code: Select all

root@gentoo ~/RaspberryPi/linux # ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- make modules_install INSTALL_MOD_PATH=/mnt/gentoo
I then put the microSD in my raspberry pi 4 and booted it but it doesn't boot anymore.

Does this branch version not work? Or do I had made a wrong step?

I am very grateful for any information.
Last edited by ROGA on Fri Dec 27, 2019 5:15 pm, edited 1 time in total.
regards,

Roland
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Dec 27, 2019 3:52 pm

ROGA,

When you checked out rpi-4.20.y, it came with a new bcm2711_defconfig. You should use that as your starting point.
I don't know what

Code: Select all

ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- make olddefconfig
does inside a git checkout.
If you copy the old .config outside of git, do the checkout, then move the old .config back to the kernel, I would be more confident that make olddefconfig would do what you were expecting.

There is a working rpi-5.4.y branch now too, so its time to migrate to that.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ROGA
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Sat Feb 17, 2018 1:59 pm
Location: Zurich, Switzerland
Contact:
Contact ROGA
Website

  • Quote

Post by ROGA » Fri Dec 27, 2019 4:35 pm

NeddySeagoon,

I did what you recommended and also migrate to the newest branch version 5.4.y and really it works now! :lol:

Thank you very much!!!!!
regards,

Roland
Top
ROGA
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Sat Feb 17, 2018 1:59 pm
Location: Zurich, Switzerland
Contact:
Contact ROGA
Website

  • Quote

Post by ROGA » Fri Dec 27, 2019 6:45 pm

Hi NeddySeagoon,

it sems that the new branch kernel version 5.4.y has a problem with the onboard nic. I couldn't see a nic anymore after migration.

I don't have any Idea, how I could solve this problem :?

lspci and lsusb don't show me a nic-card, stange!
regards,

Roland
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Dec 27, 2019 6:57 pm

ROGA,

It works here. Did you use the correct .dtb?
Only the USB3 is on a PCIe lane. The LAN is on its own Broadcom link.

My Pi4 kernel binary is on my server.

bcm2711-rpi-4-b.dtb_64 is the 64 bit device tree.
kernel-5.4.3-v8+ is the kernel binary.
config.txt sets up things the way I like and loads the above files by name

5.4.3-v8+.tbz2 is a tarball of the kernel modules.
It needs to be untarred to /lib/modules/ on the Pi.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ROGA
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Sat Feb 17, 2018 1:59 pm
Location: Zurich, Switzerland
Contact:
Contact ROGA
Website

  • Quote

Post by ROGA » Fri Dec 27, 2019 8:50 pm

NeddySeagoon,
It works here.
Good to hear that, I remain confident
Did you use the correct .dtb?
Ohh, I used the same .dtb file as with kernel 4.19.y. I didn't realize that the new kernel version brings a new .dtb file. I did think that this could be the same file for all kernel versions.

That was my problem, thanks for this hint.

Now I have kernel 5.4.y and it works with network. But I had to install the branch kernel 5.4.y from the scratch.

What I need to know is the exact procedure to migrate to newer kernel without losing my old .config

btw: your config.txt file is a great example! That's a good way to handle with multiple kernel version and .dtb files.
regards,

Roland
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Dec 27, 2019 9:02 pm

ROGA,

I start with the bcm2711_defconfig for every kernel as I only make one or two changes.
If you make lots of changes, then in worth preserving your .config outside of git.
Do the git pull or git checkout to update your copy of the repo.
Restore the .config inside the repo
Then

Code: Select all

ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- make oldconfig
to update the .config for the new kernel.

The dtb does not change much but the Pi4 is still new so its important to keep a matching kernel/dtb set.
Mostly, the old dtb will be fine but not always :)
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ROGA
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Sat Feb 17, 2018 1:59 pm
Location: Zurich, Switzerland
Contact:
Contact ROGA
Website

  • Quote

Post by ROGA » Fri Dec 27, 2019 9:24 pm

Thank's NeddySeagoon,

I will try your suggestions the next time, when a new version will be released. For safety I wrote down the steps in my wiki :)

In the meantime, I now will build my Raspberry Pi 3+ with gentoo. Hopefully it will work too :wink:
regards,

Roland
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56085
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Dec 27, 2019 9:31 pm

ROGA,

The same userland works on both Pi3s and the Pi4
You need a different kernel and dtb depending on the version.

config.txt understands some filers. bootcode.bin can determine what Pi its running on, so you can make one SD card that will boot on any Pi.
That is left as an exercise for the reader :)
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ROGA
Apprentice
Apprentice
User avatar
Posts: 163
Joined: Sat Feb 17, 2018 1:59 pm
Location: Zurich, Switzerland
Contact:
Contact ROGA
Website

  • Quote

Post by ROGA » Fri Dec 27, 2019 9:57 pm

NeddySeagoon,
so you can make one SD card that will boot on any Pi
hey, that sounds great! I will take on this challenge. :wink:
regards,

Roland
Top
Post Reply
  • Print view

10 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic