[OpenBIOS] Fail to boot a macosx 10.5 disk image

Cédric Le Goater clg at kaod.org
Wed Jun 8 15:48:17 CEST 2016


Hello,

This thread was started on qemu-devel@ but openbios@ seems more appropriate 
place now.


On 06/07/2016 10:24 AM, Mark Cave-Ayland wrote:
> On 07/06/16 08:04, Cédric Le Goater wrote:
> 
>>>>> 2. I have an old ibook G4 from which I dd'ed the disk. openbios 
>>>>>    complains for some invalid state. is that supported ?
>>>
>>> Yes, OpenBIOS should boot most things these days (MorphOS is the only
>>> execption I know of where the bootloader won't execute correctly as it
>>> assumes real mode). The above message means that OpenBIOS couldn't find
>>> a bootloader, or it could but was unable to execute it, e.g. due to
>>> incompatible architecture - which OS is your image running? 
>>
>> I am pretty sure it is a Mac OS X v10.5. I still have the hardware but it
>> is running Linux now : 
>>
>> # cat /proc/cpuinfo 
>> processor	: 0
>> cpu		: 7447A, altivec supported
>> clock		: 1333.333000MHz
>> revision	: 1.5 (pvr 8003 0105)
>> bogomips	: 36.86
>>
>> total bogomips	: 36.86
>> timebase	: 18432000
>> platform	: PowerMac
>> model		: PowerBook6,7
>> machine		: PowerBook6,7
>> motherboard	: PowerBook6,7 MacRISC3 Power Macintosh 
>> detected as	: 287 (iBook G4)
>> pmac flags	: 0000001a
>> L2 cache	: 512K unified
>> pmac-generation	: NewWorld
>> Memory		: 1024 MB
>>
>> # lsprop  /proc/device-tree/rom at ff800000/boot-rom at fff00000/
>> reg              fff00000 00100000
>> info             fff00000 00003f00 000493f0 20050705
>> 		 815fda85 fff08000 00078001 000493f0
>> 		 20050705 23765c6c fff80000 00080002
>> 		 000493f0 20050705 b3364dca fff03f00
>> 		 00000083 000493f0 20050705 c2b72d61
>> 		 fff03f80 00000084 e24a68ca 15a82001
>> 		 ffffffff fff04000 00004005 6e767261
>> 		 6d000000 00000000 00000000 00000000
>> 		 [140 bytes total]
>> name             "boot-rom"
>> security-modes   6e6f6e65 2c206675 6c6c2c20 636f6d6d
>> 		 616e642c 206e6f2d 70617373 776f7264
>> image            00080000 (524288)
>> model            "Apple PowerBook6,7 4.9.3f0 BootROM built on 07/05/05 at 11:14:11"
>> write-characteristic
>> 		 "flash"
>> hwi-flags        402a1220 (1076498976)
>> BootROM-version  "$0004.93f0"
>> BootROM-build-date
>> 		 "07/05/05 at 11:14:11"
>> linux,phandle    ff89cb08
>> has-config-block
>>
>>
>>> Have you tried both mac99 and g3beige machines?
>>
>> yes.
> 
> (I'm wondering if we should start a new thread here either just on
> qemu-ppc or over on the OpenBIOS list)

doing so on openbios@

> OpenBIOS will read hfs/hfsplus filesystems fine - I wonder if maybe it
> can't locate a suitable partition in the Apple Partition Map?
> 
> If you boot to the Forth prompt with -prom-env 'auto-boot?=false' can
> you try the following to see if you can list the disk contents:
> 
> dir hd:,\
> 
> If that doesn't work it means that the partition auto-detection is
> failing, so try manually forcing the partition number until you find one
> that works e.g.
> 
> dir hd:0,\
> dir hd:1,\
> etc.
> 
> up until around partition 10? Once you find one that works it should be
> possible to boot that partition directly e.g.
> 
> boot hd:1

So it is hd:3 and then, openbios dies directly :  

	...
	IN: 
	0xfff0d6c8:  mr      r28,r3
	0xfff0d6cc:  add     r30,r30,r3
	0xfff0d6d0:  add     r31,r31,r3
	0xfff0d6d4:  b       0xfff0d6a0

	IN: 
	0xfff0d6a0:  mr      r3,r29
	0xfff0d6a4:  li      r5,0
	0xfff0d6a8:  mr      r6,r30
	0xfff0d6ac:  bl      0xfff279e8

	IN: 
	0x00000300:  .long 0x0

	IN: 
	0x00000700:  .long 0x0

which is this loop in bootcode_load() :

    ...
    bootcode = loadbase;
    offset = 0;
    
    while(1) {
        if (seek_io(fd, offset) == -1)
            break;
        count = read_io(fd, (void *)bootcode, 512);
        offset += count;
        bootcode += count;
    }
    ...

How do I add more logging with openbios ? 

Thanks,

C.



More information about the OpenBIOS mailing list