Skip to contentSkip to conversation

linux-firmware: upgrade 20240909 -> 20250311

PATCH Superseded Hiago De Franco 4 participants 5 messages Mar 25, 2025 – Mar 26, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-firmware: upgrade 20240909 -> 20250311

From: Hiago De Franco <[email protected]>

Update the linux-firmware recipe to the most recent upstream tag.

Since commit 515022675f81 ("make: separate installation and de-duplication targets") in linux-firmware, 'install-nodedup' no longer exists. Adapt the do_install function to accommodate these changes, as done in the oe-core master branch.

---
 ...20240909.bb => linux-firmware_20250311.bb} | 24 ++++++++++++++-----
 1 file changed, 18 insertions(+), 6 deletions(-)
 rename meta/recipes-kernel/linux-firmware/{linux-firmware_20240909.bb => linux-firmware_20250311.bb} (99%)
meta/recipes-kernel/linux-firmware/linux-firmware_20250311.bb renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20240909.bb +18 -6
similarity index 99%
rename from meta/recipes-kernel/linux-firmware/linux-firmware_20240909.bb
rename to meta/recipes-kernel/linux-firmware/linux-firmware_20250311.bb
index 30c47d772088..2ba362ed3b33 100644
@@ -154,7 +154,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
                     "
 # WHENCE checksum is defined separately to ease overriding it if
 # class-devupstream is selected.
-WHENCE_CHKSUM  = "6ae5ffd807c84809977286ad0b37acdb"
+WHENCE_CHKSUM  = "886924eb733c4efcec21dff980795771"
 
 # These are not common licenses, set NO_GENERIC_LICENSE for them
 # so that the license files will be copied from fetched source
@@ -241,23 +241,35 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw
 # Pin this to the 20220509 release, override this in local.conf
 SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae"
 
-SRC_URI[sha256sum] = "943fbd19883cf8eadf89e0b22422549db056557b1ecd30a56400615971369671"
+SRC_URI[sha256sum] = "b1083a36f19aea46f661dcfd4cd462d13933dcb4e7f0dc809525552dd5c3541d"
 
 inherit allarch
 
 CLEANBROKEN = "1"
 
-# Use PACKAGECONFIG_CONFARGS to set the Makefile target
 PACKAGECONFIG ??= ""
-# Enabling dedup will turn duplicate firmware files into links
-PACKAGECONFIG[deduplicate] = "install,install-nodedup,rdfind-native"
+PACKAGECONFIG[deduplicate] = ",,rdfind-native"
+
+# Possible values are "xz" and "zst".
+FIRMWARE_COMPRESSION ?= ""
+
+def fw_compr_suffix(d):
+    compr = d.getVar('FIRMWARE_COMPRESSION')
+    if compr == '':
+        return ''
+    return '-' + compr
 
 do_compile() {
 	:
 }
 
 do_install() {
-        oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' ${PACKAGECONFIG_CONFARGS}
+        sed -i 's:^./check_whence.py:#./check_whence.py:' ${S}/copy-firmware.sh
+
+        oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' install${@fw_compr_suffix(d)}
+        if [ "${@bb.utils.contains('PACKAGECONFIG', 'deduplicate', '1', '0', d)}" = "1" ]; then
+                oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' dedup
+        fi
         cp LICEN[CS]E.* WHENCE ${D}${nonarch_base_libdir}/firmware/
 }
 
Signature · 1 line
2.39.5
#1 lore raw

Hi Hiago,

I'm getting build errors with this patch:

https://errors.yoctoproject.org/Errors/Details/849582/

I think you will need to add a PARALLEL_MAKE fix similar to what was done in master:

https://github.com/openembedded/openembedded-core/commit/16e86b63696177a6f8b8f73b41e55dd6389f9e1c

(linking to the github mirror since our git infrastructure is under attack at the moment)

Please submit a V2 with this addition.

Thanks!

Steve

Quoted 85 lines · Hiago De Franco via lists.openembedded.org

From: Hiago De Franco <[email protected]>

Update the linux-firmware recipe to the most recent upstream tag.

Since commit 515022675f81 ("make: separate installation and de-duplication targets") in linux-firmware, 'install-nodedup' no longer exists. Adapt the do_install function to accommodate these changes, as done in the oe-core master branch.

---
 ...20240909.bb => linux-firmware_20250311.bb} | 24 ++++++++++++++-----
 1 file changed, 18 insertions(+), 6 deletions(-)
 rename meta/recipes-kernel/linux-firmware/{linux-firmware_20240909.bb => linux-firmware_20250311.bb} (99%)
meta/recipes-kernel/linux-firmware/linux-firmware_20250311.bb renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20240909.bb +18 -7
similarity index 99%
rename from meta/recipes-kernel/linux-firmware/linux-firmware_20240909.bb
rename to meta/recipes-kernel/linux-firmware/linux-firmware_20250311.bb
index 30c47d772088..2ba362ed3b33 100644
@@ -154,7 +154,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
                     "
 # WHENCE checksum is defined separately to ease overriding it if
 # class-devupstream is selected.
-WHENCE_CHKSUM  = "6ae5ffd807c84809977286ad0b37acdb"
+WHENCE_CHKSUM  = "886924eb733c4efcec21dff980795771"
 
 # These are not common licenses, set NO_GENERIC_LICENSE for them
 # so that the license files will be copied from fetched source
@@ -241,23 +241,35 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw
 # Pin this to the 20220509 release, override this in local.conf
 SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae"
 
-SRC_URI[sha256sum] = "943fbd19883cf8eadf89e0b22422549db056557b1ecd30a56400615971369671"
+SRC_URI[sha256sum] = "b1083a36f19aea46f661dcfd4cd462d13933dcb4e7f0dc809525552dd5c3541d"
 
 inherit allarch
 
 CLEANBROKEN = "1"
 
-# Use PACKAGECONFIG_CONFARGS to set the Makefile target
 PACKAGECONFIG ??= ""
-# Enabling dedup will turn duplicate firmware files into links
-PACKAGECONFIG[deduplicate] = "install,install-nodedup,rdfind-native"
+PACKAGECONFIG[deduplicate] = ",,rdfind-native"
+
+# Possible values are "xz" and "zst".
+FIRMWARE_COMPRESSION ?= ""
+
+def fw_compr_suffix(d):
+    compr = d.getVar('FIRMWARE_COMPRESSION')
+    if compr == '':
+        return ''
+    return '-' + compr
 
 do_compile() {
        :
 }
 
 do_install() {
-        oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' ${PACKAGECONFIG_CONFARGS}
+        sed -i 's:^./check_whence.py:#./check_whence.py:' ${S}/copy-firmware.sh
+
+        oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' install${@fw_compr_suffix(d)}
+        if [ "${@bb.utils.contains('PACKAGECONFIG', 'deduplicate', '1', '0', d)}" = "1" ]; then
+                oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' dedup
+        fi
         cp LICEN[CS]E.* WHENCE ${D}${nonarch_base_libdir}/firmware/
 }
 
--

2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#213622): https://lists.openembedded.org/g/openembedded-core/message/213622
Mute This Topic: https://lists.openembedded.org/mt/111906654/3620601
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi Steve and Hiago,

This makes me very uneasy.

Ideally we should be backporting all/most commits from master instead of doing a big upgrade from 20240909 to 20250311. Additionally, we need to guarantee backward compatibility with current users of scarthgap, so this means not blindly backporting as some files are moved around or split into different packages, we need to make sure if files were renamed to have symlinks too, and in the appropriate packages.

Cheers,
Quentin

Quoted 112 lines · Steve Sakoman via lists.openembedded.org

Hi Hiago,

I'm getting build errors with this patch:

https://errors.yoctoproject.org/Errors/Details/849582/

I think you will need to add a PARALLEL_MAKE fix similar to what was done in master:

https://github.com/openembedded/openembedded-core/commit/16e86b63696177a6f8b8f73b41e55dd6389f9e1c

(linking to the github mirror since our git infrastructure is under attack at the moment)

Please submit a V2 with this addition.

Thanks!

Steve

Quoted 89 lines · Hiago De Franco via lists.openembedded.org

From: Hiago De Franco <[email protected]>

Update the linux-firmware recipe to the most recent upstream tag.

Since commit 515022675f81 ("make: separate installation and de-duplication targets") in linux-firmware, 'install-nodedup' no longer exists. Adapt the do_install function to accommodate these changes, as done in the oe-core master branch.

---
  ...20240909.bb => linux-firmware_20250311.bb} | 24 ++++++++++++++-----
  1 file changed, 18 insertions(+), 6 deletions(-)

rename meta/recipes-kernel/linux-firmware/{linux-firmware_20240909.bb => linux-firmware_20250311.bb} (99%)

meta/recipes-kernel/linux-firmware/linux-firmware_20250311.bb renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20240909.bb +18 -7
similarity index 99%
rename from meta/recipes-kernel/linux-firmware/linux-firmware_20240909.bb
rename to meta/recipes-kernel/linux-firmware/linux-firmware_20250311.bb
index 30c47d772088..2ba362ed3b33 100644
@@ -154,7 +154,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
                      "
  # WHENCE checksum is defined separately to ease overriding it if
  # class-devupstream is selected.
-WHENCE_CHKSUM  = "6ae5ffd807c84809977286ad0b37acdb"
+WHENCE_CHKSUM  = "886924eb733c4efcec21dff980795771"
 
  # These are not common licenses, set NO_GENERIC_LICENSE for them
  # so that the license files will be copied from fetched source
@@ -241,23 +241,35 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw
  # Pin this to the 20220509 release, override this in local.conf
  SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae"
 
-SRC_URI[sha256sum] = "943fbd19883cf8eadf89e0b22422549db056557b1ecd30a56400615971369671"
+SRC_URI[sha256sum] = "b1083a36f19aea46f661dcfd4cd462d13933dcb4e7f0dc809525552dd5c3541d"
 
  inherit allarch
 
  CLEANBROKEN = "1"
 
-# Use PACKAGECONFIG_CONFARGS to set the Makefile target
  PACKAGECONFIG ??= ""
-# Enabling dedup will turn duplicate firmware files into links
-PACKAGECONFIG[deduplicate] = "install,install-nodedup,rdfind-native"
+PACKAGECONFIG[deduplicate] = ",,rdfind-native"
+
+# Possible values are "xz" and "zst".
+FIRMWARE_COMPRESSION ?= ""
+
+def fw_compr_suffix(d):
+    compr = d.getVar('FIRMWARE_COMPRESSION')
+    if compr == '':
+        return ''
+    return '-' + compr
 
  do_compile() {
         :
  }
 
  do_install() {
-        oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' ${PACKAGECONFIG_CONFARGS}
+        sed -i 's:^./check_whence.py:#./check_whence.py:' ${S}/copy-firmware.sh
+
+        oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' install${@fw_compr_suffix(d)}
+        if [ "${@bb.utils.contains('PACKAGECONFIG', 'deduplicate', '1', '0', d)}" = "1" ]; then
+                oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' dedup
+        fi
          cp LICEN[CS]E.* WHENCE ${D}${nonarch_base_libdir}/firmware/
  }
 
--

2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#213649): https://lists.openembedded.org/g/openembedded-core/message/213649
Mute This Topic: https://lists.openembedded.org/mt/111906654/6293953
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
Quoted 4 lines · Quentin Schulz via lists.openembedded.org

Hi Steve and Hiago,

This makes me very uneasy.

Quoted 8 lines

Ideally we should be backporting all/most commits from master instead of
doing a big upgrade from 20240909 to 20250311. Additionally, we need to
guarantee backward compatibility with current users of scarthgap, so this means not blindly backporting as some files are moved around or split into different packages, we need to make sure if files were renamed to have symlinks too, and in the appropriate packages.

I'd add that the firmware upgrades have been a consistent source of packaging problems more recently, lots of follow up fixes :(

Cheers,

Richard

#4 lore raw

Hi Richard, Quentin and Steve,

Thanks for the reviews.

I got the idea now, I will then backport the patches from master into styhead and scarthgap and send a v2. I also plan to do the same with kirkstone.

Cheers,

Hiago.