@@ -133,7 +133,8 @@ Properties for +type=fs+
* +fs_type+ (mandatory): the type of filesystem to generate
** +ext+: generate an extended filesystem (ext2, ext3, ext4)
-** +vfat+: generate a VFAT filesystem (FAT16, FAT32)
+** +squashfs+: generate a squashfs (version 4) filesystem
+** +vfat+: generate a VFAT filesystem (FAT12, FAT16 or FAT32)
* +fs_label+ (optional): the label to assign to this filesystem, if that
filesystem supports a label
@@ -176,6 +177,14 @@ Properties for +fs_type=ext+
** +1+ (mandatory for ext3 or ext4): generate a revision 1 extended
filesystem
+Properties for +fs_type=squashfs+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* +squashfs_comp+ (mandatory): the compression type to use
+** +gzip+, +xz+, +lzo+: gzip, xz or lzo compression
+
+* +squashfs_block+ (optional): the size of blocks, in bytes
+
Properties for +fs_type=vfat+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -34,5 +34,8 @@ endif
ifeq ($(BR2_PACKAGE_HOST_PARTED),y)
ROOTFS_CUSTOM_DEPENDENCIES += host-parted
endif
+ifeq ($(BR2_PACKAGE_HOST_SQUASHFS),y)
+ROOTFS_CUSTOM_DEPENDENCIES += host-squashfs
+endif
$(eval $(call ROOTFS_TARGET,custom))
new file mode 100644
@@ -0,0 +1,15 @@
+# Create a squashfs filesystem
+
+do_image() {
+ local root_dir="${1}"
+ local img="${2}"
+ local -a fs_opts
+
+ fs_opts+=( -no-progress -noappend )
+ [ -z "${squashfs_comp}" ] || fs_opts+=( -comp "${squashfs_comp}" )
+ [ -z "${squashfs_block}" ] || fs_opts+=( -b ${squahsfs_block} )
+
+ mksquashfs "${root_dir}" "${img}" "${fs_opts[@]}" >/dev/null
+}
+
+# vim: ft=sh