Pi Zero kernel compilation issues

Ask questions about Arch Linux ARM. Please search before making a new topic.

Pi Zero kernel compilation issues

Postby quark » Thu Nov 25, 2021 4:36 pm

I'm trying to recompile the kernel using this guide:
https://www.raspberrypi.com/documentati ... ernel.html
It seems to be booting but USB seems to crash during boot. It does see USB devices at first but towards the end of boot all USB devices lock.
I exported the default ALARM kernel config and just recompiled. I cross-compiled it on Ubuntu.
Is there anything in particular I have to do, apart from what's mentioned in the official documentation?
quark
 
Posts: 59
Joined: Thu Nov 25, 2021 8:26 am

Re: Pi Zero kernel compilation issues

Postby quark » Fri Nov 26, 2021 6:18 am

any dev around here? I got on your IRC channel and there wasn't any activity.
is there anything special about installing the new kernel? using the default archlinux arm config the new kernel is having issues with USB devices.
quark
 
Posts: 59
Joined: Thu Nov 25, 2021 8:26 am

Re: Pi Zero kernel compilation issues

Postby graysky » Fri Nov 26, 2021 7:40 am

Don't use a Debian guide on Arch ARM. Arch ARM like Arch uses a PKGBUILD for building and packaging. Just fork the github repo, modify the PKGBUILD or config, etc. to your liking, and build with makepkg. Once you have your own package, install with pacman like any other.

Github repo: https://github.com/archlinuxarm/PKGBUILDs
Some helpful links for you to read through:
https://wiki.archlinux.org/title/Makepkg
https://wiki.archlinux.org/title/Creating_packages
https://wiki.archlinux.org/title/Pacman
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Pi Zero kernel compilation issues

Postby quark » Fri Nov 26, 2021 7:51 am

thanks!
I'll have a look at the resources you posted.
So far I managed to use the usb keyboard to log in, and I noticed there's no kernel modules loaded.
When I plug the wifi dongle it sees it on USB but doesn't use it. The whole networking stuff is down most likely due to no loaded kernel module.
quark
 
Posts: 59
Joined: Thu Nov 25, 2021 8:26 am

Re: Pi Zero kernel compilation issues

Postby graysky » Fri Nov 26, 2021 7:53 am

What do you want to achieve with a custom kernel first of all?
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Pi Zero kernel compilation issues

Postby quark » Fri Nov 26, 2021 8:01 am

well I want to make it realtime for audio use.
I suppose this is it:
https://github.com/archlinuxarm/PKGBUIL ... aspberrypi
I'll use the ARCH build system like I use on my desktop.

edit:
I have a few pi's with different shields, digital, DACs.
For desktop there's the zen linux which is built with realtime settings, that doesn't seem to be available for the Pi's yet. I don't know about other stuff in the zen kernel but the realtime stuff helps with audio.
Last edited by quark on Fri Nov 26, 2021 8:15 am, edited 1 time in total.
quark
 
Posts: 59
Joined: Thu Nov 25, 2021 8:26 am

Re: Pi Zero kernel compilation issues

Postby quark » Fri Nov 26, 2021 8:03 am

but do I have to compile it on the pi itself? that would take ages I think. can I use my arch desktop?
quark
 
Posts: 59
Joined: Thu Nov 25, 2021 8:26 am

Re: Pi Zero kernel compilation issues

Postby graysky » Fri Nov 26, 2021 8:17 am

Cross compile using distcc is the only way to go for armv7h.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Pi Zero kernel compilation issues

Postby quark » Fri Nov 26, 2021 8:20 am

Pi Zero is ARMv6 afaik :|
edit: I see armv6 also mentioned.
quark
 
Posts: 59
Joined: Thu Nov 25, 2021 8:26 am

Re: Pi Zero kernel compilation issues

Postby graysky » Fri Nov 26, 2021 8:23 am

My bad, doesn't matter, official tool chains are available for all supported. If it's aarch64, you can cross-compile the kernel directly on your x86_64 hardware. This will not work for most other packages/the kernel is self confined.

For your info, in the x86_64 box, install aarch64-linux-gnu-gcc and build with something like:
$this->bbcode_second_pass_code('', 'CARCH=aarch64 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- makepkg -sCAf --noconfirm')

Again, only for aarch64 and only for self contained packages. You want the distcc option I mentioned.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Next

Return to User Questions

Who is online

Users browsing this forum: No registered users and 5 guests