[2/3] dtc: update to version 1.7.1 and move to before qemu build

Message ID 20240904185126.527126-2-adolf.belka@ipfire.org
State Staged
Commit 82c9e495d595f70a5d5d30c1ea8dd98bd5069c65
Headers
Series [1/3] qemu: Update to version 9.0.2 |

Commit Message

Adolf Belka Sept. 4, 2024, 6:51 p.m. UTC
  - Update from version 1.6.1 to 1.7.1
- Move to before qemu build as it now requires a system libfdt for build as the bundled
   version has been removed.
- Change HOME= to HOME=/usr so that the include files are placed in /usr/include which
   is where qemu is looking for them when it checks that libfdt is available.
- Update disable_Werror patch to take account of differences in the source tarball
- Update of architectures from only aarch64 to all.
- Move rootfile from common/aarch64 to common/
- The previous fdt python files were commented out, hence not used at runtime and are
   not needed at buildtime. From 9.0.1 onwards they require swig and python to be built
   but as they are not needed there was no point to move swig to before dtc
- Changelog
    1.7.1
	 * dtc
	   * Fix -Oasm output on PA-RISC by avoiding ';' separators
	   * Put symbolic label references in -Odts output when possible
	   * Add label relative path references
	   * Don't incorrectly attempt to create fixups for reference to path
	     in overlays
	   * Warning rather than hard error if integer expression results are
	     truncated due to cell size
	 * libfdt
	   * Add fdt_get_property_by_offset_w() function
	 * pylibfdt
	   * Fixed to work with Python 3.10
	   * A number of extra methods
	   * Fix out of tree build
	 * fdtget
	   * Add raw bytes output mode
	 * General
	   * Fixes for mixed-signedness comparison warnings
	   * Assorted other warning fixes
	   * Assorted updates to checks
	   * Assorted bugfixes
	   * Fix scripts to work with dash as well as bash
	   * Allow static builds
	   * Formalize Signed-off-by usage

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/common/aarch64/dtc           | 28 -------------------
 config/rootfiles/common/dtc                   | 14 ++++++++++
 lfs/dtc                                       | 12 ++++----
 make.sh                                       |  2 +-
 .../dtc/dtc-1.6.1-disable_Werror.patch        | 12 --------
 .../dtc/dtc-1.7.1-disable_Werror.patch        | 12 ++++++++
 6 files changed, 32 insertions(+), 48 deletions(-)
 delete mode 100644 config/rootfiles/common/aarch64/dtc
 create mode 100644 config/rootfiles/common/dtc
 delete mode 100644 src/patches/dtc/dtc-1.6.1-disable_Werror.patch
 create mode 100644 src/patches/dtc/dtc-1.7.1-disable_Werror.patch
  

Patch

diff --git a/config/rootfiles/common/aarch64/dtc b/config/rootfiles/common/aarch64/dtc
deleted file mode 100644
index 8f0996452..000000000
--- a/config/rootfiles/common/aarch64/dtc
+++ /dev/null
@@ -1,28 +0,0 @@ 
-#bin/convert-dtsv0
-#bin/dtc
-#bin/dtdiff
-#bin/fdtdump
-#bin/fdtget
-#bin/fdtoverlay
-#bin/fdtput
-#include
-#include/fdt.h
-#include/libfdt.h
-#include/libfdt_env.h
-#lib/libfdt-1.6.1.so
-#lib/libfdt.a
-#lib/libfdt.so
-#lib/libfdt.so.1
-#lib/python3.10
-#lib/python3.10/site-packages
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/PKG-INFO
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/SOURCES.txt
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/dependency_links.txt
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/native_libs.txt
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/not-zip-safe
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/top_level.txt
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/_libfdt.cpython-310-aarch64-linux-gnu.so
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/_libfdt.py
-#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/libfdt.py
diff --git a/config/rootfiles/common/dtc b/config/rootfiles/common/dtc
new file mode 100644
index 000000000..95aa9bb88
--- /dev/null
+++ b/config/rootfiles/common/dtc
@@ -0,0 +1,14 @@ 
+#usr/bin/convert-dtsv0
+#usr/bin/dtc
+#usr/bin/dtdiff
+#usr/bin/fdtdump
+#usr/bin/fdtget
+#usr/bin/fdtoverlay
+#usr/bin/fdtput
+#usr/include/fdt.h
+#usr/include/libfdt.h
+#usr/include/libfdt_env.h
+#usr/lib/libfdt.a
+#usr/lib/libfdt.so
+#usr/lib/libfdt.so.1
+#usr/lib/libfdt.so.1.7.1
diff --git a/lfs/dtc b/lfs/dtc
index 3e6cfed07..b3069b56e 100644
--- a/lfs/dtc
+++ b/lfs/dtc
@@ -1,7 +1,7 @@ 
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2021  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2024  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -24,7 +24,7 @@ 
 
 include Config
 
-VER        = 1.6.1
+VER        = 1.7.1
 
 THISAPP    = dtc-$(VER)
 DL_FILE    = $(THISAPP).tar.xz
@@ -32,8 +32,6 @@  DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
-SUP_ARCH   = aarch64
-
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -42,7 +40,7 @@  objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_BLAKE2 = c6fd93ede494923bcad1ac9aabe328f13333d70ccb52c048b085392cc5ebfe886c442bd95733a14044381b65a6eca130c57c473e6a5f8573e301dbe52cc4875d
+$(DL_FILE)_BLAKE2 = c9d9d7c60ce13c8e138ab8ddf3e8166d7cf3867ca4e5ea53621bf73514319faf6a6bac09fb96c971554db9f77dd3428e01d53990586041092a64849685d8854b
 
 install : $(TARGET)
 
@@ -73,9 +71,9 @@  $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
 
-	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dtc/dtc-1.6.1-disable_Werror.patch
+	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/dtc/dtc-1.7.1-disable_Werror.patch
 
 	cd $(DIR_APP) && make HOME= $(MAKETUNING)
-	cd $(DIR_APP) && make HOME= install
+	cd $(DIR_APP) && make HOME=/usr install
 	@rm -rf $(DIR_APP)
 	@$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 9b2e0ee70..bba35de41 100755
--- a/make.sh
+++ b/make.sh
@@ -1908,6 +1908,7 @@  build_system() {
 	lfsmake2 libusbredir
 	lfsmake2 libseccomp
 	lfsmake2 libslirp
+	lfsmake2 dtc
 	lfsmake2 qemu
 	lfsmake2 netsnmpd
 	lfsmake2 nagios_nrpe
@@ -1968,7 +1969,6 @@  build_system() {
 	lfsmake2 ddrescue
 	lfsmake2 parted
 	lfsmake2 swig
-	lfsmake2 dtc
 	lfsmake2 u-boot
 	lfsmake2 wireless-regdb
 	lfsmake2 ddns
diff --git a/src/patches/dtc/dtc-1.6.1-disable_Werror.patch b/src/patches/dtc/dtc-1.6.1-disable_Werror.patch
deleted file mode 100644
index 89870df81..000000000
--- a/src/patches/dtc/dtc-1.6.1-disable_Werror.patch
+++ /dev/null
@@ -1,12 +0,0 @@ 
-diff -Naur dtc-1.6.1.org/Makefile dtc-1.6.1/Makefile
---- dtc-1.6.1.org/Makefile	2021-06-08 07:00:49.000000000 +0000
-+++ dtc-1.6.1/Makefile	2021-10-01 07:57:58.344551140 +0000
-@@ -23,7 +23,7 @@
- CPPFLAGS = -I libfdt -I . -DFDT_ASSUME_MASK=$(ASSUME_MASK)
- WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
- 	-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
--CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
-+CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) $(EXTRA_CFLAGS)
- 
- BISON = bison
- LEX = flex
diff --git a/src/patches/dtc/dtc-1.7.1-disable_Werror.patch b/src/patches/dtc/dtc-1.7.1-disable_Werror.patch
new file mode 100644
index 000000000..332c09859
--- /dev/null
+++ b/src/patches/dtc/dtc-1.7.1-disable_Werror.patch
@@ -0,0 +1,12 @@ 
+diff -Naur dtc-1.7.1.orig/Makefile dtc-1.7.1/Makefile
+--- dtc-1.7.1.orig/Makefile	2024-08-17 10:22:16.000000000 +0200
++++ dtc-1.7.1/Makefile	2024-09-03 11:41:19.125603922 +0200
+@@ -21,7 +21,7 @@
+ WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs -Wsign-compare \
+ 	-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow \
+ 	-Wsuggest-attribute=format -Wwrite-strings
+-CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
++CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) $(EXTRA_CFLAGS)
+ 
+ BISON = bison
+ LEX = flex