[PATCH] nearly successful powerpc build
I got a build that ran all the way up to release.sh before failing
to install some documentation. Here are the relevant patches. I'm
not too sure about the second one, because I don't understand what
'$system' is supposed to be for (it's currently always passed in as
null from the higher-level scripts, and the value the lower-level
scripts want is in the subarch, i took a wild guess which to fix).
The third bit isn't a patch at all, it's part of the first patch
(powerpc-prep-apus.diff). I had to add a new file,
make/powerpc.rules, and cvs add didn't want to work without write
cvs access, so I had to unbundle it.
Anyway, most of this stuff deals with getting bootprep.sh to work,
and apus stuff to build despite the outdated kernel. The second
patch deals with an impedance mismatch between rescue.sh and
make/rescue, as well as the charset problem mentioned in the
previous thread but like I said before it's really half-assed.
Changelog entries:
powerpc-prep-apus.diff
- Added powerpc/rules, to deal with prep and apus oddities.
- Modernized bootprep.sh.
- config: Changed default powerpc kernel version to 2.2.17.
powerpc-hacks.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,39 +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
-zcat $builddir/usr/src/kernel-patches/powerpc/*.diff.gz \
- | patch -l -s -p1
+# 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.17
+ pcmcia_kver := 2.2.17-pmac
apuskver := 2.2.10
endif
ifeq "$(architecture)" "sparc"
@@ -57,7 +57,7 @@
# Top-level directory where we will look for external stuff required
# to build the boot-floppies. It has to be an absolute PATH or else
# the basedisks.sh script will fail.
-ftp_archive := /archive/debian
+ftp_archive := /space/james/archive/debian
# files from Incoming; note they must be named *_all.deb or *_<arch>.deb
incoming := $(ftp_archive)/Incoming
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
Index: debian/changelog
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/debian/changelog,v
retrieving revision 1.421
diff -u -r1.421 changelog
--- debian/changelog 2001/04/13 14:20:46 1.421
+++ debian/changelog 2001/04/14 05:06:46
@@ -17,6 +17,8 @@
- enable user to set APT_PREFS in case they need a local apt
preferences file
- some fixes for folks building from Linux 2.4.x
+ * James Deikun
+ - use libc version 2.2.2 for powerpc
-- Adam Di Carlo <aph@debian.org> Fri, 13 Apr 2001 02:49:06 -0400
#-----------------------------------------------------------------------
# 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 pmac 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: