summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Brandt <chris.brandt@renesas.com>2018-04-07 13:35:43 (GMT)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-09 09:29:46 (GMT)
commit265aee8c51718fe7370a3dbc91048ff60eb5909c (patch)
tree0467335b0b566d1c166fed69771ff26db07a56e3
parent2cf4871808a820e48e265a5c91e6d0c51886e635 (diff)
downloadbuildroot-265aee8c51718fe7370a3dbc91048ff60eb5909c.tar.gz
buildroot-265aee8c51718fe7370a3dbc91048ff60eb5909c.tar.bz2
fs/cramfs: add xip option
Cramfs now has the ability to XIP all ELF files. Cc: Nicolas Pitre <nico@linaro.org> Signed-off-by: Chris Brandt <chris.brandt@renesas.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--fs/cramfs/Config.in20
-rw-r--r--fs/cramfs/cramfs.mk8
2 files changed, 28 insertions, 0 deletions
diff --git a/fs/cramfs/Config.in b/fs/cramfs/Config.in
index b11885b..89f8ad5 100644
--- a/fs/cramfs/Config.in
+++ b/fs/cramfs/Config.in
@@ -4,3 +4,23 @@ config BR2_TARGET_ROOTFS_CRAMFS
Build a cramfs root filesystem
https://github.com/npitre/cramfs-tools
+
+if BR2_TARGET_ROOTFS_CRAMFS
+
+config BR2_TARGET_ROOTFS_CRAMFS_XIP
+ bool "Support XIP of all ELF files"
+ help
+ For ELF files, uncompressed and properly aligned data blocks
+ will be automatically be mapped directly into user space
+ whenever possible providing eXecute-In-Place (XIP) from ROM
+ of read-only segments. Data segments mapped read-write
+ (hence they have to be copied to RAM) may still be
+ compressed in the cramfs image in the same file along with
+ non compressed read-only segments. Both MMU and no-MMU
+ systems are supported. This is particularly handy for tiny
+ embedded systems with very tight memory constraints.
+
+ The CRAMFS_MTD Kconfig option must also be enabled in a
+ 4.15+ kernel.
+
+endif # BR2_TARGET_ROOTFS_CRAMFS
diff --git a/fs/cramfs/cramfs.mk b/fs/cramfs/cramfs.mk
index 8745c78..9250638 100644
--- a/fs/cramfs/cramfs.mk
+++ b/fs/cramfs/cramfs.mk
@@ -10,6 +10,14 @@ else
CRAMFS_OPTS = -L
endif
+ifeq ($(BR2_TARGET_ROOTFS_CRAMFS_XIP),y)
+ifeq ($(BR2_USE_MMU),y)
+CRAMFS_OPTS += -X -X
+else
+CRAMFS_OPTS += -X
+endif
+endif
+
define ROOTFS_CRAMFS_CMD
$(HOST_DIR)/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $@
endef