LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 06-26-2021, 07:34 AM   #1
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Rep: Reputation: Disabled
slarm64 - upgrading the kernel


I wonder if someone could post an "Idiot's Guide" to upgrading the kernel in slarm64?

I do it all the time in x86_64 systems using a script I wrote:

Code:
installpkg /path/to/Slackware/slackware64-current/slackware64/a/kernel-generic-*.txz
installpkg /path/to/Slackware/slackware64-current/slackware64/a/kernel-modules-*.txz
installpkg /path/to/Slackware/slackware64-current/slackware64/k/kernel-source-*.txz
upgradepkg /path/to/Slackware/slackware64-current/slackware64/d/kernel-headers-*.txz
(followed by mkinitrd and linking the various bits and bobs to the generic names, finally re-running lilo or grub-mkconfig)

However, I'm confused by the slarm64 boot system. There appear to be two parallel systems available, selected by changing the line in the /boot/config.txt file between u-boot.bin and Image.

I usually run the Image file, as in the early days with my Pi-400 I had a few issues I was trying to nail down! Either version now seems to work OK, but "Image" gives me a display of four raspberries during the initial part of boot (one for each core, like the penguins on x86_64))

In my boot partition are several files that appear to be associated with the kernel - boot process. There is a vmlinuz-5.10.9 file, which speaks for itself, along with a uInitrd-5.10.9 file and a uInitrd file, both of which appear to be identical (why?). There is also an Image file, which is much larger than the vmlinuz file, and is the file I assume is called by config.txt

My question is how are all these files related, and - in the case of the Image file - how is it created?

I would like to upgrade to the 5.12 series kernel, but my lack of familiarity with Arm64 is holding me back. I can see hints of what is happening, but don't know how to proceed.

Any advice gratefully accepted!

--
Pete
 
Old 06-26-2021, 08:37 AM   #2
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,923

Rep: Reputation: Disabled
you can use the distribution's kernel to update the kernel, but the kernel may not work without additional patches.
therefore, to upgrade to a working kernel, you need to download the latter for a specific board (for example, kernel-bcm2711-5.12.4) and update via
Code:
upgradepkg kernel*.txz
after which you can update initrd
Code:
/boot/rebuild-initrd.sh
regarding files, since in raspberry pi 4 boot files are located on fat32, symlinks cannot be installed, but the creation of the structure is the same as for any other board.
vmlinuz-5.12.4 = Image <-- kernel
config-5.12.4 = config <-- kernel config
uInitrd-5.12.4 = uInitrd <-- initrd u-boot format

in config.txt an entry is left to quickly switch to boot by changing u-boot.
 
Old 06-26-2021, 09:16 AM   #3
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
Thanks for the quick response! I'm still a little confused, though!

I'm currently running kernel 5.10.9. My boot partition has a uInitrd and a uInitrd-5.10.9 file, both of 9.7MiB (so probably the same. Yes, I understand about symlinks on FAT ) However, I'm booting the Image file directly (I think!) rather than use u-boot, so I assume the system must still recognise the different files name. I would have expected it to look for either initrd or initrd-5.10.9, but neither are present and none of the .txt files points to uInitrd.

On x86_64 I always keep at least one "old" kernel in case things go pear shaped! There doesn't seem to be any option for this at present - unless I can install lilo/elilo/grub? Do any of these work here?

I can also create an initrd for one kernel from another older one under x86_64. I just tell it the kernel number, and it will make an initrd regardless of whether that is the running kernel or not. Indeed, without an initrd, I can't boot the kernel under x86_64, so I have to create the initrd from "outside" the desired kernel. Is this not possible under the arm boot system?

Sorry if I'm being a bit dense here, but I'd like to be clear in my head as to what I'm doing before I start! (Always a good plan! )

I have copied my SD card to another, so I do have a fall back!

TIA,

--
Pete
 
Old 06-26-2021, 10:10 AM   #4
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,923

Rep: Reputation: Disabled
Quote:
Originally Posted by pchristy View Post
I'm currently running kernel 5.10.9. My boot partition has a uInitrd and a uInitrd-5.10.9 file, both of 9.7MiB (so probably the same. Yes, I understand about symlinks on FAT ) However, I'm booting the Image file directly (I think!) rather than use u-boot, so I assume the system must still recognise the different files name. I would have expected it to look for either initrd or initrd-5.10.9, but neither are present and none of the .txt files points to uInitrd.
when using kernel=Image
settings from cmdline.txt are used for loading, so uInitrd is not used in this case.

Quote:
Originally Posted by pchristy View Post
On x86_64 I always keep at least one "old" kernel in case things go pear shaped! There doesn't seem to be any option for this at present - unless I can install lilo/elilo/grub? Do any of these work here?
you can rename before updating

Quote:
Originally Posted by pchristy View Post
I can also create an initrd for one kernel from another older one under x86_64. I just tell it the kernel number, and it will make an initrd regardless of whether that is the running kernel or not. Indeed, without an initrd, I can't boot the kernel under x86_64, so I have to create the initrd from "outside" the desired kernel. Is this not possible under the arm boot system?
initrd is unnecessary in most cases, script /boot/rebuild-initrd.sh can also do for any kernel.
 
Old 06-26-2021, 11:12 AM   #5
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
OK, thanks for the guidance. I'll have a go and see what happens! Probably not until tomorrow, though!

Cheers,

--
Pete
 
Old 07-07-2021, 03:03 AM   #6
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
I finally got around to upgrading the kernel yesterday, following the links and instructions you kindly supplied. It all went smoothly, except that it killed WiFi!

Bluetooth still worked, but WiFi was dead. Again, it appears to be a firmware issue. I notice that you've linked from the /firmware/brcm folder to the /firmware/ap6256 folder - presumably to get around the duplication of file names that I discovered some time ago. Unfortunately, it doesn't work for the 400!

I've tried substituting the various brcmfmac43456-sdio files individually, to try and locate the culprit, but to no avail. The only thing that has worked is removing the ap6256 folder, and replacing the brcm folder with one from raspbian.

Interestingly, when it all works, I find this in dmesg:

Code:
dmesg | grep 43456
[    2.460016] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
[    2.481268] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43456-sdio.raspberrypi,400.txt failed with error -2
[    2.660504] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43456-sdio for chip BCM4345/9
So despite the error for the 400.txt file, it ll works fine. I don't know if this gives you a clue or not (this is using the raspbian brcm folder).

I've got backups of all three folders stored locally, so its relatively easy for me to substitute and try fault-finding, if you want me to try something different. I've run out of ideas, but you may have a suggestion or two.

In the meantime, I'm back up and running, but using the raspbian firmware files.

Cheers,

--
Pete

Last edited by pchristy; 07-07-2021 at 03:07 AM.
 
Old 09-20-2021, 05:12 AM   #7
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
I've been trying to upgrade to the 5.14.1 kernel, but unfortunately, it doesn't work on the Pi-400!

I followed the instructions above, using the BCM-2711 kernel from your post here: http://dl.slarm64.org/slackware/imag...y_pi_4/kernel/

The system boots initially (I see the 4 raspberries), but then goes to a black screen and the keyboard becomes unresponsive. I've tried this twice - just in case I made an error the first time - but with the same result.

I know there are minor differences between the Pi 4 and 400, but in the past this has only meant fiddling with the firmware to get WiFi to work. This time, its a total bork!

Not sure how much help I can be here, as when the system crashes, all I can do is remove the power! I'll try putting the sd card in my desktop and see if there's anything in the logs, but I'm not holding my breath.

Cheers,

--
Pete
 
Old 09-20-2021, 09:55 AM   #8
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,923

Rep: Reputation: Disabled
Quote:
Originally Posted by pchristy View Post
I've been trying to upgrade to the 5.14.1 kernel, but unfortunately, it doesn't work on the Pi-400!

I followed the instructions above, using the BCM-2711 kernel from your post here: http://dl.slarm64.org/slackware/imag...y_pi_4/kernel/

The system boots initially (I see the 4 raspberries), but then goes to a black screen and the keyboard becomes unresponsive. I've tried this twice - just in case I made an error the first time - but with the same result.

I know there are minor differences between the Pi 4 and 400, but in the past this has only meant fiddling with the firmware to get WiFi to work. This time, its a total bork!

Not sure how much help I can be here, as when the system crashes, all I can do is remove the power! I'll try putting the sd card in my desktop and see if there's anything in the logs, but I'm not holding my breath.

Cheers,

--
Pete
yes the problem is in the graphics driver. change in /boot/config.txt
Code:
[pi4]
#dtoverlay=vc4-fkms-v3d
dtoverlay=vc4-kms-v3d
 
Old 09-20-2021, 10:46 AM   #9
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
That makes sense!

I'll make the changes and have another go. May have to wait until tomorrow though, as we're going out shortly!

Thanks for your prompt fix!



--
Pete
 
Old 09-21-2021, 04:56 AM   #10
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
OK, that has got it running again, but has also re-introduced an issue I had forgotten about!

Despite setting the default run level to 4 in inittab, sddm no longer starts. I am dropped to a command prompt.

Not the end of the world, as logging in at the command prompt and issuing "startx" gets Plasma up and running, but clearly something is unhappy there for some reason. Any ideas?

Oh, and Wifi has stopped working again, but I think I know the fix for that (the good old firmware problem...!)

<sigh!> Every time I think I'm starting to get a handle on ARM, I find that I'm still missing a lot of knowledge...!

--
Pete
 
Old 09-22-2021, 04:58 AM   #11
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
Further update: Switching graphics drivers has also had a severely detrimental effect on the graphics performance. KDE animations are now very jerky (I know, turn them off! But they were OK previously), and video playback is now jerky as well.

Thinking back I seem to recall switching to the firmware(?) driver because it improved performance. Switching back seems to confirm this.

Is there anything I can do to fix this, other than revert to the older kernels? I'm happy to work on it, but need some pointers to help with my inexperience on ARM.

--
Pete
 
Old 09-22-2021, 09:26 AM   #12
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
A bit more digging...

It appears that hardware graphics acceleration is only available with vc4-fkms-v3d. The kms version does not support it.

I can check by:
Code:
cat /proc/device-tree/soc/firmwarekms@7e600000/status
and
Code:
cat /proc/device-tree/v3dbus/v3d@7ec04000/status
Under kernel 5.12.4 and fkms, both these return "okay", indicating that hardware acceleration is working. Under 5.14.1 and kms (fkms doesn't work), the first returns "disabled", and the second that the location doesn't exist.

This is a showstopper for me, so for the moment, I'm back on 5.12.4.

--
Pete
 
1 members found this post helpful.
Old 09-27-2021, 12:30 PM   #13
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,126

Original Poster
Rep: Reputation: Disabled
Just tried 5.14.7 and normal service has been resumed!

The fkms driver now works, and all is well in Pi 400 land!

Still no wifi unless I do my usual bodge with the /lib/firmware folders, deleting ap6256 and replacing brcm with the one from raspbian.

--
Pete
 
Old 09-27-2021, 03:30 PM   #14
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,923

Rep: Reputation: Disabled
ok i haven't gotten to reboot yet to test.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slarm64 on the Pinebook 1080 - help with kernel? shelldweller Slackware - ARM 229 12-07-2021 09:00 AM
[SOLVED] Slarm64 / Xfce / Blueman / PyGObject - GUI seems broken? shelldweller Slackware - ARM 9 02-20-2020 10:25 AM
Installing slarm64 on a Raspberry PI 4 akschu Slackware - ARM 0 01-04-2020 09:44 PM
slarm64 no wifi kermitdafrog8 Slackware - ARM 45 09-27-2019 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration