tazlito rev 198
Add small loram cdrom support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Dec 22 13:20:59 2010 +0100 (2010-12-22) |
parents | f86b2091167a |
children | 7cdda81b0343 |
files | tazlito tazlitobox |
line diff
1.1 --- a/tazlito Wed Dec 22 10:30:33 2010 +0100 1.2 +++ b/tazlito Wed Dec 22 13:20:59 2010 +0100 1.3 @@ -241,6 +241,12 @@ 1.4 create_iso() 1.5 { 1.6 echo "Generating $1" 1.7 + if [ $(ls $2/boot/vmlinuz* $2/boot/bzImage | wc -l) -eq 2 ]; then 1.8 + if cmp $2/boot/vmlinuz* $2/boot/bzImage > /dev/null; then 1.9 + rm -f $2/boot/bzImage 1.10 + ln $2/boot/vmlinuz* $2/boot/bzImage 1.11 + fi 1.12 + fi 1.13 genisoimage -R -o $1 -b boot/isolinux/isolinux.bin \ 1.14 -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 \ 1.15 -V "$VOLUM_NAME" -p "$PREPARED" -input-charset iso8859-1 \ 1.16 @@ -852,7 +858,7 @@ 1.17 for i in \${path}rootfs* ; do 1.18 fs=\${i#*root} 1.19 branch=\$branch:/mnt/.\$fs 1.20 - mkdir -p /mnt/.rw/mnt/.\$fs /mnt/.\$fs 1.21 + mkdir -p /mnt/.rw/mnt/.\$fs /mnt/.\$fs /mnt/.rw/mnt/.cdrom 1.22 if [ -f /bin/cromfs-driver ]; then 1.23 cromfs-driver \${path}root\$fs /mnt/.\$fs -o ro,dev,suid,allow_other 1.24 else 1.25 @@ -931,16 +937,20 @@ 1.26 build_initfs cdrom || return 1 1.27 build_loram_rootfs cdrom 1.28 cp -a $TMP_DIR/iso $TMP_DIR/loramiso 1.29 - mkdir $TMP_DIR/loramiso/fs 1.30 - cd $TMP_DIR/loramiso/fs 1.31 - for i in $( ls ../boot/root* | sort -r ) ; do 1.32 - ( zcat $i 2> /dev/null || unlzma -c $i ) | cpio -idmu 1.33 - rm -f $i 1.34 - done 1.35 - cd - > /dev/null 1.36 + if [ "$1" == "small" ]; then 1.37 + rm -f $TMP_DIR/loramiso/boot/root* 1.38 + else 1.39 + mkdir $TMP_DIR/loramiso/fs 1.40 + cd $TMP_DIR/loramiso/fs 1.41 + for i in $( ls ../boot/root* | sort -r ) ; do 1.42 + ( zcat $i 2> /dev/null || unlzma -c $i ) | cpio -idmu 1.43 + rm -f $i 1.44 + done 1.45 + mkdir -p $TMP_DIR/loramiso/fs/mnt/.cdrom 1.46 + cd - > /dev/null 1.47 + fi 1.48 mv $TMP_DIR/initfs.gz $TMP_DIR/loramiso/boot/rootfs.gz 1.49 mv $TMP_DIR/rootfs*.gz $TMP_DIR/loramiso 1.50 - mkdir -p $TMP_DIR/loramiso/fs/mnt/.cdrom 1.51 unmeta_boot 1.52 create_iso $OUTPUT $TMP_DIR/loramiso 1.53 } 1.54 @@ -2349,9 +2359,10 @@ 1.55 fi 1.56 1.57 case "$4" in 1.58 - cdrom) build_loram_cdrom ;; 1.59 - http) build_loram_http ;; 1.60 - *) build_loram_ram ;; 1.61 + cdrom) build_loram_cdrom ;; 1.62 + smallcdrom) build_loram_cdrom small ;; 1.63 + http) build_loram_http ;; 1.64 + *) build_loram_ram ;; 1.65 esac 1.66 umount -d $TMP_DIR/iso 1.67 rm -rf $TMP_DIR ;;
2.1 --- a/tazlitobox Wed Dec 22 10:30:33 2010 +0100 2.2 +++ b/tazlitobox Wed Dec 22 13:20:59 2010 +0100 2.3 @@ -120,8 +120,9 @@ 2.4 2.5 loram_action() 2.6 { 2.7 - case "$LORAM_RAM$LORAM_CDROM" in 2.8 - falsetrue) type=cdrom ;; 2.9 + case "$LORAM_RAM$LORAM_CDROM$LORAM_CDROM_SMALL" in 2.10 + falsefalsetrue) type=smallcdrom ;; 2.11 + falsetruefalse) type=cdrom ;; 2.12 *) type=ram ;; 2.13 esac 2.14 xterm -geometry 80x16 \ 2.15 @@ -535,7 +536,11 @@ 2.16 <variable>LORAM_RAM</variable> 2.17 </radiobutton> 2.18 <radiobutton> 2.19 - <label>The filesystem may be on a CDROM.</label> 2.20 + <label>The filesystem may be on a small CDROM.</label> 2.21 + <variable>LORAM_CDROM_SMALL</variable> 2.22 + </radiobutton> 2.23 + <radiobutton> 2.24 + <label>The filesystem may be on a large CDROM.</label> 2.25 <variable>LORAM_CDROM</variable> 2.26 </radiobutton> 2.27 </vbox>