Skip to contentSkip to conversation

arm-toolchain/external-arm-toolchain: fix missing license updates

PATCH New Jon Mason 1 participant 8 messages Feb 25, 2022

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/8 arm-toolchain/external-arm-toolchain: fix missing license updates

From: Ross Burton <[email protected]>

Commit 53a40b1 updates the license names to use the SPDX terms, but as intermediate variables are used in this recipe a few instances were missed.

---
 .../recipes-devtools/external-arm-toolchain/license.inc   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc +4 -4
index 10f2542292b4..4260dc710d7d 100644
@@ -1,9 +1,9 @@
 LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only & GPL-2.0-only & LGPL-3.0-only & LGPL-2.1-only & LGPL-2.0-only"
 
-EAT_BFD_LICENSE = "GPL-3.0"
-EAT_GCC_LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-EAT_GDB_LICENSE = "GPL-3.0"
-EAT_LIBC_LICENSE = "GPLv2 & LGPLv2.1"
+EAT_BFD_LICENSE = "GPL-3.0-only"
+EAT_GCC_LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
+EAT_GDB_LICENSE = "GPL-3.0-only"
+EAT_LIBC_LICENSE = "GPL-2.0-only & LGPL-2.1-only"
 EAT_RLE_LICENSE = "GPL-3.0-with-GCC-exception"
 
 LICENSE:${PN} = "${EAT_LIBC_LICENSE}"
Signature · 1 line
2.30.2
author
#1 lore raw

PATCH 2/8 arm/edk2-firmware: expand comment

From: Ross Burton <[email protected]>

We currently disable release builds with Clang, but it appears the underlying issue has been fixed upstream so make a note that we should be able to turn release builds back on with EDK2 202202.

---
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +2 -1
index 8057e8870212..b1595e858b25 100644
@@ -27,7 +27,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 EDK2_BUILD_RELEASE = "1"
 # Release builds don't work with clang yet:
-# https://bugzilla.tianocore.org/show_bug.cgi?id=3758
+# https://bugzilla.tianocore.org/show_bug.cgi?id=3758.
+# Can be removed in 202202 (c9b7c6e)
 EDK2_BUILD_RELEASE:toolchain-clang = "0"
 
 EDK2_PLATFORM      = "unset"
Signature · 1 line
2.30.2
author
#2 lore raw

PATCH 3/8 arm/edk2-firmware: unbreak builds with latest Clang

In reply to Jon Mason

From: Ross Burton <[email protected]>

The latest Clang produced unaligned access warnings, which EDK2 promotes to errors with -Werror.

edk2/MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h:78:47:
error: field Guid within 'FPDT_GUID_EVENT_RECORD' is less aligned than 'EFI_GUID' and is usually due to 'FPDT_GUID_EVENT_RECORD' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]

This has been reported upstream so for now ignore this warning.

---
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc   |  1 +
 .../recipes-bsp/uefi/files/unaligned.patch    | 27 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/uefi/files/unaligned.patch
meta-arm/recipes-bsp/uefi/edk2-firmware.inc +1 -0
index b1595e858b25..dc561eeff971 100644
@@ -17,6 +17,7 @@ SRC_URI = "\
     ${EDK2_SRC_URI};name=edk2;destsuffix=edk2;nobranch=1 \
     ${EDK2_PLATFORMS_SRC_URI};name=edk2-platforms;destsuffix=edk2/edk2-platforms;nobranch=1 \
     file://0001-Fix-VLA-parameter-warning.patch \
+    file://unaligned.patch \
 "
 
 SRCREV_FORMAT         = "edk2_edk2-platforms"
meta-arm/recipes-bsp/uefi/files/unaligned.patch new file +27 -0
new file mode 100644
index 000000000000..1930f4c741f9
@@ -0,0 +1,27 @@
+Latest clang is causing build failures because -Werror is used:
+
+  edk2/MdeModulePkg/Include/Guid/ExtendedFirmwarePerformance.h:78:47:
+  error: field Guid within 'FPDT_GUID_EVENT_RECORD' is less aligned than 'EFI_GUID'
+  and is usually due to 'FPDT_GUID_EVENT_RECORD' being packed, which can lead to
+  unaligned accesses [-Werror,-Wunaligned-access]
+
+This has been reported upstream[1] so until this is resolved, ignore the warnings.
+
+[1] https://edk2.groups.io/g/devel/message/86838
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <[email protected]>
+
+diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
+index 2e6b382ab6..75bfbc5ae6 100755
+--- a/BaseTools/Conf/tools_def.template
++++ b/BaseTools/Conf/tools_def.template
+@@ -2566,7 +2566,7 @@ DEFINE CLANG38_X64_PREFIX           = ENV(CLANG38_BIN)
+ DEFINE CLANG38_IA32_TARGET          = -target i686-pc-linux-gnu
+ DEFINE CLANG38_X64_TARGET           = -target x86_64-pc-linux-gnu
+ 
+-DEFINE CLANG38_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option
++DEFINE CLANG38_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-error=unaligned-access
+ DEFINE CLANG38_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float  -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference
+ 
+ ###########################
Signature · 1 line
2.30.2
author
#3 lore raw

PATCH 4/8 CI: apply a patch so that meta-zephyr is compatible with kirkstone

In reply to Jon Mason

From: Ross Burton <[email protected]>

---
 ...-kirkstone-to-layer-compatible-lists.patch | 49 +++++++++++++++++++
 ci/meta-zephyr.yml                            |  4 ++
 2 files changed, 53 insertions(+)
 create mode 100644 0001-layer.conf-add-kirkstone-to-layer-compatible-lists.patch
0001-layer.conf-add-kirkstone-to-layer-compatible-lists.patch new file +49 -0
new file mode 100644
index 000000000000..8476e0ac37bb
@@ -0,0 +1,49 @@
+From b49ad47797c6364b351ffdac6ff8c627368962c3 Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Wed, 23 Feb 2022 13:39:39 +0000
+Subject: [meta-zephyr][PATCH] layer.conf: add kirkstone to layer compatible
+ lists
+
+Add Kirkstone to the layer compatbility list now that oe-core master
+only support kirkstone.
+
+Many variables were renamed in oe-core, but as none of them are used in
+meta-zephyr this layer can remain compatible with older layers too.
+
+Signed-off-by: Ross Burton <[email protected]>
+---
+ meta-zephyr-bsp/conf/layer.conf  | 4 ++--
+ meta-zephyr-core/conf/layer.conf | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/meta-zephyr-bsp/conf/layer.conf b/meta-zephyr-bsp/conf/layer.conf
+index d5d478c..507374f 100644
+--- a/meta-zephyr-bsp/conf/layer.conf
++++ b/meta-zephyr-bsp/conf/layer.conf
+@@ -15,6 +15,6 @@ LAYERVERSION_zephyrbsp = "1"
+ 
+ LAYERDEPENDS_zephyrbsp = "zephyrcore core meta-python"
+ 
+-LAYERSERIES_COMPAT_zephyrbsp = "dunfell gatesgarth hardknott honister"
++LAYERSERIES_COMPAT_zephyrbsp = "dunfell gatesgarth hardknott honister kirkstone"
+ 
+-X86_TUNE_DIR = "${@bb.utils.contains('LAYERSERIES_CORENAMES', 'honister', 'include/x86', 'include', d)}"
++X86_TUNE_DIR = "${@bb.utils.contains_any('LAYERSERIES_CORENAMES', 'honister kirkstone', 'include/x86', 'include', d)}"
+diff --git a/meta-zephyr-core/conf/layer.conf b/meta-zephyr-core/conf/layer.conf
+index d3ac10e..20c8fdf 100644
+--- a/meta-zephyr-core/conf/layer.conf
++++ b/meta-zephyr-core/conf/layer.conf
+@@ -15,8 +15,8 @@ LAYERVERSION_zephyrcore = "1"
+ 
+ LAYERDEPENDS_zephyrcore = "core meta-python"
+ 
+-LAYERSERIES_COMPAT_zephyrcore = "dunfell gatesgarth hardknott honister"
++LAYERSERIES_COMPAT_zephyrcore = "dunfell gatesgarth hardknott honister kirkstone"
+ 
+-X86_TUNE_DIR = "${@bb.utils.contains('LAYERSERIES_CORENAMES', 'honister', 'include/x86', 'include', d)}"
++X86_TUNE_DIR = "${@bb.utils.contains_any('LAYERSERIES_CORENAMES', 'honister kirkstone', 'include/x86', 'include', d)}"
+ 
+ PYTHON3_NATIVE_SITEPACKAGES_DIR = "${libdir_native}/${PYTHON3_DIR}/site-packages"
+-- 
+2.25.1
+
ci/meta-zephyr.yml +4 -0
index bdd0e2bbb9c6..5675cc0eb4f9 100644
@@ -8,6 +8,10 @@ repos:
     url: https://git.yoctoproject.org/git/meta-zephyr
     layers:
       meta-zephyr-core:
+    patches:
+      kirkstone:
+        repo: meta-arm
+        path: 0001-layer.conf-add-kirkstone-to-layer-compatible-lists.patch
 
 target:
   - zephyr-kernel-test-all
Signature · 1 line
2.30.2
author
#4 lore raw

PATCH 5/8 arm/scp-firmware: disable clang builds

In reply to Jon Mason

From: Ross Burton <[email protected]>

We only build with our binary GCC right now, so disable clang from trying to get involved. This solves the missing strip problem where do_populate_sysroot wants to use llvm-strip but it hasn't been added to the sysroot.

---
 meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.9.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.9.0.bb +2 -0
index 89d4a34f1c16..f95d968f668c 100644
@@ -19,6 +19,8 @@ SCP_LOG_LEVEL       ?= "WARN"
 
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS = "virtual/arm-none-eabi-gcc-native"
+# For now we only build with GCC, so stop meta-clang trying to get involved
+TOOLCHAIN = "gcc"
 
 SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'release', 'debug', d)}"
 
Signature · 1 line
2.30.2
author
#5 lore raw

PATCH 6/8 CI: use kas:latest, needed for the latest bitbake

In reply to Jon Mason

From: Ross Burton <[email protected]>

As BitBake has renamed BB_ENV_EXTRAWHITE to BB_ENV_PASSTHROUGH_ADDITIONS the SSTATE_DIR and DL_DIR variables don't get passed from the environment to bitake anymore.

This is fixed in Kas's git repo, so use :latest until a release is made.

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
index bd495cf9cfc9..66d213f575ab 100644
@@ -1,4 +1,4 @@
-image: ghcr.io/siemens/kas/kas:latest-release
+image: ghcr.io/siemens/kas/kas:latest
 
 stages:
   - prep
Signature · 1 line
2.30.2
author
#6 lore raw

PATCH 7/8 CI: run utility jobs last

In reply to Jon Mason

From: Ross Burton <[email protected]>

Run check-layer and coverage jobs after the building tasks, as we want to start compiling sooner and not wait for check-layer to finish before compiling.

---
 .gitlab-ci.yml | 83 +++++++++++++++++++++++++-------------------------
 1 file changed, 41 insertions(+), 42 deletions(-)
.gitlab-ci.yml +41 -42
index 66d213f575ab..2a450ea3b4f7 100644
@@ -56,15 +56,6 @@ update-repos:
   script:
     - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos
 
-
-# What percentage of machines in the layer do we build
-machine-coverage:
-  stage: build
-  interruptible: true
-  script:
-    - ./ci/check-machine-coverage
-  coverage: '/Coverage: \d+/'
-
 #
 # Build stage, the actual build jobs
 #
@@ -74,39 +65,6 @@ machine-coverage:
 #  VIRT: [none, xen]
 #  TESTING: testimage
 
-# Validate layers are Yocto Project Compatible
-check-layers:
-  extends: .setup
-  script:
-    - kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \
-      "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
-  parallel:
-    matrix:
-      - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5]
-
-pending-updates:
-  extends: .setup
-  artifacts:
-    paths:
-      - update-report
-  script:
-    - rm -fr update-report
-    # This configuration has all of the layers we need enabled
-    - kas shell ci/gem5-arm64.yml --command \
-      "$CI_PROJECT_DIR/scripts/machine-summary.py -t report -o $CI_PROJECT_DIR/update-report $($CI_PROJECT_DIR/ci/listmachines.py meta-arm meta-arm-bsp meta-gem5)"
-  # Do this on x86 whilst the compilers are x86-only
-  tags:
-    - x86_64
-
-metrics:
-  extends: .setup
-  artifacts:
-    reports:
-      metrics: metrics.txt
-  script:
-    - kas shell --update --force-checkout ci/base.yml --command \
-      "$CI_PROJECT_DIR/ci/patchreview $CI_PROJECT_DIR/meta-* --verbose --metrics $CI_PROJECT_DIR/metrics.txt"
-
 corstone500:
   extends: .build
 
@@ -234,3 +192,44 @@ tc1:
 
 toolchains:
   extends: .build
+
+# Validate layers are Yocto Project Compatible
+check-layers:
+  extends: .setup
+  script:
+    - kas shell --update --force-checkout ci/base.yml:ci/meta-openembedded.yml --command \
+      "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
+  parallel:
+    matrix:
+      - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5]
+
+pending-updates:
+  extends: .setup
+  artifacts:
+    paths:
+      - update-report
+  script:
+    - rm -fr update-report
+    # This configuration has all of the layers we need enabled
+    - kas shell ci/gem5-arm64.yml --command \
+      "$CI_PROJECT_DIR/scripts/machine-summary.py -t report -o $CI_PROJECT_DIR/update-report $($CI_PROJECT_DIR/ci/listmachines.py meta-arm meta-arm-bsp meta-gem5)"
+  # Do this on x86 whilst the compilers are x86-only
+  tags:
+    - x86_64
+
+# What percentage of machines in the layer do we build
+machine-coverage:
+  stage: build
+  interruptible: true
+  script:
+    - ./ci/check-machine-coverage
+  coverage: '/Coverage: \d+/'
+
+metrics:
+  extends: .setup
+  artifacts:
+    reports:
+      metrics: metrics.txt
+  script:
+    - kas shell --update --force-checkout ci/base.yml --command \
+      "$CI_PROJECT_DIR/ci/patchreview $CI_PROJECT_DIR/meta-* --verbose --metrics $CI_PROJECT_DIR/metrics.txt"
Signature · 1 line
2.30.2
author
#7 lore raw

PATCH 8/8 CI: temporarily pin meta-oe to pre-python-wheel removal until oe-core catches up

In reply to Jon Mason

From: Ross Burton <[email protected]>

---
 ci/meta-openembedded.yml | 1 +
 1 file changed, 1 insertion(+)
ci/meta-openembedded.yml +1 -0
index bed338dae05c..91343f0f5af2 100644
@@ -4,6 +4,7 @@ header:
 repos:
   meta-openembedded:
     url: https://git.openembedded.org/meta-openembedded
+    refspec: 44a810f34e20c7985b0bcbdf71943799b278ecc7
     layers:
       meta-filesystems:
       meta-networking:
Signature · 1 line
2.30.2