Port-macppc archive

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

Re: What does ofwboot.xcf know?



hauke%Espresso.Rhein-Neckar.DE@localhost wrote:

> I tried that before, and got

What did you actually try?
Did you see other ports which support lfs boot?

The following patch at least compiles for me.
(though untested on actual lfs disk)

Index: ofdev.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/stand/ofwboot/ofdev.c,v
retrieving revision 1.19
diff -u -r1.19 ofdev.c
--- ofdev.c     24 May 2006 21:24:25 -0000      1.19
+++ ofdev.c     24 Feb 2008 16:12:34 -0000
@@ -50,6 +50,7 @@
 #include <lib/libsa/cd9660.h>
 #include <lib/libsa/nfs.h>
 #include <lib/libsa/ufs.h>
+#include <lib/libsa/lfs.h>
 #include <lib/libsa/ustarfs.h>
 
 #include "hfs.h"
@@ -158,12 +159,14 @@
 int ndevs = sizeof of_devsw / sizeof of_devsw[0];
 
 static struct fs_ops file_system_ufs = FS_OPS(ufs);
+static struct fs_ops file_system_lfsv1 = FS_OPS(lfsv1);
+static struct fs_ops file_system_lfsv2 = FS_OPS(lfsv2);
 static struct fs_ops file_system_hfs = FS_OPS(hfs);
 static struct fs_ops file_system_ustarfs = FS_OPS(ustarfs);
 static struct fs_ops file_system_cd9660 = FS_OPS(cd9660);
 static struct fs_ops file_system_nfs = FS_OPS(nfs);
 
-struct fs_ops file_system[4];
+struct fs_ops file_system[6];
 int nfsys;
 
 static struct of_dev ofdev = {
@@ -335,7 +338,9 @@
                file_system[1] = file_system_ustarfs;
                file_system[2] = file_system_cd9660;
                file_system[3] = file_system_hfs;
-               nfsys = 4;
+               file_system[4] = file_system_lfsv1;
+               file_system[5] = file_system_lfsv2;
+               nfsys = 6;
                return 0;
        }
        if (!strcmp(buf, "network")) {

---
(BTW, maybe we should also add ffsv2 support)

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index