SOURCES: linux-live-package.patch - 6.2.4 - merged from DEVEL

patrys patrys at pld-linux.org
Tue Aug 19 22:35:11 CEST 2008


Author: patrys                       Date: Tue Aug 19 20:35:11 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- 6.2.4
- merged from DEVEL

---- Files affected:
SOURCES:
   linux-live-package.patch (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SOURCES/linux-live-package.patch
diff -u SOURCES/linux-live-package.patch:1.10 SOURCES/linux-live-package.patch:1.11
--- SOURCES/linux-live-package.patch:1.10	Fri Dec 22 17:43:53 2006
+++ SOURCES/linux-live-package.patch	Tue Aug 19 22:35:05 2008
@@ -1,96 +1,153 @@
---- linux-live-5.5.0/config	2006-09-29 15:30:28.000000000 +0300
-+++ linux-live-5.5.0/config	2006-10-17 22:53:07.000000000 +0300
-@@ -12,31 +12,33 @@
--RAM0SIZE=4444
-+RAM0SIZE=6444
- 
- # change this variable if you installed your distro to some directory.
- # for example ROOT=/tmp/newdir. You may leave it empty, then it defaults to /
--ROOT=
-+#ROOT=/opt/livecd/root
- 
- # kernel version. Change it to "2.6.10" for example, if you are building
- # LiveCD with a different kernel than the one you are actually running
--KERNEL="`uname -r`"
-+image=$(cd $ROOT; readlink boot/vmlinuz)
-+KERNEL="${image#vmlinuz-}"
- 
- # list of directories which will be modularized
- # You may add 'dev' inthere in the case your distro doesn't have udev installed
-+# You should add 'lib64' here if you're having 64bit arch
- MKMOD="bin etc home lib opt root usr sbin var"
- 
- # compressed directories (img) will be stored here
- # (the whole folder will be erased now!)
--CDDATA=/tmp/live_data_$$
-+export CDDATA=${CDDATA:-$(mktemp -d)}
- 
- # name of initrd image
- INITRDIMG=initrd
- 
- # Enable debug by setting the following parameter to "logfile.log"
--DEBUG=/tmp/linux-live-debug.log
-+DEBUG=/dev/null
- 
- # Install/uninstall all scripts from /tools to /usr/sbin and /usr/lib
- # so the user is able to use all these commands while running his/her Live Linux
- # Disable if your distro already contains installed linux live tools.
--INSTALL_TOOLS=1
-+INSTALL_TOOLS=0
- 
- # where to save resulting livecd ISO image
--ISO_IMAGE=/tmp/livecd.iso
-+ISO_IMAGE=${ISO_IMAGE:-/root/livecd.iso}
---- linux-live/runme.sh	2006-10-13 15:33:24.000000000 +0300
-+++ linux-live-5.5.0/runme.sh	2006-10-13 18:25:50.000000000 +0300
+diff -ur linux-live-6.2.4.orig/build linux-live-6.2.4/build
+--- linux-live-6.2.4.orig/build	2008-08-15 21:18:01.200408725 +0200
++++ linux-live-6.2.4/build	2008-08-19 22:27:40.960579005 +0200
 @@ -10,8 +10,8 @@
  echo "Changing current directory to $CHANGEDIR"
  cd $CHANGEDIR
  
--. ./config || exit 1
 -. liblinuxlive || exit 1
-+. /etc/linux-live/config || exit 1
+-. ./.config || exit 1
 +. /usr/lib/liblinuxlive || exit 1
++. /etc/linux-live/config || exit 1
  
  # only root can continue, because only root can read all files from your system
  allow_only_root
-@@ -19,9 +19,9 @@
+@@ -30,9 +30,9 @@
  # search for kernel
  VMLINUZ=$ROOT/boot/vmlinuz
- if [ -L "$VMLINUZ" ]; then VMLINUZ=`readlink -f $VMLINUZ`; fi
--echo -ne "Enter path for the kernel you wanna use [hit enter for $VMLINUZ]: "
+ if [ -L "$VMLINUZ" ]; then VMLINUZ=$(readlink -f $VMLINUZ); fi
+-echo -ne "Enter path for the kernel you'd like to use [hit enter for $VMLINUZ]: "
 -read NEWKERNEL
 -if [ "$NEWKERNEL" != "" ]; then VMLINUZ="$NEWKERNEL"; fi
-+#echo -ne "Enter path for the kernel you wanna use [hit enter for $VMLINUZ]: "
++#echo -ne "Enter path for the kernel you'd like to use [hit enter for $VMLINUZ]: "
 +#read NEWKERNEL
 +#if [ "$NEWKERNEL" != "" ]; then VMLINUZ="$NEWKERNEL"; fi
- if [ "`ls $VMLINUZ 2>>$DEBUG`" = "" ]; then echo "cannot find $VMLINUZ"; exit 1; fi
+ if [ "$(ls $VMLINUZ 2>>$DEBUG)" = "" ]; then echo "cannot find $VMLINUZ"; exit 1; fi
  
  header "Creating LiveCD from your Linux"
-@@ -40,7 +40,13 @@
- echo "copying cd-root to $CDDATA, using kernel from $VMLINUZ"
- echo "Using kernel modules from /lib/modules/$KERNEL"
- cp -R cd-root/* $CDDATA
--cp tools/* $CDDATA/tools
-+cp /usr/bin/{deb2mo,dir2mo,img2mo,mo2dir,tgz2mo} $CDDATA/tools
-+cp /usr/lib/liblinuxlive $CDDATA/tools
-+cp /usr/sbin/uselivemod $CDDATA/tools
-+cp /sbin/mksquashfs $CDDATA/tools
-+cp /sbin/unsquashfs $CDDATA/tools
-+cp /usr/sbin/unionctl $CDDATA/tools
-+cp /usr/sbin/uniondbg $CDDATA/tools
- cp -R DOC/* $CDDATA
+@@ -50,7 +50,10 @@
+ 
+ mkdir -p $CDDATA/$LIVECDNAME
+ cp -R cd-root/linux/* $CDDATA/$LIVECDNAME
+-cp tools/* $CDDATA/$LIVECDNAME/tools
++cp /usr/bin/{deb2lzm,dir2lzm,lzm2dir,tgz2lzm} $CDDATA/$LIVECDNAME/tools
++cp /usr/lib/liblinuxlive $CDDATA/$LIVECDNAME/tools
++cp /sbin/mksquashfs $CDDATA/$LIVECDNAME/tools
++cp /sbin/unsquashfs $CDDATA/$LIVECDNAME/tools
+ cp -R DOC/LICENSE $CDDATA/$LIVECDNAME
  cp $VMLINUZ $CDDATA/boot/vmlinuz
  
---- linux-live-5.5.0/initrd/initrd_create	2006-10-17 19:42:57.000000000 +0300
-+++ linux-live-5.5.0/initrd/initrd_create	2006-12-21 21:36:56.000000000 +0200
-@@ -3,11 +3,12 @@
+@@ -82,12 +85,17 @@
+     fi
+ done
+ 
+-cd $CDDATA/$LIVECDNAME
+ echo "--------done----------"
+-echo
+-echo "* run $CDDATA/$LIVECDNAME/make_iso.bat to create ISO image"
+-echo "* or copy content of $CDDATA to your USB device"
+-echo "and run ./boot/bootinst.sh (from the device!) to setup boot sector"
+-echo
+-echo "Now press Enter..."
+-read junk
++
++if [ "$ISO_IMAGE" ]; then
++    cd $CDDATA/$LIVECDNAME
++    sh make_iso.sh "$ISO_IMAGE"
++else
++    echo
++    echo "* run $CDDATA/$LIVECDNAME/make_iso.sh to create ISO image"
++    echo "* or copy content of $CDDATA to your USB device"
++    echo "and run ./boot/bootinst.sh (from the device!) to setup boot sector"
++    echo
++    echo "Now press Enter..."
++    read junk
++fi
+diff -ur linux-live-6.2.4.orig/cd-root/boot/isolinux/isolinux.cfg linux-live-6.2.4/cd-root/boot/isolinux/isolinux.cfg
+--- linux-live-6.2.4.orig/cd-root/boot/isolinux/isolinux.cfg	2008-08-15 21:18:01.196408776 +0200
++++ linux-live-6.2.4/cd-root/boot/isolinux/isolinux.cfg	2008-08-19 22:27:40.960579005 +0200
+@@ -5,7 +5,7 @@
+ LABEL linux
+ MENU LABEL Run linux
+ KERNEL /boot/vmlinuz
+-APPEND vga=769 initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw
++APPEND initrd=/boot/initrd.gz ramdisk_size=9666 root=/dev/ram0 rw
+ 
+ LABEL memtest86
+ MENU LABEL Run Memtest utility
+diff -ur linux-live-6.2.4.orig/cd-root/linux/make_iso.sh linux-live-6.2.4/cd-root/linux/make_iso.sh
+--- linux-live-6.2.4.orig/cd-root/linux/make_iso.sh	2008-08-15 21:18:01.200408725 +0200
++++ linux-live-6.2.4/cd-root/linux/make_iso.sh	2008-08-19 22:27:40.960579005 +0200
+@@ -12,10 +12,11 @@
+   exit
+ fi
+ 
+-CDLABEL="SLAX"
++CDLABEL="LiveCD"
+ ISONAME=$(readlink -f "$1")
+ 
+-cd $(dirname $0)
++DIRNAME=$(dirname $0)
++DIR=$(cd $DIRNAME; cd ..; pwd)
+ 
+ if [ "$ISONAME" = "" ]; then
+    SUGGEST=$(readlink -f ../../$(basename $(pwd)).iso)
+@@ -26,4 +27,4 @@
+ 
+ mkisofs -o "$ISONAME" -v -J -R -D -A "$CDLABEL" -V "$CDLABEL" \
+ -no-emul-boot -boot-info-table -boot-load-size 4 \
+--b boot/isolinux/isolinux.bin -c boot/isolinux/isolinux.boot ../.
++-b boot/isolinux/isolinux.bin -c boot/isolinux/isolinux.boot "$DIR"
+diff -ur linux-live-6.2.4.orig/.config linux-live-6.2.4/.config
+--- linux-live-6.2.4.orig/.config	2008-08-15 21:18:01.200408725 +0200
++++ linux-live-6.2.4/.config	2008-08-19 22:27:40.960579005 +0200
+@@ -6,16 +6,12 @@
+ # Live CD Name. Defaults to 'mylinux'; you should change it to your own
+ # name if you wish your own branding. Eg. Slax changes it to 'slax'
+ # Must not contain any spaces. You'll be asked for this during livecd creation.
+-LIVECDNAME="mylinux"
++LIVECDNAME="pldlive"
+ 
+ # the size of RAMdisk (in KBytes)
+ # if you change this, then you will need to change the same
+ # in the following files as well: ./cd-root/boot/isolinux.cfg, ./cd-root/boot/syslinux.cfg, ./cd-root/boot/DOS/config
+-RAM0SIZE=6666
+-
+-# kernel version. Change it to "2.6.10" for example, if you are building
+-# LiveCD with a different kernel than the one you are actually running
+-KERNEL=$(uname -r)
++RAM0SIZE=9666
+ 
+ # list of directories which will be modularized
+ # no subdirectories are allowed, no slashes. You can't use /var/tmp here for example
+@@ -30,7 +26,13 @@
+ 
+ # change this variable if you installed your distro to some directory.
+ # for example ROOT=/tmp/newdir. You may leave it empty, then it defaults to /
+-ROOT=
++#ROOT=/root/chroot
++#ISO_IMAGE="/root/$LIVECDNAME.iso"
++
++# kernel version. Change it to "2.6.10" for example, if you are building
++# LiveCD with a different kernel than the one you are actually running
++image=$(cd $ROOT; readlink boot/vmlinuz)
++KERNEL="${image#vmlinuz-}"
+ 
+ # If the writable branch (used for changes) doesn't support symlinks or if it
+ # doesn't handle chmod attributes well, overmount it using the posix overlay 
+diff -ur linux-live-6.2.4.orig/initrd/initrd_create linux-live-6.2.4/initrd/initrd_create
+--- linux-live-6.2.4.orig/initrd/initrd_create	2008-08-15 21:18:01.185408216 +0200
++++ linux-live-6.2.4/initrd/initrd_create	2008-08-19 22:28:03.111409558 +0200
+@@ -3,7 +3,7 @@
  #
  # Author:	  Tomas M. <http://www.linux-live.org>
  
--. ../config || exit 1
+-. ../.config || exit 1
 +. /etc/linux-live/config || exit 1
  
+ if [ "$1" != "" ]; then
+    LIVECDNAME="$1"
+@@ -20,6 +20,7 @@
  # rcopy is a recursive cp, which copies also symlink's real source
  # $1 = source (may be a regular file or symlink)
  # $2 = target PARENT
@@ -98,20 +155,20 @@
  #
  rcopy()
  {
-@@ -16,7 +17,11 @@
-       cp --parent -R "$REALPATH" "$2"
-       ln -sf "$REALPATH" "$2/$1"
+@@ -33,7 +34,11 @@
+       cp --parent -a "$REALPATH" "$DEST"
+       ln -sf "$REALPATH" "$DEST/$SOURCE"
     else
--      cp --parent -R "$1" "$2"
-+	  if [ "$3" ]; then
-+		  tar ${3:+-C "$3"} -cf - "${1#$3/}" | tar -C "$2" -xf -
-+	  else
-+		  cp --parent -R "$1" "$2"
-+	  fi
+-      cp --parent -a "$SOURCE" "$DEST"
++      if [ "$3" ]; then
++          tar ${3:+-C "$3"} -cf - "${1#$3/}" | tar -C "$DEST" -xf -
++      else
++          cp --parent -a "$SOURCE" "$DEST"
++      fi
     fi
     if [ "$?" -ne 0 ]; then
-       echo "---------------------------"
-@@ -31,11 +36,12 @@
+       echo ""
+@@ -51,12 +56,13 @@
  # copy file/dir only if it exists, else skip with no error
  # $1 = source (may not exist)
  # $2 = target PARENT
@@ -119,211 +176,170 @@
  #
  rcopy_ex()
  {
+    debug "rcopy_ex $1 $2"
     if [ -a "$1" ]; then
 -      rcopy "$1" "$2"
 +      rcopy "$1" "$2" "$3"
     fi
  }
  
-@@ -48,21 +54,8 @@
+@@ -69,8 +75,8 @@
  ##################################################
  # Create INITRD image now:
  
 -MOUNTDIR=/tmp/initrd_mountdir_$$
 -INITRD_TREE=/tmp/initrd_tree_$$
--
--if [ ! -d "kernel-modules/$KERNEL" ]; then
--   echo "The directory `pwd`/kernel-modules/$KERNEL doesn't exist."
--   echo "Please create it and copy squashfs.ko and unionfs.ko modules"
--   echo "for your kernel ($KERNEL) to this directory."
--   exit 1
--fi
--
--if [ "`ls -1 rootfs/lib`" = "" ]; then
--   echo "cannot find essential libc libraries."
--   echo "please add ld-linux and libc.so to `pwd`./rootfs/lib"
--   exit 1
--fi
 +MOUNTDIR=$(mktemp -d || echo /tmp/initrd_mountdir_$$)
 +INITRD_TREE=$(mktemp -d || echo /tmp/initrd_tree_$$)
+ INITRDIMG=initrd
  
+ if [ ! -d $ROOT/$LMK ]; then
+@@ -78,12 +84,6 @@
+    exit 1
+ fi
+ 
+-if [ "$(ls -1 rootfs/lib)" = "" ]; then
+-   echo "cannot find essential libc libraries."
+-   echo "please add ld-linux and libc.so to $(pwd)./rootfs/lib"
+-   exit 1
+-fi
+-
  debug "creating empty directory $INITRD_TREE"
  rm -Rf $INITRD_TREE
-@@ -81,15 +74,17 @@
-   mknod $INITRD_TREE/dev/tty$i c 4 $i;
- done
+ mkdir $INITRD_TREE
+@@ -150,6 +150,7 @@
+ rcopy_ex $ROOT/$LMK/kernel/fs/fat $INITRD_TREE 2>>$DEBUG
+ rcopy_ex $ROOT/$LMK/kernel/fs/vfat $INITRD_TREE 2>>$DEBUG
+ rcopy_ex $ROOT/$LMK/kernel/fs/ntfs $INITRD_TREE 2>>$DEBUG
++rcopy_ex $ROOT/$LMK/kernel/fs/jbd $INITRD_TREE 2>>$DEBUG
+ rcopy_ex $ROOT/$LMK/kernel/fs/ext3 $INITRD_TREE 2>>$DEBUG
+ rcopy_ex $ROOT/$LMK/kernel/fs/reiserfs $INITRD_TREE 2>>$DEBUG
+ rcopy_ex $ROOT/$LMK/kernel/fs/xfs $INITRD_TREE 2>>$DEBUG
+@@ -164,8 +165,11 @@
+ rcopy_ex $ROOT/$LMK/kernel/drivers/usb/host/uhci-hcd.* $INITRD_TREE 2>>$DEBUG
+ 
+ # pci modules
++rcopy_ex $ROOT/$LMK/kernel/drivers/scsi $INITRD_TREE 2>>$DEBUG
++rcopy_ex $ROOT/$LMK/kernel/drivers/acpi $INITRD_TREE 2>>$DEBUG
+ rcopy_ex $ROOT/$LMK/kernel/drivers/cdrom $INITRD_TREE 2>>$DEBUG
+ rcopy_ex $ROOT/$LMK/kernel/drivers/ide $INITRD_TREE 2>>$DEBUG
++rcopy_ex $ROOT/$LMK/kernel/drivers/ata $INITRD_TREE 2>>$DEBUG
+ 
+ # pcmcia modules
+ rcopy_ex $ROOT/$LMK/kernel/drivers/pcmcia/pcmcia_core.* $INITRD_TREE 2>>$DEBUG
+@@ -190,44 +194,30 @@
+ chmod ago-x $INITRD_TREE/usr.lzm
+ rm -Rf $INITRD_TREE/usr/*
  
-+mkdir $INITRD_TREE/dev/loop
- loops=255
- while [ $loops -ge 0 ]; do
--   mknod $INITRD_TREE/dev/loop$loops b 7 $loops
-+   mknod $INITRD_TREE/dev/loop/$loops b 7 $loops
-    loops=$(($loops-1))
- done
- 
- debug "copying files to the rootdisk"
- touch $INITRD_TREE/etc/{m,fs}tab
--cp {linuxrc,cleanup,liblinuxlive} $INITRD_TREE # symlink will be copied as original file
-+cp {linuxrc,cleanup} $INITRD_TREE
-+cp /usr/lib/liblinuxlive $INITRD_TREE
- chmod a+x $INITRD_TREE/linuxrc
- chmod a+x $INITRD_TREE/cleanup
- 
-@@ -103,46 +98,97 @@
- ln -s busybox $INITRD_TREE/bin/poweroff
- ln -s busybox $INITRD_TREE/bin/halt
- ln -s busybox $INITRD_TREE/bin/reboot
--ln -s busybox $INITRD_TREE/bin/ld
- ln -s busybox $INITRD_TREE/bin/ls
--ln -s busybox $INITRD_TREE/bin/head
- ln -s busybox $INITRD_TREE/bin/cat
--ln -s busybox $INITRD_TREE/bin/grep
--ln -s busybox $INITRD_TREE/bin/sleep
--ln -s bin $INITRD_TREE/sbin
-+ln -s busybox $INITRD_TREE/bin/mkdir
-+ln -s busybox $INITRD_TREE/bin/echo
-+ln -s busybox $INITRD_TREE/bin/uname
-+ln -s busybox $INITRD_TREE/bin/sed
-+ln -s busybox $INITRD_TREE/bin/egrep
-+ln -s busybox $INITRD_TREE/bin/fgrep
-+ln -s busybox $INITRD_TREE/bin/losetup
-+ln -s busybox $INITRD_TREE/bin/sort
-+cp -a /bin/mawk $INITRD_TREE/bin/awk
-+cp -a /bin/busybox $INITRD_TREE/bin/busybox
-+cp -a /sbin/blkid $INITRD_TREE/bin
-+cp -a /usr/bin/eject $INITRD_TREE/bin
-+cp -a /usr/sbin/unionctl $INITRD_TREE/bin
-+cp -a /usr/sbin/uniondbg $INITRD_TREE/bin
-+mkdir -p $INITRD_TREE/usr/share
-+cp -a /usr/bin/pcidev $INITRD_TREE/bin
-+cp -a /usr/share/pci-database $INITRD_TREE/usr/share
-+rm -f $INITRD_TREE/lib/*
-+if [ -d /lib64 ]; then
-+	lib=lib64
-+	ld_linux=ld-linux-x86-64.so.?
-+else
-+	lib=lib
-+	ld_linux=ld-linux.so.?
-+fi
-+rcopy /$lib/$ld_linux $INITRD_TREE
-+rcopy /$lib/libc.so.? $INITRD_TREE
-+rcopy /$lib/libblkid.so.? $INITRD_TREE
-+rcopy /$lib/libuuid.so.? $INITRD_TREE
-+rcopy /$lib/libz.so.? $INITRD_TREE
-+rcopy /$lib/libm.so.* $INITRD_TREE
-+rcopy /$lib/libdevmapper.so.* $INITRD_TREE
-+rcopy /$lib/libselinux.so.* $INITRD_TREE
-+rcopy /$lib/libsepol.so.* $INITRD_TREE
-+rcopy /$lib/libdl.so.* $INITRD_TREE
-+rcopy /$lib/librt.so.? $INITRD_TREE
-+rcopy /$lib/libpthread.so.? $INITRD_TREE
-+rcopy /$lib/libcrypt.so.? $INITRD_TREE
- 
- LMK="lib/modules/$KERNEL"
- 
--#necessary modules and dependency files
--mkdir -p $INITRD_TREE/$LMK/kernel/fs
--cp kernel-modules/$KERNEL/unionfs.ko* $INITRD_TREE/$LMK/kernel/fs
--cp kernel-modules/$KERNEL/squashfs.ko* $INITRD_TREE/$LMK/kernel/fs
+-debug "creating empty image file for initrd"
+-dd if=/dev/zero of=$INITRDIMG bs=1024 count=$RAM0SIZE >>$DEBUG 2>&1
 -
--#copy filesystem modules, if not directly copied into kernel
--rcopy_ex /$LMK/kernel/lib/zlib_inflate $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/lib/zlib_deflate $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/drivers/block/loop* $INITRD_TREE 2>>$DEBUG
+-debug "making filesystem"
+-mkfs -t ext2 -F -m 0 -b 1024 -i 1024 $INITRDIMG >>$DEBUG 2>&1
+-tune2fs -i 120m $INITRDIMG >>$DEBUG 2>&1
 -
--rcopy_ex /$LMK/kernel/fs/isofs $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/fs/fat $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/fs/vfat $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/fs/ntfs $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/fs/ext3 $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/fs/reiserfs $INITRD_TREE 2>>$DEBUG
-+(
-+# copy filesystem modules, if not directly copied into kernel
-+rcopy $ROOT/$LMK/kernel/lib/zlib_inflate $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/lib/zlib_deflate $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/block/loop.ko* $INITRD_TREE $ROOT
-+
-+rcopy_ex $ROOT/$LMK/kernel/fs/isofs $INITRD_TREE $ROOT
-+rcopy_ex $ROOT/$LMK/kernel/fs/isofs.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/fat $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/vfat $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/ntfs $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/ext3 $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/xfs $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/exportfs $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/reiserfs $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/jbd/jbd.ko* $INITRD_TREE $ROOT
- 
- # add language support for filesystems
--rcopy_ex /$LMK/kernel/fs/nls/ $INITRD_TREE 2>>$DEBUG
--
--#usb modules
--rcopy_ex /$LMK/kernel/drivers/usb/storage $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/drivers/usb/host/ehci-hcd* $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/drivers/usb/host/ohci-hcd* $INITRD_TREE 2>>$DEBUG
--rcopy_ex /$LMK/kernel/drivers/usb/host/uhci-hcd* $INITRD_TREE 2>>$DEBUG
+ debug "creating empty directory $MOUNTDIR"
+ rm -Rf $MOUNTDIR
+ mkdir $MOUNTDIR
+ 
+-debug "mounting $INITRDIMG to it"
+-modprobe loop 2>>$DEBUG
+-mount -o loop -t ext2 $INITRDIMG $MOUNTDIR
+-if [ "$?" -ne 0 ]; then
+-   echo "Error mounting initrd! Not enough free loop devices?"
+-   exit 1
+-fi
 -
--#disk (scsi, ide, raid, pcmcia) modules
--#rcopy_ex /$LMK/kernel/drivers/scsi $INITRD_TREE
--#rcopy_ex /$LMK/kernel/drivers/ide $INITRD_TREE
--#rcopy_ex /$LMK/kernel/drivers/pcmcia $INITRD_TREE
-+rcopy $ROOT/$LMK/kernel/fs/nls/nls_cp437.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/nls/nls_iso8859-1.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/nls/nls_iso8859-2.ko* $INITRD_TREE $ROOT
-+
-+# usb modules
-+rcopy $ROOT/$LMK/kernel/drivers/usb/core/usbcore.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/usb/input/usbhid.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/usb/input/usbkbd.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/usb/storage $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/usb/host/ehci-hcd.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/usb/host/ohci-hcd.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/usb/host/uhci-hcd.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/usb/storage/libusual.ko* $INITRD_TREE $ROOT
-+
-+rcopy $ROOT/$LMK/kernel/drivers/scsi/scsi_mod.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/scsi/sr_mod.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/scsi/ata_piix.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/scsi/libata.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/drivers/scsi/sata*.ko* $INITRD_TREE $ROOT
-+
-+rcopy_ex $ROOT/$LMK/kernel/drivers/ide $INITRD_TREE $ROOT
-+
-+rcopy $ROOT/$LMK/kernel/drivers/cdrom/cdrom.ko* $INITRD_TREE $ROOT
-+
-+rcopy $ROOT/$LMK/kernel/fs/isofs/isofs $INITRD_TREE $ROOT
-+rcopy_ex $ROOT/$LMK/kernel/fs/squashfs.ko* $INITRD_TREE $ROOT
-+rcopy_ex $ROOT/$LMK/kernel/fs/squashfs $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/unionfs.ko* $INITRD_TREE $ROOT
-+rcopy $ROOT/$LMK/kernel/fs/unionfs/unionfs $INITRD_TREE $ROOT
-+) 2>>$DEBUG
- 
- if [ "$COMPRESS" = 1 ]; then
-    debug "gzipping kernel modules"
---- linux-live-5.5.0/initrd/linuxrc	2006-09-28 01:19:28.000000000 +0300
-+++ linux-live-5.5.0/initrd/linuxrc	2006-09-28 01:19:28.000000000 +0300
-@@ -157,5 +157,8 @@
- fstab_update $UNION
- 
-+echolog "creating /etc/modprobe.conf"
-+modprobe_update $UNION
-+
- # More likely these directories aren't there.
- # Even if they are, this won't hurt.
- # Even if they are, this won't hurt.
-@@ -182,6 +185,9 @@
+ debug "copying content of $INITRD_TREE to $MOUNTDIR"
+-rmdir $MOUNTDIR/lost+found
+ cp -R --preserve $INITRD_TREE/* $MOUNTDIR 2>/dev/null
+ if [ $? -ne 0 ]; then
+    debug "error copying data to mounted initrd. Increase RAM0SIZE"
+    echo "Not enough free space in initrd. Edit .config and increase RAM0SIZE !"
+-   umount $MOUNTDIR
+-   rm $INITRDIMG
+    exit 1
  fi
  
- header "linux live end, starting the Linux distribution"
-+
-+$DEBUGCMD
-+
- pivot_root . $INITRAMDISK
- exec $CHROOT . sbin/init <dev/console >dev/console 2>&1
+-debug "unmounting $MOUNTDIR"
+-umount $MOUNTDIR
++debug "building $MOUNTDIR"
++CUR=$(pwd)
++cd $MOUNTDIR
++cp linuxrc init
++find . | cpio -H newc -o > "$CUR/$INITRDIMG"
++cd $CUR
+ 
+ debug "gzipping $INITRDIMG"
+ gzip --best $INITRDIMG
+ 
+ debug "deleting directory $MOUNTDIR"
+-rmdir $MOUNTDIR
++rm -rf $MOUNTDIR
  
---- linux-live-5.5.0/tools/liblinuxlive	2006-11-28 19:08:09.000000000 +0200
-+++ linux-live-5.5.0/tools/liblinuxlive	2006-12-21 21:50:27.000000000 +0200
-@@ -367,6 +367,13 @@
+ debug "deleting directory $INITRD_TREE"
+ rm -Rf $INITRD_TREE
+diff -ur linux-live-6.2.4.orig/initrd/linuxrc linux-live-6.2.4/initrd/linuxrc
+--- linux-live-6.2.4.orig/initrd/linuxrc	2008-08-15 21:18:01.185408216 +0200
++++ linux-live-6.2.4/initrd/linuxrc	2008-08-19 22:27:40.963906593 +0200
+@@ -250,18 +250,9 @@
+ 
+ mount -n -o remount,ro aufs .
+ 
+-# We will copy init from the distro to initrd (there should be 2MB free)
+-# This allows us to use the cleanup script during reboot, as init will be
+-# started from memory and not from the union and /union will not be busy.
+-
+-cp -af $INIT /bin
+-if [ $? -eq 0 ]; then
+-   pivot_root . $INITRAMDISK
+-   exec $CHROOT . $INITRAMDISK/bin/init <dev/console >dev/console 2>&1
+-else # If copying fails, start init directly.
+-   pivot_root . $INITRAMDISK
+-   exec $CHROOT . $INIT <dev/console >dev/console 2>&1
+-fi
++# Should do switch_root but not supported by this busybox
++pivot_root . $INITRAMDISK
++exec $CHROOT . $INIT <dev/console >dev/console 2>&1
+ 
+ header "!!ERROR!!"
+ fatal "You are not supposed to be here, something went wrong!"
+diff -ur linux-live-6.2.4.orig/install linux-live-6.2.4/install
+--- linux-live-6.2.4.orig/install	2008-08-15 21:18:01.196408776 +0200
++++ linux-live-6.2.4/install	2008-08-19 22:27:40.963906593 +0200
+@@ -15,18 +15,7 @@
+ if [ "$N" = "build" ]; then
+    N=install
+ else
+-   . ./.config || exit 1
++   . /etc/linux-live/config || exit 1
+    if [ "$1" ]; then ROOT="$1"; fi
+ fi
+ 
+-if [ "$N" != "uninstall" ]; then
+-   mkdir -p $ROOT/usr/bin
+-   mkdir -p $ROOT/usr/lib
+-   ls -1 ./tools | egrep -v "^lib" | while read FILE; do cp ./tools/$FILE $ROOT/usr/bin; done
+-   cat ./tools/liblinuxlive | sed -r 's/^LIVECDNAME=.*/LIVECDNAME="'$LIVECDNAME'"/' > $ROOT/usr/lib/liblinuxlive
+-else
+-   ls -1 ./tools | egrep -v "^lib" | while read FILE; do rm -v $ROOT/usr/bin/$FILE; done
+-   ls -1 ./tools | egrep "^lib" | while read FILE; do rm -v $ROOT/usr/lib/$FILE; done
+-fi
+-
+-echo "Linux Live scripts were $N""ed successfuly in $1/"
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/linux-live-package.patch?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list