summaryrefslogtreecommitdiffstats
path: root/bin/build.initramfs.sh
diff options
context:
space:
mode:
authorSebastian Schmelzer2011-04-21 15:36:16 +0200
committerSebastian Schmelzer2011-04-21 15:36:16 +0200
commitc61ac386c2dbf70c629d8e5364c5872563510aed (patch)
tree5f5dd1451866093afeab1edd72a1029d292fd7d0 /bin/build.initramfs.sh
parentfbgui update (shutdowm button fix...) (diff)
downloadusb-boot-stick-c61ac386c2dbf70c629d8e5364c5872563510aed.tar.gz
usb-boot-stick-c61ac386c2dbf70c629d8e5364c5872563510aed.tar.xz
usb-boot-stick-c61ac386c2dbf70c629d8e5364c5872563510aed.zip
script tuning :) + vesamenu
Diffstat (limited to 'bin/build.initramfs.sh')
-rwxr-xr-xbin/build.initramfs.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/build.initramfs.sh b/bin/build.initramfs.sh
new file mode 100755
index 0000000..36ee4eb
--- /dev/null
+++ b/bin/build.initramfs.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+ROOT_DIR=$(readlink -f $(dirname $(readlink -f $0))/..)
+
+cd ${ROOT_DIR}/build/rootfs
+echo "[build-initramfs] \t Create initramfs."
+find . | cpio -H newc -o > ../initramfs-default.cpio
+cd ..
+gzip initramfs-default.cpio
+
+mv initramfs-default.cpio.gz initramfs-default
+INITRAMFS_SIZE=$(stat -c %s ${ROOT_DIR}/build/initramfs-default)
+
+cd - > /dev/null 2>&1
+
+echo "[build-initramfs] \t New initramfs created."
+echo "\t\t\t Location: ${ROOT_DIR}/build/initramfs-default."
+echo "\t\t\t Size: ${INITRAMFS_SIZE} bytes."