tech-toolchain archive

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

Re: Tools mkhybrid(8) for mac68k/macppc ISO9660/HFS install ISO images



(Cc'ed to port-macppc@)

abs@ wrote in tech-toolchain@:
 https://mail-index.netbsd.org/tech-toolchain/2024/06/02/msg004362.html

> On Sat, 1 Jun 2024 at 21:23, David Brownlee <abs%absd.org@localhost> wrote:
> >
> > localsrc/releng/autobuild/etc/autobuild.conf disables the iso-image
> > target for mac68k and riscv. Let me run a quick check that it doesn't
> > explode building an iso-image for netbsd-9 and netbsd-10 and I'll
> > propose changing it to build mac68k by default.
> 
> OK, so previous mac68k iso-image requires the external mkisofs (which
> will certainly not be a surprise to tsutsui@, but may be new
> information to some readers :)

Yes, I also noticed it during my mkhybrid work.
(especially on -data-change-warn stuff)

> I've confirmed with releng and added iso-image to the HEAD mac68k
> builds, so hopefully the images should start to show up and be
> testable.

Thanks.

> Should the HEAD macppc images be bootable also? (Just tries the June 1
> image and it was not - not sure if the changes will be in that date)

I've confirmed the following changes make "make iso-image" in src/etc
make bootable macppc iso using TOOL_MKHYBRID.

There are several pitfalls (like 32KB padding, complicated mkhybrid
options etc.) and maybe need more cleanup (to create temporary working
image first and then copy it into releasedir/images rather than
creating the target image directly etc.), but I think now I can
ask to review and test changes, especially OpenFirmware 1.x and
3.x machines.

Current diffs are on my github (diffs also attached):
 https://github.com/tsutsui/netbsd-src/compare/8b057ce4...tsutsui-macppc-iso-image

# Summary:

- build src/distrib/cdrom/macppc_installboot as a tool in
  src/tools/macppc_installboot
  (and also change src/distrib/cdrom/macppc_installboot as a native tool
   to use src/tools/Makefile.host)
- disable iso_image tareget in src/distrib/macppc (that uses makefs(8))
  and add macppc specific iso stuff to etc/etc.macppc/Makefile.inc
- change "boothfs" file for mkhybrid to have 32KB NetBSD_BootBlock size
  (previously src/distrib/cdrom/Makefile manually add 32KB padding)
 ==> maybe OpenFirmware uses 32KB blocksize to load a bootblock
     specified in the Apple partition map entry

The old SCSI CD-ROM drive on my Apus2000 has several troubles that
cannot recognize modern CD-R media (for only DVD drives?) many times,
so I switched to using BlueSCSI v2 to test images after I made >10
white CD-R coasters..

I will try to cleanup more stuff in the iso-image target in src/etc
and will commit changes in the next weekend.

Here is the latest test log with the macppc cd image built by
"build.sh -U -m macppc iso-image":
---

Open Firmware, 2.0
To continue booting the MacOS type:
BYE<return>
To continue booting from the default boot device type:
BOOT<return>
 ok
0 > boot scsi/sd@3:0 
OF_open bootpath=scsi/sd@3
read stage 2 blocks: 0. done!
starting stage 2...

>> NetBSD/macppc OpenFirmware Boot, Revision 1.14 (Sun Jun  2 12:42:06 UTC 2024)
>> Open Firmware version 2.x
>> Open Firmware running in virtual-mode.
6756044+117636=0x68e654
 start=0x100000
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 10.99.10 (INSTALL) #0: Sun Jun  2 22:17:20 JST 2024
[   1.0000000] 	tsutsui@mirage:/s/tsutsui/netbsd-src/sys/arch/macppc/compile/obj.macppc/INSTALL
[   1.0000000] total memory = 144 MB
[   1.0000000] avail memory = 131 MB
[   1.0000000] found ohare PIC at f3000000
[   1.0000000] bootpath: 8`
e[   1.0000000] mainbus0 (root)
[   1.0000000] cpu0 at mainbus0: 603ev (Revision 2.1), ID 0 (primary)
[   1.0000000] cpu0: HID0 0x90c001<DOZE,DPM,ICE,DCE,NOPTI>, powersave: 1
[   1.0000000] cpu0: ohare L2 cache enabled
[   1.0000000] bandit0 at mainbus0
[   1.0000000] pci0 at bandit0 bus 0
[   1.0000000] pchb0 at pci0 dev 11 function 0
[   1.0000000] pchb0: vendor 106b product 0008 (rev. 0x02)
[   1.0000000] ex0 at pci0 dev 13 function 0: 3Com 3c905B-TX 10/100 Ethernet (rev. 0x30)
[   1.0000000] ex0: interrupting at irq 23
[   1.0000000] ex0: MAC address 00:50:04:65:51:1a
[   1.0000000] exphy0 at ex0 phy 24: 3Com internal media interface
[   1.0000000] exphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[   1.0000000] vendor 1106 product 3038 (USB serial bus, UHCI, revision 0x04) at pci0 dev 14 function 0 not configured
[   1.0000000] obio0 at pci0 dev 16 function 0: addr 0xf3000000
[   1.0000000] mesh0 at obio0 offset 0x10000 irq 12: 50MHz, SCSI ID 7
[   1.0000000] scsibus0 at mesh0: 8 targets, 8 luns per target
[   1.0000000] zsc0 at obio0 irq 15,16
[   1.0000000] zstty0 at zsc0 channel 0 (console i/o)
[   1.0000000] zstty1 at zsc0 channel 1
[   1.0000000] awacs at obio0 offset 0x14000 not configured
[   1.0000000] swim3 at obio0 offset 0x15000 not configured
[   1.0000000] nvram0 at obio0 offset 0x60000
[   1.0000000] cuda0 at obio0 offset 0x16000 irq 18
[   1.0000000] nadb0 at cuda0: Apple Desktop Bus
[   1.0000000] iic at cuda0 not configured
[   1.0000000] wdc0 at obio0 offset 0x20000 irq property not found; using 13: DMA transfer
[   1.0000000] atabus0 at wdc0 channel 0
[   1.0000000] vmmask 7e000000 schedmask 7e000000 highmask 7e000000
[   1.0000954] scsibus0: waiting 2 seconds for devices to settle...
[   1.0299869] WARNING: system needs entropy for security; see entropy(7)
[   1.3599114] adbkbd0 at nadb0 addr 2: extended keyboard
[   1.3898992] wskbd0 at adbkbd0 mux 1
[   1.3898992] nadb0: ADB relative pointing device not configured
[   4.7299271] cd0 at scsibus0 target 3 lun 0: <BlueSCSI, CD-ROM CDU-55S, 1.9a> cdrom removable
[   4.7599591] cd1 at scsibus0 target 4 lun 0: <BlueSCSI, CD-ROM CDU-55S, 1.9a> cdrom removable
[   4.7899701] cd2 at scsibus0 target 5 lun 0: <BlueSCSI, CD-ROM CDU-55S, 1.9a> cdrom removable
[   5.1399196] wd0 at atabus0 drive 0
[   5.1899144] wd0: <DOGFISH SSD 64GB>
[   5.1899144] wd0: 61057 MB, 124053 cyl, 16 head, 63 sec, 512 bytes/sect x 125045424 sectors
[   6.3499269] boot device: <unknown>
[   6.3499269] root on md0a dumps on md0b
[   6.3499269] root file system type: ffs
[   6.3499269] kern.module.path=/stand/macppc/10.99.10/modules
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100] [   7.7899394] entropy: best effort

Erase is backspace.
(I)nstall, (S)hell or (H)alt ? s
# pdisk /dev/rcd0c
Edit /dev/rcd0c -
Command (? for help): P

Partition map (with 512 byte blocks) on '/dev/rcd0c'
 #:                type name             length   base   ( size )
 1: Apple_partition_map Apple                 3 @ 1     
 3:           Apple_HFS NETBSD_109910    798284 @ 16     (389.8M)
 2:        Apple_Driver NetBSD_BootBlock     64 @ 798236

Device block size=2048, Number of Blocks=199575 (389.8M)
DeviceType=0x1, DeviceId=0x1

Command (? for help): q
# 

---

diff --git a/distrib/cdrom/Makefile b/distrib/cdrom/Makefile
index e45629322736..1ddc391a72e5 100644
--- a/distrib/cdrom/Makefile
+++ b/distrib/cdrom/Makefile
@@ -67,10 +67,6 @@ SUBDIR=
 MKISOFS=	${TOOL_MKHYBRID}
 .endif
 
-.if !empty(ALL_PORTS:Mmacppc)
-SUBDIR+=	macppc_installboot
-.endif
-
 .if !empty(SUBDIR)
 .include <bsd.subdir.mk>
 .endif
@@ -85,9 +81,6 @@ RSYNC?=		/usr/pkg/bin/rsync
 ALPHA_IBOOT?=	${TOOL_INSTALLBOOT} -m alpha -o sunsum,append
 PMAX_IBOOT?=	${TOOL_INSTALLBOOT} -m pmax -o sunsum,append
 VAX_IBOOT?=	${TOOL_INSTALLBOOT} -m vax -o sunsum,append
-.if !empty(ALL_PORTS:Mmacppc)
-MACPPC_IBOOTDIR!= cd ${.CURDIR}/macppc_installboot && ${PRINTOBJDIR}
-.endif
 .if !empty(ALL_PORTS:Msgimips)
 SGIMIPS_SGIVOL?=	${TOOLDIR}/bin/nbsgivol
 .endif
@@ -472,10 +465,6 @@ size-${image}: stage-${image} extfileprep fileprep-${image} check_mkisofs
 
 # Actually build the image with all the bootstrap goo....
 
-.if !empty(BASE_PORTS.${image}:Mmacppc)
-${IMAGEDIR}/${image}.iso: all-macppc_installboot
-.endif
-
 ${IMAGEDIR}/${image}.iso: size-${image} check_mkisofs
 	@sort -o ${contents.${image}} ${contents.${image}}
 .if defined(LOG_MKISOFS)
@@ -489,8 +478,7 @@ ${IMAGEDIR}/${image}.iso: size-${image} check_mkisofs
 	    ${.TARGET} ${SUN_BOOT_ARGS.${image}}
 .endif
 .if !empty(BASE_PORTS.${image}:Mmacppc)
-	${MACPPC_IBOOTDIR}/macppc_installboot \
-	    $@ ${EXTFILEDIR}/macppc.bootxx /ofwboot
+	${TOOL_MACPPCINSTALLBOOT} $@ ${EXTFILEDIR}/macppc.bootxx /ofwboot
 .endif
 .if !empty(BASE_PORTS.${image}:Mpmax)
 	${PMAX_IBOOT} $@ ${BOOTFILE.pmax}
diff --git a/distrib/cdrom/boothfs.uue b/distrib/cdrom/boothfs.uue
index 5daf1634028b..f0cc5feb40c8 100644
--- a/distrib/cdrom/boothfs.uue
+++ b/distrib/cdrom/boothfs.uue
@@ -1,4 +1,4 @@
-$NetBSD: boothfs.uue,v 1.1 2009/03/29 04:54:19 tsutsui Exp $
+$NetBSD$
 begin 644 boothfs
 M15((`````````0`!````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
@@ -11,9 +11,9 @@ M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
-M``````````````````````!030```````0````$````!3F5T0E-$7T)O;W1"
+M``````````````````````!030```````0````$````03F5T0E-$7T)O;W1"
 M;&]C:P````````````````````!!<'!L95]$<FEV97(`````````````````
-M```````````````````!````.P````````@```!``````````$``````````
+M```````````````````/````.P````````@```!``````````$``````````
 M``!0;W=E<E!#````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
@@ -23,8 +23,8 @@ M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M`````````````````````````````````````````````%!-```````!````
-M!`````1.971"4T1?0F]O=$)L;V-K`````````````````````$%P<&QE7T1R
-M:79E<@````````````````````````````````````0````[````````"```
+M!````$!.971"4T1?0F]O=$)L;V-K`````````````````````$%P<&QE7T1R
+M:79E<@```````````````````````````````````#P````[````````"```
 M`$``````````0````````````%!O=V5R4$,`````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
@@ -91,7 +91,6 @@ M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
-M`$Q+````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
@@ -113,6 +112,667 @@ M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
 M````````````````````````````````````````````````````````````
-C````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````3$L`
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+?````````````````````````````````````````````
 `
 end
diff --git a/distrib/cdrom/macppc_installboot/Makefile b/distrib/cdrom/macppc_installboot/Makefile
index 97d2c9f75f20..c7c9a75730b5 100644
--- a/distrib/cdrom/macppc_installboot/Makefile
+++ b/distrib/cdrom/macppc_installboot/Makefile
@@ -1,14 +1,16 @@
 #	$NetBSD: Makefile,v 1.13 2024/05/24 10:13:44 tsutsui Exp $
 
-.include <bsd.hostinit.mk>
-HOSTPROG=	macppc_installboot
-SRCS=		installboot.c cd9660.c cd9660_util.c
+NOMAN=	# defined
+PROG=	macppc_installboot
+SRCS=	installboot.c cd9660.c cd9660_util.c
 
+.PATH.c: ${.CURDIR}
 .PATH.c: ${NETBSDSRCDIR}/usr.sbin/installboot ${NETBSDSRCDIR}/sys/fs/cd9660
 
-HOST_CPPFLAGS+=	-I. -I${.CURDIR}
-#HOST_CPPFLAGS+=	-DDEBUG
+CPPFLAGS+=	-I. -I${.CURDIR}
+#CPPFLAGS+=	-DDEBUG
 
+.if !defined(HOSTPROGNAME)
 .if !make(obj) && !make(clean) && !make(cleandir)
 .BEGIN:
 	-rm -rf fs
@@ -23,11 +25,6 @@ cleandir distclean: cleaninc
 
 cleaninc:
 	-rm -rf fs
+.endif	# !defined(HOSTPROGNAME)
 
-.include <bsd.own.mk>
-
-.ifndef NOCOMPATLIB
-.-include	"${TOOLDIR}/share/compat/defs.mk"
-.endif
-
-.include <bsd.hostprog.mk>
+.include <bsd.prog.mk>
diff --git a/distrib/cdrom/macppc_mkboothfs/mkboothfs.c b/distrib/cdrom/macppc_mkboothfs/mkboothfs.c
index 2a28c410135a..6aec017cc62c 100644
--- a/distrib/cdrom/macppc_mkboothfs/mkboothfs.c
+++ b/distrib/cdrom/macppc_mkboothfs/mkboothfs.c
@@ -30,6 +30,9 @@
 #else
 #include <sys/bootblock.h>
 #endif
+#if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
+#include <sys/endian.h>
+#endif
 
 #include <err.h>
 #include <fcntl.h>
@@ -40,8 +43,18 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
+#define BUFSIZE		(64 * 1024)
+
 #define BSIZE		512
-#define BUFSIZE		(8 * 1024)
+#define BOOTPARTSIZE	32768	/* XXX: not sure how much required */
+#define BOOTDATASIZE	(BOOTPARTSIZE - MACPPC_BOOT_BLOCK_MAX_SIZE)
+
+#define HFS_BLKSIZE	512
+#define HFS_MAGICOFFSET	(BOOTDATASIZE - (HFS_BLKSIZE * 2))
+#define HFS_MAGIC	0x4c4b
+
+#define SIZETOBLK512(size)	((size) / 512)
+#define SIZETOBLK2048(size)	((size) / 2048)
 
 static void usage(void);
 
@@ -94,8 +107,8 @@ main(int argc, char **argv)
 	pme.pmSig =		htobe16(APPLE_PART_MAP_ENTRY_MAGIC);
 	pme.pmMapBlkCnt =	htobe32(1);
 	pme.pmPyPartStart =	htobe32(1);
-	pme.pmPartBlkCnt =	htobe32(1);
-	pme.pmDataCnt =		htobe32(1);
+	pme.pmPartBlkCnt =	htobe32(SIZETOBLK2048(BOOTPARTSIZE));
+	pme.pmDataCnt =		htobe32(SIZETOBLK2048(BOOTDATASIZE));
 	strlcpy(pme.pmPartName, "NetBSD_BootBlock", sizeof(pme.pmPartName));
 	strlcpy(pme.pmPartType, "Apple_Driver", sizeof(pme.pmPartType));
 	pme.pmPartStatus =	htobe32(0x3b);
@@ -112,8 +125,8 @@ main(int argc, char **argv)
 	 * Write 512-byte/sector map in the third 512 byte block
 	 */
 	pme.pmPyPartStart =	htobe32(4);
-	pme.pmPartBlkCnt =	htobe32(4);
-	pme.pmDataCnt =		htobe32(4);
+	pme.pmPartBlkCnt =	htobe32(SIZETOBLK512(BOOTPARTSIZE));
+	pme.pmDataCnt =		htobe32(SIZETOBLK512(BOOTDATASIZE));
 	memset(buf, 0, BSIZE);
 	memcpy(buf, &pme, sizeof(pme));
 	write(ofd, buf, BSIZE);
@@ -133,10 +146,9 @@ main(int argc, char **argv)
 	/*
 	 * Prepare HFS "bootblock"; enough to pacify mkisofs.
 	 */
-	memset(buf, 0, BSIZE * 2);
-	buf[0] = 0x4c;
-	buf[1] = 0x4b;
-	if (write(ofd, buf, BSIZE * 2) != BSIZE * 2)
+	memset(buf, 0, BOOTDATASIZE);
+	be16enc(&buf[HFS_MAGICOFFSET], HFS_MAGIC);
+	if (write(ofd, buf, BOOTDATASIZE) != BOOTDATASIZE)
 		err(1, "write boot-hfs-file `%s'", boothfs);
  
 	free(buf);
diff --git a/distrib/macppc/Makefile b/distrib/macppc/Makefile
index 384e3934467f..e6e9999b7dd9 100644
--- a/distrib/macppc/Makefile
+++ b/distrib/macppc/Makefile
@@ -18,6 +18,9 @@ release: check_RELEASEDIR .WAIT ${OWFBOOTERS}
 	${RELEASE_INSTALL} ${OFWBOOTERS} ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation
 
 iso_image:
-	${MAKEDIRTARGET} cdroms iso_image
+# macppc installcd is now created via "do-isa-image" target in
+# etc/Makefile using ${TOOLS_MKHYBRID} for ISO9660/HFS hybrid image
+# with bootable special Apple partition map
+#	${MAKEDIRTARGET} cdroms iso_image
 
 .include <bsd.subdir.mk>
diff --git a/etc/etc.macppc/Makefile.inc b/etc/etc.macppc/Makefile.inc
index 8323cc08545d..8ab52bc2b5ed 100644
--- a/etc/etc.macppc/Makefile.inc
+++ b/etc/etc.macppc/Makefile.inc
@@ -14,3 +14,39 @@ BUILD_KERNELS+=		INSTALL INSTALL_601 GENERIC_MD
 
 INSTALLATION_DIRS+=	installation/floppy
 .endif
+
+# For "make iso-image"
+# mkisofs arguments to create a hybrid (HFS/Rockridge) CD-ROM image.
+# XXX: files in ${DISTRIB_CDROMDIR} should be moved under distrib/macppc/cdrom?
+DISTRIB_CDROMDIR=	${NETBSDSRCDIR}/distrib/cdrom
+
+BOOTHFS=		boothfs
+UUDECODE_FILES=		${BOOTHFS}
+.SUFFIXES:	.uue
+.PATH.uue: ${DISTRIB_CDROMDIR}
+
+MKISOFS_FLAGS+=	-hide-rr-moved \
+	-hfs -part -hide-hfs-list ${DISTRIB_CDROMDIR}/hide-hfs.lst \
+	--macbin -map ${DISTRIB_CDROMDIR}/hfsmap.lst \
+	-hide-joliet-list ${DISTRIB_CDROMDIR}/hide-jol.lst \
+	-boot-hfs-file ${.OBJDIR}/${BOOTHFS}
+
+MD_DISTRIBDIR=	${NETBSDSRCDIR}/distrib/${MACHINE}
+CDINSTKERNEL=	${MD_DISTRIBDIR}/floppies/md-kernel
+_INSTKERNELNOBJDIR!=	cd ${CDINSTKERNEL} && ${PRINTOBJDIR}
+CDKERNELS=	netbsd-INSTALL.gz netbsd
+CDKERNELS+=	netbsd-INSTALL_601.gz netbsd.601
+
+iso-image-md-pre: ${BOOTHFS}
+.for kernel target in ${CDKERNELS}
+	${INSTALL} ${COPY} -m 0644 \
+		${_INSTKERNELNOBJDIR}/${kernel} ${CDROM.dir}/${target}
+.endfor
+	${INSTALL} ${COPY} -m 0644 ${DESTDIR}/usr/mdec/ofwboot ${CDROM.dir}
+	${INSTALL} ${COPY} -m 0644 ${DESTDIR}/usr/mdec/ofwboot.xcf ${CDROM.dir}
+
+iso-image: do-iso-image
+
+iso-image-md-post:
+	${TOOL_MACPPCINSTALLBOOT} ${CDROM_IMAGE} \
+		${DESTDIR}/usr/mdec/bootxx /ofwboot
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index 45df5bdce409..6f2e9be5e5d7 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -473,6 +473,7 @@ TOOL_JOIN=		${TOOLDIR}/bin/${_TOOL_PREFIX}join
 TOOL_LLVM_TBLGEN=	${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen
 TOOL_M4=		${TOOLDIR}/bin/${_TOOL_PREFIX}m4
 TOOL_MACPPCFIXCOFF=	${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
+TOOL_MACPPCINSTALLBOOT=	${TOOLDIR}/bin/${_TOOL_PREFIX}macppc_installboot
 TOOL_MAKEFS=		${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
 TOOL_MAKEINFO=		${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
 TOOL_MAKEKEYS=		${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys
diff --git a/tools/Makefile b/tools/Makefile
index 48d240eed4d2..2dff094e3d6c 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -172,6 +172,7 @@ SUBDIR+=	ibmnws-ncdcs
 
 .if ${MACHINE} == "macppc"
 SUBDIR+=	macppc-fixcoff
+SUBDIR+=	macppc_installboot
 .endif
 
 .if (${MACHINE} == "prep" || ${MACHINE} == "rs6000" || ${MACHINE} == "bebox")
diff --git a/tools/macppc_installboot/Makefile b/tools/macppc_installboot/Makefile
new file mode 100644
index 000000000000..ed425386a72e
--- /dev/null
+++ b/tools/macppc_installboot/Makefile
@@ -0,0 +1,9 @@
+#	$NetBSD$
+
+.include <bsd.hostinit.mk>
+
+HOSTPROGNAME=	${_TOOL_PREFIX}macppc_installboot
+HOST_SRCDIR=	distrib/cdrom/macppc_installboot
+
+.include "${.CURDIR}/../Makefile.nbincludes"
+.include "${.CURDIR}/../Makefile.host"

---
Izumi Tsutsui



Home | Main Index | Thread Index | Old Index