Port-macppc archive

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

Re: What does ofwboot.xcf know?



At 1:17 Uhr +0900 25.2.2008, Izumi Tsutsui wrote:
>hauke%Espresso.Rhein-Neckar.DE@localhost wrote:
>
>> I tried that before, and got
>
>What did you actually try?

Well, it took me a while to understand that I actually needed to list every
(ffs-derived) filesystem explicitely.  ;)

>Did you see other ports which support lfs boot?

Well, there's i386... the missing interaction with OF makes it quite different.

>The following patch at least compiles for me.

[...]

That's more or less what I ended up with. The small problem: It doesn't
work, a kernel on an lfs partition is not found. The fact that there's no
way of looking at the file systems in question, and no diaglostics, doesn't
help either.

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

Index: ofdev.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/stand/ofwboot/ofdev.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 ofdev.c
--- ofdev.c     24 May 2006 21:24:25 -0000      1.19
+++ ofdev.c     24 Feb 2008 18:58:49 -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"
@@ -161,9 +162,12 @@ static struct fs_ops file_system_ufs = F
 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_ffsv2 = FS_OPS(ffsv2);
+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_nfs = FS_OPS(nfs);

-struct fs_ops file_system[4];
+struct fs_ops file_system[8];
 int nfsys;

 static struct of_dev ofdev = {
@@ -335,7 +339,10 @@ devopen(struct open_file *of, const char
                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_ffsv2;
+               file_system[5] = file_system_lfsv1;
+               file_system[6] = file_system_lfsv2;
+               nfsys = 7;
                return 0;
        }
        if (!strcmp(buf, "network")) {

is what I have now. I might try with ffsv2, just to make sure...

        hauke

--
"It's never straight up and down"     (DEVO)




Home | Main Index | Thread Index | Old Index