public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel
@ 2026-03-13 21:50 Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 2/7] package/xfsprogs: bump version to 6.18.0 Julien Olivain via buildroot
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-13 21:50 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Eric Le Bihan, Julien Olivain, Philippe Proulx,
	Thomas Petazzoni

This commit updates the test configuration to switch to a Bootlin
external toolchain. This is needed to get newer toolchain kernel
headers required by newer xfsprogs versions.

xfsprogs upstream commit [1] (included in v6.15) introduced a usage
of the "capacity" field of zoned block devices, introduced in Kernel
commit [2], first included in v5.9.

This commit also updates the runtime test Kernel version
to the LTS 6.18.18. This is because the default filesystem options
of mkfs.xfs were updated in upstream commit [3] to include new
features supported in the new Kernel 6.18.y LTS series. The commit [3]
is included in xfsprogs v6.18.

[1] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=48ccc2459039309cfbaf358febea53a86f07827c
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=82394db7383d33641f3f565bd79792fb41b1741f
[3] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=54aad16b4b9b923442b4042afaba4438ca1aa868

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes:
v1-> v2:
- new patch, separated from the xfsprogs bump in v1
- kernel updated from 6.18.9 to 6.18.18
---
 support/testing/tests/package/test_xfsprogs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/support/testing/tests/package/test_xfsprogs.py b/support/testing/tests/package/test_xfsprogs.py
index a3a4bd27d8..03191aa22b 100644
--- a/support/testing/tests/package/test_xfsprogs.py
+++ b/support/testing/tests/package/test_xfsprogs.py
@@ -12,10 +12,11 @@ class TestXfsProgs(infra.basetest.BRTest):
         f"""
         BR2_aarch64=y
         BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
         BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
         BR2_LINUX_KERNEL=y
         BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.37"
+        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.18"
         BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
         BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
         BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{kern_frag}"
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 2/7] package/xfsprogs: bump version to 6.18.0
  2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
@ 2026-03-13 21:50 ` Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 3/7] package/inih: enable host package variant Julien Olivain via buildroot
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-13 21:50 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Eric Le Bihan, Julien Olivain, Philippe Proulx,
	Thomas Petazzoni

Changelog:
https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/tree/doc/CHANGES?h=v6.18.0

This commit refreshes the patch 0001 (rebase and update upstream link
to lore mailing list). It also removes the patch 0002 included in
this new version and removes the corresponding _AUTORECONF and
_POST_CONFIGURE_HOOKS.

Also, the upstream commit [1] introduced a usage of the "capacity"
field of zoned block devices, introduced in Kernel commit [2],
first included in v5.9. For this reason, this commit adds the new
dependency to BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9.

For that reason, this commit updates the test_xfsprogs runtime test
to switch to a Bootlin external toolchain, which includes Kernel
headers that meet this new requirement.

Finally, this commit also updates this runtime test Kernel version
to the LTS 6.18.9. This is because the default filesystem options
of mkfs.xfs were updated in upstream commit [3] to include new
features supported in the new Kernel 6.18.y LTS series. The commit [3]
is included in xfsprogs v6.18.

[1] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=48ccc2459039309cfbaf358febea53a86f07827c
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=82394db7383d33641f3f565bd79792fb41b1741f
[3] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=54aad16b4b9b923442b4042afaba4438ca1aa868

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes:
v1-> v2:
- add --enable-libicu=no in HOST_XFSPROGS_CONF_OPTS
---
 ...do-not-do-dynamic-linking-of-libtool.patch | 12 ++---
 ...itionally-get-icu-uc-from-pkg-config.patch | 47 -------------------
 package/xfsprogs/Config.in                    |  4 +-
 package/xfsprogs/xfsprogs.hash                |  2 +-
 package/xfsprogs/xfsprogs.mk                  | 11 +----
 5 files changed, 11 insertions(+), 65 deletions(-)
 delete mode 100644 package/xfsprogs/0002-configure-additionally-get-icu-uc-from-pkg-config.patch

diff --git a/package/xfsprogs/0001-mdrestore-scrub-do-not-do-dynamic-linking-of-libtool.patch b/package/xfsprogs/0001-mdrestore-scrub-do-not-do-dynamic-linking-of-libtool.patch
index cb30e68db4..434658307c 100644
--- a/package/xfsprogs/0001-mdrestore-scrub-do-not-do-dynamic-linking-of-libtool.patch
+++ b/package/xfsprogs/0001-mdrestore-scrub-do-not-do-dynamic-linking-of-libtool.patch
@@ -1,4 +1,4 @@
-From fa3a4e036c8c78325216ed21eff6145aeb186686 Mon Sep 17 00:00:00 2001
+From e09511b7cf91c6c00b72c568571d0b0984acd381 Mon Sep 17 00:00:00 2001
 From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
 Date: Wed, 25 Nov 2015 10:50:00 +0000
 Subject: [PATCH] mdrestore, scrub: do not do dynamic linking of libtool
@@ -11,12 +11,12 @@ linking for libuuid only. Otherwise the build will fail like this:
 ld: attempted static link of dynamic object `/usr/lib/libuuid.so'
 
 Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-Upstream: Proposed: https://www.spinics.net/lists/xfs/msg36149.html
+Upstream: Proposed: https://lore.kernel.org/linux-xfs/1448449838-47261-1-git-send-email-Vincent.Riera@imgtec.com/
 [baruch: update for v4.15.1; extend to include scrub]
 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 [matt: update for v4.16.1; adjusted libunistring -> libicu]
 Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
-[Julien: rebased on v6.4.0]
+[Julien: rebased on v6.18.0]
 Signed-off-by: Julien Olivain <ju.o@free.fr>
 ---
  mdrestore/Makefile | 2 +-
@@ -37,10 +37,10 @@ index 4a932efb..7ea1fd45 100644
  default: depend $(LTCOMMAND)
  
 diff --git a/scrub/Makefile b/scrub/Makefile
-index aba14ed2..f0ef492f 100644
+index 6375d77a..26414491 100644
 --- a/scrub/Makefile
 +++ b/scrub/Makefile
-@@ -71,7 +71,7 @@ xfs_scrub.c
+@@ -90,7 +90,7 @@ xfs_scrub.c
  LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBICU_LIBS) $(LIBRT) $(LIBURCU) \
  	$(LIBPTHREAD)
  LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG)
@@ -50,5 +50,5 @@ index aba14ed2..f0ef492f 100644
  ifeq ($(HAVE_MALLINFO),yes)
  LCFLAGS += -DHAVE_MALLINFO
 -- 
-2.45.2
+2.52.0
 
diff --git a/package/xfsprogs/0002-configure-additionally-get-icu-uc-from-pkg-config.patch b/package/xfsprogs/0002-configure-additionally-get-icu-uc-from-pkg-config.patch
deleted file mode 100644
index 714d1e1257..0000000000
--- a/package/xfsprogs/0002-configure-additionally-get-icu-uc-from-pkg-config.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0b3e7284c7fa20dd27f8a584f8db417d1d6fa27b Mon Sep 17 00:00:00 2001
-From: Alyssa Ross <hi@alyssa.is>
-Date: Fri, 14 Feb 2025 09:45:10 +0100
-Subject: configure: additionally get icu-uc from pkg-config
-
-Upstream libicu changed its pkgconfig files[0] in version 76 to require
-callers to call out to each .pc file they need for the libraries they
-want to link against.  This apparently reduces overlinking, at a cost of
-needing the world to fix themselves up.
-
-This patch fixes the following build error with icu 76, also seen by
-Fedora[1]:
-
-	    /bin/ld: unicrash.o: undefined reference to symbol 'uiter_setString_76'
-	    /bin/ld: /lib/libicuuc.so.76: error adding symbols: DSO missing from command line
-	    collect2: error: ld returned 1 exit status
-	    make[2]: *** [../include/buildrules:65: xfs_scrub] Error 1
-	    make[1]: *** [include/buildrules:35: scrub] Error 2
-
-Link: https://github.com/unicode-org/icu/commit/199bc827021ffdb43b6579d68e5eecf54c7f6f56 [0]
-Link: https://src.fedoraproject.org/rpms/xfsprogs/c/624b0fdf7b2a31c1a34787b04e791eee47c97340 [1]
-Signed-off-by: Alyssa Ross <hi@alyssa.is>
-Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
-
-Upstream: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=0b3e7284c7fa20dd27f8a584f8db417d1d6fa27b
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- m4/package_icu.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-(limited to 'm4/package_icu.m4')
-
-diff --git a/m4/package_icu.m4 b/m4/package_icu.m4
-index 3ccbe0cc98..6b89c874f1 100644
---- a/m4/package_icu.m4
-+++ b/m4/package_icu.m4
-@@ -1,5 +1,5 @@
- AC_DEFUN([AC_HAVE_LIBICU],
--  [ PKG_CHECK_MODULES([libicu], [icu-i18n], [have_libicu=yes], [have_libicu=no])
-+  [ PKG_CHECK_MODULES([libicu], [icu-i18n icu-uc], [have_libicu=yes], [have_libicu=no])
-     AC_SUBST(have_libicu)
-     AC_SUBST(libicu_CFLAGS)
-     AC_SUBST(libicu_LIBS)
--- 
-cgit 1.2.3-korg
-
diff --git a/package/xfsprogs/Config.in b/package/xfsprogs/Config.in
index 1a29579d8b..1ecffa3e0e 100644
--- a/package/xfsprogs/Config.in
+++ b/package/xfsprogs/Config.in
@@ -1,7 +1,8 @@
-comment "xfsprogs needs a toolchain w/ threads, C++"
+comment "xfsprogs needs a toolchain w/ threads, headers >= 5.9, C++"
 	depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS
 	depends on BR2_USE_MMU
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9 || \
 		!BR2_INSTALL_LIBSTDCPP
 
 config BR2_PACKAGE_XFSPROGS
@@ -10,6 +11,7 @@ config BR2_PACKAGE_XFSPROGS
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP # liburcu
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9 # blkzoned.h (capacity)
 	select BR2_PACKAGE_INIH
 	select BR2_PACKAGE_LIBURCU
 	select BR2_PACKAGE_UTIL_LINUX
diff --git a/package/xfsprogs/xfsprogs.hash b/package/xfsprogs/xfsprogs.hash
index a86693419d..24c2e20a7e 100644
--- a/package/xfsprogs/xfsprogs.hash
+++ b/package/xfsprogs/xfsprogs.hash
@@ -1,5 +1,5 @@
 # From https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/sha256sums.asc
-sha256  dae3bb432196f7b183b2e6bd5dc44bf33edbd7d0e85bd37d25c235df81b8100a  xfsprogs-6.11.0.tar.xz
+sha256  3a6dc7b1245ce9bccd197bab00691f1b190bd3694d3ccc301d21b83afc133199  xfsprogs-6.18.0.tar.xz
 
 # Hash for license files
 sha256  f6b78c087c3ebdf0f3c13415070dd480a3f35d8fc76f3d02180a407c1c812f79  LICENSES/GPL-2.0
diff --git a/package/xfsprogs/xfsprogs.mk b/package/xfsprogs/xfsprogs.mk
index 552ff69bd6..ab78f8e2cc 100644
--- a/package/xfsprogs/xfsprogs.mk
+++ b/package/xfsprogs/xfsprogs.mk
@@ -4,21 +4,12 @@
 #
 ################################################################################
 
-XFSPROGS_VERSION = 6.11.0
+XFSPROGS_VERSION = 6.18.0
 XFSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/fs/xfs/xfsprogs
 XFSPROGS_SOURCE = xfsprogs-$(XFSPROGS_VERSION).tar.xz
 XFSPROGS_LICENSE = GPL-2.0, GPL-2.0+, LGPL-2.1 (libhandle, few headers)
 XFSPROGS_LICENSE_FILES = LICENSES/GPL-2.0 LICENSES/LGPL-2.1
 
-# 0002-configure-additionally-get-icu-uc-from-pkg-config.patch
-XFSPROGS_AUTORECONF = YES
-
-# restore upstream install-sh script overwritten by autoreconf
-define XFSPROGS_FIX_INSTALL_SH
-	mv $(@D)/install-sh~ $(@D)/install-sh
-endef
-XFSPROGS_POST_CONFIGURE_HOOKS = XFSPROGS_FIX_INSTALL_SH
-
 XFSPROGS_DEPENDENCIES = inih liburcu util-linux
 
 XFSPROGS_CONF_ENV = ac_cv_header_aio_h=yes ac_cv_lib_rt_lio_listio=yes PLATFORM="linux"
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 3/7] package/inih: enable host package variant
  2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 2/7] package/xfsprogs: bump version to 6.18.0 Julien Olivain via buildroot
@ 2026-03-13 21:50 ` Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 4/7] package/liburcu: " Julien Olivain via buildroot
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-13 21:50 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Eric Le Bihan, Julien Olivain, Philippe Proulx,
	Thomas Petazzoni

host-inih is needed for host-xfsprogs.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/inih/inih.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/inih/inih.mk b/package/inih/inih.mk
index 4d9a8c03ab..c4a897604b 100644
--- a/package/inih/inih.mk
+++ b/package/inih/inih.mk
@@ -18,3 +18,4 @@ INIH_CONF_OPTS += -Dwith_INIReader=false
 endif
 
 $(eval $(meson-package))
+$(eval $(host-meson-package))
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 4/7] package/liburcu: enable host package variant
  2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 2/7] package/xfsprogs: bump version to 6.18.0 Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 3/7] package/inih: enable host package variant Julien Olivain via buildroot
@ 2026-03-13 21:50 ` Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 5/7] package/xfsprogs: " Julien Olivain via buildroot
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-13 21:50 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Eric Le Bihan, Julien Olivain, Philippe Proulx,
	Thomas Petazzoni

host-liburcu is needed for host-xfsprogs.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/liburcu/liburcu.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/liburcu/liburcu.mk b/package/liburcu/liburcu.mk
index 656dfb2408..cf1b08e469 100644
--- a/package/liburcu/liburcu.mk
+++ b/package/liburcu/liburcu.mk
@@ -21,3 +21,4 @@ LIBURCU_INSTALL_STAGING = YES
 LIBURCU_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 5/7] package/xfsprogs: enable host package variant
  2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
                   ` (2 preceding siblings ...)
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 4/7] package/liburcu: " Julien Olivain via buildroot
@ 2026-03-13 21:50 ` Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 6/7] fs/xfs: add support for generating a xfs image Julien Olivain via buildroot
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-13 21:50 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Eric Le Bihan, Julien Olivain, Philippe Proulx,
	Thomas Petazzoni

The host mkfs.xfs is needed to create XFS root filesystems
in Buildroot.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/Config.in.host          | 1 +
 package/xfsprogs/Config.in.host | 6 ++++++
 package/xfsprogs/xfsprogs.mk    | 8 ++++++++
 3 files changed, 15 insertions(+)
 create mode 100644 package/xfsprogs/Config.in.host

diff --git a/package/Config.in.host b/package/Config.in.host
index 2160a0f558..b990ce8b14 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -128,6 +128,7 @@ menu "Host utilities"
 	source "package/utp_com/Config.in.host"
 	source "package/uuu/Config.in.host"
 	source "package/vboot-utils/Config.in.host"
+	source "package/xfsprogs/Config.in.host"
 	source "package/xorriso/Config.in.host"
 	source "package/zip/Config.in.host"
 	source "package/zstd/Config.in.host"
diff --git a/package/xfsprogs/Config.in.host b/package/xfsprogs/Config.in.host
new file mode 100644
index 0000000000..f200b766fe
--- /dev/null
+++ b/package/xfsprogs/Config.in.host
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HOST_XFSPROGS
+	bool "host xfsprogs"
+	help
+	  The XFS file system utilities and libraries
+
+	  https://xfs.wiki.kernel.org
diff --git a/package/xfsprogs/xfsprogs.mk b/package/xfsprogs/xfsprogs.mk
index ab78f8e2cc..729f4f753f 100644
--- a/package/xfsprogs/xfsprogs.mk
+++ b/package/xfsprogs/xfsprogs.mk
@@ -20,6 +20,13 @@ XFSPROGS_CONF_OPTS = \
 	INSTALL_GROUP=root \
 	--enable-static
 
+HOST_XFSPROGS_DEPENDENCIES = host-inih host-liburcu host-util-linux
+HOST_XFSPROGS_CONF_OPTS = \
+	--enable-gettext=no \
+	--enable-lib64=no \
+	--enable-libicu=no \
+	--enable-static
+
 ifeq ($(BR2_PACKAGE_ICU),y)
 XFSPROGS_DEPENDENCIES += icu
 XFSPROGS_CONF_OPTS += --enable-libicu
@@ -34,3 +41,4 @@ endif
 XFSPROGS_INSTALL_TARGET_OPTS = DIST_ROOT=$(TARGET_DIR) install
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 6/7] fs/xfs: add support for generating a xfs image
  2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
                   ` (3 preceding siblings ...)
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 5/7] package/xfsprogs: " Julien Olivain via buildroot
@ 2026-03-13 21:50 ` Julien Olivain via buildroot
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 7/7] support/testing: fs: new xfs runtime test Julien Olivain via buildroot
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-13 21:50 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Eric Le Bihan, Julien Olivain, Philippe Proulx,
	Thomas Petazzoni

mkfs.xfs is able to populate a filesystem from a directory since
upstream commit [1], included since v6.17.

With this option, it is now possible to create XFS rootfs in
Buildroot. This commit adds this new feature.

[1] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=8a4ea72724930cfe262ccda03028264e1a81b145

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 fs/Config.in     |  1 +
 fs/xfs/Config.in | 34 ++++++++++++++++++++++++++++++++++
 fs/xfs/xfs.mk    | 33 +++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 fs/xfs/Config.in
 create mode 100644 fs/xfs/xfs.mk

diff --git a/fs/Config.in b/fs/Config.in
index 42b0e608ac..be2a47b855 100644
--- a/fs/Config.in
+++ b/fs/Config.in
@@ -15,6 +15,7 @@ source "fs/squashfs/Config.in"
 source "fs/tar/Config.in"
 source "fs/ubi/Config.in"
 source "fs/ubifs/Config.in"
+source "fs/xfs/Config.in"
 source "fs/yaffs2/Config.in"
 
 endmenu
diff --git a/fs/xfs/Config.in b/fs/xfs/Config.in
new file mode 100644
index 0000000000..49dd5ed4aa
--- /dev/null
+++ b/fs/xfs/Config.in
@@ -0,0 +1,34 @@
+config BR2_TARGET_ROOTFS_XFS
+	bool "xfs root filesystem"
+	select BR2_PACKAGE_HOST_XFSPROGS
+	help
+	  Build a xfs root filesystem. If you enable this option, you
+	  probably want to enable the xfsprogs package too.
+
+if BR2_TARGET_ROOTFS_XFS
+
+config BR2_TARGET_ROOTFS_XFS_LABEL
+	string "filesystem label"
+	default "rootfs"
+
+config BR2_TARGET_ROOTFS_XFS_SIZE
+	string "exact size"
+	default "300M"
+	help
+	  The size of the filesystem image. This size is passed to the
+	  "truncate -s", so this option recognizes unit suffixes such
+	  as K,M,G (see the manual page truncate(1)). Note the XFS
+	  minimal filesystem size is 300M.
+
+config BR2_TARGET_ROOTFS_XFS_MKFS_OPTIONS
+	string "additional mkfs.xfs options"
+	help
+	  Specify a space-separated list of mkfs.xfs options.
+
+	  For more information about the mke2fs options, see the
+	  manual page mkfs.xfs(8).
+
+	  For more information about the XFS features which can be
+	  set, see also the manual page xfs(5).
+
+endif # BR2_TARGET_ROOTFS_XFS
diff --git a/fs/xfs/xfs.mk b/fs/xfs/xfs.mk
new file mode 100644
index 0000000000..2706822550
--- /dev/null
+++ b/fs/xfs/xfs.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# Build the xfs root filesystem image
+#
+################################################################################
+
+ROOTFS_XFS_SIZE = $(call qstrip,$(BR2_TARGET_ROOTFS_XFS_SIZE))
+ifeq ($(BR2_TARGET_ROOTFS_XFS)-$(ROOTFS_XFS_SIZE),y-)
+$(error BR2_TARGET_ROOTFS_XFS_SIZE cannot be empty)
+endif
+
+ROOTFS_XFS_MKFS_OPTS = $(call qstrip,$(BR2_TARGET_ROOTFS_XFS_MKFS_OPTIONS))
+
+# qstrip results in stripping consecutive spaces into a single one. So the
+# variable is not qstrip-ed to preserve the integrity of the string value.
+ROOTFS_XFS_LABEL = $(subst ",,$(BR2_TARGET_ROOTFS_XFS_LABEL))
+#" comment to balance quotes/parenthesis for syntax highlighting)
+
+ROOTFS_XFS_OPTS = \
+	-f \
+	-p '$(TARGET_DIR)' \
+	-L '$(ROOTFS_XFS_LABEL)' \
+	$(ROOTFS_XFS_MKFS_OPTS)
+
+ROOTFS_XFS_DEPENDENCIES = host-xfsprogs
+
+define ROOTFS_XFS_CMD
+	$(RM) -f $@
+	truncate -s $(ROOTFS_XFS_SIZE) $@
+	$(HOST_DIR)/sbin/mkfs.xfs $(ROOTFS_XFS_OPTS) $@
+endef
+
+$(eval $(rootfs))
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 7/7] support/testing: fs: new xfs runtime test
  2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
                   ` (4 preceding siblings ...)
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 6/7] fs/xfs: add support for generating a xfs image Julien Olivain via buildroot
@ 2026-03-13 21:50 ` Julien Olivain via buildroot
  2026-03-13 22:50 ` [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Romain Naour via buildroot
  2026-03-20 15:54 ` Thomas Perale via buildroot
  7 siblings, 0 replies; 9+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-13 21:50 UTC (permalink / raw)
  To: buildroot
  Cc: Dario Binacchi, Eric Le Bihan, Julien Olivain, Philippe Proulx,
	Thomas Petazzoni

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes:
v1-> v2:
- kernel updated from 6.18.9 to 6.18.18
---
 DEVELOPERS                                    |  2 +
 support/testing/tests/fs/test_xfs.py          | 55 +++++++++++++++++++
 .../tests/fs/test_xfs/linux-xfs.fragment      |  1 +
 3 files changed, 58 insertions(+)
 create mode 100644 support/testing/tests/fs/test_xfs.py
 create mode 100644 support/testing/tests/fs/test_xfs/linux-xfs.fragment

diff --git a/DEVELOPERS b/DEVELOPERS
index ba6ba6b221..5293d94649 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1849,6 +1849,8 @@ F:	support/testing/tests/fs/test_btrfs.py
 F:	support/testing/tests/fs/test_btrfs/
 F:	support/testing/tests/fs/test_erofs.py
 F:	support/testing/tests/fs/test_erofs/
+F:	support/testing/tests/fs/test_xfs.py
+F:	support/testing/tests/fs/test_xfs/
 F:	support/testing/tests/package/sample_python_distro.py
 F:	support/testing/tests/package/sample_python_gnupg.py
 F:	support/testing/tests/package/sample_python_hwdata.py
diff --git a/support/testing/tests/fs/test_xfs.py b/support/testing/tests/fs/test_xfs.py
new file mode 100644
index 0000000000..7e4a617baf
--- /dev/null
+++ b/support/testing/tests/fs/test_xfs.py
@@ -0,0 +1,55 @@
+import os
+
+import infra.basetest
+
+
+class TestXfs(infra.basetest.BRTest):
+    kern_frag = \
+        infra.filepath("tests/fs/test_xfs/linux-xfs.fragment")
+    xfs_label = "BR_TEST"
+    config = \
+        f"""
+        BR2_aarch64=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_LINUX_KERNEL=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.18"
+        BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+        BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+        BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{kern_frag}"
+        BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+        BR2_TARGET_ROOTFS_XFS=y
+        BR2_TARGET_ROOTFS_XFS_LABEL="{xfs_label}"
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """
+
+    def test_run(self):
+        disk = os.path.join(self.builddir, "images", "rootfs.xfs")
+        kern = os.path.join(self.builddir, "images", "Image")
+        bootargs = ["root=/dev/vda"]
+        qemu_opts = ["-M", "virt", "-cpu", "cortex-a57", "-m", "512M",
+                     "-drive", f"file={disk},if=virtio,format=raw"]
+        self.emulator.boot(arch="aarch64",
+                           kernel=kern,
+                           kernel_cmdline=bootargs,
+                           options=qemu_opts)
+        self.emulator.login()
+
+        # We check our root filesystem is in xfs format.
+        cmd = "mount | grep '/dev/root on / type xfs'"
+        self.assertRunOk(cmd)
+
+        # We try to write data on the root filesystem.
+        msg = "Hello Buildroot"
+        fname = "/root/file.txt"
+        self.assertRunOk(f"echo '{msg}' > {fname}")
+
+        # We sync and drop all caches, to make sure we will read back
+        # from the filsystem.
+        self.assertRunOk("sync")
+        self.assertRunOk("echo 3 > /proc/sys/vm/drop_caches")
+
+        # We check we can read back out data.
+        out, ret = self.emulator.run(f"cat {fname}")
+        self.assertEqual(ret, 0)
+        self.assertEqual(out[0], msg)
diff --git a/support/testing/tests/fs/test_xfs/linux-xfs.fragment b/support/testing/tests/fs/test_xfs/linux-xfs.fragment
new file mode 100644
index 0000000000..32f7f6d872
--- /dev/null
+++ b/support/testing/tests/fs/test_xfs/linux-xfs.fragment
@@ -0,0 +1 @@
+CONFIG_XFS_FS=y
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel
  2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
                   ` (5 preceding siblings ...)
  2026-03-13 21:50 ` [Buildroot] [PATCH v2 7/7] support/testing: fs: new xfs runtime test Julien Olivain via buildroot
@ 2026-03-13 22:50 ` Romain Naour via buildroot
  2026-03-20 15:54 ` Thomas Perale via buildroot
  7 siblings, 0 replies; 9+ messages in thread
From: Romain Naour via buildroot @ 2026-03-13 22:50 UTC (permalink / raw)
  To: Julien Olivain, buildroot
  Cc: Dario Binacchi, Eric Le Bihan, Philippe Proulx, Thomas Petazzoni

Hello Julien, All,

Le 13/03/2026 à 22:50, Julien Olivain via buildroot a écrit :
> This commit updates the test configuration to switch to a Bootlin
> external toolchain. This is needed to get newer toolchain kernel
> headers required by newer xfsprogs versions.
> 
> xfsprogs upstream commit [1] (included in v6.15) introduced a usage
> of the "capacity" field of zoned block devices, introduced in Kernel
> commit [2], first included in v5.9.
> 
> This commit also updates the runtime test Kernel version
> to the LTS 6.18.18. This is because the default filesystem options
> of mkfs.xfs were updated in upstream commit [3] to include new
> features supported in the new Kernel 6.18.y LTS series. The commit [3]
> is included in xfsprogs v6.18.
> 
> [1] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=48ccc2459039309cfbaf358febea53a86f07827c
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=82394db7383d33641f3f565bd79792fb41b1741f
> [3] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=54aad16b4b9b923442b4042afaba4438ca1aa868
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Series applied to master, thanks.

Best regards,
Romain


> ---
> Changes:
> v1-> v2:
> - new patch, separated from the xfsprogs bump in v1
> - kernel updated from 6.18.9 to 6.18.18
> ---
>  support/testing/tests/package/test_xfsprogs.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/support/testing/tests/package/test_xfsprogs.py b/support/testing/tests/package/test_xfsprogs.py
> index a3a4bd27d8..03191aa22b 100644
> --- a/support/testing/tests/package/test_xfsprogs.py
> +++ b/support/testing/tests/package/test_xfsprogs.py
> @@ -12,10 +12,11 @@ class TestXfsProgs(infra.basetest.BRTest):
>          f"""
>          BR2_aarch64=y
>          BR2_TOOLCHAIN_EXTERNAL=y
> +        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
>          BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
>          BR2_LINUX_KERNEL=y
>          BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.37"
> +        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.18"
>          BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
>          BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
>          BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{kern_frag}"

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel
  2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
                   ` (6 preceding siblings ...)
  2026-03-13 22:50 ` [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Romain Naour via buildroot
@ 2026-03-20 15:54 ` Thomas Perale via buildroot
  7 siblings, 0 replies; 9+ messages in thread
From: Thomas Perale via buildroot @ 2026-03-20 15:54 UTC (permalink / raw)
  To: Julien Olivain; +Cc: Thomas Perale, buildroot

In reply of:
> This commit updates the test configuration to switch to a Bootlin
> external toolchain. This is needed to get newer toolchain kernel
> headers required by newer xfsprogs versions.
> 
> xfsprogs upstream commit [1] (included in v6.15) introduced a usage
> of the "capacity" field of zoned block devices, introduced in Kernel
> commit [2], first included in v5.9.
> 
> This commit also updates the runtime test Kernel version
> to the LTS 6.18.18. This is because the default filesystem options
> of mkfs.xfs were updated in upstream commit [3] to include new
> features supported in the new Kernel 6.18.y LTS series. The commit [3]
> is included in xfsprogs v6.18.
> 
> [1] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=48ccc2459039309cfbaf358febea53a86f07827c
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=82394db7383d33641f3f565bd79792fb41b1741f
> [3] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=54aad16b4b9b923442b4042afaba4438ca1aa868
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Applied to 2026.02.x. Thanks

> ---
> Changes:
> v1-> v2:
> - new patch, separated from the xfsprogs bump in v1
> - kernel updated from 6.18.9 to 6.18.18
> ---
>  support/testing/tests/package/test_xfsprogs.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/support/testing/tests/package/test_xfsprogs.py b/support/testing/tests/package/test_xfsprogs.py
> index a3a4bd27d8..03191aa22b 100644
> --- a/support/testing/tests/package/test_xfsprogs.py
> +++ b/support/testing/tests/package/test_xfsprogs.py
> @@ -12,10 +12,11 @@ class TestXfsProgs(infra.basetest.BRTest):
>          f"""
>          BR2_aarch64=y
>          BR2_TOOLCHAIN_EXTERNAL=y
> +        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
>          BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
>          BR2_LINUX_KERNEL=y
>          BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.37"
> +        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.18.18"
>          BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
>          BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
>          BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{kern_frag}"
> -- 
> 2.53.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-20 15:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13 21:50 [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Julien Olivain via buildroot
2026-03-13 21:50 ` [Buildroot] [PATCH v2 2/7] package/xfsprogs: bump version to 6.18.0 Julien Olivain via buildroot
2026-03-13 21:50 ` [Buildroot] [PATCH v2 3/7] package/inih: enable host package variant Julien Olivain via buildroot
2026-03-13 21:50 ` [Buildroot] [PATCH v2 4/7] package/liburcu: " Julien Olivain via buildroot
2026-03-13 21:50 ` [Buildroot] [PATCH v2 5/7] package/xfsprogs: " Julien Olivain via buildroot
2026-03-13 21:50 ` [Buildroot] [PATCH v2 6/7] fs/xfs: add support for generating a xfs image Julien Olivain via buildroot
2026-03-13 21:50 ` [Buildroot] [PATCH v2 7/7] support/testing: fs: new xfs runtime test Julien Olivain via buildroot
2026-03-13 22:50 ` [Buildroot] [PATCH v2 1/7] support/testing: test_xfsprogs: use bootlin toolchain, update kernel Romain Naour via buildroot
2026-03-20 15:54 ` Thomas Perale via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox