linux-2.6.29 now includes squashfs 4.0 in the main line.
It is incompatible with the previous version squashfs3.4

Select 4.0 if you are using linux-2.6.29 or later
Otherwise select the version that matches the squashfs patch you've
applied to your linux kernel tree.

You no longer need to specify the endianess on squashfs4.0

Signed-off-by: Jon Ringle <j...@ringle.org>
---
 platforms/image_squashfs.in    |   24 ++++++++++++++++++++++++
 rules/host-squashfs-tools.make |    3 ++-
 rules/post/images.make         |    6 ++++--
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/platforms/image_squashfs.in b/platforms/image_squashfs.in
index c7ad75b..86ee965 100644
--- a/platforms/image_squashfs.in
+++ b/platforms/image_squashfs.in
@@ -13,6 +13,30 @@ menuconfig IMAGE_SQUASHFS
 
 if IMAGE_SQUASHFS
 
+choice
+       prompt "squashfs version"
+       default HOST_SQUASHFS_TOOLS_V3X
+       help
+         Select 4.0 if you are using linux-2.6.29 or later
+         Otherwise select the version that matches the squashfs patch you've
+         applied to your linux kernel tree.
+
+       config HOST_SQUASHFS_TOOLS_V3X
+       bool "3.4"
+       help
+         Select 4.0 if you are using linux-2.6.29 or later
+         Otherwise select the version that matches the squashfs patch you've
+         applied to your linux kernel tree.
+
+       config HOST_SQUASHFS_TOOLS_V4X
+       bool "4.0"
+       help
+         Select 4.0 if you are using linux-2.6.29 or later
+         Otherwise select the version that matches the squashfs patch you've
+         applied to your linux kernel tree.
+
+endchoice
+
 config IMAGE_SQUASHFS_BLOCK_SIZE
        string
        default "${PTXCONF_FLASH_BLOCKSIZE}"
diff --git a/rules/host-squashfs-tools.make b/rules/host-squashfs-tools.make
index 7c11456..781f07c 100644
--- a/rules/host-squashfs-tools.make
+++ b/rules/host-squashfs-tools.make
@@ -16,7 +16,8 @@ HOST_PACKAGES-$(PTXCONF_HOST_SQUASHFS_TOOLS) += 
host-squashfs-tools
 #
 # Paths and names
 #
-HOST_SQUASHFS_TOOLS_VERSION    := 3.4
+HOST_SQUASHFS_TOOLS_VERSION            := $(call ptx/ifdef, 
PTXCONF_HOST_SQUASHFS_TOOLS_V3X, 3.4, 4.0)
+
 HOST_SQUASHFS_TOOLS            := squashfs$(HOST_SQUASHFS_TOOLS_VERSION)
 HOST_SQUASHFS_TOOLS_SUFFIX     := tar.gz
 HOST_SQUASHFS_TOOLS_URL                := 
$(PTXCONF_SETUP_SFMIRROR)/squashfs/$(HOST_SQUASHFS_TOOLS).$(HOST_SQUASHFS_TOOLS_SUFFIX)
diff --git a/rules/post/images.make b/rules/post/images.make
index d3b4dee..df50cda 100644
--- a/rules/post/images.make
+++ b/rules/post/images.make
@@ -121,6 +121,9 @@ $(IMAGEDIR)/root.jffs2: $(STATEDIR)/image_working_dir 
$(STATEDIR)/host-mtd-utils
 #
 # create the squashfs image
 #
+SQUASHFS_EXTRA_ARGS:=$(call ptx/ifdef, PTXCONF_HOST_SQUASHFS_TOOLS_V3X, $(call 
ptx/ifdef, PTXCONF_ENDIAN_BIG, -be, -le), )
+SQUASHFS_EXTRA_ARGS+=$(PTXCONF_IMAGE_SQUASHFS_EXTRA_ARGS)
+
 $(IMAGEDIR)/root.squashfs: $(STATEDIR)/image_working_dir 
$(STATEDIR)/host-squashfs-tools.install
        @echo -n "Creating root.squashfs from working dir..."
        @cd $(WORKDIR);                                                 \
@@ -131,8 +134,7 @@ $(IMAGEDIR)/root.squashfs: $(STATEDIR)/image_working_dir 
$(STATEDIR)/host-squash
                echo -n "$@ ";                                          \
                echo -n "-noappend ";                                   \
                echo -n "-b $(PTXCONF_IMAGE_SQUASHFS_BLOCK_SIZE) ";     \
-               echo -n "$(call ptx/ifdef, PTXCONF_ENDIAN_BIG, -be, -le) "; \
-               echo -n $(PTXCONF_IMAGE_SQUASHFS_EXTRA_ARGS) )  \
+               echo -n $(SQUASHFS_EXTRA_ARGS) )        \
        ) | $(FAKEROOT) --
        @echo "done."
 
-- 
1.6.2.1.423.g442d


--
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to