malekith: bootdisk mkimages,1.10,1.11

Michał Moskal malekith w pld-linux.org
Pon, 25 Mar 2002, 10:18:04 CET


Module name:    bootdisk
Changes by:     malekith

Changed RCS file: /cvsroot/bootdisk/mkimages,v
----------------------------
revision 1.11
date: 2002/03/25 09:18:01;  author: malekith;  state: Exp;  lines: +48 -19
- handle making images for ppc (only initrd, no .img files)
 

Index: mkimages
===================================================================
RCS file: /cvsroot/bootdisk/mkimages,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- mkimages	22 Mar 2002 10:09:10 -0000	1.10
+++ mkimages	25 Mar 2002 09:18:01 -0000	1.11
@@ -6,33 +6,62 @@
   name="$1"
   shift
   
-  case "$name" in
-    parted )
-      ;;
-    net_eth )
-      ;;
-  esac
-
   opt=
   for f in tmp-etc/* ; do
     opt="$opt -e $f"
   done
 
-  opt="$opt -m floppy,vfat"
+  case $ARCH in
+    ia32 )
+      opt="$opt -m floppy,vfat"
+      echo
+      echo "Making $name bootdisk."
+      sh scripts/mkinstaller -t `pwd`/targz $kernel_opt $opt "$@" \
+  		-I bootdisk_${name}.txt \
+		-o bootdisk_${name}.img
+      echo
+      echo "Making $name slow bootdisk."
+      sh scripts/mkinstaller -t `pwd`/targz -a $kernel_opt $opt "$@" \
+  		-I bootdisk_${name}_slow.txt \
+		-o bootdisk_${name}_slow.img
+      ;;
+    ppc )
+      case $name in
+      iso )
+      	: we only want initrd_iso.gz
+        ;;
+      * )
+        return
+	;;
+      esac
+      
+      echo
+      echo "Making $name initrd."
+      sh scripts/mkinstaller -t `pwd`/targz $kernel_opt $opt "$@" \
+  		-I bootdisk_fake_${name}.txt \
+		-o initrd_${name} \
+		-s initrd
+      echo -n "compressing... "
+      gzip -9nf initrd_${name}
+      echo "done"
+      ;;
+  esac
 
-  echo
-  echo "Making $name bootdisk."
-  sh scripts/mkinstaller -t `pwd`/targz $kernel_opt $opt "$@" \
-  	-I bootdisk_${name}.txt \
-	-o bootdisk_${name}.img
-  echo
-  echo "Making $name slow bootdisk."
-  sh scripts/mkinstaller -t `pwd`/targz -a $kernel_opt $opt "$@" \
-  	-I bootdisk_${name}_slow.txt \
-	-o bootdisk_${name}_slow.img
-  
   rm -rf tmp-etc
   mkdir tmp-etc
+}
+
+set_bootloader () {
+  boot_loader=rc-boot
+  case `uname -m` in
+  ppc )
+    boot_loader=yaboot
+    ;;
+  esac
+  cp tmp-etc/installer.conf tmp-etc/installer.conf.tmp
+  sed -e 's/^boot_loader=.*/boot_loader="'$boot_loader'"/' \
+  	tmp-etc/installer.conf.tmp > tmp-etc/installer.conf
+  rm -f tmp-etc/installer.conf.tmp
 }
 
 network_conf () {



Więcej informacji o liście dyskusyjnej pld-installer