Port-ofppc archive

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

FAT and RDB



Hi! all,


Please support to load from FAT on RDB partition.
I create FAT on RDB partition by MorphOS 2.5.  And ofwboot succeed to
load the netbsd from there.

  Boot: /pci@80000000/ide@C,1/disk@0,0:e/netbsd


My rwd0d:
  # dd if=/dev/rwd0d | hexdump -C | less

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  52 44 53 4b 00 00 00 40  ad ba 95 43 00 00 00 07  |RDSK...@...C....|
00000410  00 00 02 00 00 00 00 00  ff ff ff ff 00 00 00 03  |................|
00000420  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
  <...snip...>
*
00000800  50 41 52 54 00 00 00 40  df 26 f5 1f 00 00 00 07  |PART...@.&......|
00000810  00 00 00 05 00 00 00 01  00 00 00 00 00 00 00 00  |................|
00000820  00 00 00 00 03 44 4f 53  00 00 00 00 00 00 00 00  |.....DOS........|
00000830  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000880  00 00 00 10 00 00 00 80  00 00 00 00 00 00 00 01  |................|
00000890  00 00 00 01 00 00 02 61  00 00 00 02 00 00 00 00  |.......a........|
000008a0  00 00 00 00 00 00 0d 80  00 00 14 39 00 00 00 40  |...........9...@|
000008b0  00 00 00 01 7f ff ff ff  ff ff ff ff 00 00 00 00  |................|
000008c0  4d 53 44 00 00 00 00 00  00 00 00 00 00 00 00 00  |MSD.............|
000008d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|


My diff:

Index: rdb.c
===================================================================
RCS file: /cvsroot/src/sys/arch/ofppc/stand/ofwboot/rdb.c,v
retrieving revision 1.1
diff -u -r1.1 rdb.c
--- rdb.c       11 Sep 2009 12:00:12 -0000      1.1
+++ rdb.c       16 Jun 2010 01:23:40 -0000
@@ -99,6 +99,10 @@
                adt.archtype = ADT_RAID;
                adt.fstype = FS_RAID;
                return adt;
+       case DOST_MSD:
+               adt.archtype = ADT_MSD;
+               adt.fstype = FS_MSDOS;
+               return adt;
        default:
                adt.archtype = ADT_UNKNOWN;
                adt.fstype = FS_UNUSED;


Index: disklabel_rdb.h
===================================================================
RCS file: /cvsroot/src/sys/sys/disklabel_rdb.h,v
retrieving revision 1.1
diff -u -r1.1 disklabel_rdb.h
--- disklabel_rdb.h     12 Sep 2009 08:23:25 -0000      1.1
+++ disklabel_rdb.h     16 Jun 2010 01:41:00 -0000
@@ -205,6 +205,8 @@
 #define DOST_EXT2      0x4c4e5800      /* 'LNX0' Linux fs partition (ext2fs) */
 #define DOST_LNXSWP    0x53575000      /* 'SWP0' Linux swap partition */
 #define DOST_RAID      0x52414900      /* 'RAID' Raidframe partition */
+#define DOST_MSD       0x4d534400      /* 'MSDx' MSDOS partition */
+#define DOST_SFS       0x53465300      /* 'SFSx' Smart fs partition */
 
 struct adostype {
        u_char archtype;        /* see ADT_xxx below */
@@ -220,6 +222,8 @@
 #define ADT_AMIX       5
 #define ADT_EXT2       6
 #define ADT_RAID       7
+#define ADT_MSD                8
+#define ADT_SFS                9

 #define ISFSARCH_NETBSD(adt) \
        ((adt).archtype >= ADT_NETBSDROOT && (adt).archtype <= ADT_NETBSDUSER)



By the way, how create DOST_NBR partition?
Do you forcibly make it with the binary editor?  For instance, use bvi
and the DOST_MSD partition.  ;-)

Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index