]> spindle.queued.net Git - xodist/commitdiff
mkjffs2: add lzo support
authorAndres Salomon <dilinger@debian.org>
Thu, 23 Oct 2008 21:08:45 +0000 (17:08 -0400)
committerAndres Salomon <dilinger@debian.org>
Thu, 23 Oct 2008 21:08:45 +0000 (17:08 -0400)
This adds support for building lzo images for root (and updates the
kernel accordingly, as LZO support wasn't compiled into the jffs2
driver).  However, I'm not sold on LZO, so I haven't enabled it by
default.  According to my tests, zlib left 540MB free, and bootup took
97s, while lzo left 505MB free, and bootup took 91s.  Program startup
time appeared to be about the same.  I'm not convinced that the 6s
bootup time improvement is worth it.

Signed-off-by: Andres Salomon <dilinger@debian.org>
initchroot.sh
mkjffs2.sh

index ff47423b02014e6b948b8d19bf98cf4120604d60..42fa72a4697a7afb8fa3faf0e9badf1a384c43e5 100755 (executable)
@@ -135,7 +135,7 @@ echo "en_US.UTF-8 UTF-8" >${ROOT_DIR}/etc/locale.gen
 
 k="http://lunge.mit.edu/~dilinger/debxo-0.2/initramfs-tools_0.92l.2_all.deb 
  http://lunge.mit.edu/~dilinger/debxo-0.2/ofw-config_0.1_all.deb 
- http://lunge.mit.edu/~dilinger/debxo-0.2/linux-2.6.25.15_2.6.25.15-139_i386.deb"
+ http://lunge.mit.edu/~dilinger/debxo-0.2/linux-2.6.25.15_2.6.25.15-140_i386.deb"
 mkdir -p cache
 for i in $k; do
        pkg=$(basename ${i})
index da53633e06ee37c9dd0997f666d4a8c3e97eb44b..e18346e6ef69e1681be631a86e3cf04a115c0907 100755 (executable)
@@ -53,9 +53,9 @@ create_jffs2()
 {
        root_dir="$1"
        out="$2"
+       comp="$3"
 
-       # XXX:  do we want to switch to lzo?  (mkfs.jffs2 -X lzo)
-       mkfs.jffs2 -n -e128KiB -r ${root_dir} -o ${out}.pre
+       mkfs.jffs2 -n -e128KiB -X${comp} -r ${root_dir} -o ${out}.pre
        sumtool -n -p -e 128KiB -i ${out}.pre -o ${out}
        rm -f ${out}.pre
 }
@@ -96,13 +96,14 @@ EOF
 
 # create the boot partition
 ln -s . ${ROOT_DIR}/boot/boot
-create_jffs2 ${ROOT_DIR}/boot _boot.img
+create_jffs2 ${ROOT_DIR}/boot _boot.img zlib
 rm -f ${ROOT_DIR}/boot/boot
 
 # create the root partition
 mv ${ROOT_DIR}/boot _boot
 mkdir ${ROOT_DIR}/boot
-create_jffs2 ${ROOT_DIR} _root.img
+create_jffs2 ${ROOT_DIR} _root.img zlib
+# lzo
 rmdir ${ROOT_DIR}/boot
 mv _boot ${ROOT_DIR}/boot