Allows to use disk (like CD-ROM) without partition map but with filesystem

on the full disk. We accept partition number 0 (which identifies the full
disk) and partition number 1 (we can see the disk as only one partition).

This is needed to boot openSUSE install CD which uses
"&device;:1,\suseboot\yaboot.ibm" as its boot path.

There is a Mac partition map on the CD, but
partition 1 is the partition map itself, and thus is not usable by a filesystem.
So we can guess, openFirmware must use ISO9660 instead of HFS and thus
to not use the Mac partition map, but the whole CD for the partition #1.

Disk openSUSE-ppc.iso: 135 MB, 135593984 bytes
4 heads, 32 sectors/track, 2069 cylinders
Units = cylinders of 128 * 512 = 65536 bytes

                                  Device Boot      Start         End      Blocks   Id  System 
openSUSE-ppc.iso1               1           1          48   Apple_partition_map
openSUSE-ppc.iso2               1        2066      132160   Apple_HFS



git-svn-id: svn://coreboot.org/openbios/openbios-devel@443 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Laurent Vivier
2009-02-05 00:16:54 +00:00
parent b47d10c5e2
commit 15c56bea6f

View File

@@ -78,6 +78,21 @@ dlabel_open( dlabel_info_t *di )
}
}
/* try to see if there is a filesystem without partition */
if (atol(parstr) == 0 || atol(parstr) == 1) {
PUSH_ih( my_self() );
selfword("find-filesystem");
ph = POP_ph();
if( ph ) {
push_str( filename );
PUSH_ph( ph );
fword("interpose");
success = 1;
goto out;
}
}
/* find partition handler */
seek_io( fd, 0 );
if( read_io(fd, block0, sizeof(block0)) != sizeof(block0) )