Re: Patching a kernel on RPi

From: MJ <mafsys1234_at_gmail.com>
Date: Fri, 15 Oct 2021 04:52:52 UTC

On 15/10/2021 3:41 pm, Olivier wrote:
> Hi,
> 
> I am trying to work on a Raspberry Pi with FreeBSD for the first time.
> 
> One thing I need it enabling interrupts on GPIO. I have found the patch
> to applied, but I am not fully sure how to recompile the kernel and
> install the new kernel on RPi.
> 
> I understand that the disk/boot organisation is not really the same as
> with another arcitecture and would prefer to not do something that would
> make the system unbootable.
> 
> TIA,
> 
> Olivier
> 
Hi Olivier,

The same way you compile a kernel on an AMD64 is how you do it on an ARM64. IFF that is all you want to do is have a new kernel. In which case, there's no need to modify booting etc. This information can be readily found in the handbook.

If, however, you want to make an image that you can burn onto an uSD card, then crochet is a good place to start: https://github.com/freebsd/crochet. This approach will be faster than building a kernel on an RPI (assuming you have an AMD64 machine running FreeBSD, that is).

Cheers
Matt.