* [Buildroot] [PATCH 0/3] fs: make it behave more like the package infra
@ 2017-12-26 23:20 Yann E. MORIN
2017-12-26 23:20 ` [Buildroot] [PATCH 1/3] fs/ubifs: split long line, use simple asignment Yann E. MORIN
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Yann E. MORIN @ 2017-12-26 23:20 UTC (permalink / raw)
To: buildroot
Hello All!
Currently, to register a new filesystem, one has to call:
$(eval $(call ROOTFS_TARGET,blabla))
This is different from the package infrastructure, where the name of the
package needs not be specified, and is automatically guessed. This makes
the fs infra a bit different, when there is no reason for that.
Well, it turns out that there is a reason: we currently register two
filesystems from the same directory: ubifs and ubi. But it turns out
that these are in fact not two filesystems, but ubi can be considered
only as a post-preocessing of the ubifs one.
So, after we fix the ubifs filesystem to register only one filesystem,
we eventually turn the rootfs infra into a package-like infra, whereby
naming the filesystem is no longer needed, which allows one to simply
write:
$(eval $(rootfs))
The 'rootfs' keyword may seem rather generic, but it is currently unused
in our tree (except in a post-image script for the chromebook defconfig):
$ git grep -E '\<rootfs[[:space:]]*:?='
board/chromebook/snow/mksd.sh:rootfs=$BINARIES_DIR/rootfs.ext2
Regards,
Yann E. MORIN.
The following changes since commit 131188de8df20028e2a7efaba3fdb13b6cca0aa2
json-c: bump to version 0.13 (2017-12-26 19:57:44 +0100)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to 63ee53d0a4bbf5e9fc6f3f500dda279d99d1350f
fs: make it behave a bit more like the package infra (2017-12-27 00:16:51 +0100)
----------------------------------------------------------------
Yann E. MORIN (3):
fs/ubifs: split long line, use simple asignment
fs/ubifs: UBI image is not another type of filesystem
fs: make it behave a bit more like the package infra
Config.in.legacy | 59 ++++++++++++++++++++++++++++++++++++
fs/axfs/axfs.mk | 2 +-
fs/cloop/cloop.mk | 2 +-
fs/common.mk | 7 ++---
fs/cpio/cpio.mk | 2 +-
fs/cramfs/cramfs.mk | 2 +-
fs/ext2/ext2.mk | 2 +-
fs/iso9660/iso9660.mk | 2 +-
fs/jffs2/jffs2.mk | 2 +-
fs/romfs/romfs.mk | 2 +-
fs/squashfs/squashfs.mk | 2 +-
fs/tar/tar.mk | 2 +-
fs/ubifs/Config.in | 23 ++++++++------
fs/ubifs/ubi.mk | 32 -------------------
fs/ubifs/ubifs.mk | 34 +++++++++++++++++++--
fs/yaffs2/yaffs.mk | 2 +-
support/testing/tests/fs/test_ubi.py | 6 ++--
17 files changed, 122 insertions(+), 61 deletions(-)
delete mode 100644 fs/ubifs/ubi.mk
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/3] fs/ubifs: split long line, use simple asignment
2017-12-26 23:20 [Buildroot] [PATCH 0/3] fs: make it behave more like the package infra Yann E. MORIN
@ 2017-12-26 23:20 ` Yann E. MORIN
2017-12-27 21:53 ` Thomas Petazzoni
2017-12-26 23:20 ` [Buildroot] [PATCH 2/3] fs/ubifs: UBI image is not another type of filesystem Yann E. MORIN
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2017-12-26 23:20 UTC (permalink / raw)
To: buildroot
This line has been sitting there unchanged for years now, but it does
not follow current best pratices, that is:
- do not use imediate assignment,
- split lines longer than ~80 chars.
Fix that.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
fs/ubifs/ubifs.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/ubifs/ubifs.mk b/fs/ubifs/ubifs.mk
index 7b2b0fb2cc..4f45acdc4a 100644
--- a/fs/ubifs/ubifs.mk
+++ b/fs/ubifs/ubifs.mk
@@ -4,7 +4,10 @@
#
################################################################################
-UBIFS_OPTS := -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) -c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
+UBIFS_OPTS = \
+ -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) \
+ -c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) \
+ -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB),y)
UBIFS_OPTS += -x zlib
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/3] fs/ubifs: UBI image is not another type of filesystem
2017-12-26 23:20 [Buildroot] [PATCH 0/3] fs: make it behave more like the package infra Yann E. MORIN
2017-12-26 23:20 ` [Buildroot] [PATCH 1/3] fs/ubifs: split long line, use simple asignment Yann E. MORIN
@ 2017-12-26 23:20 ` Yann E. MORIN
2017-12-26 23:20 ` [Buildroot] [PATCH 3/3] fs: make it behave a bit more like the package infra Yann E. MORIN
2017-12-27 21:55 ` [Buildroot] [PATCH 0/3] fs: make it behave " Thomas Petazzoni
3 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2017-12-26 23:20 UTC (permalink / raw)
To: buildroot
Currently, the UBI image is treated as if it were a filesystem on its
own, yet it shares almost all of its directory structure with ubifs.
However, the UBI image can very well be seen as a "container" of the
ubifs image, and we can treat it as a post-gen hook instead of a
separate filesystem.
Move the code from ubi.mk to a post-gen hook in ubifs.mk.
Rename all the options accordingly and add legacy entries.
Update the runtime tests infra.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Julien Boibessot <julien.boibessot@armadeus.com>
---
Config.in.legacy | 59 ++++++++++++++++++++++++++++++++++++
fs/ubifs/Config.in | 23 ++++++++------
fs/ubifs/ubi.mk | 32 -------------------
fs/ubifs/ubifs.mk | 27 +++++++++++++++++
support/testing/tests/fs/test_ubi.py | 6 ++--
5 files changed, 103 insertions(+), 44 deletions(-)
delete mode 100644 fs/ubifs/ubi.mk
diff --git a/Config.in.legacy b/Config.in.legacy
index decbaceb76..cf2f181cd8 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -145,6 +145,65 @@ endif
###############################################################################
comment "Legacy options removed in 2018.02"
+config BR2_TARGET_ROOTFS_UBI
+ bool "UBI image option renamed"
+ select BR2_LEGACY
+ select BR2_TARGET_ROOTFS_UBIFS_UBI
+ help
+ The option to embed the ubifs into an UBI image has been renamed.
+
+config BR2_TARGET_ROOTFS_UBI_PEBSIZE
+ hex "UBI image physical eraseblock size option renamed"
+ default 0x0
+ help
+ UBI image physical eraseblock size option has been renamed.
+
+config BR2_TARGET_ROOTFS_UBI_PEBSIZE_WRAP
+ bool
+ default y if BR2_TARGET_ROOTFS_UBI_PEBSIZE != 0x0 \
+ && BR2_TARGET_ROOTFS_UBI_PEBSIZE != 0x20000 # deprecated default value
+ select BR2_LEGACY
+
+config BR2_TARGET_ROOTFS_UBI_SUBSIZE
+ int "UBI image sub-page size option renamed"
+ default 0
+ help
+ UBI image sub-page size option has been renamed.
+
+config BR2_TARGET_ROOTFS_UBI_SUBSIZE_WRAP
+ bool
+ default y if BR2_TARGET_ROOTFS_UBI_SUBSIZE != 0 \
+ && BR2_TARGET_ROOTFS_UBI_SUBSIZE != 512 # deprecated default value
+ select BR2_LEGACY
+
+config BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
+ bool "UBI image use custom config file option renamed"
+ select BR2_LEGACY
+ select BR2_TARGET_ROOTFS_UBIFS_UBI_USE_CUSTOM_CONFIG
+ help
+ UBI image use custom config file option has been renamed.
+
+config BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE
+ string "UBI image custm configuration file path option renamed"
+ help
+ UBI image custm configuration file path option has been renamed.
+
+config BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE_WRAP
+ bool
+ default y if BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE != ""
+ select BR2_LEGACY
+
+config BR2_TARGET_ROOTFS_UBI_OPTS
+ string "UBI image additional ubinize options renamed"
+ help
+ Option to specify UBI image additional ubinize options has been
+ renamed.
+
+config BR2_TARGET_ROOTFS_UBI_OPTS_WRAP
+ bool
+ default y if BR2_TARGET_ROOTFS_UBI_OPTS != ""
+ select BR2_LEGACY
+
config BR2_PACKAGE_GNUPG2_GPGV2
bool "gnupg2 gpgv2 option removed"
select BR2_LEGACY
diff --git a/fs/ubifs/Config.in b/fs/ubifs/Config.in
index ff604c5c38..6294cba645 100644
--- a/fs/ubifs/Config.in
+++ b/fs/ubifs/Config.in
@@ -95,23 +95,25 @@ config BR2_TARGET_ROOTFS_UBIFS_OPTS
help
Any additional mkfs.ubifs options you may want to include.
-config BR2_TARGET_ROOTFS_UBI
+config BR2_TARGET_ROOTFS_UBIFS_UBI
bool "Embed into an UBI image"
help
Build an ubi image from the ubifs one (with ubinize).
-if BR2_TARGET_ROOTFS_UBI
+if BR2_TARGET_ROOTFS_UBIFS_UBI
-config BR2_TARGET_ROOTFS_UBI_PEBSIZE
+config BR2_TARGET_ROOTFS_UBIFS_UBI_PEBSIZE
hex "physical eraseblock size"
+ default BR2_TARGET_ROOTFS_UBI_PEBSIZE if BR2_TARGET_ROOTFS_UBI_PEBSIZE_WRAP # legacy
default 0x20000
help
Tells ubinize the physical eraseblock (PEB) size of the
flash chip the ubi image is created for. The value provided
here is passed to the -p/--peb-size option of ubinize.
-config BR2_TARGET_ROOTFS_UBI_SUBSIZE
+config BR2_TARGET_ROOTFS_UBIFS_UBI_SUBSIZE
int "sub-page size"
+ default BR2_TARGET_ROOTFS_UBI_SUBSIZE if BR2_TARGET_ROOTFS_UBI_SUBSIZE_WRAP # legacy
default 512
help
Tells ubinize that the flash supports sub-pages and the sub-page
@@ -119,7 +121,7 @@ config BR2_TARGET_ROOTFS_UBI_SUBSIZE
The value provided here is passed to the -s/--sub-page-size
option of ubinize.
-config BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
+config BR2_TARGET_ROOTFS_UBIFS_UBI_USE_CUSTOM_CONFIG
bool "Use custom config file"
help
Select this option to use a custom ubinize configuration file,
@@ -133,17 +135,20 @@ config BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
So the volume defined for the root filesystem can specify the
image path as: image=BR2_ROOTFS_UBIFS_PATH
-config BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE
+config BR2_TARGET_ROOTFS_UBIFS_UBI_CUSTOM_CONFIG_FILE
string "Configuration file path"
- depends on BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG
+ depends on BR2_TARGET_ROOTFS_UBIFS_UBI_USE_CUSTOM_CONFIG
+ default BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE \
+ if BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE_WRAP # legacy
help
Path to the ubinize configuration file.
-config BR2_TARGET_ROOTFS_UBI_OPTS
+config BR2_TARGET_ROOTFS_UBIFS_UBI_OPTS
string "Additional ubinize options"
+ default BR2_TARGET_ROOTFS_UBI_OPTS if BR2_TARGET_ROOTFS_UBI_OPTS != ""
help
Any additional ubinize options you may want to include.
-endif # BR2_TARGET_ROOTFS_UBI
+endif # BR2_TARGET_ROOTFS_UBIFS_UBI
endif # BR2_TARGET_ROOTFS_UBIFS
diff --git a/fs/ubifs/ubi.mk b/fs/ubifs/ubi.mk
deleted file mode 100644
index 2baece5fb0..0000000000
--- a/fs/ubifs/ubi.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-################################################################################
-#
-# Embed the ubifs image into an ubi image
-#
-################################################################################
-
-UBI_UBINIZE_OPTS := -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
-UBI_UBINIZE_OPTS += -p $(BR2_TARGET_ROOTFS_UBI_PEBSIZE)
-ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0)
-UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE)
-endif
-
-UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS))
-
-ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs
-
-ifeq ($(BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG),y)
-UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE))
-else
-UBINIZE_CONFIG_FILE_PATH = fs/ubifs/ubinize.cfg
-endif
-
-# don't use sed -i as it misbehaves on systems with SELinux enabled when this is
-# executed through fakeroot (see #9386)
-define ROOTFS_UBI_CMD
- sed 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' \
- $(UBINIZE_CONFIG_FILE_PATH) > $(BUILD_DIR)/ubinize.cfg
- $(HOST_DIR)/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg
- rm $(BUILD_DIR)/ubinize.cfg
-endef
-
-$(eval $(call ROOTFS_TARGET,ubi))
diff --git a/fs/ubifs/ubifs.mk b/fs/ubifs/ubifs.mk
index 4f45acdc4a..5f7846ff73 100644
--- a/fs/ubifs/ubifs.mk
+++ b/fs/ubifs/ubifs.mk
@@ -27,4 +27,31 @@ define ROOTFS_UBIFS_CMD
$(HOST_DIR)/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@
endef
+ifeq ($(BR2_TARGET_ROOTFS_UBIFS_UBI),y)
+
+UBIFS_UBINIZE_OPTS = \
+ -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE) \
+ -p $(BR2_TARGET_ROOTFS_UBIFS_UBI_PEBSIZE)
+
+ifneq ($(BR2_TARGET_ROOTFS_UBIFS_UBI_SUBSIZE),0)
+UBIFS_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBIFS_UBI_SUBSIZE)
+endif
+
+UBIFS_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_UBI_OPTS))
+
+ifeq ($(BR2_TARGET_ROOTFS_UBIFS_UBI_USE_CUSTOM_CONFIG),y)
+UBIFS_UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_UBI_CUSTOM_CONFIG_FILE))
+else
+UBIFS_UBINIZE_CONFIG_FILE_PATH = fs/ubifs/ubinize.cfg
+endif
+
+define UBIFS_UBINIZE
+ sed 's;BR2_ROOTFS_UBIFS_PATH;$@;' \
+ $(UBIFS_UBINIZE_CONFIG_FILE_PATH) > $(FS_DIR)/ubinize.cfg
+ $(HOST_DIR)/sbin/ubinize -o $(@:%.ubifs=%.ubi) $(UBIFS_UBINIZE_OPTS) $(FS_DIR)/ubinize.cfg
+endef
+ROOTFS_UBIFS_POST_GEN_HOOKS += UBIFS_UBINIZE
+
+endif # BR2_TARGET_ROOTFS_UBI
+
$(eval $(call ROOTFS_TARGET,ubifs))
diff --git a/support/testing/tests/fs/test_ubi.py b/support/testing/tests/fs/test_ubi.py
index 015d82f769..dff2a2ac1e 100644
--- a/support/testing/tests/fs/test_ubi.py
+++ b/support/testing/tests/fs/test_ubi.py
@@ -10,9 +10,9 @@ class TestUbi(infra.basetest.BRTest):
BR2_TARGET_ROOTFS_UBIFS=y
BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x7ff80
BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1
- BR2_TARGET_ROOTFS_UBI=y
- BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x80000
- BR2_TARGET_ROOTFS_UBI_SUBSIZE=1
+ BR2_TARGET_ROOTFS_UBIFS_UBI=y
+ BR2_TARGET_ROOTFS_UBIFS_UBI_PEBSIZE=0x80000
+ BR2_TARGET_ROOTFS_UBIFS_UBI_SUBSIZE=1
"""
# TODO: if you boot Qemu twice on the same UBI image, it fails to
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 3/3] fs: make it behave a bit more like the package infra
2017-12-26 23:20 [Buildroot] [PATCH 0/3] fs: make it behave more like the package infra Yann E. MORIN
2017-12-26 23:20 ` [Buildroot] [PATCH 1/3] fs/ubifs: split long line, use simple asignment Yann E. MORIN
2017-12-26 23:20 ` [Buildroot] [PATCH 2/3] fs/ubifs: UBI image is not another type of filesystem Yann E. MORIN
@ 2017-12-26 23:20 ` Yann E. MORIN
2017-12-27 21:55 ` [Buildroot] [PATCH 0/3] fs: make it behave " Thomas Petazzoni
3 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2017-12-26 23:20 UTC (permalink / raw)
To: buildroot
Currently, to register a filesystem, one has to call:
$(eval $(call ROOTFS_TARGET,blabla))
This is very unlike the package infrastrucutre, where the name of the
packagge os automatically guessed by the infra.
It turns out that we can nowe do that for the filesystem infra too.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
fs/axfs/axfs.mk | 2 +-
fs/cloop/cloop.mk | 2 +-
fs/common.mk | 7 +++----
fs/cpio/cpio.mk | 2 +-
fs/cramfs/cramfs.mk | 2 +-
fs/ext2/ext2.mk | 2 +-
fs/iso9660/iso9660.mk | 2 +-
fs/jffs2/jffs2.mk | 2 +-
fs/romfs/romfs.mk | 2 +-
fs/squashfs/squashfs.mk | 2 +-
fs/tar/tar.mk | 2 +-
fs/ubifs/ubifs.mk | 2 +-
fs/yaffs2/yaffs.mk | 2 +-
13 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/fs/axfs/axfs.mk b/fs/axfs/axfs.mk
index 6c795d7062..4b93df55c0 100644
--- a/fs/axfs/axfs.mk
+++ b/fs/axfs/axfs.mk
@@ -10,4 +10,4 @@ define ROOTFS_AXFS_CMD
$(HOST_DIR)/bin/mkfs.axfs -s -a $(TARGET_DIR) $@
endef
-$(eval $(call ROOTFS_TARGET,axfs))
+$(eval $(rootfs))
diff --git a/fs/cloop/cloop.mk b/fs/cloop/cloop.mk
index cbfc79b0d1..17749c5a3b 100644
--- a/fs/cloop/cloop.mk
+++ b/fs/cloop/cloop.mk
@@ -11,4 +11,4 @@ define ROOTFS_CLOOP_CMD
$(HOST_DIR)/bin/create_compressed_fs - 65536 > $@
endef
-$(eval $(call ROOTFS_TARGET,cloop))
+$(eval $(rootfs))
diff --git a/fs/common.mk b/fs/common.mk
index b06e9b5597..98232f0b9f 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -37,7 +37,7 @@ ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
# Since this function will be called from within an $(eval ...)
# all variable references except the arguments must be $$-quoted.
-define ROOTFS_TARGET_INTERNAL
+define inner-rootfs
# extra deps
ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \
@@ -128,8 +128,7 @@ endif
endef
-define ROOTFS_TARGET
- $(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1)))
-endef
+# $(pkgname) also works well to return the filesystem name
+rootfs = $(call inner-rootfs,$(pkgname),$(call UPPERCASE,$(pkgname)))
include $(sort $(wildcard fs/*/*.mk))
diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk
index c68e0bfb97..aa4d947fa5 100644
--- a/fs/cpio/cpio.mk
+++ b/fs/cpio/cpio.mk
@@ -40,4 +40,4 @@ endef
ROOTFS_CPIO_POST_GEN_HOOKS += ROOTFS_CPIO_UBOOT_MKIMAGE
endif
-$(eval $(call ROOTFS_TARGET,cpio))
+$(eval $(rootfs))
diff --git a/fs/cramfs/cramfs.mk b/fs/cramfs/cramfs.mk
index 85b98b8ccd..f880871935 100644
--- a/fs/cramfs/cramfs.mk
+++ b/fs/cramfs/cramfs.mk
@@ -16,4 +16,4 @@ endef
ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
-$(eval $(call ROOTFS_TARGET,cramfs))
+$(eval $(rootfs))
diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index 12b87a722c..6bb4b1c7f8 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -43,4 +43,4 @@ endef
ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_EXT2_SYMLINK
endif
-$(eval $(call ROOTFS_TARGET,ext2))
+$(eval $(rootfs))
diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
index c2de27101a..ab11a393e1 100644
--- a/fs/iso9660/iso9660.mk
+++ b/fs/iso9660/iso9660.mk
@@ -128,4 +128,4 @@ endef
ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID
endif
-$(eval $(call ROOTFS_TARGET,iso9660))
+$(eval $(rootfs))
diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk
index 9a36a75ff4..740ab3e03d 100644
--- a/fs/jffs2/jffs2.mk
+++ b/fs/jffs2/jffs2.mk
@@ -49,4 +49,4 @@ define ROOTFS_JFFS2_CMD
endef
endif
-$(eval $(call ROOTFS_TARGET,jffs2))
+$(eval $(rootfs))
diff --git a/fs/romfs/romfs.mk b/fs/romfs/romfs.mk
index eded91df0a..163751b4e2 100644
--- a/fs/romfs/romfs.mk
+++ b/fs/romfs/romfs.mk
@@ -10,4 +10,4 @@ define ROOTFS_ROMFS_CMD
$(HOST_DIR)/bin/genromfs -d $(TARGET_DIR) -f $@
endef
-$(eval $(call ROOTFS_TARGET,romfs))
+$(eval $(rootfs))
diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk
index 7de7f51af1..51abd5d7d0 100644
--- a/fs/squashfs/squashfs.mk
+++ b/fs/squashfs/squashfs.mk
@@ -24,4 +24,4 @@ define ROOTFS_SQUASHFS_CMD
$(HOST_DIR)/bin/mksquashfs $(TARGET_DIR) $@ $(ROOTFS_SQUASHFS_ARGS)
endef
-$(eval $(call ROOTFS_TARGET,squashfs))
+$(eval $(rootfs))
diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
index 0e3eacbedf..e39c2fdbf1 100644
--- a/fs/tar/tar.mk
+++ b/fs/tar/tar.mk
@@ -11,4 +11,4 @@ define ROOTFS_TAR_CMD
tar $(TAR_OPTS) -cf $@ --null --no-recursion -T - --numeric-owner)
endef
-$(eval $(call ROOTFS_TARGET,tar))
+$(eval $(rootfs))
diff --git a/fs/ubifs/ubifs.mk b/fs/ubifs/ubifs.mk
index 5f7846ff73..277bff4ebf 100644
--- a/fs/ubifs/ubifs.mk
+++ b/fs/ubifs/ubifs.mk
@@ -54,4 +54,4 @@ ROOTFS_UBIFS_POST_GEN_HOOKS += UBIFS_UBINIZE
endif # BR2_TARGET_ROOTFS_UBI
-$(eval $(call ROOTFS_TARGET,ubifs))
+$(eval $(rootfs))
diff --git a/fs/yaffs2/yaffs.mk b/fs/yaffs2/yaffs.mk
index 30570735fa..9cba27af70 100644
--- a/fs/yaffs2/yaffs.mk
+++ b/fs/yaffs2/yaffs.mk
@@ -10,4 +10,4 @@ define ROOTFS_YAFFS2_CMD
$(HOST_DIR)/bin/mkyaffs2 --all-root $(TARGET_DIR) $@
endef
-$(eval $(call ROOTFS_TARGET,yaffs2))
+$(eval $(rootfs))
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/3] fs/ubifs: split long line, use simple asignment
2017-12-26 23:20 ` [Buildroot] [PATCH 1/3] fs/ubifs: split long line, use simple asignment Yann E. MORIN
@ 2017-12-27 21:53 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-12-27 21:53 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 27 Dec 2017 00:20:45 +0100, Yann E. MORIN wrote:
> This line has been sitting there unchanged for years now, but it does
> not follow current best pratices, that is:
> - do not use imediate assignment,
> - split lines longer than ~80 chars.
>
> Fix that.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> fs/ubifs/ubifs.mk | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 0/3] fs: make it behave more like the package infra
2017-12-26 23:20 [Buildroot] [PATCH 0/3] fs: make it behave more like the package infra Yann E. MORIN
` (2 preceding siblings ...)
2017-12-26 23:20 ` [Buildroot] [PATCH 3/3] fs: make it behave a bit more like the package infra Yann E. MORIN
@ 2017-12-27 21:55 ` Thomas Petazzoni
2017-12-28 9:45 ` Yann E. MORIN
3 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-12-27 21:55 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 27 Dec 2017 00:20:41 +0100, Yann E. MORIN wrote:
> Currently, to register a new filesystem, one has to call:
>
> $(eval $(call ROOTFS_TARGET,blabla))
>
> This is different from the package infrastructure, where the name of the
> package needs not be specified, and is automatically guessed. This makes
> the fs infra a bit different, when there is no reason for that.
>
> Well, it turns out that there is a reason: we currently register two
> filesystems from the same directory: ubifs and ubi. But it turns out
> that these are in fact not two filesystems, but ubi can be considered
> only as a post-preocessing of the ubifs one.
>
> So, after we fix the ubifs filesystem to register only one filesystem,
> we eventually turn the rootfs infra into a package-like infra, whereby
> naming the filesystem is no longer needed, which allows one to simply
> write:
> $(eval $(rootfs))
>
> The 'rootfs' keyword may seem rather generic, but it is currently unused
> in our tree (except in a post-image script for the chromebook defconfig):
>
> $ git grep -E '\<rootfs[[:space:]]*:?='
> board/chromebook/snow/mksd.sh:rootfs=$BINARIES_DIR/rootfs.ext2
I've applied PATCH 1/3, which is a preparation patch. However, I'm not
100% convinced with the value of PATCH 2/3 and 3/3. And PATCH 2/3 has a
significant drawback: it breaks all existing configurations that build
an UBI filesystem. That's a rather high price to pay for an internal
change that isn't that important IMO.
So I'd like to gather more feedback on this change, but at this point,
I'm a bit reluctant I have to say.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 0/3] fs: make it behave more like the package infra
2017-12-27 21:55 ` [Buildroot] [PATCH 0/3] fs: make it behave " Thomas Petazzoni
@ 2017-12-28 9:45 ` Yann E. MORIN
0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2017-12-28 9:45 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2017-12-27 22:55 +0100, Thomas Petazzoni spake thusly:
> On Wed, 27 Dec 2017 00:20:41 +0100, Yann E. MORIN wrote:
> > Currently, to register a new filesystem, one has to call:
> >
> > $(eval $(call ROOTFS_TARGET,blabla))
> >
> > This is different from the package infrastructure, where the name of the
> > package needs not be specified, and is automatically guessed. This makes
> > the fs infra a bit different, when there is no reason for that.
> >
> > Well, it turns out that there is a reason: we currently register two
> > filesystems from the same directory: ubifs and ubi. But it turns out
> > that these are in fact not two filesystems, but ubi can be considered
> > only as a post-preocessing of the ubifs one.
> >
> > So, after we fix the ubifs filesystem to register only one filesystem,
> > we eventually turn the rootfs infra into a package-like infra, whereby
> > naming the filesystem is no longer needed, which allows one to simply
> > write:
> > $(eval $(rootfs))
> >
> > The 'rootfs' keyword may seem rather generic, but it is currently unused
> > in our tree (except in a post-image script for the chromebook defconfig):
> >
> > $ git grep -E '\<rootfs[[:space:]]*:?='
> > board/chromebook/snow/mksd.sh:rootfs=$BINARIES_DIR/rootfs.ext2
>
> I've applied PATCH 1/3, which is a preparation patch. However, I'm not
> 100% convinced with the value of PATCH 2/3 and 3/3. And PATCH 2/3 has a
> significant drawback: it breaks all existing configurations that build
> an UBI filesystem. That's a rather high price to pay for an internal
> change that isn't that important IMO.
I made it so that the legacy infra would take care of converting the old
configurations over to the new options, though. ;-)
> So I'd like to gather more feedback on this change, but at this point,
> I'm a bit reluctant I have to say.
As discussed on IRC, I'll submit a different patch that converts ubi in
a full filesystem of its own, in its opwn ubi/ directory, so we can
compare.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-12-28 9:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-26 23:20 [Buildroot] [PATCH 0/3] fs: make it behave more like the package infra Yann E. MORIN
2017-12-26 23:20 ` [Buildroot] [PATCH 1/3] fs/ubifs: split long line, use simple asignment Yann E. MORIN
2017-12-27 21:53 ` Thomas Petazzoni
2017-12-26 23:20 ` [Buildroot] [PATCH 2/3] fs/ubifs: UBI image is not another type of filesystem Yann E. MORIN
2017-12-26 23:20 ` [Buildroot] [PATCH 3/3] fs: make it behave a bit more like the package infra Yann E. MORIN
2017-12-27 21:55 ` [Buildroot] [PATCH 0/3] fs: make it behave " Thomas Petazzoni
2017-12-28 9:45 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox