Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2018 02:18:21 +0000
From:      tech-lists <tech-lists@zyxst.net>
To:        freebsd-arm@freebsd.org
Subject:   Re: Custom kernel for RPi2 and 3
Message-ID:  <c1a82728-a6cd-c972-9b54-73baca644528@zyxst.net>
In-Reply-To: <20180220161900.GA2345@www.zefox.net>
References:  <20180220161900.GA2345@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 20/02/2018 16:19, bob prohaska wrote:
> Does anyone have a recipe for building a custom RPi2 or RPi3 kernel?

for rpi2 I comment out /remove what I don't need [0]. On rpi3 if I'll
use GENERIC-NODEBUG, or comment out what's not needed. But
GENERIC-NODEBUG is good and still has *some* ability to debug. I get a
smaller system by adding WITHOUT= statements to various bits that will
never be used in the context. man 5 src.conf

> I tried it, by simply commenting out drivers I didn't recognize in
> GENERIC, but after much trial-by-error the kernel didn't shrink a lot.
> Having since learned that GENERIC is the tail of a much larger beast,
> perhaps there's a more intelligent method.
> 

Are you compiling on the pi? I don't because it's painfully slow and bad
for the microsd. I cross-compile on a faster machine using
https://github.com/freebsd/crochet - basically do this every time
there's a problem/vulnerability that can't be patched and building world
is needed.

[0] trimming the kernel config in the wrong place can lead to
compilation failure or an image that won't boot. So now I'll just remove
what I'm certain it can do without.

-- 
J.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c1a82728-a6cd-c972-9b54-73baca644528>