wok-current rev 14751
busybox-boot: create /usr/share/boot/initrd
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jun 16 19:48:35 2013 +0200 (2013-06-16) |
parents | f98e99c7c5d8 |
children | 1b959b4585bf |
files | busybox-boot/receipt |
line diff
1.1 --- a/busybox-boot/receipt Sun Jun 16 16:40:26 2013 +0200 1.2 +++ b/busybox-boot/receipt Sun Jun 16 19:48:35 2013 +0200 1.3 @@ -15,7 +15,7 @@ 1.4 genpkg_rules() 1.5 { 1.6 jslinux=false 1.7 - mkdir $fs/bin $fs/dev 1.8 + mkdir $fs/usr/share/boot/bin $fs/usr/share/boot/dev 1.9 CHOICE=static 1.10 for i in uclibc musl diet ; do 1.11 [ -x $src/busybox-$i ] || continue 1.12 @@ -23,16 +23,17 @@ 1.13 $(stat -c %s $src/busybox-$CHOICE) ] && 1.14 CHOICE=$i 1.15 done 1.16 - cp -a $src/busybox-$CHOICE $fs/bin/busybox 1.17 - mknod -m 660 $fs/dev/console c 5 1 1.18 - mknod -m 771 $fs/dev/null c 1 3 1.19 - mknod -m 660 $fs/dev/tty c 5 0 1.20 - mknod -m 660 $fs/dev/tty1 c 4 1 1.21 + cp -a $src/busybox-$CHOICE $fs/usr/share/boot/bin/busybox 1.22 + chmod 4755 $fs/usr/share/boot/bin/busybox 1.23 + mknod -m 660 $fs/usr/share/boot/dev/console c 5 1 1.24 + mknod -m 771 $fs/usr/share/boot/dev/null c 1 3 1.25 + mknod -m 660 $fs/usr/share/boot/dev/tty c 5 0 1.26 + mknod -m 660 $fs/usr/share/boot/dev/tty1 c 4 1 1.27 if $jslinux; then 1.28 - mknod -m 644 $fs/dev/clipboard c 10 231 1.29 - mknod -m 660 $fs/dev/ttyS0 c 4 64 1.30 + mknod -m 644 $fs/usr/share/boot/dev/clipboard c 10 231 1.31 + mknod -m 660 $fs/usr/share/boot/dev/ttyS0 c 4 64 1.32 fi 1.33 - cat > $fs/init <<EOT 1.34 + cat > $fs/usr/share/boot/init <<EOT 1.35 #!/bin/busybox sh 1.36 1.37 for i in \$(busybox --list) ; do busybox ln /bin/busybox /bin/\$i; done 1.38 @@ -90,15 +91,7 @@ 1.39 fi 1.40 done 1.41 EOT 1.42 - chmod +x $fs/init 1.43 + chmod +x $fs/usr/share/boot/init 1.44 + ( cd $fs/usr/share/boot ; find bin dev init | cpio -o -H newc ) > initrd 1.45 + rm -rf $fs/usr/share/boot/bin $fs/usr/share/boot/dev $fs/usr/share/boot/init 1.46 } 1.47 - 1.48 -pre_install() 1.49 -{ 1.50 - rm -rf $1/bin $1/dev 1.51 -} 1.52 - 1.53 -post_install() 1.54 -{ 1.55 - rm -rf $1/lib $1/var $1/sbin $1/home $1/root $1/media 1.56 -}