wok-current annotate slitaz-loram-cdrom/stuff/loram.rootfs @ rev 10580

openerp-client: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 26 09:04:02 2011 +0200 (2011-05-26)
parents 738a9be33f09
children
rev   line source
pascal@309 1 echo "$(du -hs /usr | cut -f1) were used by /usr"
pascal@4099 2 for j in insmod unmkcromfs unsquashfs ; do
pascal@4099 3 lib/ld-*.so --list *bin/$j 2> /dev/null | grep /usr/lib | cut -d\ -f3 | \
pascal@4099 4 while read ii; do
pascal@4099 5 mv .${ii%%.so.*}.so* ./lib
pascal@4099 6 done
pascal@954 7 done
pascal@309 8 for ii in /sbin /lib /bin; do
pascal@309 9 mkdir -p ./usr/.moved$ii
pascal@390 10 for j in e2fsprogs pcmciautils cpio syslinux-extra isapnptools ncurses \
pascal@390 11 libcap; do
pascal@744 12 for k in $(grep -s ^$ii /var/lib/tazpkg/installed/$j/files.list) ; do
pascal@309 13 [ -f .$k ] || continue
pascal@309 14 mv .$k ./usr/.moved$k
pascal@309 15 ln -s /usr/.moved$k .$k
pascal@309 16 done
pascal@309 17 done
pascal@309 18 done
pascal@390 19 k="$(ls /lib/lib[rp]*.so)"
pascal@390 20 [ -x /bin/funionfs ] && k="$(ls /lib/libresolv*.so)"
pascal@390 21 for ii in /var/lib/tazpkg/installed /lib/modules/*/kernel/drivers/net \
pascal@2140 22 /lib/modules/*/kernel/sound /sbin/depmod /sbin/modinfo /sbin/lsmod \
pascal@390 23 /lib/libns*.so $k; do
pascal@390 24 [ -L .$ii ] && continue
pascal@3897 25 case "$ii" in
pascal@3897 26 /lib/libnss_file*) continue;;
pascal@3915 27 /lib/libpthread*) continue;;
pascal@3897 28 esac
pascal@309 29 j=$(dirname /usr/.moved$ii)
pascal@309 30 mkdir -p .$j
pascal@309 31 mv .$ii .$j
pascal@309 32 ln -s /usr/.moved$ii .$ii
pascal@309 33 done
pascal@390 34 echo "$(du -hs ./usr/.moved | cut -f1) have been moved into /usr"
pascal@370 35 usr=usr
pascal@5048 36 if [ -x bin/funionfs -o -d /var/lib/tazpkg/installed/aufs-utils ]; then
pascal@370 37 usr=.usr.ro
pascal@370 38 mkdir .usr.ro .usr.rw
pascal@1884 39 fi
pascal@1884 40 if [ -x bin/funionfs -o -x usr/bin/mkcromfs ]; then
pascal@1884 41 ln -s /$usr/lib/$(cd usr/lib ; ls libfuse.so.2.*) lib/libfuse.so.2
pascal@370 42 fi
pascal@370 43 if [ -x usr/bin/mkcromfs ]; then
pascal@370 44 usr/bin/mkcromfs -qq -f 262144 -b 16384 usr ../rootcd/usr.cromfs
pascal@370 45 rm -rf usr
pascal@370 46 mkdir usr
pascal@370 47 for ii in unmkcromfs cromfs-driver ; do
pascal@370 48 mv bin/$ii ../rootcd
pascal@370 49 ln -s /cdrom/$ii bin/$ii
pascal@370 50 done
pascal@370 51 elif [ -x usr/sbin/mksquashfs ]; then
pascal@7653 52 usr/sbin/mksquashfs usr ../rootcd/usr.sqfs -comp xz -Xbcj x86
pascal@309 53 rm -rf usr
pascal@309 54 mkdir usr
pascal@309 55 else
pascal@309 56 mv usr ../rootcd
pascal@390 57 [ "$usr" = "usr" ] || mv $usr usr
pascal@370 58 ln -s /cdrom/usr $usr
pascal@309 59 fi
pascal@850 60 if [ -d ../rootcd/usr/lib ]; then
pascal@850 61 for ii in *; do
pascal@850 62 case "$ii" in
pascal@1096 63 usr|boot|home) continue;;
pascal@850 64 mnt|media|sys|proc|cdrom) mkdir ../rootcd/$ii;;
pascal@850 65 *) cp -a $ii ../rootcd/$ii;;
pascal@850 66 esac
pascal@850 67 done
pascal@1096 68 for ii in media/*; do
pascal@1096 69 [ "$ii" = "media/cdrom" ] || mkdir ../rootcd/$ii
pascal@1096 70 done
pascal@850 71 for ii in keymap.conf locale.conf resolv.conf TZ motd; do
pascal@1096 72 rm -f ../rootcd/etc/$ii
pascal@1096 73 ln -s /tmp/$ii ../rootcd/etc/$ii
pascal@850 74 done
pascal@1097 75 ln -s /tmp/detected-modules ../rootcd/var/lib/detected-modules
pascal@850 76 for ii in log run lock; do
pascal@850 77 mv ../rootcd/var/$ii ../rootcd/var/$ii.ORG
pascal@1096 78 ln -s /tmp ../rootcd/var/$ii
pascal@850 79 done
pascal@850 80 mv ../rootcd/root ../rootcd/root.ORG
pascal@850 81 ln -s /tmp ../rootcd/root
pascal@1096 82 ln -s /tmp ../rootcd/home
pascal@850 83 ln -s / ../rootcd/media/cdrom
pascal@850 84 mkdir ../rootcd/mnt/target
pascal@850 85 sed -i 's/CLEAN_UP_SYSTEM="yes"/CLEAN_UP_SYSTEM="no"/' ../rootcd/etc/rcS.conf
pascal@850 86 sed -i 's/RUN_DAEMONS=.*/RUN_DAEMONS=""/' ../rootcd/etc/rcS.conf
pascal@850 87 for ii in ../rootcd/boot/isolinux/*.cfg; do
pascal@850 88 cat $ii | awk '{ print } /append/ { printf "label loram\n\tkernel /boot/bzImage\n\tappend ro sound=noconf screen=text %s %s %s\n",$5,$6,$7 }' > $ii.tmp
pascal@850 89 mv -f $ii.tmp $ii
pascal@850 90 done
pascal@850 91 cat >> ../rootcd/boot/isolinux/enopts.txt <<EOT
pascal@821 92 With few RAM, you can use loram entry with the cdrom device; example:
pascal@821 93 boot: loram root=/dev/hdc
pascal@821 94 EOT
pascal@850 95 cat >> ../rootcd/boot/isolinux/options.txt <<EOT
pascal@821 96 Avec peu de RAM, utilisez l'entrée loram en précisant le cdrom, exemple:
pascal@821 97 boot: loram root=/dev/hdc
pascal@821 98 EOT
pascal@850 99 fi
pascal@2140 100 for ii in bin/vcsa2txt bin/awk bin/script bin/cut bin/readlink bin/du bin/free \
pascal@4454 101 bin/killall5 bin/seq bin/find bin/xargs bin/patch; do
pascal@1620 102 [ -e $ii ] || ln -s busybox $ii
pascal@370 103 done
pascal@5715 104 [ -e bin/vcsa2txt ] || ln -s busybox bin/conspy
pascal@309 105 mkdir cdrom
pascal@309 106 COMPRESSION="gzip"