SOURCES: linux-live-package.patch (NEW), linux-live-config.patch (...

glen glen at pld-linux.org
Fri Oct 13 17:34:25 CEST 2006


Author: glen                         Date: Fri Oct 13 15:34:25 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- move patch into single file for easier maintenance

---- Files affected:
SOURCES:
   linux-live-package.patch (NONE -> 1.1)  (NEW), linux-live-config.patch (1.3 -> NONE)  (REMOVED), linux-live-modprobe.patch (1.5 -> NONE)  (REMOVED), linux-live-modules.patch (1.3 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: SOURCES/linux-live-package.patch
diff -u /dev/null SOURCES/linux-live-package.patch:1.1
--- /dev/null	Fri Oct 13 17:34:25 2006
+++ SOURCES/linux-live-package.patch	Fri Oct 13 17:34:20 2006
@@ -0,0 +1,322 @@
+--- linux-live-5.5.0/config	2006-09-27 01:47:53.000000000 +0300
++++ linux-live-5.5.0/config	2006-09-29 15:30:28.000000000 +0300
+@@ -13,11 +13,33 @@
+ 
+ # 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=/vservers/anaconda/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-}"
++
++initrddir="${ROOT%/root}/linux-live-$LINUX_LIVE_VERSION/initrd/kernel-modules/$KERNEL"
++if [ ! -d $initrddir ]; then
++	echo >&2 "Creating $initrd dir"
++	mkdir -p $initrddir
++	for mod in \
++		drivers/cdrom/cdrom \
++		drivers/ide/ide-cd \
++		drivers/ide/ide-core \
++		fs/isofs/isofs \
++		fs/squashfs/squashfs \
++		fs/unionfs \
++		fs/unionfs/unionfs \
++		fs/vfat/vfat \
++		lib/zlib_inflate/zlib_inflate \
++		; do
++		if [ -f $ROOT/lib/modules/$KERNEL/kernel/$mod.ko* ]; then
++			cp -af $ROOT/lib/modules/$KERNEL/kernel/$mod.ko* $initrddir
++		fi
++	done
++fi
+ 
+ # list of directories which will be modularized
+ # You may add 'dev' inthere in the case your distro doesn't have udev installed
+@@ -28,15 +50,15 @@
+-CDDATA=/tmp/live_data_$$
++CDDATA=../live_data_$$
+ 
+ # name of initrd image
+ INITRDIMG=initrd
+ 
+ # Enable debug by setting the following parameter to "logfile.log"
+-DEBUG=/tmp/linux-live-debug.log
++DEBUG=../linux-live-debug.log
+ 
+ # 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:-/home/glen/livecd.iso}
+--- linux-live/runme.sh	2006-10-13 15:11:34.000000000 +0300
++++ linux-live/runme.sh	2006-10-13 15:33:24.000000000 +0300
+@@ -10,8 +10,8 @@
+ echo "Changing current directory to $CHANGEDIR"
+ cd $CHANGEDIR
+ 
+-. ./config || exit 1
+-. liblinuxlive || exit 1
++. /etc/linux-live/config || exit 1
++. /usr/lib/liblinuxlive || exit 1
+ 
+ # only root can continue, because only root can read all files from your system
+ allow_only_root
+@@ -19,9 +19,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]: "
+-read NEWKERNEL
+-if [ "$NEWKERNEL" != "" ]; then VMLINUZ="$NEWKERNEL"; fi
++#echo -ne "Enter path for the kernel you wanna 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
+ 
+ header "Creating LiveCD from your Linux"
+--- linux-live/initrd/initrd_create	2006-10-13 14:38:45.000000000 +0300
++++ linux-live-5.5.0/initrd/initrd_create	2006-10-13 16:36:35.000000000 +0300
+@@ -3,11 +3,12 @@
+ #
+ # Author:	  Tomas M. <http://www.linux-live.org>
+ 
+-. ../config || exit 1
++. /etc/linux-live/config || exit 1
+ 
+ # rcopy is a recursive cp, which copies also symlink's real source
+ # $1 = source (may be a regular file or symlink)
+ # $2 = target PARENT
++# $3 = optional PREFIX to strip from $1
+ #
+ rcopy()
+ {
+@@ -16,7 +17,11 @@
+       cp --parent -R "$REALPATH" "$2"
+       ln -sf "$REALPATH" "$2/$1"
+    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
+    fi
+    if [ "$?" -ne 0 ]; then
+       echo "---------------------------"
+@@ -31,11 +36,12 @@
+ # copy file/dir only if it exists, else skip with no error
+ # $1 = source (may not exist)
+ # $2 = target PARENT
++# $3 = optional PREFIX to strip from $1
+ #
+ rcopy_ex()
+ {
+    if [ -a "$1" ]; then
+-      rcopy "$1" "$2"
++      rcopy "$1" "$2" "$3"
+    fi
+ }
+ 
+@@ -109,40 +115,88 @@
+ ln -s busybox $INITRD_TREE/bin/cat
+ ln -s busybox $INITRD_TREE/bin/grep
+ ln -s busybox $INITRD_TREE/bin/sleep
++cp -a /bin/mawk $INITRD_TREE/bin/awk
+ ln -s bin $INITRD_TREE/sbin
++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
+ 
+ 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
++#cp kernel-modules/$KERNEL/*.ko* $INITRD_TREE/$LMK/kernel/fs
++#cp kernel-modules/$KERNEL/squashfs.ko* $INITRD_TREE/$LMK/kernel/fs
++#cp kernel-modules/$KERNEL/zlib_inflate.ko* $INITRD_TREE/$LMK/kernel/fs
+ 
++(
+ #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
+-
+-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
++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 # causes weird issues
++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
++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_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
++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/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/cdrom/cdrom.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/ide/ide-cd.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/ide/ide-core.ko* $INITRD_TREE $ROOT
++rcopy $ROOT/$LMK/kernel/drivers/ide/pci/piix.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/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
+ 
+ #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
++) 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 @@
+ fi
+ 
+ header "linux live end, starting the Linux distribution"
++
++$DEBUGCMD
++
+ pivot_root . $INITRAMDISK
+ exec $CHROOT . sbin/init <dev/console >dev/console 2>&1
+ 
+--- linux-live-5.5.0/tools/liblinuxlive	2006-09-28 03:14:39.000000000 +0300
++++ linux-live-5.5.0/tools/liblinuxlive	2006-09-29 18:04:58.000000000 +0300
+@@ -367,6 +367,13 @@
+    list_partition_devices
+ }
+ 
++# List all network drivers
++#
++list_network_drivers()
++{
++	pcidev /m net
++}
++
+ # Find file-path on given device
+ # Mounts the device in $1 and returns path if found,
+ # else unmounts and exits
+@@ -434,10 +441,13 @@
+ #
+ modprobe_essential_modules()
+ {
++   echolog "starting IDE device support"
++   modprobe_module piix
+    echolog "starting loop device support"
+    modprobe_module loop max_loop=255
+    echolog "starting cdrom filesystem support"
+    modprobe_module isofs
++   modprobe_module ide-cd
+    echolog "starting squashfs support"
+    modprobe_module squashfs
+    echolog "starting unionfs support"
+@@ -449,6 +459,12 @@
+    modprobe_module vfat
+    echolog "starting ntfs support"
+    modprobe_module ntfs
++   echolog "starting xfs support"
++   modprobe_module xfs
++   echolog "starting reiserfs support"
++   modprobe_module reiserfs
++   echolog "starting ext3 support"
++   modprobe_module ext3
+    create_block_devices
+ }
+ 
+@@ -561,0 +578,13 @@
++
++# create modprobe.conf file $1/etc/modprobe.conf with appropriate ethX module aliases
++# $1 = root directory (union)
++#
++modprobe_update()
++{
++	i=0
++	> $1/etc/modprobe.conf
++	for drv in $(list_network_drivers); do
++		echo "alias eth$i $drv" >> $1/etc/modprobe.conf
++		i=$((i+1))
++	done
++}
+--- linux-live-5.5.0/cd-root/isolinux.cfg	2006-05-05 23:25:22.000000000 +0300
++++ linux-live-5.5.0/cd-root/isolinux.cfg	2006-10-03 14:03:53.000000000 +0300
+@@ -7,7 +7,7 @@
+ 
+ label linux
+ kernel boot/vmlinuz
+-append vga=769 max_loop=255 initrd=boot/initrd.gz init=linuxrc load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=4444 root=/dev/ram0 rw
++append vga=769 max_loop=255 initrd=boot/initrd.gz init=linuxrc load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=6444 root=/dev/ram0 rw
+ 
+ label memtest
+ kernel boot/memtest
================================================================


More information about the pld-cvs-commit mailing list