[Lunar-commits] CVS: lunar-iso/scripts initrd, 1.3, 1.4 kernels, 1.8, 1.9

Auke Kok sofar at lunar-linux.org
Fri Feb 4 09:17:50 UTC 2005


Update of /var/cvs/lunar/lunar-iso/scripts
In directory espresso.foo-projects.org:/tmp/cvs-serv3973

Modified Files:
	initrd kernels 
Log Message:
setup initrd to use proper kernel names, depmod and installed modules for BOTH initrd kernels

Index: initrd
===================================================================
RCS file: /var/cvs/lunar/lunar-iso/scripts/initrd,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- initrd	24 Nov 2004 12:21:36 -0000	1.3
+++ initrd	4 Feb 2005 09:17:46 -0000	1.4
@@ -40,10 +40,12 @@
 chroot BUILD /sbin/ldconfig
 
 # compile the initrd image
-mkdir -p BUILD/lib/modules/${ISO_KVER}-ll-${ISO_KREL}/kernel/drivers/
-cp -a $ISO_TARGET/lib/modules/${ISO_KVER}-ll-${ISO_KREL}/kernel/drivers/{ide,scsi} BUILD/lib/modules/${ISO_KVER}-ll-${ISO_KREL}/kernel/drivers/
-# TODO compile multiple kernels:
-depmod -b BUILD/ -a -F $ISO_TARGET/usr/src/linux-${ISO_KVER}/System.map
+for KERNEL in linux safe ; do
+  KVER=$(file -k $ISO_SOURCE/kernels/$KERNEL | sed 's/.*\(version .*\)/\1/' | cut -d' ' -f2)
+  mkdir -p BUILD/lib/modules/$KVER/kernel/drivers/
+  cp -a $ISO_TARGET/lib/modules/$KVER/kernel/drivers/{ide,scsi} BUILD/lib/modules/$KVER/kernel/drivers/
+  depmod -b BUILD/ -a -F $KERNEL.map
+done
 
 # install discover in the initrd BUILD
 mkdir -p BUILD/{bin,etc} BUILD/usr/share/discover/dtd 
@@ -56,6 +58,8 @@
 for file in $(find BUILD/{lib,bin,sbin,usr}); do
   strip $file 2> /dev/null
 done
+
+chown -R root:root BUILD/*
   
 # calculate the size of the initrd image
 SIZE=$(du -kcs BUILD | tail -1 | cut -f1)

Index: kernels
===================================================================
RCS file: /var/cvs/lunar/lunar-iso/scripts/kernels,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- kernels	3 Feb 2005 21:05:12 -0000	1.8
+++ kernels	4 Feb 2005 09:17:46 -0000	1.9
@@ -68,6 +68,9 @@
       cp arch/i386/boot/bzImage $ISO_SOURCE/kernels/$2
     fi
     cp System.map $ISO_SOURCE/kernels/BUILD/boot/System.map-$ISO_KVER$1
+    if [ -n "$2" ] ; then
+      cp System.map $ISO_SOURCE/kernels/$2.map
+    fi
     cp .config $ISO_SOURCE/kernels/BUILD/boot/config-$ISO_KVER$1
     gzip $ISO_SOURCE/kernels/BUILD/boot/config-$ISO_KVER$1
     cp -aL $ISO_SOURCE/kernels/linux-$ISO_KVER/include/asm $ISO_SOURCE/kernels/BUILD/usr/include/linux-$ISO_KVER$1/asm



More information about the Lunar-commits mailing list