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

powermac boot-floppy patches



Here are several patches to fix some things up on powerpc/powermac:

todo.diff - bootloader setup corrections, and update re yabootconfig
bootprep.sh - #!/bin/sh -> #!/bin/bash prevents build failure when /bin/sh is ash
EXTRACT_LIST_powerpc_pmac.diff - remove hfsutils
SMALL_BASE_LIST_powerpc_pmac.diff - remove hfsutils
scripts/rootdisk/ybinwrapper - tiny wrapper that sets PATH_PREFIX and execs /target/usr/bin/$PRG
rootdisk.sh.diff - add ybinwrapper and links for mkofboot, ybin and
		   yabootconfig, also symlinks /usr/lib/yaboot -> /target/usr/lib/yaboot

i removed hfsutils and yaboot/ybin/mkofboot from the root disk because
there is no room, we were already exceeding the 1.44MB barrier by
about 85K.  also new upstream ybin supports PATH_PREFIX allowing it to
run from inside /target.  the /usr/lib/yaboot symlink is still needed
since the yaboot.conf generated by yabootconfig must reference it.  i
left ofpath on the root disk as its useful for fixing broken nvram and
does not require the real root filesystem or anything special.  

this will all build fine even with the current yaboot in unstable
(1.2.1-1.1.1-1) but for the future `Make system bootable' and
ybinwrapper to work we must have yaboot (>= 1.2.1-1.2-1).

i have already sucessfully built the boot-floppies with these changes,
and now the pmac root1440 disk is no longer trunicated.  

Adam are you still open to giving out CVS access?  

-- 
Ethan Benson
http://www.alaska.net/~erbenson/
Index: todo
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/todo,v
retrieving revision 1.89
diff -u -r1.89 todo
--- todo	2001/05/28 01:50:35	1.89
+++ todo	2001/05/30 09:22:45
@@ -24,7 +24,7 @@
     - quik stuff is a bit buggy because it's using the /vmlinuz
       symlink, and quik doesn't like that
     - we need to set the nvsetenv vars:
-        nvsetenv boot-device `ofpath <root device>'
+        nvsetenv boot-device "$(ofpath <root disk>0)"
         nvsetenv boot-file " Linux" (may not be needed)
      [ even this won't work on beige g3s ]
     - prevent /boot on a separate partition
@@ -33,12 +33,13 @@
       sensitive) partititon; the installer must enforce or at least
       lart the user if they don't have one immediatly after parititoning a
       newworld
-    - moreover, that apple_bootstrap partition must be on the same
+    - moreover, that Apple_Bootstrap partition must be on the same
       disk as the root partition
-    - Ethan Benson is adding a yaboot configurator to make the
-      yaboot.conf file and set nvram settings; provisionally called
-      'yabootconfig' and will be added to the yaboot pkg
-    - then run 'mkofboot -f -C /target/etc/yaboot.conf'
+    - Ethan Benson has added yabootconfig to upstream ybin.
+      dbootstrap need only run yabootconfig -t /target -r <root device> \
+      -b <Apple_Bootstrap device>, the last two are optional but recommended
+      (so yabootconfig does not have to guess what dbootstrap already knows.
+      yabootconfig will take care of running mkofboot correctly. 
 
 
 GENERAL TASKS FOR WOODY
Index: bootprep.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/bootprep.sh,v
retrieving revision 1.14
diff -u -r1.14 bootprep.sh
--- bootprep.sh	2001/05/29 17:36:06	1.14
+++ bootprep.sh	2001/05/30 09:14:19
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 # PReP Boot Builder.  Copyright 1999, Matt Porter <porter@debian.org> 
 # This is free software under the GNU General Public License.
  
Index: scripts/rootdisk/EXTRACT_LIST_powerpc_pmac
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/scripts/rootdisk/EXTRACT_LIST_powerpc_pmac,v
retrieving revision 1.1
diff -u -r1.1 EXTRACT_LIST_powerpc_pmac
--- scripts/rootdisk/EXTRACT_LIST_powerpc_pmac	2000/04/22 17:48:53	1.1
+++ scripts/rootdisk/EXTRACT_LIST_powerpc_pmac	2001/05/30 09:16:10
@@ -4,5 +4,4 @@
 powerpc-utils
 pcmcia-cs
 eject
-hfsutils
 yaboot
Index: scripts/rootdisk/SMALL_BASE_LIST_powerpc_pmac
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/scripts/rootdisk/SMALL_BASE_LIST_powerpc_pmac,v
retrieving revision 1.2
diff -u -r1.2 SMALL_BASE_LIST_powerpc_pmac
--- scripts/rootdisk/SMALL_BASE_LIST_powerpc_pmac	2000/11/22 06:29:47	1.2
+++ scripts/rootdisk/SMALL_BASE_LIST_powerpc_pmac	2001/05/30 09:16:50
@@ -4,23 +4,5 @@
 sbin/ifport
 sbin/cardmgr
 usr/bin/eject
-usr/bin/hattrib
-usr/bin/hcd
-usr/bin/hcopy
-usr/bin/hdel
-usr/bin/hdir
-usr/bin/hformat
-usr/bin/hls
-usr/bin/hmkdir
-usr/bin/hmount
-usr/bin/hpwd
-usr/bin/hrename
-usr/bin/hrmdir
-usr/bin/humount
-usr/bin/hvol
-usr/lib/yaboot/yaboot
-usr/lib/yaboot/ofboot
-usr/sbin/ybin
-usr/sbin/mkofboot
 usr/sbin/ofpath
 sbin/nvsetenv
#! /bin/sh
export PATH_PREFIX=/target
EXEC="${0##*/}"
if [ ! -x "/target/usr/sbin/$EXEC" ] ; then
	echo 1>&2 "Sorry you must mount your root and /usr filesystems on /target and /target/usr before running $EXEC"
	exit 1
fi
/target/usr/sbin/$EXEC "$@"
Index: rootdisk.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/rootdisk.sh,v
retrieving revision 1.206
diff -u -r1.206 rootdisk.sh
--- rootdisk.sh	2001/05/30 04:38:04	1.206
+++ rootdisk.sh	2001/05/30 09:26:48
@@ -616,6 +616,14 @@
 	cp $scripts/fdisk-powerpc $R/sbin/fdisk
 fi
 
+# powermac needs a ybin wrapper.  Should this be somewhere else?
+if [ "$arch" = powerpc -a "$system" = pmac ] ; then
+	cp $scripts/ybinwrapper $R/usr/sbin/ybin
+	ln $R/usr/sbin/ybin $R/usr/sbin/mkofboot
+	ln $R/usr/sbin/ybin $R/usr/sbin/yabootconfig
+	ln -s /target/usr/lib/yaboot $R/usr/lib/yaboot
+fi
+
 # do library reduction for platforms where it works
 if [ "$arch" != "worksonallarches" ]; then
     info "doing library reduction"

Attachment: pgpqArORq0NFc.pgp
Description: PGP signature


Reply to: