[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[UPDATE][PATCH] nearly successful powerpc build (woody)



I've updated these patches.  Please use this version instead
of the original.

This version fixes some problems in the patches I originally
sent, but they lack build-testing.  Thanks to Daniel
Jacobowitz for pointing out most of these problems.  (I'm
sure there are more.)

Changelog entries:

powerpc-prep-apus-v2.diff
    - Added powerpc/rules, to deal with prep and apus oddities.
    - Modernized bootprep.sh.
    - config: Changed default powerpc kernel version to 2.2.19.

powerpc-hacks-v2.diff
    - rescue.sh: Switch on $subarch, not $system for powerpc.
    - rootdisk.sh: Added 'charset=latin1' (HACK--where should
      this come from?)

-- 
James Deikun, Techie(tm), CSI Multimedia
The opinions expressed &c.
? make/powerpc.rules
Index: bootprep.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/bootprep.sh,v
retrieving revision 1.11
diff -u -r1.11 bootprep.sh
--- bootprep.sh	2000/07/15 23:57:19	1.11
+++ bootprep.sh	2001/04/14 04:43:48
@@ -5,12 +5,11 @@
 . ./common.sh
  
 # Usage message 
-if [ $# -lt 3 ]; then
-echo "Usage: "$0" archive" 1>&2
+if [ $# -lt 2 ]; then
+echo "Usage: "$0" archive kver" 1>&2
         cat 1>&2 << EOF
  
         archive: the directory containing the Debian binary packages.
-	top: top of the boot-floppies source tree
 	kver: kernel version
 EOF
  
@@ -20,42 +19,37 @@
 # Set this to the location of the package archive.
 archive=$1
 
-# Set this to the location of the top of the source tree.
-top=$2
-
 # Set this to the kernel version
-kver=$3
+kver=$2
 
 #-----------------------------------------------
 # build PReP bootable images
 #-----------------------------------------------
 
+# Save the current directory
+top=`pwd`
+
 # Create a tmp directory
 builddir=${tmpdir}/boot-floppies/bootprep-tmp-$$
 rm -rf $builddir
 make_tmpdir $builddir
 
 # Extract kernel source and patches 
-dpkg --extract `ls -t {$top/updates,$archive/devel}/kernel-source-$kver*.deb \
- 2>/dev/null | head -1` $builddir
-dpkg --extract `ls -t {$top/updates,$archive/devel}/kernel-patch-$kver-powerpc*.deb \
- 2>/dev/null | head -1` $builddir
+dpkg --extract `grab_paths kernel-source-$kver` $builddir
+dpkg --extract `grab_paths kernel-patch-$kver-powerpc` $builddir
 
 # Unpack kernel source 
 cd $builddir/usr/src
 if [ -f kernel-source-${kver}.tar.gz ]; then
   tar zxf kernel-source-$kver.tar.gz
 else
-  tar Ixf kernel-source-$kver.tar.bz2
+  tar x --bzip2 -f kernel-source-$kver.tar.bz2
 fi
 
 # Patch kernel source - FIXME: allow for other patches
 cd kernel-source-$kver
+# XXX: this patch may be getting applied twice.  Comment
+# this out if you get messages about patches being already
+# applied.
 zcat $builddir/usr/src/kernel-patches/powerpc/*.diff.gz \
  | patch -l -s -p1
 
 # Add rootprep.bin as the ramdisk
 cp $top/rootprep.bin ./arch/ppc/coffboot/ramdisk.image.gz 
Index: config
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/config,v
retrieving revision 1.66
diff -u -r1.66 config
--- config	2001/04/11 10:42:45	1.66
+++ config	2001/04/14 04:43:48
@@ -25,8 +25,8 @@
     kver	:= 2.2.17
 endif
 ifeq "$(architecture)" "powerpc"
-    kver	:= 2.2.18
-    pcmcia_kver := 2.2.18-pmac
+    kver	:= 2.2.19
+    pcmcia_kver := 2.2.19-pmac
     apuskver	:= 2.2.10
 endif
 ifeq "$(architecture)" "sparc"
Index: rescue.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/rescue.sh,v
retrieving revision 1.100
diff -u -r1.100 rescue.sh
--- rescue.sh	2001/04/11 20:40:50	1.100
+++ rescue.sh	2001/04/14 05:06:39
@@ -395,7 +395,7 @@
 	error "no support for MIPS"
         ;;
     powerpc)
-        case "$system" in
+        case "$subarch" in
             apus|chrp)
                 mkdosfs -r 112 -F 12 $floppy $blocks
                 fstype=msdos
@@ -570,7 +570,7 @@
         write_milo
         ;;
     powerpc)
-	case $system in
+	case $subarch in
 	    apus|bbox|chrp|mbx|prep)
 		# no bootloader yet, write out install.sh like m68k
 		write_m68kinfo
Index: rootdisk.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/rootdisk.sh,v
retrieving revision 1.194
diff -u -r1.194 rootdisk.sh
--- rootdisk.sh	2001/04/14 00:13:09	1.194
+++ rootdisk.sh	2001/04/14 05:06:42
@@ -12,6 +12,9 @@
 
 export LANG=C
 
+# FIXME -- should be a runtime parameter
+charset=latin1
+
 # vflag is for the '-v' flag, set conditionally
 if [ ${debug} ]; then
     vflag=-v
#-----------------------------------------------------------------------
# powerpc-specific Rules
#
# This module contains rules to build the 'apus' and 'prep'
# subarchitectures, as they are somewhat difficult.
#-----------------------------------------------------------------------

bootprep.bin bootprepfull.bin: bootprep.sh rootprep.bin
	./bootprep.sh $(archive) $(kver)
##
## XXX: apus isn't keeping up with the other powerpc kernels
##
modulesapus.tgz sys_mapapus.gz configapus.gz linuxapus modcontapus:	kernel.sh
	$(ROOTCMD) ./kernel.sh $(archive) $(apuskver) "apus"

#Local variables:
#mode: Makefile
#End:

Reply to: