matrix-rootfs: add jffs2_extra_args
authorAdrian Bunk <adrian.bunk@movial.com>
Tue, 23 Feb 2010 13:36:19 +0000 (15:36 +0200)
committerAdrian Bunk <adrian.bunk@movial.com>
Tue, 23 Feb 2010 13:36:19 +0000 (15:36 +0200)
Arbitrary parameters can now be passed to mkfs.jffs2.

matrix/config.py
matrix/rootfs.py

index 3d54168..2b926fa 100644 (file)
@@ -74,6 +74,7 @@ class Board(object):
                     ubifs_min_io_size=0,
                     ubinize_config_vol_size=0,
                     cleanmarkers="unknown",
+                    jffs2_extra_args="",
                     flags=[]):
 
                self.name = name
@@ -91,6 +92,7 @@ class Board(object):
                self.ubifs_min_io_size = ubifs_min_io_size
                self.ubinize_config_vol_size = ubinize_config_vol_size
                self.cleanmarkers = cleanmarkers
+               self.jffs2_extra_args = jffs2_extra_args
                self.flags = flags
 
                config.boards[name] = self
index 5fd0bda..7bfa094 100644 (file)
@@ -97,6 +97,7 @@ def main():
 
        build.set_flash_compression(config.boards[config.board].flash_compression)
        build.set_cleanmarkers(config.boards[config.board].cleanmarkers)
+       build.set_jffs2_extra_args(config.boards[config.board].jffs2_extra_args)
        build.set_ubifs_leb_size(config.boards[config.board].ubifs_leb_size)
        build.set_ubifs_max_leb_count(config.boards[config.board].ubifs_max_leb_count)
        build.set_ubifs_min_io_size(config.boards[config.board].ubifs_min_io_size)
@@ -144,6 +145,9 @@ class Builder(object):
        # cleanmarkers: yes/no/unknown
        cleanmarkers = "unknown"
 
+       # extra jffs2 args
+       jffs2_extra_args = ""
+
        # Configation values for ubinize
        ubinize_config_mode = "ubi"
        ubinize_config_image = None
@@ -273,7 +277,9 @@ class Builder(object):
                        print "no cleanmarkers setting in the board file, assuming no cleanmarkers"
                else:
                        raise Error("invalid cleanmarkers setting")
-                       
+
+       def set_jffs2_extra_args(self, setting):
+               self.jffs2_extra_args = setting
 
        def set_no_strip(self, no_strip):
                self.no_strip = no_strip
@@ -446,7 +452,7 @@ class Builder(object):
                # Build jffs2
                if build_target == "all" or build_target == "jffs2":
                        print "Creating a root image as JFFS2..."
-                       os.system("%s -p%d %s -e%d -r '%s' -o '%s.jffs2'" % (self.mkfs_jffs2, self.flash_pad_size, self.cleanmarkers, self.flash_erase_size, basepath, basepath))
+                       os.system("%s -p%d %s -e%d %s -r '%s' -o '%s.jffs2'" % (self.mkfs_jffs2, self.flash_pad_size, self.cleanmarkers, self.flash_erase_size, self.jffs2_extra_args, basepath, basepath))
 
                # Build ubifs
                if build_target == "ubi":