How to compile realtime kernel on aarch64 pi4

Discussion about U-Boot and the kernel.

Re: How to compile realtime kernel on aarch64 pi4

Postby tombrear » Mon Oct 12, 2020 5:18 am

Thanks for providing realtime pkg. I would try it.
And I also removed config.txt and make it force to upgrade. After reboot, it just crushed. QQ
Could you also provide your kernel build git repository. Let me could repeat your process? Thanks again.
tombrear
 
Posts: 17
Joined: Sun Oct 04, 2020 3:29 pm

Re: How to compile realtime kernel on aarch64 pi4

Postby mrtux » Tue Oct 13, 2020 3:16 am

Let me know if it works. We can configure the kernel further if you need certain modules for what you are trying to accomplish. Getting one to boot is the first step. I don't use git, the PKGBUILD I use cross compiles the kernel on my main computer, and then the Pi has a pacman repository on it that i use for my other computers in the house. You could set up your computer to cross compile the kernel and transfer them to the pi with scp. There are other packages needed for cross compiling though, it becomes a little more complicated to get going, and the process of building it is slightly different. See if it works first, then we will go from there. I can help you with the pkgbuild and modify it so you can build it on your pi if you'd like. Make sure after your kernels are installed you run the mkscr script for uboot in your /boot directory. If your root is somewhere other than your first partition on the SD card, you will need to change the boot.txt file to reflect the correct location, then run ./mkscr to build the uboot image. You can also install the 2020.10 u-boot package that fixes the usb issue during boot. I have u-boot built as a package if you don't want to hassle with building it. You can get that off my dropbox here https://www.dropbox.com/s/u2a4f5d9dawn20h/linux-slim-5.8.14-uboot-2020.10.tar.gz?dl=0
mrtux
 
Posts: 32
Joined: Wed Aug 12, 2020 4:06 am

Re: How to compile realtime kernel on aarch64 pi4

Postby tombrear » Mon Oct 19, 2020 1:15 am

YEs, the rt-pkg mrtux provided works. But I still have no idea how to build the rt-kernel.
I try to modify the configuration of archlinuxarm official PKBUILDS, but all failed. I using 5.4rt for building. After reboot, it still crush. QQ
tombrear
 
Posts: 17
Joined: Sun Oct 04, 2020 3:29 pm

Re: How to compile realtime kernel on aarch64 pi4

Postby mrtux » Mon Oct 19, 2020 1:29 am

The 5.9 series has gone stable so I have built the 5.9.1 version with the realtime patch, https://www.dropbox.com/s/acifk2k9ud7pbx2/linux-slim-pi-rt-5.9.1.tar.gz?dl=0

And here I have modified the PKGBUILD so you should be able to download the folder, cd into it, edit the PKGBUILD pkgver at the top, save, run updpkgsums *you may need to install this* afterwards, run makepkg -s and all should build for you. You can change the pkgbase at the top. https://www.dropbox.com/s/givc04o6pam8jrt/pi-rt-buildable.tar.gz?dl=0
If you run ./build, it will go clean the build directory and remove all previously built packages. I would recommend editing the build file, changing the BUILDDIR to your location, and uncomment the cd $BUILDDIR line. Let me know if it works for you.
Cheers
mrtux
 
Posts: 32
Joined: Wed Aug 12, 2020 4:06 am

Re: How to compile realtime kernel on aarch64 pi4

Postby tombrear » Mon Oct 19, 2020 11:38 am

Thanks for mrtux's scripting. It works just good. However, I did adjust the configuration to complete my usage. I use it on pi3+. and use bcmrpi3_defconfig to generate default config. and menuconfig to choose Full RT.
I am not sure how's going about to build 5.4.70-rt in pi3+. After rebooting, it not booted.
here is my configuration and pkg base on mrtux provided.
https://drive.google.com/file/d/16e6wtw ... sp=sharing

Is it working for pi3-plus and pi3-cm?

Many thanks,
tombrear
 
Posts: 17
Joined: Sun Oct 04, 2020 3:29 pm

Re: How to compile realtime kernel on aarch64 pi4

Postby tombrear » Mon Oct 19, 2020 2:03 pm

More test of that, the rt-pkg mrtux made could booted normally. But wifi ethernet and alsa-lib usb connect would have issues. Just not workable.
tombrear
 
Posts: 17
Joined: Sun Oct 04, 2020 3:29 pm

Re: How to compile realtime kernel on aarch64 pi4

Postby mrtux » Tue Oct 20, 2020 4:28 am

You are using it for a Pi 3? I thought based on your title you were using it for a Pi 4, unless you are using it for both Pi's? I am a little confused at this point. I am unsure of how the Pi 3's boot, if they are able to use Uboot, it should work fine, once you add the necessary modules needed for the hardware. I call it -slim because it is trimmed of most other unnecessary modules/support. I only use my Pi for Plex, Mumble, Nginx, and a pacman repository, headless, but I left support for the Pi 4 wifi/BT/ etc. If you want to use it for the Pi 3, I would recommend copying a running config of the default kernel ( Like demonstrated in the first reply, using zcat), Use that config instead of generating a default, and after it is patched you can change your preemption or anything else you may want/not want. Not sure if the Pi 3 uses the dtbs overlays or something else, you may have to modify that part of the pkgbuild. Is there a particular reason you want to use the 5.4 series kernels? The 5.8 had some good stuff for aarch if i recall correctly. (Possibly only pertains to the Pi 4?)
mrtux
 
Posts: 32
Joined: Wed Aug 12, 2020 4:06 am

Re: How to compile realtime kernel on aarch64 pi4

Postby mrtux » Tue Oct 20, 2020 4:30 am

mrtux
 
Posts: 32
Joined: Wed Aug 12, 2020 4:06 am

Re: How to compile realtime kernel on aarch64 pi4

Postby tombrear » Tue Oct 20, 2020 8:15 am

Yes, I used for both. But I used your pkg you made in Pi4. the wifi and alsa-lib to usb were not working well. Maybe I should retry again. pi3 is bootable after install your pkg. But still the wifi and alsa-lib to usb function will have issues.
tombrear
 
Posts: 17
Joined: Sun Oct 04, 2020 3:29 pm

Re: How to compile realtime kernel on aarch64 pi4

Postby mrtux » Wed Oct 21, 2020 4:27 am

Now that I think about it, I think the wifi and BT were disabled. You can either reenable them under network and also device drivers, or just use a default config since that is all you are after anyway. I recommend building the pcie_brcmstb module into the kernel instead of loading it as a module, this prevents a USB issue on boot. The PKGBUILD is mostly what you were after, I think if you use a default config, you now have a pkgbuild that will work for you, everything should work for you from here. Same with the Pi 3, figure out your configuration file to start with, and you should be able to get it working fine.
mrtux
 
Posts: 32
Joined: Wed Aug 12, 2020 4:06 am

PreviousNext

Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 6 guests