Hi,

I've made some modifications to add support for ext4 to SystemImager. The patch is against trunk and I've tested it with version 4.1.6.

The only remaining thing is updating the versions of, at least, the kernel and e2fsprogs in BOEL binaries. Sorry, I did it in a hurry and the patch I prepared doesn't build in trunk, no idea of the reason. If it helps I'm using e2fsprogs 1.41.8 and kernel 2.6.29.4.

Cheers,
Àlex
--- /usr/lib/systemimager/perl/SystemImager/Server.pm.orig	2009-06-02 14:48:35.000000000 +0200
+++ /usr/lib/systemimager/perl/SystemImager/Server.pm	2009-06-09 08:39:30.000000000 +0200
@@ -1399,7 +1399,48 @@
             } elsif ( $xml_config->{fsinfo}->{$line}->{fs} eq "ext3" ) {
 
                 # create fs
-                $cmd = "mke2fs -q -j $real_dev || shellout";
+                $cmd = "mke2fs -t ext3 -q $real_dev || shellout";
+                print $out qq(logmsg "$cmd"\n);
+                print $out "$cmd\n";
+
+                if ($mount_dev) {
+                    # add LABEL if necessary
+                    if ($mount_dev =~ /LABEL=/) {
+                        my $label = $mount_dev;
+                        $label =~ s/LABEL=//;
+
+                        $cmd = "tune2fs -L $label $real_dev";
+                        print $out qq(logmsg "$cmd"\n);
+                        print $out "$cmd\n";
+                    }
+
+                    # add UUID if necessary
+                    if ($mount_dev =~ /UUID=/) {
+                        my $uuid = $mount_dev;
+                        $uuid =~ s/UUID=//;
+
+                        $cmd = "tune2fs -U $uuid $real_dev";
+                        print $out qq(logmsg "$cmd"\n);
+                        print $out "$cmd\n";
+                    }
+                }
+
+                # mkdir
+                $cmd = "mkdir -p /a$mp || shellout";
+                print $out qq(logmsg "$cmd"\n);
+                print $out "$cmd\n";
+
+                # mount
+                $cmd = "mount $real_dev /a$mp -t $fs -o $options || shellout";
+                print $out qq(logmsg "$cmd"\n);
+                print $out "$cmd\n";
+
+                print $out "\n";
+
+            } elsif ( $xml_config->{fsinfo}->{$line}->{fs} eq "ext4" ) {
+
+                # create fs
+                $cmd = "mke2fs -t ext4 -q $real_dev || shellout";
                 print $out qq(logmsg "$cmd"\n);
                 print $out "$cmd\n";
 
@@ -1730,6 +1771,7 @@
             unless( 
                    ($fs eq "ext2") 
                    or ($fs eq "ext3") 
+                   or ($fs eq "ext4") 
                    or ($fs eq "reiserfs")
                    or ($fs eq "msdos")
                    or ($fs eq "vfat")
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to