Skip to contentSkip to conversation

Add support for AXFS filesystem type

PATCH New Ariel D'Alessandro 2 participants 5 messages Oct 14, 2015 VFS

lore
Share & tools
lore
#0 lore raw

v3 cover Add support for AXFS filesystem type

This patch series adds support for using the AXFS filesystem type.

The Advanced XIP File System is a Linux kernel filesystem driver that enables files to be executed directly from flash or ROM memory rather than being copied into RAM. It has the ability to store individual *pages* in a file uncompressed/XIP or compressed/Demand Paged.

At the moment, the FS is not supported in Linux mainline (v4.3-rc5), so the kernel has to be built with the axfs patches to be able to read it. Patches can be found here: https://github.com/jaredeh/axfs
NOTE: adding this as a kernel extension is planned.

The mkfs.axfs utility is used to create an AXFS file system image. It can receive an additional argument using the -i flag which points to a CSV file that indicates which pages the user desires to have marked for XIP within the file system image.

This patch only adds support for 'XIP all' mode, so all the files that have the execute attribute set will be XIP'ed. Support for more options (including AXFS profiling tool) will be submitted in following patches.

More info can be found here:
* http://elinux.org/AXFS
* http://www.academypublisher.com/ojs/index.php/jcp/article/viewFile/03017989/370
* http://docslide.us/documents/application-execute-in-place-xip-with-linux-and-axfs.html

Changes from v2:
* Added host-zlib as a dependency.
* Fixed LICENSE_FILES path.
* Expanded explanation in config help.

Changes from v1:
* Removed unnecessary call to $(generic-package) in axfsutils.mk.

Thanks,

Ariel D'Alessandro (2):
axfsutils: add new package
axfs: add new filesystem type

 fs/Config.in                   |  1 +
 fs/axfs/Config.in              | 16 ++++++++++++++++
 fs/axfs/axfs.mk                | 13 +++++++++++++
 package/axfsutils/axfsutils.mk | 23 +++++++++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 100644 fs/axfs/Config.in
 create mode 100644 fs/axfs/axfs.mk
 create mode 100644 package/axfsutils/axfsutils.mk
Signature · 1 line
2.6.1
#1 lore raw

PATCH v3 1/2 axfsutils: add new package

Tools for building AXFS Filesystem.

The Advanced XIP File System is a Linux kernel filesystem driver that enables files to be executed directly from flash or ROM memory rather than being copied into RAM. It has the ability to store individual *pages* in a file uncompressed/XIP or compressed/Demand Paged.

Source:
https://github.com/jaredeh/axfs

---
 package/axfsutils/axfsutils.mk | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 package/axfsutils/axfsutils.mk
package/axfsutils/axfsutils.mk new file +23 -0
new file mode 100644
index 0000000..1dba1c4
@@ -0,0 +1,23 @@
+################################################################################
+#
+# axfsutils
+#
+################################################################################
+
+AXFSUTILS_VERSION = f26ae785e33df76f658b71ef2cfbc7f511ff875d
+AXFSUTILS_SITE = $(call github,jaredeh,axfs,$(AXFSUTILS_VERSION))
+AXFSUTILS_LICENSE = GPLv2
+AXFSUTILS_LICENSE_FILES = mkfs.axfs-legacy/COPYING
+AXFSUTILS_DEPENDENCIES = host-zlib
+
+# The 'new' mkfs.axfs version requires GNUstep which is not a buildroot
+# prerequisite. The 'legacy' one works just as well without that requirement.
+define HOST_AXFSUTILS_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/mkfs.axfs-legacy
+endef
+
+define HOST_AXFSUTILS_INSTALL_CMDS
+	cp $(@D)/mkfs.axfs-legacy/mkfs.axfs $(HOST_DIR)/usr/bin/
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
2.6.1
#2 lore raw

PATCH v3 1/2 axfsutils: add new package

Dear Ariel D'Alessandro,

Quoted 7 lines · Ariel D'Alessandro

Tools for building AXFS Filesystem.

The Advanced XIP File System is a Linux kernel filesystem driver that enables files to be executed directly from flash or ROM memory rather than being copied into RAM. It has the ability to store individual *pages* in a file uncompressed/XIP or compressed/Demand Paged.

Quoted 8 lines

Source:
https://github.com/jaredeh/axfs

---
 package/axfsutils/axfsutils.mk | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 package/axfsutils/axfsutils.mk

Applied with some minor tweaks:

[Thomas:
- add hash file.
- use $(INSTALL) -D -m 0755 instead of cp for installing mkfs.axfs.]

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v3 2/2 axfs: add new filesystem type

In reply to Ariel D'Alessandro

The Advanced XIP File System is a Linux kernel filesystem driver that enables files to be executed directly from flash or ROM memory rather than being copied into RAM. It has the ability to store individual *pages* in a file uncompressed/XIP or compressed/Demand Paged.

This commit only adds support for 'XIP all' mode, so all the files that have the execute attribute set will be XIP'ed.

At the moment, the FS is not supported in Linux mainline (v4.3-rc5), so the kernel has to be built with the axfs patches to be able to read it. Patches can be found here: https://github.com/jaredeh/axfs

---
 fs/Config.in      |  1 +
 fs/axfs/Config.in | 16 ++++++++++++++++
 fs/axfs/axfs.mk   | 13 +++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 fs/axfs/Config.in
 create mode 100644 fs/axfs/axfs.mk
fs/Config.in +1 -0
index 5853113..51ccf28 100644
@@ -1,5 +1,6 @@
 menu "Filesystem images"
 
+source "fs/axfs/Config.in"
 source "fs/cloop/Config.in"
 source "fs/cpio/Config.in"
 source "fs/cramfs/Config.in"
fs/axfs/Config.in new file +16 -0
new file mode 100644
index 0000000..2c97715
@@ -0,0 +1,16 @@
+config BR2_TARGET_ROOTFS_AXFS
+	bool "axfs root filesystem"
+	help
+	  The Advanced XIP File System is a Linux kernel filesystem driver
+	  that enables files to be executed directly from flash or ROM
+	  memory rather than being copied into RAM. It has the ability to
+	  store individual *pages* in a file uncompressed/XIP or
+	  compressed/Demand Paged.
+
+	  So far, the only supported mode is 'XIP all', so all the files
+	  that have the execute attribute set will be XIP'ed.
+
+	  At the moment, the FS is not supported in Linux mainline
+	  (v4.3-rc5), so the kernel has to be built with the axfs patches
+	  to be able to read it. Patches can be found here:
+	    https://github.com/jaredeh/axfs
fs/axfs/axfs.mk new file +13 -0
new file mode 100644
index 0000000..05d6e5d
@@ -0,0 +1,13 @@
+################################################################################
+#
+# Build the axfs root filesystem image
+#
+################################################################################
+
+ROOTFS_AXFS_DEPENDENCIES = host-axfsutils
+
+define ROOTFS_AXFS_CMD
+	$(HOST_DIR)/usr/bin/mkfs.axfs -s -a $(TARGET_DIR) $@
+endef
+
+$(eval $(call ROOTFS_TARGET,axfs))
Signature · 1 line
2.6.1
#4 lore raw

PATCH v3 2/2 axfs: add new filesystem type

Dear Ariel D'Alessandro,

Quoted 12 lines · Ariel D'Alessandro

The Advanced XIP File System is a Linux kernel filesystem driver that enables files to be executed directly from flash or ROM memory rather than being copied into RAM. It has the ability to store individual *pages* in a file uncompressed/XIP or compressed/Demand Paged.

This commit only adds support for 'XIP all' mode, so all the files that have the execute attribute set will be XIP'ed.

At the moment, the FS is not supported in Linux mainline (v4.3-rc5), so the kernel has to be built with the axfs patches to be able to read it. Patches can be found here: https://github.com/jaredeh/axfs

Quoted 8 lines
---
 fs/Config.in      |  1 +
 fs/axfs/Config.in | 16 ++++++++++++++++
 fs/axfs/axfs.mk   | 13 +++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 fs/axfs/Config.in
 create mode 100644 fs/axfs/axfs.mk

Applied with some minor tweaks:

[Thomas: rewrap Config.in help text.]

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com