cramfs: new maintainer, repo and XIP feature
v3 cover cramfs: new maintainer, repo and XIP feature
As of linux-4.15, cramfs is maintained again and the source repository has moved. Additionaly, there is a new XIP option.
v3:
- Added note about cramfsck not supporting endian swap
- Added Reviewed-by
v2:
- Update hash to include new endian support
Chris Brandt (2):
cramfs: change to new site location
cramfs: add xip option
fs/cramfs/Config.in | 19 +- fs/cramfs/cramfs.mk | 12 +- package/cramfs/0001-endian.patch | 288 ---------------------------- package/cramfs/0002-cygwin_IO.patch | 15 -- package/cramfs/0003-fix-missing-types.patch | 17 -- package/cramfs/Config.in | 2 +- package/cramfs/Config.in.host | 2 +- package/cramfs/cramfs.hash | 2 +- package/cramfs/cramfs.mk | 4 +- 9 files changed, 33 insertions(+), 328 deletions(-) delete mode 100644 package/cramfs/0001-endian.patch delete mode 100644 package/cramfs/0002-cygwin_IO.patch delete mode 100644 package/cramfs/0003-fix-missing-types.patch
Signature · 1 line
2.16.1
PATCH v3 1/2 cramfs: change to new site location
As of Linux-4.15, cramfs now has a official maintainer again. Additionally, that person is hosting and maintaining a new version of cramfs-tools.
Patches 0001-endian.patch and 0003-fix-missing-types.patch are no longer needed because they have been upstreamed.
However, since patch 0002-cygwin_IO.patch is so old, it is being removed until someone that needs it can reapply and test it. At that point, they should submit the changes to the new cramfs-tools maintainer instead of adding the patches back here.
Please note that cross-endian support for cramfsck is not supported at this time.
---
v3:
- Added note about cramfsck not supporting endian swap
- Added Reviewed-by
v2:
- Update hash to include new endian support
--- fs/cramfs/Config.in | 2 +- fs/cramfs/cramfs.mk | 4 +- package/cramfs/0001-endian.patch | 288 ---------------------------- package/cramfs/0002-cygwin_IO.patch | 15 -- package/cramfs/0003-fix-missing-types.patch | 17 -- package/cramfs/Config.in | 2 +- package/cramfs/Config.in.host | 2 +- package/cramfs/cramfs.hash | 2 +- package/cramfs/cramfs.mk | 4 +- 9 files changed, 8 insertions(+), 328 deletions(-) delete mode 100644 package/cramfs/0001-endian.patch delete mode 100644 package/cramfs/0002-cygwin_IO.patch delete mode 100644 package/cramfs/0003-fix-missing-types.patch
fs/cramfs/Config.in +1 -1
@@ -3,4 +3,4 @@ config BR2_TARGET_ROOTFS_CRAMFS help Build a cramfs root filesystem - http://sourceforge.net/projects/cramfs/ + https://github.com/npitre/cramfs-tools
fs/cramfs/cramfs.mk +2 -2
@@ -5,9 +5,9 @@ ################################################################################ ifeq ($(BR2_ENDIAN),"BIG") -CRAMFS_OPTS = -b +CRAMFS_OPTS = -B else -CRAMFS_OPTS = -l +CRAMFS_OPTS = -L endif define ROOTFS_CRAMFS_CMD
package/cramfs/0001-endian.patch deleted +0 -288
288 lines not on this page · raw message
package/cramfs/0002-cygwin_IO.patch deleted +0 -15
@@ -1,15 +0,0 @@ -Index: cramfs-1.1/cramfsck.c -=================================================================== ---- cramfs-1.1.orig/cramfsck.c 2011-09-09 15:10:06.000000000 +0200 -+++ cramfs-1.1/cramfsck.c 2011-09-09 15:13:49.950897747 +0200 -@@ -57,6 +57,10 @@ - #include <byteswap.h> - #include <zlib.h> - -+#ifdef __CYGWIN__ -+#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -+#endif /* __CYGWIN__ */ -+ - /* Exit codes used by fsck-type programs */ - #define FSCK_OK 0 /* No errors */ - #define FSCK_NONDESTRUCT 1 /* File system errors corrected */
package/cramfs/0003-fix-missing-types.patch deleted +0 -17
@@ -1,17 +0,0 @@ -mkcramfs; loff_t is guarded by _GNU_SOURCE - -Although already properly done in cramfsck, it was missing in mkcramfs. - -Signed-off-by: "Yann E. MORIN" <[email protected]> - -diff -durN cramfs-1.1.orig/mkcramfs.c cramfs-1.1/mkcramfs.c ---- cramfs-1.1.orig/mkcramfs.c 2015-08-05 22:31:16.830543096 +0200 -+++ cramfs-1.1/mkcramfs.c 2015-08-05 22:33:33.136289744 +0200 -@@ -22,6 +22,7 @@ - * If you change the disk format of cramfs, please update fs/cramfs/README. - */ - -+#define _GNU_SOURCE - #include <sys/types.h> - #include <stdio.h> - #include <sys/stat.h>
package/cramfs/Config.in +1 -1
@@ -5,4 +5,4 @@ config BR2_PACKAGE_CRAMFS cramfs is a compressed read-only filesystem. This package contains the tools to generate and check a cramfs filesystem. - http://sourceforge.net/projects/cramfs/ + https://github.com/npitre/cramfs-tools
package/cramfs/Config.in.host +1 -1
@@ -4,4 +4,4 @@ config BR2_PACKAGE_HOST_CRAMFS cramfs is a compressed read-only filesystem. This package contains the tools to generate and check a cramfs filesystem. - http://sourceforge.net/projects/cramfs/ + https://github.com/npitre/cramfs-tools
package/cramfs/cramfs.hash +1 -1
@@ -1,2 +1,2 @@ # Locally computed: -sha256 133caca2c4e7c64106555154ee0ff693f5cf5beb9421ce2eb86baee997d22368 cramfs-1.1.tar.gz +sha256 99d87aa5874f4a34c219275e0297b0f4c710895f9c87295267aeabe6a752add1 cramfs-1a1e65f2a049.tar.gz
package/cramfs/cramfs.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -CRAMFS_VERSION = 1.1 -CRAMFS_SITE = http://downloads.sourceforge.net/project/cramfs/cramfs/$(CRAMFS_VERSION) +CRAMFS_VERSION = 1a1e65f2a049 +CRAMFS_SITE = $(call github,npitre,cramfs-tools,$(CRAMFS_VERSION)) CRAMFS_LICENSE = GPL-2.0+ CRAMFS_LICENSE_FILES = COPYING
Signature · 1 line
2.16.1
Thomas Petazzoni
AppliedPATCH v3 1/2 cramfs: change to new site location
Hello,
Quoted 24 lines · Chris Brandt
As of Linux-4.15, cramfs now has a official maintainer again. Additionally, that person is hosting and maintaining a new version of cramfs-tools.
Patches 0001-endian.patch and 0003-fix-missing-types.patch are no longer needed because they have been upstreamed.
However, since patch 0002-cygwin_IO.patch is so old, it is being removed until someone that needs it can reapply and test it. At that point, they should submit the changes to the new cramfs-tools maintainer instead of adding the patches back here.
Please note that cross-endian support for cramfsck is not supported at this time.
Cc Nicolas Pitre <[email protected]>Signed-off-by Chris Brandt <[email protected]>Reviewed-by Matt Weber <[email protected]>---
v3:
- Added note about cramfsck not supporting endian swap
- Added Reviewed-by
v2:
- Update hash to include new endian support
Quoted 14 lines
--- fs/cramfs/Config.in | 2 +- fs/cramfs/cramfs.mk | 4 +- package/cramfs/0001-endian.patch | 288 ---------------------------- package/cramfs/0002-cygwin_IO.patch | 15 -- package/cramfs/0003-fix-missing-types.patch | 17 -- package/cramfs/Config.in | 2 +- package/cramfs/Config.in.host | 2 +- package/cramfs/cramfs.hash | 2 +- package/cramfs/cramfs.mk | 4 +- 9 files changed, 8 insertions(+), 328 deletions(-) delete mode 100644 package/cramfs/0001-endian.patch delete mode 100644 package/cramfs/0002-cygwin_IO.patch delete mode 100644 package/cramfs/0003-fix-missing-types.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 2/2 cramfs: add xip option
In reply to Chris BrandtCramfs now has the ability to XIP all ELF files.
--- fs/cramfs/Config.in | 17 +++++++++++++++++ fs/cramfs/cramfs.mk | 8 ++++++++ 2 files changed, 25 insertions(+)
fs/cramfs/Config.in +17 -0
@@ -4,3 +4,20 @@ 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
fs/cramfs/cramfs.mk +8 -0
@@ -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
Signature · 1 line
2.16.1
PATCH v3 2/2 cramfs: add xip option
Hello,
fs/cramfs/Config.in config BR2_TARGET_ROOTFS_CRAMFS · line 21
Quoted 12 lines · Chris Brandt
fs/cramfs/Config.in +12
-0+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.
These lines were way too long, so I rewrapped them. You can use ./utils/check-package to verify your changes: it would have complained on this change due to the length of the lines.
Applied with this fixed.
Thanks for this cramfs update!
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com