View previous topic :: View next topic |
Author |
Message |
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Jul 13, 2019 4:29 am Post subject: How do I compile gentoo-sources-5.2.0 for Raspberry Pi 3 B+? |
|
|
I want to compile gentoo-sources-5.2.0 for Raspberry Pi 3 B+ on my amd64 gentoo desktop.
I don't know how to configure gentoo-sources-5.2.0 for it. How can I do that? I want to compile aarch64 kernel. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54586 Location: 56N 3W
|
Posted: Sat Jul 13, 2019 8:41 am Post subject: |
|
|
crocket,
You start with the defconfig provided in the kernel, then you use menuconfig to change what you have to suit the Pi.
For a head start, use bcmrpi3_defconfig from the foundation kernel, then make oldconfig to make it a legal .config for gentoo-sources-5.2.0 and lastly make config.
The blow by blow aarch cross compile will need to be adapted.
Beware the mainline kernel and Pi Foundation kernel use different names for the dtb files. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Jul 13, 2019 11:16 am Post subject: |
|
|
It seems people haven't figured out how to configure mainline linux for single board computers. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54586 Location: 56N 3W
|
Posted: Sat Jul 13, 2019 11:28 am Post subject: |
|
|
crocket,
Its not that simple. The Pi Foundation kernel has some code that is not in the upstream kernel.
Try rpi-5.2.y if yo want a 5.2 kernel. However, kernel development goes into 4.19.y first, so that's a good starting point.
The further away from that you go, the less works.
If you want to follow mainline development, keep an eye on patchwork _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Jul 13, 2019 11:30 am Post subject: |
|
|
Would CONFIG_ARCH_BCM2835 in gentoo-sources-5.2.0 support Raspberry Pi 3 B+? Raspberry Pi 3 B+ has BCM2837B0, though. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54586 Location: 56N 3W
|
Posted: Sat Jul 13, 2019 11:35 am Post subject: |
|
|
crocket,
Rather than feed you, I'll show you how to fish.
Read the help on that option to answer your question.
Rather more generally, the kernel context sensitive help is often useful but not always. Its always a good place to start. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Jul 13, 2019 12:18 pm Post subject: |
|
|
NeddySeagoon wrote: | crocket,
Rather than feed you, I'll show you how to fish.
Read the help on that option to answer your question.
Rather more generally, the kernel context sensitive help is often useful but not always. Its always a good place to start. |
Right, I read the description again. It says the option is for Raspberry Pi 3. I guess it means both 3B and 3B+. For Raspberry Pi 4, I will need something else. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54586 Location: 56N 3W
|
Posted: Sat Jul 13, 2019 12:20 pm Post subject: |
|
|
crocket,
Its the same for the Pi4 :)
That description predates the Pi but I doubt it will be updated. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Last edited by NeddySeagoon on Sat Jul 13, 2019 12:25 pm; edited 1 time in total |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Jul 13, 2019 12:22 pm Post subject: |
|
|
NeddySeagoon wrote: | crocket,
Its the same for the Pi4 |
Are you saying BCM2711 is supported by CONFIG_ARCH_BCM2835? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54586 Location: 56N 3W
|
Posted: Sat Jul 13, 2019 12:28 pm Post subject: |
|
|
crocket,
Yes. That's what's in Code: | ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- make bcm2711_defconfig |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Jul 13, 2019 12:56 pm Post subject: |
|
|
According to https://github.com/raspberrypi/linux/wiki/Upstreaming
CONFIG_ARCH_BCM2835 was not enough. CONFIG_USB_DWC2_HOST was not selected by CONFIG_ARCH_BCM2835.
defconfig selected USB_DWC3_DUAL_ROLE instead.
Is it going to take a while for people to properly document how to configure mainline linux for Raspberry Pi 3 B+ and Raspberry Pi 4? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54586 Location: 56N 3W
|
Posted: Sat Jul 13, 2019 1:57 pm Post subject: |
|
|
crocket,
The DWC2 is the USB port on the Pi3 SoC.
It can actually operate in Host mode or OTG mode. The Pi3 has its LAN interface on USB, so the Pi3 is constrained to host mode only.
The Pi zero provides OTG mode as it does not have a LAN port.
CONFIG_ARCH_BCM2835 says nothing about the peripherals integrated into the SoC, its for the ARM CPU and the things it depends on.
e.g. It does not select the VC4 support. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Jul 13, 2019 10:49 pm Post subject: |
|
|
NeddySeagoon wrote: | crocket,
The DWC2 is the USB port on the Pi3 SoC.
It can actually operate in Host mode or OTG mode. The Pi3 has its LAN interface on USB, so the Pi3 is constrained to host mode only.
The Pi zero provides OTG mode as it does not have a LAN port.
CONFIG_ARCH_BCM2835 says nothing about the peripherals integrated into the SoC, its for the ARM CPU and the things it depends on.
e.g. It does not select the VC4 support. |
Does CONFIG_USB_DWC2_DUAL_ROLE have no issue with Raspberry Pi 3 B+? |
|
Back to top |
|
|
|