wok-6.x rev 13879
busybox-boot: add mount=, loopfs= & subroot= cmdline args
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jan 17 13:39:49 2013 +0100 (2013-01-17) |
parents | 8437ad3ae814 |
children | 1db81b2d03ff |
files | busybox-boot/receipt gcc3/receipt |
line diff
1.1 --- a/busybox-boot/receipt Tue Jan 15 11:21:28 2013 +0100 1.2 +++ b/busybox-boot/receipt Thu Jan 17 13:39:49 2013 +0100 1.3 @@ -14,11 +14,23 @@ 1.4 genpkg_rules() 1.5 { 1.6 jslinux=false 1.7 - mkdir -p $fs/bin $fs/sbin $fs/dev/pts $fs/proc $fs/sys $fs/tmp 1.8 + mkdir -p $fs/bin $fs/sbin $fs/dev/pts $fs/proc $fs/sys $fs/tmp $fs/mnt 1.9 cp -a $src/busybox-static $fs/bin/busybox 1.10 mknod -m 660 $fs/dev/console c 5 1 1.11 mknod -m 771 $fs/dev/null c 1 3 1.12 mknod -m 660 $fs/dev/tty c 5 0 1.13 + mknod -m 660 $fs/dev/loop0 b 7 0 1.14 + mknod -m 660 $fs/dev/loop1 b 7 1 1.15 + while read name major minor ; do 1.16 + for i in '' 1 2 3 4 5 6 7 8 9 ; do 1.17 + mknod -m 644 $fs/dev/$name$i b $major $(($i + $minor)) 1.18 + done 1.19 + done <<EOT 1.20 +hda 3 0 1.21 +hdb 3 64 1.22 +sda 8 0 1.23 +sdb 8 16 1.24 +EOT 1.25 if $jslinux; then 1.26 mknod -m 644 $fs/dev/clipboard c 10 231 1.27 mknod -m 660 $fs/dev/ttyS0 c 4 64 1.28 @@ -34,6 +46,17 @@ 1.29 export TERM=vt100 1.30 1.31 mount -t proc none /proc 1.32 + 1.33 +arg() 1.34 +{ 1.35 +grep -q $1= /proc/cmdline && root="$(sed "s/.*$1=\([^ ]*\).*/\1/" </proc/cmdline)" 1.36 +} 1.37 + 1.38 +arg mount && mount $root /mnt 1.39 +arg loopfs && losetup /dev/loop0 /mnt/$root && mount /dev/loop0 /mnt 1.40 +arg subroot && cp /bin/chroot /mnt/$root/dev/shm && 1.41 +exec switch_root mnt $root/dev/shm/chroot $root /sbin/init 1.42 + 1.43 [ -d /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb 1.44 mount -t sysfs none /sys 1.45 mount -t devpts none /dev/pts
2.1 --- a/gcc3/receipt Tue Jan 15 11:21:28 2013 +0100 2.2 +++ b/gcc3/receipt Thu Jan 17 13:39:49 2013 +0100 2.3 @@ -9,7 +9,6 @@ 2.4 TARBALL="$SOURCE-$VERSION.tar.bz2" 2.5 WEB_SITE="http://gcc.gnu.org/" 2.6 WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL" 2.7 -#WGET_URL="ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-$VERSION/$TARBALL" 2.8 TAGS="compiler C C++" 2.9 2.10 BUILD_DEPENDS="gawk" 2.11 @@ -18,24 +17,22 @@ 2.12 # Rules to configure and make the package. 2.13 compile_rules() 2.14 { 2.15 - mkdir gcc-build 2.16 - cd gcc-build 2.17 - $src/configure --prefix=/usr --libexecdir=/usr/lib \ 2.18 - --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \ 2.19 - --enable-languages=c,c++ --enable-shared --with-system-zlib \ 2.20 - --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \ 2.21 - --enable-threads=posix --with-tune=$ARCH \ 2.22 - --program-suffix=-3 2.23 - make $MAKEFLAGS bootstrap 2.24 - # Make install in the source tree to help creating derivated pkgs 2.25 - # and keep $_pkg variable set for genpkg. 2.26 - make $MAKEFLAGS install 2.27 + mkdir gcc-build 2.28 + cd gcc-build 2.29 + $src/configure --prefix=/usr --libexecdir=/usr/lib \ 2.30 + --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \ 2.31 + --enable-languages=c,c++ --enable-shared --with-system-zlib \ 2.32 + --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \ 2.33 + --enable-threads=posix --with-tune=$ARCH \ 2.34 + --program-suffix=-3 2.35 + make $MAKEFLAGS bootstrap && 2.36 + make $MAKEFLAGS install 2.37 } 2.38 2.39 # Rules to gen a SliTaz package suitable for Tazpkg. 2.40 genpkg_rules() 2.41 { 2.42 - mkdir -p $fs/usr 2.43 - cp -a $_pkg/usr/bin $_pkg/usr/lib $_pkg/usr/include $fs/usr 2.44 - rm $fs/usr/lib/lib* 2.45 + mkdir -p $fs/usr 2.46 + cp -a $install/usr/bin $install/usr/lib $install/usr/include $fs/usr 2.47 + rm $fs/usr/lib/lib* 2.48 }