[1/3] arm/hafnium: upgrade to 2.6

Message ID 20211129142433.4019092-1-ross.burton@arm.com
State New
Headers show
Series [1/3] arm/hafnium: upgrade to 2.6 | expand

Commit Message

Ross Burton Nov. 29, 2021, 2:24 p.m. UTC
hashbang.patch isn't needed anymore, and rebase the other patches.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../hafnium/hafnium/hashbang.patch            | 34 ------------------
 .../recipes-bsp/hafnium/hafnium/host-ld.patch |  8 ++---
 .../hafnium/hafnium/pkg-config-native.patch   | 35 +++++++------------
 .../{hafnium_2.5.bb => hafnium_2.6.bb}        |  3 +-
 4 files changed, 18 insertions(+), 62 deletions(-)
 delete mode 100644 meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch
 rename meta-arm/recipes-bsp/hafnium/{hafnium_2.5.bb => hafnium_2.6.bb} (95%)

Patch

diff --git a/meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch b/meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch
deleted file mode 100644
index af77e7c7..00000000
--- a/meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch
+++ /dev/null
@@ -1,34 +0,0 @@ 
-Update Clang hashbangs to call python3 instead of python, as that doesn't exist
-in our hosttools.
-
-Upstream-Status: Backport [partial, fixed upstream]
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-diff --git a/linux-x64/clang/bin/clang b/prebuilts/linux-x64/clang/bin/clang
-index 081cb20a..ce9cc267 100755
---- a/prebuilts/linux-x64/clang/bin/clang
-+++ b/prebuilts/linux-x64/clang/bin/clang
-@@ -1 +1 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-diff --git a/prebuilts/linux-x64/clang/bin/clang++ b/prebuilts/linux-x64/clang/bin/clang++
-index 081cb20a..ce9cc267 100755
---- a/prebuilts/linux-x64/clang/bin/clang++
-+++ b/prebuilts/linux-x64/clang/bin/clang++
-@@ -1 +1 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-diff --git a/prebuilts/linux-x64/clang/bin/clang-tidy b/prebuilts/linux-x64/clang/bin/clang-tidy
-index 081cb20a..ce9cc267 100755
---- a/prebuilts/linux-x64/clang/bin/clang-tidy
-+++ b/prebuilts/linux-x64/clang/bin/clang-tidy
-@@ -1 +1 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-diff --git a/prebuilts/linux-x64/clang/bin/scan-view b/prebuilts/linux-x64/clang/bin/scan-view
-index 6165432e..07effbca 100755
---- a/prebuilts/linux-x64/clang/bin/scan-view
-+++ b/prebuilts/linux-x64/clang/bin/scan-view
-@@ -1 +1 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
diff --git a/meta-arm/recipes-bsp/hafnium/hafnium/host-ld.patch b/meta-arm/recipes-bsp/hafnium/hafnium/host-ld.patch
index 8e7fee25..040d61b2 100644
--- a/meta-arm/recipes-bsp/hafnium/hafnium/host-ld.patch
+++ b/meta-arm/recipes-bsp/hafnium/hafnium/host-ld.patch
@@ -11,11 +11,11 @@  diff --git a/build/linux/linux.gni b/build/linux/linux.gni
 index 65cc9df..19adbfb 100644
 --- a/build/linux/linux.gni
 +++ b/build/linux/linux.gni
-@@ -69,6 +70,7 @@ template("linux_kernel") {
-     "GCC_TOOLCHAIN_DIR=" + rebase_path("//prebuilts/linux-x64/gcc/bin"),
-     "ARCH=arm64",
+@@ -60,6 +60,7 @@ template("linux_kernel") {
+     "LLVM=1",
+     "LLVM_IAS=1",
      "CROSS_COMPILE=aarch64-linux-gnu-",
 +    "HOSTLDFLAGS=" + getenv("BUILD_LDFLAGS"),
- 
+
      # Build out-of-tree in `target_out_dir`.
      "O=" + rebase_path(target_out_dir),
diff --git a/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch b/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch
index 2dcf35aa..bc031956 100644
--- a/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch
+++ b/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch
@@ -1,29 +1,20 @@ 
-Use pkg-config-native to find the libssl headers. The bulk of this patch is
-actually a backport from mainline Linux, but pkg-config changed to
-pkg-config-native.
+Use pkg-config-native to find the libssl headers.
 
 Upstream-Status: Inappropriate
 Signed-off-by: Ross Burton <ross.burton@arm.com>
 
 diff --git a/scripts/Makefile b/scripts/Makefile
-index 9adb6d247818..5fe371c7d7f5 100644
+index b4b7d8b58..26a5160ee 100644
 --- a/third_party/linux/scripts/Makefile
 +++ b/third_party/linux/scripts/Makefile
-@@ -21,10 +21,15 @@ hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
- hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
- hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
- 
-+CRYPTO_CFLAGS = $(shell pkg-config-native --cflags libcrypto)
-+CRYPTO_LIBS = $(shell pkg-config-native --libs libcrypto)
-+
- HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include
- HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
--HOSTLDLIBS_sign-file = -lcrypto
--HOSTLDLIBS_extract-cert = -lcrypto
-+HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)
-+HOSTLDLIBS_sign-file = $(CRYPTO_LIBS)
-+HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
-+HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
- 
- always		:= $(hostprogs-y) $(hostprogs-m)
- 
+@@ -10,8 +10,8 @@
+
+ HOST_EXTRACFLAGS += -I$(srctree)/tools/include
+
+-CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
+-CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null)
++CRYPTO_LIBS = $(shell pkg-config-native --libs libcrypto 2> /dev/null || echo -lcrypto)
++CRYPTO_CFLAGS = $(shell pkg-config-native --cflags libcrypto 2> /dev/null)
+
+ hostprogs-$(CONFIG_BUILD_BIN2C)  += bin2c
+ hostprogs-$(CONFIG_KALLSYMS)     += kallsyms
diff --git a/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb b/meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb
similarity index 95%
rename from meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb
rename to meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb
index ad00f290..b9dc63bc 100644
--- a/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb
+++ b/meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb
@@ -10,11 +10,10 @@  PACKAGE_ARCH = "${MACHINE_ARCH}"
 inherit deploy python3native pkgconfig
 
 SRC_URI = "gitsm://git.trustedfirmware.org/hafnium/hafnium.git;protocol=https;branch=master \
-           file://hashbang.patch \
            file://host-ld.patch \
            file://pkg-config-native.patch \
            file://native-dtc.patch"
-SRCREV = "3a149eb219467c0d9336467ea1fb9d3fb65da94b"
+SRCREV = "55b74f893948dd08d2782dd8fa9e903c143a6704"
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"