trejan
Posts: 1830
Joined: Tue Jul 02, 2019 2:28 pm

Re: Moving Linux Kernel to 5.4

Wed May 20, 2020 7:33 pm

rcfa wrote:
Wed May 20, 2020 7:04 pm
I got two machines a 3B and 3B+, both of which should be 64-bit capable, but as can be seen here, rpi-update doesn't download the necessary files:
Is this an old Stretch install you upgraded to Buster? rpi-update won't automatically copy the kernel7l.img and kernel8.img kernels if this was an old Stretch install as the /boot partition is too small. The Buster image has a /boot partition that is 4x as big. You can force it by creating an empty /boot/kernel7l.img before running rpi-update but you risk running out of space for future updates.

cjan
Posts: 828
Joined: Sun May 06, 2012 12:00 am

Re: Moving Linux Kernel to 5.4

Wed May 20, 2020 10:39 pm

dom wrote:
Wed May 20, 2020 12:41 pm
cjan wrote:
Tue May 19, 2020 6:00 am
dtoverlay=vc4-kms-v3d on Pi2, no analog audio.
last update to 5.4.40.
There is no arm side analogue driver. You probably want:

Code: Select all

dtparam=audio=on
dtoverlay=vc4-kms-v3d,audio=off
Also note this post about separate alsa devices.
did not work.
sorry forgot to say, boot into CLI-console.

rcfa
Posts: 15
Joined: Sun Feb 25, 2018 5:22 am

Re: Moving Linux Kernel to 5.4

Wed May 20, 2020 11:11 pm

trejan wrote:
Wed May 20, 2020 7:33 pm
rcfa wrote:
Wed May 20, 2020 7:04 pm
I got two machines a 3B and 3B+, both of which should be 64-bit capable, but as can be seen here, rpi-update doesn't download the necessary files:
Is this an old Stretch install you upgraded to Buster? rpi-update won't automatically copy the kernel7l.img and kernel8.img kernels if this was an old Stretch install as the /boot partition is too small. The Buster image has a /boot partition that is 4x as big. You can force it by creating an empty /boot/kernel7l.img before running rpi-update but you risk running out of space for future updates.
Ah, thanks! That’s exactly what it is!
How big are the new boot partitions?
This is on SSDs, so I can resize them with some tools, hopefully...

Also, since I’m already on the latest kernel, is there a way to force the update to run again?

trejan
Posts: 1830
Joined: Tue Jul 02, 2019 2:28 pm

Re: Moving Linux Kernel to 5.4

Wed May 20, 2020 11:23 pm

rcfa wrote:
Wed May 20, 2020 11:11 pm
How big are the new boot partitions?
/boot is 256MB on the Buster images.

branchus
Posts: 3
Joined: Sat May 09, 2020 10:58 am

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 8:10 am

looking forward to this
once the usb boot is practical usable, I will rebuild my system, hope the new kernel is available at that time.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5501
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 9:54 am

rcfa wrote:
Wed May 20, 2020 11:11 pm
Also, since I’m already on the latest kernel, is there a way to force the update to run again?

Code: Select all

sudo rm /boot/.firmware_revision
Then run rpi-update again.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2869
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 10:03 am

@DougieLawson Did you ever get your MAX7219 display working? I ask because I finally got round to hooking mine up, and it's running fine with 5.4.42 and the hacked test programme (although I had to delete those two leading spaces to get all 8 digits displayed).

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5501
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 10:28 am

cjan wrote:
Wed May 20, 2020 10:39 pm
did not work.
sorry forgot to say, boot into CLI-console.
"did not work" is not really useful. What exactly did you run and how did it fail (just silent, or with an error message).
Is the alsa device present? Report output of "aplay -l"

User avatar
dickon
Posts: 1412
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 11:14 am

I'm stuck, and I don't really know where to begin. arm_64bit=1 in /boot/config.txt results in no wifi interfaces appearing, although everything else seems OK. Pertinent bits of dmesg are:

(64b:)

Code: Select all

[   13.351321] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[   13.352779] usbcore: registered new interface driver brcmfmac
[   13.366037] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
(32b:)

Code: Select all

[   13.138493] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[   13.160688] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
and, indeed, I see that that file is missing. Copying the brcmfmac43455-sdio.* to brcmfmac43455-sdio.raspberrypi,4-model-b.* and rebooting didn't help.

Any ideas?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2869
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 11:20 am

The Pi4-specific .txt file isn't meant to be there, but you've trimmed too much of the log to be useful - "dmesg | grep brcmfmac" would be better.

User avatar
dickon
Posts: 1412
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 11:26 am

Apologies. 64b:

Code: Select all

[   12.753082] brcmfmac: F1 signature read @0x18000000=0x15264345
[   12.770171] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[   12.770712] usbcore: registered new interface driver brcmfmac
[   12.786774] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
vs. 32b:

Code: Select all

[   12.834477] brcmfmac: F1 signature read @0x18000000=0x15264345
[   12.845454] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[   12.846064] usbcore: registered new interface driver brcmfmac
[   12.860141] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
[   13.138493] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[   13.160688] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2

User avatar
dickon
Posts: 1412
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 11:39 am

This look pertinent, too:

Code: Select all

[   23.007277] mmc1: Timeout waiting for hardware interrupt.
[  242.659272] INFO: task kworker/0:1:31 blocked for more than 120 seconds.
[  242.659289]       Tainted: G         C        5.4.42-v8+ #1319
[  242.659297] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this 
message.
[  242.659308] kworker/0:1     D    0    31      2 0x00000028
[  242.659344] Workqueue: events request_firmware_work_func
[  242.659357] Call trace:
[  242.659374]  __switch_to+0xc4/0x248
[  242.659388]  __schedule+0x3dc/0x780
[  242.659399]  schedule+0x44/0xc8
[  242.659412]  schedule_timeout+0x244/0x370
[  242.659423]  wait_for_completion+0xa8/0x128
[  242.659439]  mmc_wait_for_req_done+0x48/0x150
[  242.659452]  mmc_wait_for_req+0xa0/0xe0
[  242.659465]  mmc_io_rw_extended+0x2d8/0x308
[  242.659479]  sdio_io_rw_ext_helper+0x180/0x1e8
[  242.659492]  sdio_memcpy_toio+0x44/0x58
[  242.659546]  brcmf_sdiod_skbuff_write.isra.14+0x48/0x98 [brcmfmac]
[  242.659589]  brcmf_sdiod_ramrw+0x120/0x250 [brcmfmac]
[  242.659630]  brcmf_sdio_firmware_callback+0x194/0x840 [brcmfmac]
[  242.659671]  brcmf_fw_request_done+0x98/0xf8 [brcmfmac]
[  242.659685]  request_firmware_work_func+0x50/0x90
[  242.659698]  process_one_work+0x158/0x4b8
[  242.659710]  worker_thread+0x50/0x498
[  242.659721]  kthread+0xfc/0x128
[  242.659734]  ret_from_fork+0x10/0x1c
which repeats every two minutes or so.

cjan
Posts: 828
Joined: Sun May 06, 2012 12:00 am

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 11:42 am

dom wrote:
Thu May 21, 2020 10:28 am
cjan wrote:
Wed May 20, 2020 10:39 pm
did not work.
sorry forgot to say, boot into CLI-console.
"did not work" is not really useful. What exactly did you run and how did it fail (just silent, or with an error message).
Is the alsa device present? Report output of "aplay -l"
alsa headphone device present, but silent.

User avatar
DougieLawson
Posts: 38795
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 1:25 pm

PhilE wrote:
Thu May 21, 2020 10:03 am
@DougieLawson Did you ever get your MAX7219 display working? I ask because I finally got round to hooking mine up, and it's running fine with 5.4.42 and the hacked test programme (although I had to delete those two leading spaces to get all 8 digits displayed).
I've got three MAX7219 devices (two with the 8-digit LEDs, one with an 8x8 matrix).

Works OK on a 3A+ (64-bit), works OK on a 3B (64-bit)
Still does NOT work on a Raspberry Pi Zero Rev 1.2 (tested it with 5.4.42+ yesterday, back on 4.19.118 today)

I'll move one of those displays to an old RPi1B and give that a go.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2869
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 1:35 pm

@dickon That's peculiar. The 64-bit kernel I just built has no problem with WiFi:

Code: Select all

pi@raspberrypi:~$ uname -a
Linux raspberrypi 5.4.42-v8+ #209 SMP PREEMPT Thu May 21 13:45:07 BST 2020 aarch64 GNU/Linux
pi@raspberrypi:~$ dmesg | grep brcmf
[    6.585966] brcmfmac: F1 signature read @0x18000000=0x15264345
[    6.599090] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.599969] usbcore: registered new interface driver brcmfmac
[    6.621499] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
[    6.838296] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.857011] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
[    8.829051] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
Are you testing by adding "arm_64bit=1" and making no other changes? What do you have in your config.txt?

User avatar
dickon
Posts: 1412
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 1:46 pm

I am. Just commenting and uncommenting that line. Contents (and I apologise; it's a fairly long-lived thing, so has accumulated some cruft):

Code: Select all

root@rtr-dickonh:~# cat /tftpboot/pi4/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

arm_64bit=1
gpu_mem=256

initramfs initrd.gz
hdmi_enable_4k=1

dtoverlay=w1-gpio
hdmi_ignore_cec_init=1

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
bootloader_update=1

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
# dtoverlay=vc4-kms-v3d-pi4
max_framebuffers=2
enable_uart=1
dtoverlay=uart5,uart0
start_x=1

[all]
#dtoverlay=vc4-fkms-v3d
hdmi_enable_4kp60=1
root@rtr-dickonh:~# 
I've also tested this on an SD card, so it isn't an artifact of netbooting it. I'm attempting to test it on a spare 3B as I type. The initramfs is present to get the NFS root on the bridge device, which it does with a script in nfs-top, which NFS mounts the eventual filesystem, runs 'chroot /root modprobe bridge', does a couple of brctl calls, umount, and continues. As there are no version-specific modules in that, it shouldn't be making any difference.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2869
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 1:59 pm

There's nothing obviously wrong there. A few observations:

Code: Select all

# dtoverlay=vc4-kms-v3d-pi4
This can/should be:

Code: Select all

# dtoverlay=vc4-kms-v3d
provided you are using current firmware and have installed "overlay_map.dtb" into the overlays directory.

Code: Select all

dtoverlay=uart5,uart0
The use of uart0 there could confuse a simple person, since it is a global dtparam rather than a parameter of the uart5 overlay, but it isn't wrong.

I'd like to see a test without the initrd.gz, to rule that out as a potential cause.

User avatar
dickon
Posts: 1412
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 2:21 pm

Same problem with a direct, kernel-driven mount, only obviously the IP address is now on the wrong interface:

Code: Select all

root@pi4:~# dmesg | grep brcmfmac
[    9.507505] brcmfmac: F1 signature read @0x18000000=0x15264345
[    9.530537] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    9.531508] usbcore: registered new interface driver brcmfmac
[    9.551369] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
[  242.660849]  brcmf_sdiod_skbuff_write.isra.14+0x48/0x98 [brcmfmac]
[  242.660892]  brcmf_sdiod_ramrw+0x120/0x250 [brcmfmac]
[  242.660934]  brcmf_sdio_firmware_callback+0x194/0x840 [brcmfmac]
[  242.660975]  brcmf_fw_request_done+0x98/0xf8 [brcmfmac]
[  363.495601]  brcmf_sdiod_skbuff_write.isra.14+0x48/0x98 [brcmfmac]
[  363.495644]  brcmf_sdiod_ramrw+0x120/0x250 [brcmfmac]
[  363.495686]  brcmf_sdio_firmware_callback+0x194/0x840 [brcmfmac]
[  363.495728]  brcmf_fw_request_done+0x98/0xf8 [brcmfmac]
root@pi4:~# 

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2869
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 2:42 pm

I have no idea what's causing the WLAN firmware to die as it is appearing to, but I have a feeling that starting with a clean Raspbian image you would see no such problem.

User avatar
dickon
Posts: 1412
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 3:35 pm

Yes, it does appear that I can boot the pi with another filesystem and it works, but I'm loathe to simply dump this one and start again because it's annoying to keep doing that, and I haven't done anything odd to it that I can think of that would cause this problem. The wifi works perfectly happily with the 32b kernels, and with the 64b 4.x.y (IIRC), so I'm not sure why it isn't with the 64b 5.x.y kernel. If I simply dump everything and start again, I run the risk of tripping over the same thing at some point in the future.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2869
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 3:37 pm

Have you built your kernel with the standard arm64 bcm2711_defconfig, or have you made some changes?

User avatar
dickon
Posts: 1412
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 3:38 pm

This is a rpi-update kernel. I haven't rebuilt it.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2869
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 3:41 pm

Good. I had to ask.

rcfa
Posts: 15
Joined: Sun Feb 25, 2018 5:22 am

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 3:47 pm

trejan wrote:
Wed May 20, 2020 11:23 pm
rcfa wrote:
Wed May 20, 2020 11:11 pm
How big are the new boot partitions?
/boot is 256MB on the Buster images.
Thanks! Great, that (almost) worked. Gparted refused to make a 256MB partition and “corrected” my input always back to 255MB, which should be big enough for the foreseeable future given that just about 22% of /boot are used now.

So aside from rpi-update bitching about the partition being 1MB too small, things are up and running, 64-bit kernel is alive.

Are there any non-kernel binaries that are in aarch64 that one should preferably install? Anything that should be added to /etc/apt/sources.list ?

rcfa
Posts: 15
Joined: Sun Feb 25, 2018 5:22 am

Re: Moving Linux Kernel to 5.4

Thu May 21, 2020 3:49 pm

dom wrote:
Thu May 21, 2020 9:54 am
rcfa wrote:
Wed May 20, 2020 11:11 pm
Also, since I’m already on the latest kernel, is there a way to force the update to run again?

Code: Select all

sudo rm /boot/.firmware_revision
Then run rpi-update again.
Thanks! That did it!

Return to “Advanced users”