[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: network-console, netboot, authorized_keys



On Tue, Nov 17, 2015 at 10:48:48PM +0100, Łukasz Stelmach wrote:
> Dnia 17 listopad 2015 o 20:20 Karsten Merker <merker@debian.org> napisał(a):
> 
> > - D-i uses modules udebs, which get built by the Debian kernel
> >   package. You have to make sure that
> > 
> >   a) all necessary modules are enabled in the relevant kernel
> >      config:
> >      https://anonscm.debian.org/cgit/kernel/linux.git/tree/debian/config
> >
> >   b) the necessary modules get included into the relevant
> >      module-udebs:
> > 
> >     https://anonscm.debian.org/cgit/kernel/linux.git/tree/debian/installer/armel/modules/
> 
> That is a good point. I've already discovered I need to enable
> driver for an external RTC chip. 
> 
> BTW, until now I have used Debian kernel source obtained with
> apt-get source and patched, of course to run on NSA325. I cloned
> the above repo but I don't know exactly how to use it (I know there is
> the debian directory and it should be surrounded by the kernel source). I
> expect something like creating a smylink or bind-mounting the debian
> directory from the repo to a kernel source tree should work but (how to
> find out?)  which version (commit?) should I use?

Hello,

https://anonscm.debian.org/cgit/kernel/linux.git/tree/debian/README.source
explains how to build kernel packages from the repository.

> > - For making the system bootable, the installer uses
> >   flash-kernel. Flash-kernel has a machine database which
> >   contains a stanza for each supported system and which provides
> >   all necessary information to create and install a bootable
> >   kernel and the corresponding initrd. How exactly that is done
> >   is system-dependant. Some of the steps that can be performed
> >   by flash-kernel include:
> >   * putting kernel and initrd into some specific directory
> >   * appending the proper device-tree for the platform to the
> >     kernel image (necessary on systems with old u-boot versions
> >     that cannot load a separate device-tree blob)
> >   * generating uImages from native Linux kernels and initrds
> 
> Done. I've got a patch for debian-installer that produces uImage and
> uInitrd. I serve via tftp and the system boots and runs fine except for
> the RTC chip and detection of kernel flavour (subarch) to install (the
> bug above). The rest seems to be working well enough to get a runnable
> (booting requires some fiedling with kernel) system.

I am unsure whether we may have misunderstood each other, so
just in case:

Flash-kernel is not involved in building kernel images for
booting the installer (this is handled by the makefile at
http://anonscm.debian.org/cgit/d-i/debian-installer.git/tree/build/config/armel/kirkwood/netboot.cfg).

Flash-kernel gets run by the installer at the end of the
installation process in the "make the system bootable" step and
also every time you update an installed kernel package in the
running system.  It then takes care of making the new kernel
properly bootable and setting up everything as needed (e.g. 
building uImages or installing u-boot scripts); and to do that,
it needs a proper stanza describing your platform in its machine
database.

> >   * installing system-specific u-boot scripts
> >   * flashing the kernel and the initrd into some onboard flash
> >     chip
> 
> I don't want to touch the built-in NAND but rather install Debian on
> a pendrive. As of now it seems u-boot can't detect the pendrive to read
> kernel and initrd. I will think about it later.

Even then flash-kernel is involved. AFAIK the old Marvell u-boot
cannot boot zImages, only uImages, and it doesn't support booting
separate dtb files, so flash-kernel has to take care of appending
the proper dtb and generating a uImage from the zImage upon
kernel updates.  The name "flash-kernel" has historic reasons, it
is nowadays a very universal tool that is also used for many
systems that do not boot from onboard flash.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.


Reply to: