Subject: Re: Beige G3 troubles
To: None <macallan@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-macppc
Date: 09/12/2006 21:11:33
macallan@NetBSD.org wrote:

> > Which image did you tried? Could please you try this one?
> > ftp://ftp.NetBSD.org/pub/NetBSD/misc/tsutsui/macppccd-3.1_RC2.iso.gz
> 
> Now we get this:
> 
> - - a PowerBook 3400c with OF 2.0.1 boots this CD just fine ( boot 
> ata1/@0:0 )
> - - a beige G3 with OF 2.0f1 still crashes but gets a little further than 
> previous attempts:
> boot ide1/@0:0
> read stage 2 blocks: 0. done!
> starting stage 2...
> DEFAULT CATCH! code=FFF00400 %SRR0: 40FFED30 %SRR1: 4000B070
> 
> so whatever you did is definitely going into the right direction.

Umm, OF quirks actually disgust us...

According to <sys/bootblock.h>, the Apple partition map has
the following parameters:
---
struct apple_part_map_entry {
	uint16_t	pmSig;		/* partition signature */
	uint16_t	pmSigPad;	/* (reserved) */
	uint32_t	pmMapBlkCnt;	/* number of blocks in partition map */
	uint32_t	pmPyPartStart;	/* first physical block of partition */
	uint32_t	pmPartBlkCnt;	/* number of blocks in partition */
	uint8_t		pmPartName[32];	/* partition name */
	uint8_t		pmPartType[32];	/* partition type */
	uint32_t	pmLgDataStart;	/* first logical block of data area */
	uint32_t	pmDataCnt;	/* number of blocks in data area */
	uint32_t	pmPartStatus;	/* partition status information */
	uint32_t	pmLgBootStart;	/* first logical block of boot code */
	uint32_t	pmBootSize;	/* size of boot code, in bytes */
	uint32_t	pmBootLoad;	/* boot code load address */
	uint32_t	pmBootLoad2;	/* (reserved) */
	uint32_t	pmBootEntry;	/* boot code entry point */
	uint32_t	pmBootEntry2;	/* (reserved) */
	uint32_t	pmBootCksum;	/* boot code checksum */
	int8_t		pmProcessor[16]; /* processor type (e.g. "68020") */
	uint8_t		pmBootArgs[128]; /* A/UX boot arguments */
	uint8_t		pad[248];	/* pad to end of block */
};
---

And the mkboothfs command in my latest patch puts the following members:
---
	memset(&pme, 0, sizeof(pme));
	pme.pmSig =		htobe16(APPLE_PART_MAP_ENTRY_MAGIC);
	pme.pmMapBlkCnt =	htobe32(1);
	pme.pmPyPartStart =	htobe32(1);
	pme.pmPartBlkCnt =	htobe32(1);
	pme.pmDataCnt =		htobe32(1);
	strlcpy(pme.pmPartName, "NetBSD_BootBlock", sizeof(pme.pmPartName));
	strlcpy(pme.pmPartType, "Apple_Driver", sizeof(pme.pmPartType));
	pme.pmPartStatus =	htobe32(0x3b);
	pme.pmBootSize =	htobe32(MACPPC_BOOT_BLOCK_MAX_SIZE);
	pme.pmBootLoad =	htobe32(0x4000);
	pme.pmBootEntry =	htobe32(0x4000);
	strlcpy(pme.pmProcessor, "PowerPC", sizeof(pme.pmProcessor));
---

Does any Mac guru know what values OF refers?


Anyway, I'd appreciate if someone try to create ISO CD-ROM
with modified mkboothfs by himself.
"make RELEASE=3.1_RC2 fetch && make RELEASE=3.1_RC2"
in src/distrib/cdrom after applying my patch against the netbsd-3
tree should just work. (rsync and mkisofs are required)
(I'm a bit tired to put ~180MB images again and again...)
---
Izumi Tsutsui