smith110
Posts: 8
Joined: Tue Jul 16, 2019 7:21 am

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Thu Oct 03, 2019 12:22 pm

Would it be possible to start with “hybrid” 32/64 bit useland? I do not expect pure 64 bit distro, but 32 bit is little bit fading now. Last example is LibreOffice - after version 6.3 64 bit only. And there is quite clear the Aarch64 has double number of SIMD reqisters and for example Wolfram Matematica can benefit from this.

incognitum
Posts: 398
Joined: Tue Oct 30, 2018 3:34 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Thu Oct 03, 2019 2:23 pm

Was any special kernel configuration used to build this 64-bit kernel?

Your kernel works ok for me, but if I try to build my own from source based on a slightly modified bcm2711_defconfig I am having less luck, and get no visual.

Code: Select all

[    1.655088] bcm2708_fb soc:fb: FB found 1 display(s)
[    1.655263] bcm2708_fb soc:fb: swiotlb: coherent allocation failed, size=65536
[    1.655281] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.19.56v64 #1
[    1.655291] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[    1.655301] Call trace:
[    1.655316]  dump_backtrace+0x0/0x170
[    1.655327]  show_stack+0x24/0x30
[    1.655341]  dump_stack+0x9c/0xd4
[    1.655354]  swiotlb_alloc+0x150/0x190
[    1.655367]  __dma_alloc+0xd8/0x218
[    1.655382]  bcm2708_fb_probe+0x14c/0x790
[    1.655396]  platform_drv_probe+0x58/0xa8
[    1.655408]  really_probe+0x1c4/0x290
[    1.655419]  driver_probe_device+0x5c/0x100
[    1.655431]  __driver_attach+0xe4/0xe8
[    1.655443]  bus_for_each_dev+0x84/0xd8
[    1.655454]  driver_attach+0x30/0x40
[    1.655466]  bus_add_driver+0x1c4/0x230
[    1.655478]  driver_register+0x64/0x110
[    1.655490]  __platform_driver_register+0x54/0x60
[    1.655503]  bcm2708_fb_init+0x20/0x28
[    1.655515]  do_one_initcall+0x54/0x268
[    1.655527]  kernel_init_freeable+0x2e8/0x390
[    1.655540]  kernel_init+0x18/0x110
[    1.655552]  ret_from_fork+0x10/0x1c
[    1.655565] bcm2708_fb soc:fb: cannot allocate DMA CBs
[    1.655580] bcm2708_fb soc:fb: probe failed, err -12
[    1.655604] bcm2708_fb: probe of soc:fb failed with error -12
(full log output: https://pastebin.com/cbx61Pnt )

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Thu Oct 03, 2019 2:39 pm

incognitum wrote:
Thu Oct 03, 2019 2:23 pm
Was any special kernel configuration used to build this 64-bit kernel?
https://github.com/raspberrypi/linux/bl ... _defconfig

incognitum
Posts: 398
Joined: Tue Oct 30, 2018 3:34 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Thu Oct 03, 2019 7:41 pm

My fault.
Did was using right kernel config, but old source. Works now.

piter1984
Posts: 6
Joined: Sun Oct 06, 2019 8:05 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sun Oct 06, 2019 8:15 pm

Hi,
After successfully switching into 64bit kernel I've ran sudo apt-get update and sudo apt-get dist-upgrade, rebooted... and my raspbian is unable to boot: it displays initial rainbow screen, 4 raspberries, "brcm-pcie fd500000.pcie: dmabounce..." line and that's all. Removal of arm_64bit=1 in /boot/config.txt gives nothing, literally there is no brcm-pcie fd500000.pcie: dmabounce... line even. Any ideas how to rescue?

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Sun Oct 06, 2019 10:49 pm

If it was me, I'd chroot into its filesystem and run rpi-update to fix it, but I assume you're not doing the sensible thing and netbooting the device.

Download an image and replace the boot filesystem with dd. Fairly simple job.

incognitum
Posts: 398
Joined: Tue Oct 30, 2018 3:34 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 10:26 am

- Might want to remove "quiet" from cmdline.txt to tell it to be a little bit more verbose, and see what it is doing before hanging.
- Also might want to try if things work better if you comment out "dtoverlay=vc4-fkms-v3d" in config.txt (just in case it does boot successfully, but there is something wrong with drm causing display to stay blank after switching from simplefb to drm driver).

piter1984
Posts: 6
Joined: Sun Oct 06, 2019 8:05 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 4:06 pm

Well, please find loading screen after "quiet" removed. My RP4 is 4GB RAM version.
After comment out also #arm_64bit=1 I have only splash screen, no loading at all.

Image

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 4:15 pm

That looks like it's waiting for its root filesystem. At a guess, you've managed to corrupt the partition table somehow, so the UUID has changed.

piter1984
Posts: 6
Joined: Sun Oct 06, 2019 8:05 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 4:36 pm

This time you overestimate my abilities ;) but seriously, any idea how to fix it without removing all data?

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 4:43 pm

If it was me, I'd edit cmdline.txt and replace the bit where it says 'root=PARTUUID=...' with 'root=/dev/mmcblk0p2'. There's probably some actual proper way of doing it, but I've never liked partition UUIDs.

piter1984
Posts: 6
Joined: Sun Oct 06, 2019 8:05 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 5:14 pm

Nope... still hangs at the same place except line PARTUUID(...), now its "waiting for root device mmcblk0p2

User avatar
DougieLawson
Posts: 36811
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 5:18 pm

piter1984 wrote:
Mon Oct 07, 2019 4:06 pm
Well, please find loading screen after "quiet" removed. My RP4 is 4GB RAM version.
After comment out also #arm_64bit=1 I have only splash screen, no loading at all.
Have you just run rpi-update to the 4.19.76* kernel?

I think today's update may be poisonous.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 5:23 pm

Hmm. That means it isn't seeing its SD card, then. If the GPU has loaded the kernel from it, I'd assume the kernel is broken in some way.

piter1984
Posts: 6
Joined: Sun Oct 06, 2019 8:05 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 5:30 pm

Have you just run rpi-update to the 4.19.76* kernel?
not 100% sure but probably yes. I updated yesterday.
Strange thing is that it was ok until apt-get update and apt-get dist-upgrade

incognitum
Posts: 398
Joined: Tue Oct 30, 2018 3:34 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 6:04 pm

piter1984 wrote:
Mon Oct 07, 2019 5:30 pm
Have you just run rpi-update to the 4.19.76* kernel?
not 100% sure but probably yes. I updated yesterday.
Strange thing is that it was ok until apt-get update and apt-get dist-upgrade
Is the 64-bit kernel included in the packages one gets through "apt-get dist-upgrade" ?

If not, the problem may be that the package downgraded the firmware, device-tree files and 32-bit kernel, but not the 64-bit kernel.
Perhaps using a newer 64-bit kernel with older device-tree file or firmware may gives problems?

Doesn't explain why 32-bit does not work though.


You may want to experiment with cherry picking the latest bcm2711-rpi-4-b.dtb/start4.elf/fixup4.dat from https://github.com/raspberrypi/firmware ... aster/boot
Make a backup of the existing files in FAT partition first though.

piter1984
Posts: 6
Joined: Sun Oct 06, 2019 8:05 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 6:31 pm

You may want to experiment with cherry picking the latest bcm2711-rpi-4-b.dtb/start4.elf/fixup4.dat from https://github.com/raspberrypi/firmware ... aster/boot
YES!!! Replacing these 3 files works :) thanks

swahren
Posts: 119
Joined: Mon Sep 19, 2016 5:24 pm
Location: Germany

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Mon Oct 07, 2019 8:02 pm

Feeling guilty for this. My recent pull request backported the upstream driver changes from 5.4 into 4.19. This also introduced the accepted upstream compatibles for clock and pinctrl which doesn't work with the pre 4.19.75 device tree. A possible workaround would be to add the old compatibles to the drivers, but in general it's not recommend to mix devicetree and kernel version.

burtyb
Posts: 36
Joined: Sat Mar 05, 2016 4:19 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Oct 08, 2019 1:34 pm

Is there a config.txt conditional for 32/64 bit or what's the best way of loading a matching initramfs file?

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Oct 08, 2019 3:13 pm

Current rpi-update firmware will always prefer 32-bit kernels over 64-bit kernels. The only auto-selection occurs when only one is present, but it can be overruled (and made to fail to load) by setting arm_64bit explicitly to 1 or 0. As a result, you don't need a filter for 64-bit.

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Oct 08, 2019 3:38 pm

It's annoying that mkinitramfs doesn't take multiple kernel versions, so you only ever end up with either the 32b or 64b modules in the initrd. That precludes using one initrd for either kernel, and means you need to make more than just the one-line change to config.txt when swapping around (either an initramfs stanza in config.txt, or changing a symlink).

Not using an initramfs at all isn't an option at times: I use one to stick eth0 into a bridge group, then mount the NFS root filesystem over that, which lets me also add wlan0 into the bridge when booted, so the machine doubles up as a cheap wifi AP. So it would be handy.

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Oct 08, 2019 3:46 pm

There's an "os_prefix" setting in the works that will allow multiple kernels to be installed on a single card (space permitting).

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

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Oct 08, 2019 4:59 pm

Will that help? I don't want multiple kernels installed -- beyond the 32b and 64b variants we already have -- but I do need some way to select the correct initrd, ideally based on the arm_64bit flag.

incognitum
Posts: 398
Joined: Tue Oct 30, 2018 3:34 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Tue Oct 08, 2019 5:08 pm

PhilE wrote:
Tue Oct 08, 2019 3:13 pm
As a result, you don't need a filter for 64-bit.
Slightly related question.
I prefer 64-bit if the device supports it.
So how can I filter for 64-bit CAPABLE devices?

Sure I could use filters like [pi3] [pi4] to point those to a 64-bit kernel and set arm_64bit=1.
But what about Pi 2, wouldn't [pi2] match both BCM2836 and BCM2837 models?

fanoush
Posts: 493
Joined: Mon Feb 27, 2012 2:37 pm

Re: Pi4 64-bit raspbian kernel for testing - Focus on Pi4

Fri Oct 11, 2019 7:43 am

EDIT: a bit of necro qouting from first thread page :-) (because at first I didn't notice I see first page instead of last page of the thread)
dom wrote:
Wed Sep 04, 2019 1:18 pm
If you are daring, edit /opt/Wolfram/WolframEngine/12.0/Executables/mathematica
find lines:

Code: Select all

				armv?l)
					SystemIDList="Linux-ARM";;
and add after:

Code: Select all

				aarch64)
					SystemIDList="Linux-ARM";;
You can also change that single line with "armv?l)" to

Code: Select all

				aarch64|armv?l)

Return to “Advanced users”