Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Paul Sokolovsky
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. I 'fixed' it by replacing cmd_initfs with 'echo'. 

Unfortunately, that doesn't seem to work with "rm" thing at all - that
causes empty initramfs_data.cpio.gz to not being built by the kernel in
case we don't supply external initramfs (for example, for uclibc
kernel). So, I'm going to remove that patch and add explicit touch
after copy, until you fix your cp ;-).

[]

-- 
Best regards,
 Paul  mailto:[EMAIL PROTECTED]

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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul Sokolovsky schreef:
| Hello,
|
| On Sat, 8 Mar 2008 17:28:46 +0200
| Paul Sokolovsky <[EMAIL PROTECTED]> wrote:
|
| []
|> Of course, just "cp" should not preserve timestamp, but set current
|> time on the dest file! "cp -a" is what preserves timestamps and other
|> stuff. If you think that your cp's behavior is anyhow grounded, please
|> add explicit touch after copy, but I would think you'd hit breakage in
|> many more places with such cp.
|
| -KERNEL_INITRAMFS_PATH =
|
"${TMPDIR}/deploy/uclibc/images/${MACHINE}/initramfs-bootmenu-image-${MACHINE}.cpio.gz"
| +KERNEL_INITRAMFS_DIR =
| "${TMPDIR}/deploy/uclibc/images/${MACHINE}/"
| +KERNEL_INITRAMFS_PATH = "${KERNEL_INITRAMFS_DIR}/$(readlink
| ${KERNEL_INITRAMFS_DIR}initramfs-bootmenu-image-${MACHINE}.cpio.gz)"
|
| And this is also unnecessary by the same reason - cp should copy file
| contents, unless explicitly asked to do something else, like copying
| symlinks as is.

It makes log.do_compile contain the full filename used, which I needed
earlier on :)

regards,

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

iD8DBQFH0tHtMkyGM64RGpERAmkrAJ9cAMEti7Q46HP7LJ5+UgyT5XEqvwCfXBlC
4+gc/jX+aiCfcf6FIJYzVVE=
=JC4/
-END PGP SIGNATURE-


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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas Kunze schreef:
| First, let me state that we should aim to get the bootmenu image to be
|> as small as possible (~100kB), regardless of which route we go with the
|> above options.
|>
|> With that said, I think for the zaurus we should do:
|>
|> a) angelboot -> zImage + kexec -> zImage + bootmenu in flash -> rootfs
|>
|> or
|>
|> b) angelboot -> zImage + kexec -> zImage + bootmenu in flash -> zImage
|> in rootfs
|>
|> or
|>
|> c) angelboot -> zImage + kexec -> zImage + bootmenu in rescue filesystem
|> - -> zImage in rootfs
|>
|> d) buy an eeepc
|>
| How about:
| e) angelboot -> zImage + bootmenu -> zImage in rootfs
|
| I think this is possible if the bootmenu uses klibc and networking is
| disabled in first zImage.

Does mtd + sd + pcmcia fit inside the kernel partition? I also want a
beefier rescue system, so maybe I'm a bit biased :)

regards,

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

iD8DBQFH0s8LMkyGM64RGpERAuMoAKCPlXgoVuIFZ2WBuypoabJuPdKV/ACfYbiS
CXsupw5eUEb2JpWSaAxMuQg=
=U4tL
-END PGP SIGNATURE-


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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Paul Sokolovsky
Hello,

On Sat, 8 Mar 2008 17:28:46 +0200
Paul Sokolovsky <[EMAIL PROTECTED]> wrote:

[]
> Of course, just "cp" should not preserve timestamp, but set current
> time on the dest file! "cp -a" is what preserves timestamps and other
> stuff. If you think that your cp's behavior is anyhow grounded, please
> add explicit touch after copy, but I would think you'd hit breakage in
> many more places with such cp.

-KERNEL_INITRAMFS_PATH =
"${TMPDIR}/deploy/uclibc/images/${MACHINE}/initramfs-bootmenu-image-${MACHINE}.cpio.gz"
+KERNEL_INITRAMFS_DIR =
"${TMPDIR}/deploy/uclibc/images/${MACHINE}/"
+KERNEL_INITRAMFS_PATH = "${KERNEL_INITRAMFS_DIR}/$(readlink
${KERNEL_INITRAMFS_DIR}initramfs-bootmenu-image-${MACHINE}.cpio.gz)"

And this is also unnecessary by the same reason - cp should copy file
contents, unless explicitly asked to do something else, like copying
symlinks as is.

[]

-- 
Best regards,
 Paul  mailto:[EMAIL PROTECTED]

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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Thomas Kunze

First, let me state that we should aim to get the bootmenu image to be
> as small as possible (~100kB), regardless of which route we go with the
> above options.
>
> With that said, I think for the zaurus we should do:
>
> a) angelboot -> zImage + kexec -> zImage + bootmenu in flash -> rootfs
>
> or
>
> b) angelboot -> zImage + kexec -> zImage + bootmenu in flash -> zImage
> in rootfs
>
> or
>
> c) angelboot -> zImage + kexec -> zImage + bootmenu in rescue filesystem
> - -> zImage in rootfs
>
> d) buy an eeepc
>   
How about:
e) angelboot -> zImage + bootmenu -> zImage in rootfs

I think this is possible if the bootmenu uses klibc and networking is 
disabled in first zImage.

Regards,
Thomas

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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Paul Sokolovsky
Hello,

On Sat, 08 Mar 2008 16:00:57 +0100
Koen Kooi <[EMAIL PROTECTED]> wrote:

> -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.

Of course, just "cp" should not preserve timestamp, but set current
time on the dest file! "cp -a" is what preserves timestamps and other
stuff. If you think that your cp's behavior is anyhow grounded, please
add explicit touch after copy, but I would think you'd hit breakage in
many more places with such cp.

> 
> | 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

Well, I had them since the morning, and once tested fully pushed, there
were no merge conflicts ;-). Feel free to update as needed.

> 
> 
> regards,
> 
> Koen
[]

-- 
Best regards,
 Paul  mailto:[EMAIL PROTECTED]

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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Koen Kooi
-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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Paul Sokolovsky
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.

> 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 ;-).

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

> but my way works as well :)
> Now we only need Thomas and Paul to combine their initramfs efforts to
> get one kickass initramfs for all machines with sucky bootloaders.
> 
> regards,
> 
> Koen

[]


-- 
Best regards,
 Paul  mailto:[EMAIL PROTECTED]

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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrea Adami schreef:
|> Now we only need Thomas and Paul to combine their initramfs efforts to
|> get one kickass initramfs for all machines with sucky bootloaders.
|
| Yes, and in the meanwhile please add an RFC for linux-rp initramfs
| implementation path.
|
| I think we should focus on some potential issues, because
| initramfs-bootimage is actually way too big for the limited space in
| mtd (at least for Zaurus).
| Thomas is working at it, developing a busybox-static using klibc.
|
| From his work, two scenarios:
|
| 1) the initramfs-bootimage fits in mtd
| In this case we'd need a new recipe for the initramfs kernel: for the
| naming RP suggested "linux-rp-mini_2.6.2x.bb", including
| "linux-rp-mini.inc". This kernel would have own set of patches,
| helping to reduce the size.
|
| 2) the image doesn't fit, we'd use an initramfs-kexec image at first
| Then a new kernel+initramfs-bootmenu, unlimited in size and residing
| in /boot would be launched. No need for mini kernels this way, easy
| update when new kernels are released.
|
| Pro and Contra to discuss on the ml.

First, let me state that we should aim to get the bootmenu image to be
as small as possible (~100kB), regardless of which route we go with the
above options.

With that said, I think for the zaurus we should do:

a) angelboot -> zImage + kexec -> zImage + bootmenu in flash -> rootfs

or

b) angelboot -> zImage + kexec -> zImage + bootmenu in flash -> zImage
in rootfs

or

c) angelboot -> zImage + kexec -> zImage + bootmenu in rescue filesystem
- -> zImage in rootfs

d) buy an eeepc

~From a distribution point of view the options with a kernel in the
rootfs get bonus points since it makes kernel upgrades so much easier.

Option c) is particulary interesting, since we could opt to repartition
flash and install our own rescue filesystem that is much smaller then
the sharp one.
Almost all options mean that generating an installkit will probably take
more than one bitbake invocation (with bitbake 1.8.x), but that's not a
real problem, since all angstrom buildscripts are available from the
build tree.

regards,

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

iD8DBQFH0olGMkyGM64RGpERAsWzAKCh13V927H0Tr03F9E4KuW1SLzCMQCfQSoy
HWc2XnqtQ7AHlkVN5G2/n9I=
=PSZ3
-END PGP SIGNATURE-


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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Andrea Adami
message got somehow truncated...

On 3/8/08, Andrea Adami <[EMAIL PROTECTED]> wrote:
> > Now we only need Thomas and Paul to combine their initramfs efforts to
> > get one kickass initramfs for all machines with sucky bootloaders.
>
> Yes, and in the meanwhile please add an RFC for linux-rp initramfs
> implementation path.
>
> I think we should focus on some potential issues, because
> initramfs-bootimage is actually way too big for the limited space in
> mtd (at least for Zaurus).
> Thomas is working at it, developing a busybox-static using klibc.
>
> From his work, two scenarios:
>
> 1) the initramfs-bootimage fits in mtd
> In this case we'd need a new recipe for the initramfs kernel: for the
> naming RP suggested "linux-rp-mini_2.6.2x.bb", including
> "linux-rp-mini.inc". This kernel would have own set of patches,
> helping to reduce the size.
>
> 2) the image doesn't fit, we'd use an initramfs-kexec image at first
> Then a new kernel+initramfs-bootmenu, unlimited in size and residing
> in /boot would be launched. No need for mini kernels this way, easy
> update when new kernels are released.
>
> Pro and Contra to discuss on the ml.
>
> My 2 cents
>
> Andrea
>

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


Re: [Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Andrea Adami
> Now we only need Thomas and Paul to combine their initramfs efforts to
> get one kickass initramfs for all machines with sucky bootloaders.

Yes, and in the meanwhile please add an RFC for linux-rp initramfs
implementation path.

I think we should focus on some potential issues, because
initramfs-bootimage is actually way too big for the limited space in
mtd (at least for Zaurus).
Thomas is working at it, developing a busybox-static using klibc.

>From his work, two scenarios:

1) the initramfs-bootimage fits in mtd
In this case we'd need a new recipe for the initramfs kernel: for the
naming RP suggested "linux-rp-mini_2.6.2x.bb", including
"linux-rp-mini.inc". This kernel would have own set of patches,
helping to reduce the size.

2) the image doesn't fit, we'd use an initramfs-kexec image at first
Then a new kernel+initramfs-bootmenu, unlimited in size and residing
in /boot would be launched. No need for mini kernels this way, easy
update when new kernels are released.

Pro and Contra to discuss on the ml.

My 2 cents

Andrea

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


[Angstrom-devel] initramfs disappearing during kernel build: Solved

2008-03-08 Thread Koen Kooi
-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.
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, but my way works
as well :)
Now we only need Thomas and Paul to combine their initramfs efforts to
get one kickass initramfs for all machines with sucky bootloaders.

regards,

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

iD8DBQFH0mlCMkyGM64RGpERAuBoAKCyrzpLNsLBMB/Nl6JSV8vBpmjVCgCfbFNJ
NsJwxd7Wc0bfZUMBqW0mAAs=
=qDm6
-END PGP SIGNATURE-


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