This is for compressing initrfs.img
Code: Select all
find . -print | cpio -o -H newc 2>/dev/null | xz -f --extreme --check=crc32 > ../initrfs.img
I made some changes to reduce number of files in /bin and /lib directories,
what's now left in /bin
Code: Select all
[root@alphaos bin]# ls -l
total 1718
lrwxrwxrwx 1 root root 13 Nov 1 17:41 bash -> /usr/bin/bash
-rwxr-xr-x 1 root root 1664088 Oct 13 11:05 busybox
-rwxr-xr-x 1 root root 30480 Oct 13 11:05 chroot
-rwxr-xr-x 1 root root 30344 Oct 31 08:24 gettext
-rwxr-xr-x 1 root root 1585 Oct 31 08:24 gettext.sh
lrwxrwxrwx 1 root root 12 Nov 1 17:41 getty -> /bin/busybox
lrwxrwxrwx 1 root root 12 Nov 1 17:41 init -> /bin/busybox
-rwxr-xr-x 1 root root 30604 Oct 13 11:11 login
lrwxrwxrwx 1 root root 13 Nov 1 17:41 sh -> /usr/bin/bash
and in /lib
Code: Select all
[root@alphaos lib]# ls -l
total 1861
drwxr-xr-x 34 root root 1746 Nov 1 17:41 firmware
-rwxr-xr-x 1 root root 134284 Oct 13 11:07 ld-2.18.so
lrwxrwxrwx 1 root root 10 Sep 24 08:33 ld-linux.so.2 -> ld-2.18.so
-rwxr-xr-x 1 root root 1754580 Oct 13 11:07 libc-2.18.so
-rw-r--r-- 1 root root 246 Sep 24 08:32 libc.so
lrwxrwxrwx 1 root root 12 Sep 24 08:33 libc.so.6 -> libc-2.18.so
-rwxr-xr-x 1 root root 13868 Oct 13 11:07 libdl-2.18.so
lrwxrwxrwx 1 root root 10 Sep 24 08:32 libdl.so -> libdl.so.2
lrwxrwxrwx 1 root root 13 Sep 24 08:33 libdl.so.2 -> libdl-2.18.so
drwxr-xr-x 5 root root 1024 Oct 28 17:09 modules
drwxr-xr-x 3 root root 142 Nov 1 09:22 udev
/sbin now links to /usr/bin, instead of /bin - this link was previously added because some wireless modules didn't load on boot, but now modprobe is in /usr/bin.
Also, I deleted /etc/modprobe.d from rootfs with all *.conf files in it.
/bin/init also deleted, now /bin/init is link to busybox
eudev recompiled with files moved to /usr/, except udev rules.d they are fixed to /lib