From ec4660f8314afb4467cfdbf8abdbebd5aa44a103 Mon Sep 17 00:00:00 2001 From: Tomas M Date: Mon, 17 Sep 2012 09:02:18 -0500 Subject: [PATCH] compress current filesystem --- .config | 1 + build | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.config b/.config index dbf7366..e87acc7 100644 --- a/.config +++ b/.config @@ -16,6 +16,7 @@ KERNEL=$(uname -r) # List of directories which will be modularized # No subdirectories are allowed, no slashes, # so You can't use /var/tmp here for example +# Exclude directories like proc sys tmp MKMOD="bin etc home lib lib64 opt root sbin srv usr var" # List of files and directories you'd like to exclude from your Live Kit diff --git a/build b/build index 6736c5d..9818440 100755 --- a/build +++ b/build @@ -25,7 +25,7 @@ cd initramfs INITRAMFS=$(./initramfs_create "$LIVEKITNAME") cd .. -# create live kit filesystem +# create live kit filesystem (cpio archive) rm -Rf "$LIVEKITDATA" BOOT="$LIVEKITDATA"/"$LIVEKITNAME"/boot mkdir -p "$BOOT" @@ -40,7 +40,10 @@ cat bootfiles/bootinst.bat | sed -r "s:/boot/:/$LIVEKITNAME/boot/:" | sed -r "s: cp /boot/vmlinuz $BOOT/ # create compressed bundles -# ... TODO! +for i in $MKMOD; do + mksquashfs /$i $LIVEKITDATA/$LIVEKITNAME/$i.$BEXT -comp xz -b 512k +done + if [ -d sb ]; then cp sb/* $LIVEKITDATA/$LIVEKITNAME/ fi