-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Sokolovsky schreef:
| Hello,
|
| On Sat, 08 Mar 2008 11:24:02 +0100
| Koen Kooi
<[EMAIL PROTECTED]> wrote:
|
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Hi,
|>
|> This morning I sat down and looked at why the initramfs kernels fail
|> to include an initramfs. I finally found out what is wrong.
|>
|> The kernel shows the following output:
|> ~  GEN     usr/initramfs_data.cpio.gz
|> after which the initramfs is only 4kB big (aka an empty archive).
|>
|> ~From usr/Makefile:
|>
|> quiet_cmd_initfs = GEN     $@
|> ~      cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input)
|>
|> That command will overwrite any existing initramfs_data.cpio.gz since
|> the kernel was unpacked later than our initramfs_data.cpio.gz was
|> created.
|
| That's rather strange, because initramfs copying is handled by
| do_compile_prepend, and it worked for me as expected so far.

The Makefile sees it as 'stale' and rebuilds it.

|> I 'fixed' it by replacing cmd_initfs with 'echo'. The proper
|> fix would have been to put the contents our out initramfs in some dir
|> and have the kernel make its own initramfs_data.cpio.gz from that,
|
| The reason I bothered to use internal kernel Makefile interface instead
| of external (CONFIG_INITRAMFS_SOURCE) because the former turned out to
| be easier than the latter! For CONFIG_INITRAMFS_SOURCE, we'd need to
| boringly adhoc-sed the defconfig, and then initramfs image must be
| stupidly provided as .cpio (not .gz). Again, once I saw that "drop
| initramfs in the magic place" approach worked from the first time, I
| didn't bother to break that ;-).

It works if 'cp' doesn't preserve the original mtime. Somehow it does do
that on my machine.

| Nonetheless, I committed small fixes to do_compile_prepend - clean
| initramfs unconditionally (so nothing stale could be picked) up and
| fixed that bashism...

You didn't look at my fixes first ;) Now the .inc reads:

~        rm usr/initramfs_data.cpio.gz

[..]
~            if [ -e usr/initramfs_data.cpio.gz ] ; then
~                rm usr/initramfs_data.cpio.gz
~            fi


regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFH0qopMkyGM64RGpERAnJ0AJ98u6pQxJcf2h5rXWcq6107a+1nRwCcCDu4
cDiOuDKNK2INURRDf+39slE=
=U+y1
-----END PGP SIGNATURE-----


_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to