Disable some unused packages
[qi-bootmenu-system.git] / initramfs.sh
blob233624d02e7ce92a42740c206667827727f1672a
1 #!/bin/bash
3 source sources/include.sh || exit 1
5 cd $TOP || dienow
7 # copy root overlay
9 tar -C "$ROOT_OVERLAY" -cf - . | tar -C "$ROOT_DIR" -xf -
11 if [ -z "$NO_STRIP" ]; then
12 # strip all binaries
13 ${STRIP} "$ROOT_DIR"/usr/{bin/*,sbin/*} 2> /dev/null
14 find "$ROOT_DIR/usr/lib" -name '*.so' | xargs ${STRIP} --strip-unneeded 2>/dev/null
15 find "$ROOT_DIR/lib/modules" -name '*.ko' | xargs ${STRIP}
17 # remove libthread_db which is used for cross debuging with gdb
18 rm -f "$ROOT_DIR"/lib/libthread_db*
21 # generate file with the contents of the initramfs it's later used
22 # by the kernel build system to create a gziped cpio archive which
23 # is then embedded into the kernel binary.
25 $SCRIPTS/gen_initramfs_list.sh -u squash -g squash $ROOT_DIR > \
26 initramfs-files
28 # Add some more device nodes
30 echo "nod /dev/tty 644 0 0 c 5 0" >> initramfs-files
31 echo "nod /dev/tty0 644 0 0 c 4 0" >> initramfs-files
32 echo "nod /dev/tty1 644 0 0 c 4 1" >> initramfs-files
33 echo "nod /dev/tty2 644 0 0 c 4 2" >> initramfs-files
34 echo "nod /dev/ttyGS0 644 0 0 c 253 0" >> initramfs-files
35 echo "nod /dev/ttySAC2 644 0 0 c 204 66" >> initramfs-files
36 echo "nod /dev/console 622 0 0 c 5 1" >> initramfs-files
37 echo "nod /dev/null 622 0 0 c 1 3" >> initramfs-files
38 echo "nod /dev/fb0 644 0 0 c 29 0" >> initramfs-files
40 echo "Specify initramfs-files during kernel compilation as CONFIG_INITRAMFS_SOURCE"
41 echo "or run ./package.sh to create rootfs.tar.gz tarball for a chroot environment."