:: Re: [DNG] Giving Devuan sans-initra…
Forside
Slet denne besked
Besvar denne besked
Skribent: Adam Borowski
Dato:  
Til: dng
Emne: Re: [DNG] Giving Devuan sans-initramfs capabilities
On Sat, Jan 02, 2016 at 08:15:39PM +0100, karl@??? wrote:
> Steve Litt:
> > Where can I find documentation on how to do this? The last time I
> > compiled a kernel was probably in the 20th century, so I imagine things
> > have changed.
>
> It should be something like:
>
> download your kernel from your favourite site, e.g.
> ftp:ftp.sunet.se/pub/Linux/kernels/


Boo! Do you live in 20th century? It's a crime to not use git, especially
when patches are involved. Even if they're not, you save time unpacking /
downloading updates / switching to other releases.

git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

> make
> make install
> make modules_install


This won't let you uninstall cleanly, or deploy to other machines.

make-kpkg --rootcmd fakeroot --initrd -j6 linux-image
(no --initrd if you don't want initrd, replace 6 with the number of cores in
your box)
dpkg -i ~you/linux-image-*.deb

> ch. bootloader to load your kernal


make-kpkg will handle grub/lilo config automatically.

> > Do you re-recompile? If so, do
> > you have some sort of file containing all your choices so it's easy?
>
> I think make menuconfig et al. pulls in the current kernels config,
> just make sure you have it in /boot:
>
> # ls -l /boot/*3.12.8*
> -rw-r--r-- 1 root root 118268 Aug 1 15:36 /boot/config-3.12.8-rt11-i3
> -rw-r--r-- 1 root root 1581413 Aug 1 15:36 /boot/System.map-3.12.8-rt11-i3
> -rw-r--r-- 1 root root 3458016 Aug 1 15:36 /boot/vmlinuz-3.12.8-rt11-i3


The first time you need to copy it by hand as .config to your linux source
directory -- if you want to start with the distribution kernel, that has
every obscure driver as module. You can trim that to only those present
on the compilation box with "make localmodconfig". Another target of note
is "localyesconfig" which converts modules to built-ins, something you want
in a non-initrd kernel.

--
A tit a day keeps the vet away.