From f55f2955de650777ef99dd2de4aaa8607dc9f3c8 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Thu, 23 Oct 2008 17:08:45 -0400 Subject: [PATCH] mkjffs2: add lzo support 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 --- initchroot.sh | 2 +- mkjffs2.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/initchroot.sh b/initchroot.sh index ff47423..42fa72a 100755 --- a/initchroot.sh +++ b/initchroot.sh @@ -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}) diff --git a/mkjffs2.sh b/mkjffs2.sh index da53633..e18346e 100755 --- a/mkjffs2.sh +++ b/mkjffs2.sh @@ -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 -- 2.39.5