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

Re: DTBs in images, kexec & installer testing



On Sun, 20 Jul 2014 15:23:12 +0100
Ian Campbell <ijc@hellion.org.uk> wrote:

> On Sun, 2014-07-20 at 13:19 +0100, Neil Williams wrote:
> > On Sun, 20 Jul 2014 12:54:06 +0100
> > Neil Williams <codehelp@debian.org> wrote:
> > 
> > > One of my current blockers is the lack of modules - it would be
> 
> FWIW linux-image-foo from the regular archive is ~equivalent to a
> modules.tgz, except it happens to also contain the kernel itself +
> some metadata.
> 
> > > I was wondering about downloading core-modules-3.14-1-armmp-di and
> > > simply unpacking it....
> > 
> > ... as there's no network support, that'll need to be a custom
> > initrd with core-modules inside it.... ho hum....
> 
> You don't necessarily need to repack the initrd, since you can append
> a second cpio to the existing one and the kernel will unpack both.
> 
> One pitfall is that the to-be-appended cpio needs to have all the path
> elements, so you need to remember to include /lib, /lib/modules
> and /lib/modules/$(uname -r) etc in the archive and not just the files
> themselves (it took me an age to figure out why my appended initrd was
> silently ignored).
> 
> The xen osstest system code to do something along these lines is at
> http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=mg-debian-installer-update;h=b964f95f8e9eee173cf56ca1dd830281114245b8;hb=HEAD#l104
> the armmp.cpio.gz which results is concatenated with the regular
> installer initrd.gz. We use this to install Wheezy but using a newer
> (backports.org) kernel which is needed for the platform in our test
> env.

Thanks Ian!

I didn't append in the end (wasn't sure how to get LAVA to pass two
initrd files, I guess that's something I'll need to add to the
refactoring, Riku has already filed a bug for something similar). I
stripped the u-boot header of a working initrd, unpacked it, used your
find example to put a lump of modules into the initrd, repacked it,
added the u-boot header back and it *works*!

I'll write up just how I did it tomorrow - it did require a bit of
preliminary work to run depmod, modprobe e100, dhclient eth0 but that
wasn't a problem for LAVA.

I'll also use your script as a basis for our own script to rebuild the
initrd when there are new uploads of linux-image-armmp-*. However, this
does mean that any board which might be supportable by the ARMMP kernel
can now be tested in LAVA. All I need is to match the available boards
with the dtb filename and to publish my modified initrd. The current
test is just with the initrd but can easily be extended to a more
typical rootfs.

No changes needed in LAVA, the package in Debian unstable can already
support what I've done locally. Next will be deploying Debian u-boot on
my own boards ...

\o/

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: signature.asc
Description: PGP signature


Reply to: