Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-genkernel
Lists: gentoo-genkernel: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-genkernel@g.o
From: Richard Farina <sidhayn@...>
Subject: Re: Hello all
Date: Sun, 25 Mar 2012 00:11:12 -0400
On 03/24/12 23:27, Sebastian Pipping wrote:
> On 03/25/2012 05:11 AM, Richard Farina wrote:
>> A while back my project, pentoo, forked genkernel. Super sorry about
>> that (no seriously).  Several gentoo devs have approached me about
>> merging my changes back in so here I am, looking forward to getting rid
>> of my garbage fork and extending the features of gentoo's genkernel.
>> likewhoa is already working on the aufs changes (the biggest set of
>> changes), but I'll begin to merge in the smaller stuff as I find the time.
>> Please feel free to poke at my repo and if anyone wants to help with any
>> part please just let me know, I need it.
> It looks like your tag "3.4.18" is quite close to trunk.  Trunk seems to
> mostly differ to 3.4.18 of mainline with respect to the init script stuff.
There are a few major differences to our genkernel which were made by
various members of the pentoo team (mostly not me), they are outlined as

aufs support, under aufs support we allow for persistant changes in a
partition and modular changes in a file. The "module" support we add
allows us to make a compressed file that gets overlaid onto the live
filesystem at boot, we use this for saving changes or adding programs
one at a time. As I said earlier, this is the biggest set of changes.

Additionally we have made a few changes around e2fsprogs e2fstools for
use in the above aufs stuff.

On a completely separate note, we added in a keymap for .ch (which seems
to just be an alias for .fr).

Lastly, and possibly the only bit interesting to most of the list, we
added in selectable compression to make the initramfs compress with the
best possible supported method, since it's the simplest, I'll paste that
inline and get some feedback now.  Basically we remove all that static
stuff and then attempt to detect the best compression and use it. Please
note this diff is based on 3.4.18 not current, I'll update once you all
pick it apart.

diff -Naur '--exclude=.svn' '--exclude=.git'
genkernel-3.4.18/ pentoo/genkernel/trunk/
--- genkernel-3.4.18/   2012-03-24 23:23:39.478742478 -0400
+++ pentoo/genkernel/trunk/     2011-10-16
21:32:05.000000000 -0400
@@ -652,16 +672,40 @@
                append_data 'overlay'
-       gzip -9 "${CPIO}"
-       mv -f "${CPIO}.gz" "${CPIO}"
+       # handle the last image
        if isTrue "${INTEGRATED_INITRAMFS}"
-#              cp ${TMPDIR}/initramfs-${KV}
-               mv ${TMPDIR}/initramfs-${KV}
-#              sed -i
+               # put in kernel, here we should put CPIO
                sed -i '/^.*CONFIG_INITRAMFS_SOURCE=.*$/d'
-               echo -e
>> ${KERNEL_DIR}/.config
+               echo -e
>> ${KERNEL_DIR}/.config
+       else
+               # compress using the best way
+               print_info 1 "        >> compressing the initrd " False
+                if `grep -q '^CONFIG_RD_XZ=y' ${KERNEL_DIR}/.config` &&
test -f /usr/bin/xz
+                then
+                        print_info 1 "using xz..." True False
+                        /usr/bin/xz -e --check=none -z -f -9 ${CPIO}
+                        mv "${CPIO}.xz" "${CPIO%%.cpio}"
+               elif `grep -q '^CONFIG_RD_LZMA=y' ${KERNEL_DIR}/.config`
&& test -f /usr/bin/lzma
+               then
+                       print_info 1 "using lzma..." True False
+                       /usr/bin/lzma -z -f -9 ${CPIO}
+                       mv "${CPIO}.lzma" "${CPIO%%.cpio}"
+               elif `grep -q '^CONFIG_RD_BZIP2=y'
${KERNEL_DIR}/.config` && test -f /bin/bzip2
+               then
+                       print_info 1 "using bzip2..." True False
+                       /bin/bzip2 -z -f -9 ${CPIO}
+                       mv "${CPIO}.bz2" "${CPIO%%.cpio}"
+               elif test -f /bin/gzip
+               then
+                       print_info 1 "using gzip..." True False
+                       /bin/gzip -f -9 ${CPIO}
+                       mv "${CPIO}.gz" "${CPIO%%.cpio}"
+               else
+                       print_info 1 "--not compressed!" True False
+                       mv "${CPIO}" "${CPIO%%.cpio}"
+               fi
        if ! isTrue "${CMD_NOINSTALL}"

Let the abuse begin,

> Best,
> Sebastian

Re: Hello all
-- Sebastian Pipping
Hello all
-- Richard Farina
Re: Hello all
-- Sebastian Pipping
Lists: gentoo-genkernel: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Hello all
Next by thread:
Re: Hello all
Previous by date:
Re: Hello all
Next by date:
Re: Hello all

Updated Jun 20, 2012

Summary: Archive of the gentoo-genkernel mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.