Subject: CVS commit: src/distrib/cdrom
To: None <source-changes@NetBSD.org>
From: Izumi Tsutsui <tsutsui@netbsd.org>
List: source-changes
Date: 09/17/2006 03:56:03
Module Name:	src
Committed By:	tsutsui
Date:		Sun Sep 17 03:56:03 UTC 2006

Modified Files:
	src/distrib/cdrom: Makefile NetBSD-3.1.mk NetBSD-4.0.mk
	    NetBSD-current.mk
	src/distrib/cdrom/macppc_installboot: Makefile
Added Files:
	src/distrib/cdrom/macppc_installboot: cd9660.c cd9660_util.c
	    installboot.c installboot.h
	src/distrib/cdrom/macppc_mkboothfs: Makefile mkboothfs.c
Removed Files:
	src/distrib/cdrom/macppc_installboot: bootxx.raw.uue
	    macppc_installboot.c macppcboot.raw.uue mkmacppcboot.c

Log Message:
Reorganize macppc_installboot to make macppccd.iso image actually bootable
on (some) OpenFirmware 2.x machines.

Current macppccd.iso image doesn't boot on Openfirmware 2.x
(and probably 1.0.5) machines because it uses pre-compiled binary
which is based on old (and customized) bootxx.
It causes version mismatch against newer ofwboot whose load address
has been changed from 0x600000 to 0xe00000, as mentioned in the
following post:
http://mail-index.netbsd.org/port-macppc/2004/12/14/0020.html
There was also an raw binary which was passed to mkisofs as -boot-hfs-file.

To fix these issue, prepare a simple mkhfsboot program which creates
a boothfs file with the Apple partition map info for mkisofs,
and modify macppc_installboot to search the secondary ofwboot from isofs
and to put and modify the primary bootxx accordingly.
See PR toolchain/30245 for more details.

There are still some machines which don't boot from an iso image created
by this method (G3 machines with OF 2.0f1 etc.), but it's still better
than to keep ugly and obsolete hacks.

Ok'ed by macallan, and there is no other particular comment about this PR.


To generate a diff of this commit:
cvs rdiff -r1.28 -r1.29 src/distrib/cdrom/Makefile
cvs rdiff -r1.1 -r1.2 src/distrib/cdrom/NetBSD-3.1.mk \
    src/distrib/cdrom/NetBSD-4.0.mk
cvs rdiff -r1.4 -r1.5 src/distrib/cdrom/NetBSD-current.mk
cvs rdiff -r1.5 -r1.6 src/distrib/cdrom/macppc_installboot/Makefile
cvs rdiff -r1.1 -r0 src/distrib/cdrom/macppc_installboot/bootxx.raw.uue \
    src/distrib/cdrom/macppc_installboot/macppcboot.raw.uue \
    src/distrib/cdrom/macppc_installboot/mkmacppcboot.c
cvs rdiff -r0 -r1.1 src/distrib/cdrom/macppc_installboot/cd9660.c \
    src/distrib/cdrom/macppc_installboot/cd9660_util.c \
    src/distrib/cdrom/macppc_installboot/installboot.c \
    src/distrib/cdrom/macppc_installboot/installboot.h
cvs rdiff -r1.2 -r0 src/distrib/cdrom/macppc_installboot/macppc_installboot.c
cvs rdiff -r0 -r1.1 src/distrib/cdrom/macppc_mkboothfs/Makefile \
    src/distrib/cdrom/macppc_mkboothfs/mkboothfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.