arm-bsp/linux-yocto: Update N1SDP PCI quirk patch
PATCH 1/6 arm-bsp/linux-yocto: Update N1SDP PCI quirk patch
From: Adam Johnston <[email protected]>
Poky commit 9ef8cbcdfc85c3ce2ca52d8bee2ab6929f589383 updates the kernel to 6.1.20 which breaks the PCI quirk patch for the N1SDP.
This change fixes it.
--- ...002-n1sdp-pci_quirk-add-acs-override-for-PCI-devices.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-arm-bsp/recipes-kernel/linux/linux-yocto-6.1/n1sdp/0002-n1sdp-pci_quirk-add-acs-override-for-PCI-devices.patch +2 -2
@@ -150,9 +150,9 @@ index 285acc4aaccc..d6ebef1f30db 100644 * Some NVIDIA GPU devices do not work with bus reset, SBR needs to be * prevented for those affected devices. @@ -4980,6 +5081,7 @@ static const struct pci_dev_acs_enabled { - { PCI_VENDOR_ID_NXP, 0x8d9b, pci_quirk_nxp_rp_acs }, - /* Zhaoxin Root/Downstream Ports */ { PCI_VENDOR_ID_ZHAOXIN, PCI_ANY_ID, pci_quirk_zhaoxin_pcie_ports_acs }, + /* Wangxun nics */ + { PCI_VENDOR_ID_WANGXUN, PCI_ANY_ID, pci_quirk_wangxun_nic_acs }, + { PCI_ANY_ID, PCI_ANY_ID, pcie_acs_overrides }, { 0 } };
Signature · 1 line
2.34.1
PATCH 2/6 arm/scp-firmware: fix up whitespace
For some reason the shell functions are indented an extra character, reindent to standard four spaces.
--- .../scp-firmware/scp-firmware_2.10.0.bb | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-)
meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb +32 -32
@@ -52,46 +52,46 @@ EXTRA_OECMAKE = "-D CMAKE_BUILD_TYPE=${SCP_BUILD_STR} \ " do_configure() { - for FW in ${FW_TARGETS}; do - for TYPE in ${FW_INSTALL}; do - cmake -GNinja ${EXTRA_OECMAKE} -S ${S} -B "${B}/${TYPE}/${FW}" -D SCP_FIRMWARE_SOURCE_DIR="${SCP_PLATFORM}/${FW}_${TYPE}" - done - done + for FW in ${FW_TARGETS}; do + for TYPE in ${FW_INSTALL}; do + cmake -GNinja ${EXTRA_OECMAKE} -S ${S} -B "${B}/${TYPE}/${FW}" -D SCP_FIRMWARE_SOURCE_DIR="${SCP_PLATFORM}/${FW}_${TYPE}" + done + done } do_configure[cleandirs] += "${B}" do_compile() { - for FW in ${FW_TARGETS}; do - for TYPE in ${FW_INSTALL}; do - cmake --build ${B}/${TYPE}/${FW} --target all - done - done + for FW in ${FW_TARGETS}; do + for TYPE in ${FW_INSTALL}; do + cmake --build ${B}/${TYPE}/${FW} --target all + done + done } do_install() { - install -d ${D}/firmware - for TYPE in ${FW_INSTALL}; do - for FW in ${FW_TARGETS}; do - if [ "$TYPE" = "romfw" ]; then - if [ "$FW" = "scp" ]; then - install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-bl1.bin" "${D}/firmware/${FW}_${TYPE}.bin" - install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-bl1" "${D}/firmware/${FW}_${TYPE}.elf" - elif [ "$FW" = "mcp" ]; then - install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-mcp-bl1.bin" "${D}/firmware/${FW}_${TYPE}.bin" - install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-mcp-bl1" "${D}/firmware/${FW}_${TYPE}.elf" - fi - elif [ "$TYPE" = "ramfw" ]; then - if [ "$FW" = "scp" ]; then - install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-bl2.bin" "${D}/firmware/${FW}_${TYPE}.bin" - install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-bl2" "${D}/firmware/${FW}_${TYPE}.elf" - elif [ "$FW" = "mcp" ]; then - install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-mcp-bl2.bin" "${D}/firmware/${FW}_${TYPE}.bin" - install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-mcp-bl2" "${D}/firmware/${FW}_${TYPE}.elf" - fi - fi - done - done + install -d ${D}/firmware + for TYPE in ${FW_INSTALL}; do + for FW in ${FW_TARGETS}; do + if [ "$TYPE" = "romfw" ]; then + if [ "$FW" = "scp" ]; then + install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-bl1.bin" "${D}/firmware/${FW}_${TYPE}.bin" + install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-bl1" "${D}/firmware/${FW}_${TYPE}.elf" + elif [ "$FW" = "mcp" ]; then + install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-mcp-bl1.bin" "${D}/firmware/${FW}_${TYPE}.bin" + install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-mcp-bl1" "${D}/firmware/${FW}_${TYPE}.elf" + fi + elif [ "$TYPE" = "ramfw" ]; then + if [ "$FW" = "scp" ]; then + install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-bl2.bin" "${D}/firmware/${FW}_${TYPE}.bin" + install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-bl2" "${D}/firmware/${FW}_${TYPE}.elf" + elif [ "$FW" = "mcp" ]; then + install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-mcp-bl2.bin" "${D}/firmware/${FW}_${TYPE}.bin" + install -D "${B}/${TYPE}/${FW}/bin/${SCP_PLATFORM}-mcp-bl2" "${D}/firmware/${FW}_${TYPE}.elf" + fi + fi + done + done } FILES:${PN} = "/firmware"
Signature · 1 line
2.34.1
PATCH 3/6 arm/scp-firmware: enable verbose builds
In reply to Ross BurtonWe want compile logs to be useful, so enable verbose logs to show what commands are being invoked.
--- meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb +1 -1
@@ -64,7 +64,7 @@ do_configure[cleandirs] += "${B}" do_compile() { for FW in ${FW_TARGETS}; do for TYPE in ${FW_INSTALL}; do - cmake --build ${B}/${TYPE}/${FW} --target all + VERBOSE=1 cmake --build ${B}/${TYPE}/${FW} --target all done done }
Signature · 1 line
2.34.1
PATCH 4/6 arm/scp-firmware: remove textrel from INSANE_SKIP
In reply to Ross BurtonThe text relocations appear to have been fixed and this skip is no longer needed.
--- meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb +2 -2
@@ -98,8 +98,8 @@ FILES:${PN} = "/firmware" SYSROOT_DIRS += "/firmware" FILES:${PN}-dbg += "/firmware/*.elf" -# Skip QA check for relocations in .text of elf binaries -INSANE_SKIP:${PN}-dbg = "arch textrel" +# These binaries are specifically for 32-bit arm +INSANE_SKIP:${PN}-dbg += "arch" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" INHIBIT_PACKAGE_STRIP = "1"
Signature · 1 line
2.34.1
PATCH 5/6 arm/scp-firmware: improve debug packaging
In reply to Ross BurtonInstead of a SCP_BUILD_RELEASE boolean, add CMAKE_BUILD_TYPE and default to RelWithDebInfo which gives us release (optimised) builds with debug symbols in the matching .elf files.
To ensure that buildpaths don't leak into the debug symbols, pass the debug prefix maps via CFLAGS and ASMFLAGS.
--- .../recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb +6 -5
@@ -14,7 +14,7 @@ SRCREV = "673d014f3861ad81cc5ab06d2884a314a610799b" PROVIDES += "virtual/control-processor-firmware" -SCP_BUILD_RELEASE ?= "1" +CMAKE_BUILD_TYPE ?= "RelWithDebInfo" SCP_PLATFORM ?= "invalid" SCP_COMPILER ?= "arm-none-eabi" SCP_LOG_LEVEL ?= "WARN"
@@ -29,8 +29,6 @@ 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)}" - inherit deploy B = "${WORKDIR}/build"
@@ -39,13 +37,16 @@ S = "${WORKDIR}/git" # Allow platform specific copying of only scp or both scp & mcp, default to both FW_TARGETS ?= "scp mcp" FW_INSTALL ?= "ramfw romfw" + PACKAGE_ARCH = "${MACHINE_ARCH}" COMPATIBLE_MACHINE ?= "invalid" +export CFLAGS = "${DEBUG_PREFIX_MAP}" +export ASMFLAGS = "${DEBUG_PREFIX_MAP}" + LDFLAGS[unexport] = "1" -CFLAGS[unexport] = "1" -EXTRA_OECMAKE = "-D CMAKE_BUILD_TYPE=${SCP_BUILD_STR} \ +EXTRA_OECMAKE = "-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -D SCP_LOG_LEVEL=${SCP_LOG_LEVEL} \ -D SCP_PLATFORM_FEATURE_SET=${SCP_PLATFORM_FEATURE_SET} \ -D DISABLE_CPPCHECK=1 \
Signature · 1 line
2.34.1
PATCH 6/6 CI: mask poky's llvm if we're using clang
In reply to Ross Burtonmeta-clang's clang recipe has an irritating interaction with oe-core's llvm recipe which can result in build warnings, which cause builds to fail in our pedantic CI.
The current best known workaround is to simply mask out the llvm recipes if clang is being used.
For more details, see https://github.com/kraj/meta-clang/pull/766.
--- ci/clang.yml | 3 +++ 1 file changed, 3 insertions(+)
ci/clang.yml +3 -0
@@ -8,3 +8,6 @@ repos: local_conf_header: toolchain: | TOOLCHAIN = "clang" + # This is needed to stop bitbake getting confused about what clang/llvm is + # being used, see https://github.com/kraj/meta-clang/pull/766 + BBMASK += "/meta/recipes-devtools/llvm/llvm.*\.bb"
Signature · 1 line
2.34.1
Jon Mason
AppliedQuoted 4 lines · Ross Burton
Poky commit
9ef8cbcdfc85c3ce2ca52d8bee2ab6929f589383updates the kernel to 6.1.20 which breaks the PCI quirk patch for the N1SDP.This change fixes it.
Applied, thanks!
[1/6] arm-bsp/linux-yocto: Update N1SDP PCI quirk patch
commit: 1caacf78c7405a1ad3d97659c39eba247e082bc5
[2/6] arm/scp-firmware: fix up whitespace
(no commit info)
[3/6] arm/scp-firmware: enable verbose builds
(no commit info)
[4/6] arm/scp-firmware: remove textrel from INSANE_SKIP
(no commit info)
[5/6] arm/scp-firmware: improve debug packaging
(no commit info)
[6/6] CI: mask poky's llvm if we're using clang
(no commit info)
Best regards,
Signature · 1 line
Jon Mason <[email protected]>