Port-macppc archive

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

Re: macppc requests/needs



At 14:51 Uhr +0200 4.6.2009, Peter Bex wrote:
>Since nobody is responding, one thing I would like to be able is to boot
>the kernel from a FFSv2 partition.  That would allow people to use the
>new WAPBL logging for FFS on their root partition.  This would require
>some heavy ofwboot.xcf hacking, I suppose.

Not really. Attached is a patch that adds lfs support, and ffsv2 would be
similar.

        hauke

Attachment: %ofdev.c.patch
Description: application/applefile

--- ofdev.c     2006-05-24 23:24:25.000000000 +0200
+++ /var/tmp/ofwboot.patched/ofdev.c    2008-02-26 00:04:12.000000000 +0100
@@ -45,9 +45,12 @@
 
 #include <lib/libkern/libkern.h>
 
+#define LIBSA_LFS 1
+
 #include <lib/libsa/stand.h>
 #include <lib/libsa/byteorder.h>
 #include <lib/libsa/cd9660.h>
+#include <lib/libsa/lfs.h>
 #include <lib/libsa/nfs.h>
 #include <lib/libsa/ufs.h>
 #include <lib/libsa/ustarfs.h>
@@ -67,8 +70,8 @@
 
        lp = str;
        devtype[0] = 0;
-       *ppart = 0;
-       for (cp = str; *cp; lp = cp) {
+       *ppart = 0;     
+for (cp = str; *cp; lp = cp) {
                /* For each component of the path name... */
                while (*++cp && *cp != '/')
                        continue;
@@ -161,9 +164,11 @@
 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_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[6];
 int nfsys;
 
 static struct of_dev ofdev = {
@@ -335,7 +340,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 = 5;
                return 0;
        }
        if (!strcmp(buf, "network")) {
--
"It's never straight up and down"     (DEVO)


Home | Main Index | Thread Index | Old Index