mmc-utils: update to upstream's 8f41ccbb40b8 commit
authorMichael Heimpold <redacted>
Sun, 18 Jan 2026 12:09:23 +0000 (13:09 +0100)
committerMichael Heimpold <redacted>
Wed, 21 Jan 2026 17:54:04 +0000 (18:54 +0100)
Summary of upstream's highlight changes:
- recognize ext_csd_rev 9
- fix CID manufacturing date decoding
- add ability to flush optional eMMC cache
- upcoming versioning
- RPMB handling refactoring
- improved FFU support
- doc/help refactoring/cleanups

This also requires updating our patch for fortify-ing and
we need to add a flag to disable a call to 'sparse' tool.

Signed-off-by: Michael Heimpold <redacted>
utils/mmc-utils/Makefile
utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch [deleted file]
utils/mmc-utils/patches/0001-Drop-_FORTIFY_SOURCE-and-prevent-calls-to-git.patch [new file with mode: 0644]

index 3d83b5b0f0e1e4778bad8c42dca2505b7af4c134..dd720cb1bde76d3e16cbe0b73ef3dbb8d4e7ae21 100644 (file)
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git
-PKG_SOURCE_DATE:=2024-03-05
-PKG_SOURCE_VERSION:=e1281d4de9166b7254ba30bb58f9191fc2c9e7fb
-PKG_MIRROR_HASH:=b5f760e679aeafb48c14dba72dbc6764a10ae5a43eda38d4525c4f535dbbab63
+PKG_SOURCE_DATE:=2025-12-21
+PKG_SOURCE_VERSION:=8f41ccbb40b887325f243bd73695a9e814610520
+PKG_MIRROR_HASH:=89fcbf96113e9407dc0890bff71425daed73c20f8a83a8fdadcc69916a32881f
 
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=
@@ -41,7 +41,7 @@ endef
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 \
-               -UVERSION -DVERSION=\\\"$(shell echo $(PKG_SOURCE_VERSION) | cut -c -6)\\\"" \
+               -UVERSION -DVERSION=\\\"$(shell echo $(PKG_SOURCE_VERSION) | cut -c -6)\\\"" C=0 \
                mmc
 endef
 
diff --git a/utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch b/utils/mmc-utils/patches/0000-properly-set-fortify-source-in-makefile.patch
deleted file mode 100644 (file)
index de976ca..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,6 @@
- CC ?= gcc
- GIT_VERSION := "$(shell git describe --abbrev=6 --always --tags)"
--AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 \
-+AM_CFLAGS = -D_FILE_OFFSET_BITS=64 \
-           -DVERSION=\"$(GIT_VERSION)\"
- CFLAGS ?= -g -O2
- objects = \
diff --git a/utils/mmc-utils/patches/0001-Drop-_FORTIFY_SOURCE-and-prevent-calls-to-git.patch b/utils/mmc-utils/patches/0001-Drop-_FORTIFY_SOURCE-and-prevent-calls-to-git.patch
new file mode 100644 (file)
index 0000000..13ebccc
--- /dev/null
@@ -0,0 +1,35 @@
+From 8a310d1bbb03d158220483e5de607d42ad5b4e2e Mon Sep 17 00:00:00 2001
+From: Michael Heimpold <mhei@heimpold.de>
+Date: Sun, 18 Jan 2026 21:52:49 +0100
+Subject: [PATCH] Drop _FORTIFY_SOURCE and prevent calls to git
+
+The fortify level is set globally in OpenWrt so it would
+be redefined when passed via CFLAGS and it would trigger
+a build error. To prevent this, dont set it here. Later,
+the previously/globally defined one (the OpenWrt one) is
+passed, but then unset and re-set again via Makefile to
+the originally desired one.
+
+Comment also out calls to git for version detection.
+We pass the version from the package definition to Makefile
+and operate not on a git checkout thus the calls would fail.
+
+Signed-off-by: Michael Heimpold <mhei@heimpold.de>
+---
+ Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,9 @@
+ CC ?= gcc
+ # GIT_VERSION is set to the latest tag, number of commits since that tag, and the date of the last commit
+ # e.g., v1.0-5-2023-10-01
+-GIT_VERSION := "$(shell git describe --abbrev=0 --tags)-$$(git rev-list --count $$(git describe --abbrev=0 --tags)..HEAD)-$$(git log -1 --format=%cd --date=short)"
+-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 \
++#GIT_VERSION := "$(shell git describe --abbrev=0 --tags)-$$(git rev-list --count $$(git describe --abbrev=0 --tags)..HEAD)-$$(git log -1 --format=%cd --date=short)"
++GIT_VERSION := "unknown"
++AM_CFLAGS = -D_FILE_OFFSET_BITS=64 \
+           -DVERSION=\"$(GIT_VERSION)\"
+ CFLAGS ?= -g -O2
+ objects = \
git clone https://git.99rst.org/PROJECT