[v2,2/2] Fix u-boot build for u-boot-de0-nano-soc for buster

Message ID 20260226162019.1931890-3-wzh@ilbers.de
State Under Review
Headers show
Series Fix build failures on de0-nano-soc-buster | expand

Commit Message

Zhihang Wei Feb. 26, 2026, 4:20 p.m. UTC
From: Uladzimir Bely <ubely@ilbers.de>

Workaround the following build error:

make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_install
   dh_installdocs
   dh_installchangelogs
   dh_perl
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_missing
   dh_dwz
dwz: Too few files for multifile optimization
arm-linux-gnueabihf-objcopy: 'debian/u-boot-tools/usr/lib/debug/.dwz/arm-linux-gnueabihf/u-boot-tools.debug': No such file
dh_dwz: arm-linux-gnueabihf-objcopy --compress-debug-sections debian/u-boot-tools/usr/lib/debug/.dwz/arm-linux-gnueabihf/u-boot-tools.debug returned exit code 1
make: *** [debian/rules:34: binary] Error 2

Buster uses an older debhelper version. Ignore the missing debug
symbols file.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
Signed-off-by: Zhihang Wei <wzh@ilbers.de>
---
 .../recipes-bsp/u-boot/u-boot-de0-nano-soc_2020.10.bb     | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2020.10.bb b/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2020.10.bb
index feecd96d..1e470518 100644
--- a/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2020.10.bb
+++ b/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2020.10.bb
@@ -9,3 +9,11 @@  require u-boot-${PV}.inc
 U_BOOT_TOOLS_PACKAGE = "1"
 
 COMPATIBLE_MACHINE = "^(de0-nano-soc)$"
+
+do_prepare_build:append:buster() {
+	echo =-=-=
+cat << _EOF_ >> ${S}/debian/rules
+override_dh_dwz:
+	dh_dwz || :
+_EOF_
+}