From 7e5a60a0c82e9913f71f7bdb5cc04bf1653434d3 Mon Sep 17 00:00:00 2001 From: Niko Mauno Date: Sun, 16 Apr 2023 17:12:38 +0000 Subject: [PATCH 1/5] xlnx-embeddedsw.bbclass: Fix broken recipe parse Commit 1243552796558a00b4f0d7ed9c9c3d41d7031a7a ("xlnx-embeddedsw: Cleanup and remove old versions, no longer supported") removed also 'git' varFlag lines which causes following parsing error with _git.bb recipes that inherit this bbclass: ERROR: ExpansionError during parsing .../poky/meta-xilinx/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb Traceback (most recent call last): File ".../poky/bitbake/lib/bb/fetch2/git.py", line 250, in Git.urldata_init(ud=, d=): > ud.setup_revisions(d) File ".../poky/bitbake/lib/bb/fetch2/__init__.py", line 1349, in FetchData.setup_revisions(d=): for name in self.names: > self.revisions[name] = srcrev_internal_helper(self, d, name) File ".../poky/bitbake/lib/bb/fetch2/__init__.py", line 1214, in srcrev_internal_helper(ud=, d=, name='default'): if srcrev == "AUTOINC": > srcrev = ud.method.latest_revision(ud, d, name) File ".../poky/bitbake/lib/bb/fetch2/__init__.py", line 1626, in Git.latest_revision(ud=, d=, name='default'): except KeyError: > revs[key] = rev = self._latest_revision(ud, d, name) return rev File ".../poky/bitbake/lib/bb/fetch2/git.py", line 757, in Git._latest_revision(ud=, d=, name='default'): return sha1 > raise bb.fetch2.FetchError("Unable to resolve '%s' in upstream git repository in git ls-remote output for %s" % \ (ud.unresolvedrev[name], ud.host+ud.path)) bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Unable to resolve 'git' in upstream git repository in git ls-remote output for github.com/Xilinx/embeddedsw.git The variable dependency chain for the failure is: SRCPV -> PV -> WORKDIR -> T ERROR: Parsing halted due to errors, see error messages above Restore those lines as they were before the commit that removed them to be able to use this layer. Signed-off-by: Niko Mauno --- meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass index 13837a3ed..870d45473 100644 --- a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass +++ b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass @@ -5,10 +5,12 @@ REPO ??= "git://github.com/Xilinx/embeddedsw.git;protocol=https" ESW_BRANCH[2022.1] = "xlnx_rel_v2022.1_update" ESW_BRANCH[2022.2] = "xlnx_rel_v2022.2" +ESW_BRANCH[git] = "master-next" BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}" ESW_REV[2022.1] = "56d94a506fd9f80949f4cff08e13015928603f01" ESW_REV[2022.2] = "5330a64c8efd14f0eef09befdbb8d3d738c33ec2" +ESW_REV[git] = "7ec60e1c0e25bfa9c5e8c77d6d063876f6670770" SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or '${AUTOREV}'}" EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" @@ -17,6 +19,7 @@ EMBEDDEDSW_SRCURI ?= "${REPO};${EMBEDDEDSW_BRANCHARG}" LICENSE = "MIT" LIC_FILES_CHKSUM[xlnx_rel_v2022.1_update] = 'e62cb7a722c4430999e0a55a7234035d' LIC_FILES_CHKSUM[xlnx_rel_v2022.2] = 'ce611484168a6000bd35df68fc4f4290' +LIC_FILES_CHKSUM[master-next] = '7b5fc0b2a22e2882e1506436b3293e5d' LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}" SRC_URI = "${EMBEDDEDSW_SRCURI}" From 1d0b1716152feed82a206f64d0bc8b0a5288ee39 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Thu, 22 Sep 2022 18:34:28 -0700 Subject: [PATCH 2/5] newlib/libgloss: Rebase patch for current version Signed-off-by: Mark Hatle --- ...-Add-config-microblaze.mt-for-target.patch | 28 ++++++++----------- ...g-declarations-for-xil_printf-to-std.patch | 15 ++++------ 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Add-config-microblaze.mt-for-target.patch b/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Add-config-microblaze.mt-for-target.patch index 14e162a59..ad2f0270c 100644 --- a/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Add-config-microblaze.mt-for-target.patch +++ b/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Add-config-microblaze.mt-for-target.patch @@ -24,11 +24,10 @@ Signed-off-by: David Holsgrove 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 libgloss/config/microblaze.mt -diff --git a/libgloss/config/microblaze.mt b/libgloss/config/microblaze.mt -new file mode 100644 -index 000000000..e8fb922dd +Index: newlib-4.2.0.20211231/libgloss/config/microblaze.mt +=================================================================== --- /dev/null -+++ b/libgloss/config/microblaze.mt ++++ newlib-4.2.0.20211231/libgloss/config/microblaze.mt @@ -0,0 +1,30 @@ +# +# Match default.mt to compile generic objects but continue building @@ -60,11 +59,11 @@ index 000000000..e8fb922dd + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? +write.o: ${srcdir}/../write.c + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? -diff --git a/libgloss/microblaze/configure b/libgloss/microblaze/configure -index 9b2bc7ab4..01f0fb29d 100644 ---- a/libgloss/microblaze/configure -+++ b/libgloss/microblaze/configure -@@ -2020,7 +2020,7 @@ LIB_AM_PROG_AS +Index: newlib-4.2.0.20211231/libgloss/microblaze/configure +=================================================================== +--- newlib-4.2.0.20211231.orig/libgloss/microblaze/configure ++++ newlib-4.2.0.20211231/libgloss/microblaze/configure +@@ -2550,7 +2550,7 @@ test "${CCASFLAGS+set}" = set || CCASFLA host_makefile_frag=${srcdir}/../config/default.mh @@ -73,10 +72,10 @@ index 9b2bc7ab4..01f0fb29d 100644 host_makefile_frag_path=$host_makefile_frag -diff --git a/libgloss/microblaze/configure.in b/libgloss/microblaze/configure.in -index 77aa769d4..5d179fdfc 100644 ---- a/libgloss/microblaze/configure.in -+++ b/libgloss/microblaze/configure.in +Index: newlib-4.2.0.20211231/libgloss/microblaze/configure.ac +=================================================================== +--- newlib-4.2.0.20211231.orig/libgloss/microblaze/configure.ac ++++ newlib-4.2.0.20211231/libgloss/microblaze/configure.ac @@ -35,7 +35,7 @@ LIB_AM_PROG_AS AC_SUBST(bsp_prefix) @@ -86,6 +85,3 @@ index 77aa769d4..5d179fdfc 100644 dnl We have to assign the same value to other variables because autoconf dnl doesn't provide a mechanism to substitute a replacement keyword with --- -2.17.1 - diff --git a/meta-microblaze/recipes-core/newlib/files/0003-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch b/meta-microblaze/recipes-core/newlib/files/0003-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch index 3ecad637a..06f797cb0 100644 --- a/meta-microblaze/recipes-core/newlib/files/0003-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch +++ b/meta-microblaze/recipes-core/newlib/files/0003-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch @@ -9,20 +9,17 @@ Signed-off-by: David Holsgrove newlib/libc/include/stdio.h | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h -index ab18806e3..8240dd8ab 100644 ---- a/newlib/libc/include/stdio.h -+++ b/newlib/libc/include/stdio.h -@@ -245,6 +245,9 @@ int sprintf (char *__restrict, const char *__restrict, ...) +Index: newlib-4.2.0.20211231/newlib/libc/include/stdio.h +=================================================================== +--- newlib-4.2.0.20211231.orig/newlib/libc/include/stdio.h ++++ newlib-4.2.0.20211231/newlib/libc/include/stdio.h +@@ -245,6 +245,9 @@ int sprintf (char *__restrict, const cha _ATTRIBUTE ((__format__ (__printf__, 2, 3))); int remove (const char *); int rename (const char *, const char *); +void xil_printf (const char*, ...); +void putnum (unsigned int ); +void print (const char* ); - #ifdef _COMPILING_NEWLIB + #ifdef _LIBC int _rename (const char *, const char *); #endif --- -2.17.1 - From a533258b89fe9d3fce34fd881420ddbbfbfb7450 Mon Sep 17 00:00:00 2001 From: Niko Mauno Date: Wed, 17 May 2023 11:32:08 +0000 Subject: [PATCH 3/5] embeddedsw: Use ESW_VER specific patch file The existing version of makefile-skip-copy_bsp.sh.patch fails to apply against embeddedsw repo 'xlnx_rel_v2022.2' branch, so use an updated version of the patch file instead when ESW_VER is 2022.2. Signed-off-by: Niko Mauno --- .../makefile-skip-copy_bsp.sh.patch | 0 .../2022.2/makefile-skip-copy_bsp.sh.patch | 54 +++++++++++++++++++ .../recipes-bsp/embeddedsw/embeddedsw/git | 1 + .../embeddedsw/fsbl-firmware_2022.1.bb | 2 +- .../embeddedsw/fsbl-firmware_2022.2.bb | 2 +- .../embeddedsw/plm-firmware_2022.1.bb | 2 +- .../embeddedsw/plm-firmware_2022.2.bb | 2 +- .../embeddedsw/plm-firmware_git.bb | 2 +- .../embeddedsw/pmu-firmware_2022.1.bb | 2 +- .../embeddedsw/pmu-firmware_2022.2.bb | 2 +- .../embeddedsw/pmu-firmware_git.bb | 2 +- .../embeddedsw/psm-firmware_2022.1.bb | 2 +- .../embeddedsw/psm-firmware_2022.2.bb | 2 +- .../embeddedsw/psm-firmware_git.bb | 2 +- 14 files changed, 66 insertions(+), 11 deletions(-) rename meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/{ => 2022.1}/makefile-skip-copy_bsp.sh.patch (100%) create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/makefile-skip-copy_bsp.sh.patch create mode 120000 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/git diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/makefile-skip-copy_bsp.sh.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.1/makefile-skip-copy_bsp.sh.patch similarity index 100% rename from meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/makefile-skip-copy_bsp.sh.patch rename to meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.1/makefile-skip-copy_bsp.sh.patch diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/makefile-skip-copy_bsp.sh.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/makefile-skip-copy_bsp.sh.patch new file mode 100644 index 000000000..0d7e3be33 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/makefile-skip-copy_bsp.sh.patch @@ -0,0 +1,54 @@ +Prevent makefile from calling copy_bsp.sh + +If we call copy_bsp.sh we will undo any manual compliation steps we +have already done. Avoid this. + +YP integration specific + +Signed-off-by: Mark Hatle + +diff --git a/lib/sw_apps/versal_plm/src/versal/Makefile b/lib/sw_apps/versal_plm/src/versal/Makefile +index d65e4c1ae5..7c05e54b43 100644 +--- a/lib/sw_apps/versal_plm/src/versal/Makefile ++++ b/lib/sw_apps/versal_plm/src/versal/Makefile +@@ -32,8 +32,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) + $(CC) -o $@ $(OBJS) $(CC_FLAGS) $(CFLAGS) $(LN_FLAGS) $(LIBPATH) $(LSCRIPT) + + $(LIBS): +- echo "Copying BSP files" +- ../../misc/versal/copy_bsp.sh ++ #echo "Copying BSP files" ++ #../../misc/versal/copy_bsp.sh + echo "Compiling bsp" + $(MAKE) -C ../../misc/versal/versal_plm_bsp + +diff --git a/lib/sw_apps/versal_psmfw/src/versal/Makefile b/lib/sw_apps/versal_psmfw/src/versal/Makefile +index 1572bbbca9..ce182acaa7 100644 +--- a/lib/sw_apps/versal_psmfw/src/versal/Makefile ++++ b/lib/sw_apps/versal_psmfw/src/versal/Makefile +@@ -34,8 +34,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) + $(CC) -o $@ $(OBJS) $(CC_FLAGS) $(CFLAGS) $(LN_FLAGS) $(LIBPATH) $(LSCRIPT) + + $(LIBS): +- echo "Copying BSP files" +- ../../misc/copy_bsp.sh ++ #echo "Copying BSP files" ++ #../../misc/copy_bsp.sh + echo "Compiling bsp" + $(MAKE) -C ../../misc/versal_psmfw_bsp + +diff --git a/lib/sw_apps/zynqmp_pmufw/src/Makefile b/lib/sw_apps/zynqmp_pmufw/src/Makefile +index 1750c0a329..17f6a545ea 100644 +--- a/lib/sw_apps/zynqmp_pmufw/src/Makefile ++++ b/lib/sw_apps/zynqmp_pmufw/src/Makefile +@@ -28,8 +28,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) + $(CC) -o $@ $(OBJS) $(CC_FLAGS) $(CFLAGS) $(LN_FLAGS) $(LIBPATH) $(LSCRIPT) + + $(LIBS): +- echo "Copying BSP files" +- ../misc/copy_bsp.sh ++ #echo "Copying BSP files" ++ #../misc/copy_bsp.sh + echo "Compiling bsp" + $(MAKE) -C ../misc/zynqmp_pmufw_bsp + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/git b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/git new file mode 120000 index 000000000..51d37475a --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/git @@ -0,0 +1 @@ +2022.1 \ No newline at end of file diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.1.bb index 3f9740a0d..1f17eba20 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.1.bb @@ -3,7 +3,7 @@ require fsbl-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://fsbl-fixups.patch \ " diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.2.bb index 3f9740a0d..1f17eba20 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.2.bb @@ -3,7 +3,7 @@ require fsbl-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://fsbl-fixups.patch \ " diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.1.bb index cc8102412..e1cf04464 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.1.bb @@ -3,7 +3,7 @@ require plm-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://0001-versal_fw-Fixup-core-makefiles.patch \ " diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.2.bb index cc8102412..e1cf04464 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.2.bb @@ -3,7 +3,7 @@ require plm-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://0001-versal_fw-Fixup-core-makefiles.patch \ " diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_git.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_git.bb index af906e5e9..ebe5ea162 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_git.bb @@ -6,7 +6,7 @@ require plm-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ " do_configure() { diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.1.bb index 2c554d6d5..ddf70af37 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.1.bb @@ -3,7 +3,7 @@ require pmu-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ " diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb index 2c554d6d5..ddf70af37 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb @@ -3,7 +3,7 @@ require pmu-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ " diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb index a17aad55d..62229b4cf 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb @@ -6,7 +6,7 @@ require pmu-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ " do_configure() { diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.1.bb index d861fb1c2..57db07a53 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.1.bb @@ -3,7 +3,7 @@ require psm-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://0001-versal_fw-Fixup-core-makefiles.patch \ " diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.2.bb index d861fb1c2..57db07a53 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.2.bb @@ -3,7 +3,7 @@ require psm-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://0001-versal_fw-Fixup-core-makefiles.patch \ " diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_git.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_git.bb index 94a2c22dc..7ef79dead 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_git.bb @@ -6,7 +6,7 @@ require psm-firmware.inc FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ - file://makefile-skip-copy_bsp.sh.patch \ + file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ " do_configure() { From 5ae2bbfe6ab2cd916b3ba2723f3831ba388b17f2 Mon Sep 17 00:00:00 2001 From: Niko Mauno Date: Mon, 24 Apr 2023 05:09:21 +0000 Subject: [PATCH 4/5] pmu-firmware-2022.2: Avoid race induced build failure Limit number of concurrent jobs to one in order to mitigate the non-propagation of -j1 option from PARALLEL_MAKE directive which helps us to avoid the following kind of build failure: | .../pmu-firmware/2022.2+gitAUTOINC+5330a64c8e-r0/recipe-sysroot-native/usr/bin/microblazeel-xilinx-elf/../../libexec/microblazeel-xilinx-elf/gcc/microblazeel-xilinx-elf/11.3.0/ar: xdppsu_edid.o: No such file or directory | make[3]: *** [Makefile:31: dppsu_libs] Error 1 | make[2]: *** [Makefile:48: psu_pmu_0/libsrc/dppsu/src/make.libs] Error 2 Signed-off-by: Niko Mauno --- ...002-Avoid-race-induced-build-failure.patch | 33 +++++++++++++++++++ .../embeddedsw/pmu-firmware_2022.2.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0002-Avoid-race-induced-build-failure.patch diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0002-Avoid-race-induced-build-failure.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0002-Avoid-race-induced-build-failure.patch new file mode 100644 index 000000000..6385dd7b5 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0002-Avoid-race-induced-build-failure.patch @@ -0,0 +1,33 @@ +From 81b137e9b313d828cba8212d17c4d6a3265f565e Mon Sep 17 00:00:00 2001 +From: Niko Mauno +Date: Mon, 24 Apr 2023 05:00:00 +0000 +Subject: [PATCH] Avoid race induced build failure + +Limit number of concurrent jobs to one in order to mitigate the +non-propagation of -j1 option from PARALLEL_MAKE directive which +helps us to avoid the following kind of build failure: + + | .../pmu-firmware/2022.2+gitAUTOINC+5330a64c8e-r0/recipe-sysroot-native/usr/bin/microblazeel-xilinx-elf/../../libexec/microblazeel-xilinx-elf/gcc/microblazeel-xilinx-elf/11.3.0/ar: xdppsu_edid.o: No such file or directory + | make[3]: *** [Makefile:31: dppsu_libs] Error 1 + | make[2]: *** [Makefile:48: psu_pmu_0/libsrc/dppsu/src/make.libs] Error 2 + +Upstream-Status: Pending + +Signed-off-by: Niko Mauno +--- + +diff --git a/lib/sw_apps/zynqmp_pmufw/misc/Makefile b/lib/sw_apps/zynqmp_pmufw/misc/Makefile +index a773498512..4528600745 100644 +--- a/lib/sw_apps/zynqmp_pmufw/misc/Makefile ++++ b/lib/sw_apps/zynqmp_pmufw/misc/Makefile +@@ -17,7 +19,7 @@ endif + + all: + $(MAKE) --no-print-directory seq_libs +- $(MAKE) -j --no-print-directory par_libs ++ $(MAKE) -j1 --no-print-directory par_libs + $(MAKE) --no-print-directory archive + @echo 'Finished building libraries' + +-- +2.20.1 diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb index ddf70af37..36f90c455 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb @@ -5,6 +5,7 @@ FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://${ESW_VER}/makefile-skip-copy_bsp.sh.patch \ file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ + file://0002-Avoid-race-induced-build-failure.patch \ " EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" From ce98e8f93543e345c3139df269802d76c2710620 Mon Sep 17 00:00:00 2001 From: Niko Mauno Date: Wed, 19 Apr 2023 11:35:42 +0000 Subject: [PATCH 5/5] meta-xilinx-core: Add weak preferred qemu providers By doing so we avoid seeing following bitbake nags when machine-xilinx-qemu.inc is not included in build configuration: NOTE: Multiple providers are available for qemu-native (qemu-native, qemu-xilinx-native) Consider defining a PREFERRED_PROVIDER entry to match qemu-native NOTE: Multiple providers are available for qemu-helper-native (qemu-helper-native, qemu-xilinx-helper-native) Consider defining a PREFERRED_PROVIDER entry to match qemu-helper-native NOTE: Multiple providers are available for runtime nativesdk-qemu (nativesdk-qemu, nativesdk-qemu-xilinx) Consider defining a PREFERRED_RPROVIDER entry to match nativesdk-qemu NOTE: Multiple providers are available for qemu-system-native (qemu-system-native, qemu-xilinx-system-native) Consider defining a PREFERRED_PROVIDER entry to match qemu-system-native Signed-off-by: Niko Mauno --- meta-xilinx-core/conf/layer.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf index 112f287a5..9d5473c2b 100644 --- a/meta-xilinx-core/conf/layer.conf +++ b/meta-xilinx-core/conf/layer.conf @@ -58,3 +58,9 @@ PREFERRED_VERSION_arm-trusted-firmware ?= "2.6-xilinx-${XILINX_RELEASE_VERSION}% PREFERRED_VERSION_u-boot-xlnx ?= "v2021.01-xilinx-${XILINX_RELEASE_VERSION}%" PREFERRED_VERSION_pmu-rom-native ?= "${@d.getVar("XILINX_RELEASE_VERSION").replace('v','')}" PREFERRED_VERSION_linux-xlnx ?= "${@'5.15.19' if d.getVar("XILINX_RELEASE_VERSION") == 'v2022.1' else '5.15.36'}%" + +# Weak defaults to avoid seeing redundant multiple provider notices +PREFERRED_PROVIDER_nativesdk-qemu ??= "nativesdk-qemu" +PREFERRED_PROVIDER_qemu-helper-native ??= "qemu-helper-native" +PREFERRED_PROVIDER_qemu-native ??= "qemu-native" +PREFERRED_PROVIDER_qemu-system-native ??= "qemu-system-native"