diff options
18 files changed, 604 insertions, 15 deletions
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw.inc index d7cd3c3f..49bbcae9 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw.inc @@ -28,3 +28,5 @@ LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', SRC_URI = "${EMBEDDEDSW_SRCURI}" PV = "${ESW_VER}+git${SRCPV}" + +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-sw_apps-versal_plm-Changes-to-ensure-versionless-bui.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-sw_apps-versal_plm-Changes-to-ensure-versionless-bui.patch new file mode 100644 index 00000000..0dbe68dc --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-sw_apps-versal_plm-Changes-to-ensure-versionless-bui.patch @@ -0,0 +1,261 @@ +From 3b706021d06b9dbbe5848e524da09b527f75ad4f Mon Sep 17 00:00:00 2001 +From: "b.vikram@xilinx.com" <b.vikram@xilinx.com> +Date: Thu, 11 Feb 2021 23:20:31 +0530 +Subject: [PATCH] sw_apps :versal_plm: Changes to ensure versionless build + works with yocto flow + +The syntax of updating BSP_SEQUENTIAL_FILES variable in copy_bsp.sh is updated. +Using COMPILER, ARCHIVER and AASEMBLER variables in bsp Makefile instead of +hardcoding them. This would help yocto flow as it does not use mb-gcc. + +Signed-off-by: Vikram Sreenivasa Batchali <b.vikram@xilinx.com> +Acked-by: Krishna Chaitanya Patakamuri <krishna.chaitanya.patakamuri@xilinx.com> +--- + lib/sw_apps/versal_plm/misc/Makefile | 10 ++++++---- + lib/sw_apps/versal_plm/misc/copy_bsp.sh | 16 ++++++++-------- + lib/sw_apps/zynq_fsbl/misc/copy_bsp.sh | 6 +++--- + lib/sw_apps/zynqmp_fsbl/misc/copy_bsp.sh | 8 ++++---- + lib/sw_apps/zynqmp_pmufw/misc/Makefile | 10 ++++++---- + lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh | 8 ++++---- + 6 files changed, 31 insertions(+), 27 deletions(-) + +diff --git a/lib/sw_apps/versal_plm/misc/Makefile b/lib/sw_apps/versal_plm/misc/Makefile +index 23ac27b52b..d1be4ffc8e 100644 +--- a/lib/sw_apps/versal_plm/misc/Makefile ++++ b/lib/sw_apps/versal_plm/misc/Makefile +@@ -1,5 +1,7 @@ + # Makefile generated by Xilinx. +- ++COMPILER := mb-gcc ++ARCHIVER := mb-gcc-ar ++ASSEMBLER := mb-as + DRIVER_LIB_VERSION = 1.0 + PROCESSOR = psv_pmc_0 + LIBRARIES = ${PROCESSOR}/lib/libxil.a +@@ -28,7 +30,7 @@ par_libs: $(addsuffix /make.libs,$(PAR_SUBDIRS)) + @echo 'Finished building libraries parallelly.' + + archive: +- mb-gcc-ar -r $(LIBRARIES) $(wildcard $(PROCESSOR)/lib/*.o) ++ $(ARCHIVER) -r $(LIBRARIES) $(wildcard $(PROCESSOR)/lib/*.o) + + clean: $(addsuffix /make.clean,$(SUBDIRS)) + rm -f ${PROCESSOR}/lib/libxil.a +@@ -38,11 +40,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a + + %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,) + @echo "Running Make include in $(subst /make.include,,$@)" +- $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-gcc-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" ++ $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-gcc-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" ++ $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +diff --git a/lib/sw_apps/versal_plm/misc/copy_bsp.sh b/lib/sw_apps/versal_plm/misc/copy_bsp.sh +index 2e4e393b5d..4f082de37c 100755 +--- a/lib/sw_apps/versal_plm/misc/copy_bsp.sh ++++ b/lib/sw_apps/versal_plm/misc/copy_bsp.sh +@@ -48,33 +48,33 @@ fi + mkdir -p $BSP_DIR/libsrc/xilffs + cp -r $SERVICES_DIR/xilffs/src $BSP_DIR/libsrc/xilffs/ + cp -r $SERVICES_DIR/xilffs/src/include/* $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilffs/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilffs/src/Makefile" + + mkdir -p $BSP_DIR/libsrc/xilpdi + cp -r $SERVICES_DIR/xilpdi/src $BSP_DIR/libsrc/xilpdi/ + cp -r $SERVICES_DIR/xilpdi/src/*.h $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilpdi/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilpdi/src/Makefile" + + mkdir -p $BSP_DIR/libsrc/xilplmi + cp -r $SERVICES_DIR/xilplmi/src $BSP_DIR/libsrc/xilplmi/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilplmi/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilplmi/src/Makefile" + + mkdir -p $BSP_DIR/libsrc/xilpuf + cp -r $SERVICES_DIR/xilpuf/src $BSP_DIR/libsrc/xilpuf/ + cp -r $SERVICES_DIR/xilpuf/src/*.h $BSP_DIR/include/ +-set SP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilpuf/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilpuf/src/Makefile" + + mkdir -p $BSP_DIR/libsrc/xilloader + cp -r $SERVICES_DIR/xilloader/src $BSP_DIR/libsrc/xilloader/ + cp -r $SERVICES_DIR/xilloader/src/*.h $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilloader/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilloader/src/Makefile" + + mkdir -p $BSP_DIR/libsrc/xilpm/src/ + cp -r $SERVICES_DIR/xilpm/src/versal/common/* $BSP_DIR/libsrc/xilpm/src/ + cp -r $SERVICES_DIR/xilpm/src/versal/server/* $BSP_DIR/libsrc/xilpm/src/ + cp -r $SERVICES_DIR/xilpm/src/versal/common/*.h $BSP_DIR/include/ + cp -r $SERVICES_DIR/xilpm/src/versal/server/*.h $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilpm/src/versal/common/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilpm/src/versal/common/Makefile" + + mkdir -p $BSP_DIR/libsrc/xilsecure/src/ + cp -r $SERVICES_DIR/xilsecure/src/Makefile $BSP_DIR/libsrc/xilsecure/src/ +@@ -84,7 +84,7 @@ cp -r $SERVICES_DIR/xilsecure/src/common/*.h $BSP_DIR/include/ + cp -r $SERVICES_DIR/xilsecure/src/versal/*.h $BSP_DIR/include/ + mv $BSP_DIR/libsrc/xilsecure/src/libxilsecure_pmc.a $BSP_DIR/libsrc/xilsecure/src/libxilsecure.a + rm $BSP_DIR/libsrc/xilsecure/src/libxilsecure_*.a +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilsecure/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilsecure/src/Makefile" + + mkdir -p $BSP_DIR/libsrc/xilsem + cp -r $SERVICES_DIR/xilsem/src $BSP_DIR/libsrc/xilsem/ +@@ -116,7 +116,7 @@ do + cp -r $DRIVERS_DIR/$line/src/*.h $BSP_DIR/include/ + # copy all the HSM generated driver files DRIVER_g.c + cp $WORKING_DIR/x"$line"_g.c $BSP_DIR/libsrc/$line/src/ +- set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/$line/src/Makefile ++ BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/$line/src/Makefile" + done < $DRIVERS_LIST + + #copy the processor code. +diff --git a/lib/sw_apps/zynq_fsbl/misc/copy_bsp.sh b/lib/sw_apps/zynq_fsbl/misc/copy_bsp.sh +index 70dae119b2..70a83ffd50 100755 +--- a/lib/sw_apps/zynq_fsbl/misc/copy_bsp.sh ++++ b/lib/sw_apps/zynq_fsbl/misc/copy_bsp.sh +@@ -75,18 +75,18 @@ do + cp -r $DRIVERS_DIR/$line/src $BSP_DIR/libsrc/$line + # copy all the HSM generated driver files DRIVER_g.c + # cp $BOARD_DIR/x"$line"_g.c $BSP_DIR/libsrc/$line/src/ +- set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/$line/src/Makefile ++ BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/$line/src/Makefile" + + done < $DRIVERS_LIST + + # copy the libraries required + cp -r $SERVICES_DIR/xilffs/ $BSP_DIR/libsrc/ + cp -r $SERVICES_DIR/xilffs/src/include/* $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilffs/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilffs/src/Makefile" + + cp -r $SERVICES_DIR/xilrsa/ $BSP_DIR/libsrc/ + cp -r $SERVICES_DIR/xilrsa/src/include/* $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilrsa/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilrsa/src/Makefile" + + #copy the xparameters.h + cp $BOARD_DIR/xparameters.h $BSP_DIR/include/ +diff --git a/lib/sw_apps/zynqmp_fsbl/misc/copy_bsp.sh b/lib/sw_apps/zynqmp_fsbl/misc/copy_bsp.sh +index 8cc6e3a66e..120aeb8fc7 100755 +--- a/lib/sw_apps/zynqmp_fsbl/misc/copy_bsp.sh ++++ b/lib/sw_apps/zynqmp_fsbl/misc/copy_bsp.sh +@@ -65,7 +65,7 @@ fi + mkdir -p $BSP_DIR/libsrc/xilffs + cp -r $SERVICES_DIR/xilffs/src $BSP_DIR/libsrc/xilffs/ + cp -r $SERVICES_DIR/xilffs/src/include/* $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilffs/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilffs/src/Makefile" + + mkdir -p $BSP_DIR/libsrc/xilsecure/src/ + cp -r $SERVICES_DIR/xilsecure/src/Makefile $BSP_DIR/libsrc/xilsecure/src/ +@@ -73,13 +73,13 @@ cp -r $SERVICES_DIR/xilsecure/src/common/* $BSP_DIR/libsrc/xilsecure/src/ + cp -r $SERVICES_DIR/xilsecure/src/zynqmp/* $BSP_DIR/libsrc/xilsecure/src/ + cp -r $SERVICES_DIR/xilsecure/src/common/*.h $BSP_DIR/include/ + cp -r $SERVICES_DIR/xilsecure/src/zynqmp/*.h $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilsecure/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilsecure/src/Makefile" + + cp -r $SERVICES_DIR/xilpm/ $BSP_DIR/libsrc/ + cp -r $SERVICES_DIR/xilpm/src/zynqmp/client/common/* $BSP_DIR/libsrc/xilpm/src/ + cp -r $SERVICES_DIR/xilpm/src/zynqmp/client/common/*.h $BSP_DIR/include/ + cp $WORKING_DIR/pm_cfg_obj.c $BSP_DIR/libsrc/xilpm/src/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilpm/src/zynqmp/client/common/Makefile ++BSP_SEQUENTIAL_MAKEFILES="BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilpm/src/zynqmp/client/common/Makefile" + + rm -rf $BSP_DIR/libsrc/xilpm/src/zynqmp/ + rm -rf $BSP_DIR/libsrc/xilpm/src/versal/ +@@ -161,7 +161,7 @@ do + + # copy all the HSM generated driver files DRIVER_g.c + # cp $BOARD_DIR/x"$line"_g.c $BSP_DIR/libsrc/$line/src/ +- set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/$line/src/Makefile ++ BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/$line/src/Makefile" + + done < $DRIVERS_LIST + +diff --git a/lib/sw_apps/zynqmp_pmufw/misc/Makefile b/lib/sw_apps/zynqmp_pmufw/misc/Makefile +index 142581b2b9..a773498512 100644 +--- a/lib/sw_apps/zynqmp_pmufw/misc/Makefile ++++ b/lib/sw_apps/zynqmp_pmufw/misc/Makefile +@@ -1,5 +1,7 @@ + # Makefile generated by Xilinx. +- ++COMPILER := mb-gcc ++ARCHIVER := mb-gcc-ar ++ASSEMBLER := mb-as + DRIVER_LIB_VERSION = 1.0 + PROCESSOR = psu_pmu_0 + LIBRARIES = ${PROCESSOR}/lib/libxil.a +@@ -28,7 +30,7 @@ par_libs: $(addsuffix /make.libs,$(PAR_SUBDIRS)) + @echo 'Finished building libraries parallelly.' + + archive: +- mb-gcc-ar -r $(LIBRARIES) $(wildcard $(PROCESSOR)/lib/*.o) ++ $(ARCHIVER) -r $(LIBRARIES) $(wildcard $(PROCESSOR)/lib/*.o) + + clean: $(addsuffix /make.clean,$(SUBDIRS)) + rm -f ${PROCESSOR}/lib/libxil.a +@@ -38,11 +40,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a + + %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,) + @echo "Running Make include in $(subst /make.include,,$@)" +- $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ARCHIVER=mb-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v9.2 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" ++ $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v9.2 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ARCHIVER=mb-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v9.2 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" ++ $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v9.2 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +diff --git a/lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh b/lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh +index c683e4f73d..be8616968e 100755 +--- a/lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh ++++ b/lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh +@@ -52,14 +52,14 @@ cp -r $SERVICES_DIR/xilfpga/src/interface/zynqmp/xilfpga_pcap.c $BSP_DIR/libsrc/ + cp -r $SERVICES_DIR/xilfpga/src/*.h $BSP_DIR/include/ + cp -r $SERVICES_DIR/xilfpga/src/interface/zynqmp/*.h $BSP_DIR/include/ + rm -r $BSP_DIR/libsrc/xilfpga/src/interface/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilfpga/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilfpga/src/Makefile" + mkdir -p $BSP_DIR/libsrc/xilsecure/src/ + cp -r $SERVICES_DIR/xilsecure/src/Makefile $BSP_DIR/libsrc/xilsecure/src/ + cp -r $SERVICES_DIR/xilsecure/src/common/* $BSP_DIR/libsrc/xilsecure/src/ + cp -r $SERVICES_DIR/xilsecure/src/zynqmp/* $BSP_DIR/libsrc/xilsecure/src/ + cp -r $SERVICES_DIR/xilsecure/src/common/*.h $BSP_DIR/include/ + cp -r $SERVICES_DIR/xilsecure/src/zynqmp/*.h $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilsecure/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilsecure/src/Makefile" + cp -r $SERVICES_DIR/xilskey/ $BSP_DIR/libsrc/ + + # remove the xilskey library files which are not required for PMU +@@ -81,7 +81,7 @@ rm -r $BSP_DIR/libsrc/xilskey/src/include/xilskey_bbram.h + # copy the xilskey library header files to include directory + cp -r $BSP_DIR/libsrc/xilskey/src/*.h $BSP_DIR/include/ + cp -r $BSP_DIR/libsrc/xilskey/src/include/*.h $BSP_DIR/include/ +-set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/xilskey/src/Makefile ++BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilskey/src/Makefile" + + # copy bsp standalone code + cp $STANDALONE_DIR/common/* $BSP_DIR/libsrc/standalone/src/ +@@ -108,7 +108,7 @@ do + cp -r $DRIVERS_DIR/$line/src/*.h $BSP_DIR/include/ + # copy all the HSM generated driver files DRIVER_g.c + cp $WORKING_DIR/x"$line"_g.c $BSP_DIR/libsrc/$line/src/ +- set BSP_SEQUENTIAL_MAKEFILES += $BSP_DIR/libsrc/$line/src/Makefile ++ BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/$line/src/Makefile" + + done < $DRIVERS_LIST + +-- +2.17.1 + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-versal_psmfw-misc-Update-makefile-for-version-less-b.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-versal_psmfw-misc-Update-makefile-for-version-less-b.patch new file mode 100644 index 00000000..295d59bb --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-versal_psmfw-misc-Update-makefile-for-version-less-b.patch @@ -0,0 +1,56 @@ +From 79e17afd2c943c53978dceab2f8fd17cba8994ec Mon Sep 17 00:00:00 2001 +From: Rajan Vaja <rajan.vaja@xilinx.com> +Date: Mon, 15 Feb 2021 22:53:37 -0800 +Subject: [PATCH] versal_psmfw: misc: Update makefile for version less build + with yocto + +Use COMPILER, ARCHIVER and ASSEMBLER variables in Makefile instead of +hard coding them. This would help yocto flow as it does not use +mb-gcc. + +Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> +Acked-by: Nicole Baze <nicole.baze@xilinx.com> +--- + lib/sw_apps/versal_psmfw/misc/Makefile | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/lib/sw_apps/versal_psmfw/misc/Makefile b/lib/sw_apps/versal_psmfw/misc/Makefile +index 6374302f5c..2164c19f03 100644 +--- a/lib/sw_apps/versal_psmfw/misc/Makefile ++++ b/lib/sw_apps/versal_psmfw/misc/Makefile +@@ -8,6 +8,9 @@ SUBDIRS := $(patsubst %/Makefile, %, $(BSP_MAKEFILES)) + BSP_PARALLEL_MAKEFILES := $(filter-out $(BSP_SEQUENTIAL_MAKEFILES),$(BSP_MAKEFILES)) + SEQ_SUBDIRS := $(patsubst %/Makefile, %, $(BSP_SEQUENTIAL_MAKEFILES)) + PAR_SUBDIRS := $(patsubst %/Makefile, %, $(BSP_PARALLEL_MAKEFILES)) ++COMPILER := mb-gcc ++ARCHIVER := mb-ar ++ASSEMBLER := mb-as + + ifneq (,$(findstring win,$(RDI_PLATFORM))) + SHELL = CMD +@@ -28,7 +31,7 @@ par_libs: $(addsuffix /make.libs,$(PAR_SUBDIRS)) + @echo 'Finished building libraries parallelly.' + + archive: +- mb-ar -r $(LIBRARIES) $(wildcard $(PROCESSOR)/lib/*.o) ++ $(ARCHIVER) -r $(LIBRARIES) $(wildcard $(PROCESSOR)/lib/*.o) + + clean: $(addsuffix /make.clean,$(SUBDIRS)) + rm -f ${PROCESSOR}/lib/libxil.a +@@ -38,11 +41,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a + + %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,) + @echo "Running Make include in $(subst /make.include,,$@)" +- $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra" ++ $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COMPILER_FLAGS= -O2 -c -mcpu=v -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra" ++ $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +-- +2.17.1 + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-zynqmp_pmufw-Correct-structure-header-of-PmResetOps.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-zynqmp_pmufw-Correct-structure-header-of-PmResetOps.patch new file mode 100644 index 00000000..a5d0894a --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-zynqmp_pmufw-Correct-structure-header-of-PmResetOps.patch @@ -0,0 +1,30 @@ +From 27d08d91eedb77c28e7776d0ccf6b92d79d3b6bb Mon Sep 17 00:00:00 2001 +From: Rajan Vaja <rajan.vaja@xilinx.com> +Date: Mon, 15 Feb 2021 22:47:13 -0800 +Subject: [PATCH] zynqmp_pmufw: Correct structure header of PmResetOps + +Update structure header of PmResetOps for using resetAssert instead +of assert. + +Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> +Acked-by: Mounika Akula <mounika.akula@xilinx.com> +--- + lib/sw_apps/zynqmp_pmufw/src/pm_reset.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c b/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c +index bcd8aa73db..a693eb4196 100644 +--- a/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c ++++ b/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c +@@ -29,7 +29,7 @@ + + /** + * PmResetOps - Reset operations +- * @assert Assert or release reset line ++ * @resetAssert Assert or release reset line + * @getStatus Get current status of reset line + * @pulse Function performing reset pulse operation + */ +-- +2.17.1 + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware/fix-zynqmp-assert.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-zynqmp_pmufw-Fix-reset-ops-for-assert.patch index 87e1b111..a0e67dfd 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware/fix-zynqmp-assert.patch +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-zynqmp_pmufw-Fix-reset-ops-for-assert.patch @@ -1,8 +1,30 @@ +From 57a5a13ef730c5c46d9db159ed9b7a466cc70388 Mon Sep 17 00:00:00 2001 +From: Rajan Vaja <rajan.vaja@xilinx.com> +Date: Wed, 27 Jan 2021 22:19:51 -0800 +Subject: [PATCH] zynqmp_pmufw: Fix reset ops for assert() + +New compiler toolchain treats "assert" as a macro always. So rename +the existing "assert" variable to "resetAssert" in the codebase. + +Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> +Acked-by: Ravi Patel <ravi.patel@xilinx.com> +Acked-by: Tejas Patel <tejas.patel@xilinx.com> +--- + lib/sw_apps/zynqmp_pmufw/src/pm_reset.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c b/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c -index 297c6c2ddc..bc295cf013 100644 +index c66aae4a0c..bcd8aa73db 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c +++ b/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c -@@ -52,7 +52,7 @@ +@@ -1,5 +1,5 @@ + /* +-* Copyright (c) 2014 - 2020 Xilinx, Inc. All rights reserved. ++* Copyright (c) 2014 - 2021 Xilinx, Inc. All rights reserved. + * SPDX-License-Identifier: MIT + */ + +@@ -34,7 +34,7 @@ * @pulse Function performing reset pulse operation */ typedef struct PmResetOps { @@ -11,7 +33,7 @@ index 297c6c2ddc..bc295cf013 100644 u32 (*const getStatus)(const PmReset* const s); u32 (*const pulse)(const PmReset* const rst); } PmResetOps; -@@ -415,37 +415,37 @@ static u32 PmResetPulsePl(const PmReset* const rst) +@@ -399,37 +399,37 @@ static u32 PmResetPulsePl(const PmReset* const rst) } static const PmResetOps pmResetOpsGeneric = { @@ -55,7 +77,7 @@ index 297c6c2ddc..bc295cf013 100644 .getStatus = PmResetGetStatusGpioBankIOs, .pulse = PmResetPulseGpioBankIOs, }; -@@ -1901,8 +1901,8 @@ s32 PmResetDoAssert(const PmReset *reset, u32 action) +@@ -1885,8 +1885,8 @@ s32 PmResetDoAssert(const PmReset *reset, u32 action) switch (action) { case PM_RESET_ACTION_RELEASE: case PM_RESET_ACTION_ASSERT: @@ -66,3 +88,6 @@ index 297c6c2ddc..bc295cf013 100644 } else { status = XST_INVALID_PARAM; } +-- +2.17.1 + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/makefile-skip-copy_bsp.sh.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/makefile-skip-copy_bsp.sh.patch new file mode 100644 index 00000000..5b9cc71b --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/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 <mark.hatle@xilinx.com> + +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/lib/sw_apps/versal_plm/src/Makefile b/lib/sw_apps/versal_plm/src/Makefile +index b4536e8584..a8643ecd47 100644 +--- a/lib/sw_apps/versal_plm/src/Makefile ++++ b/lib/sw_apps/versal_plm/src/Makefile +@@ -30,8 +30,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_plm_bsp + +diff --git a/lib/sw_apps/versal_psmfw/src/Makefile b/lib/sw_apps/versal_psmfw/src/Makefile +index fdfee0a092..1ed664114b 100644 +--- a/lib/sw_apps/versal_psmfw/src/Makefile ++++ b/lib/sw_apps/versal_psmfw/src/Makefile +@@ -29,8 +29,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/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/zynqmp_pmufw-fixup.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/zynqmp_pmufw-fixup.patch new file mode 100644 index 00000000..50ce7bcb --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/zynqmp_pmufw-fixup.patch @@ -0,0 +1,19 @@ +Fix incorrect copy that triggers a failure: + +| cp: -r not specified; omitting directory '../misc/../../../../lib/bsp/standalone/src/common/clocking' + +Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> + +diff --git a/lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh b/lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh +index be8616968e..c3eca3f092 100755 +--- a/lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh ++++ b/lib/sw_apps/zynqmp_pmufw/misc/copy_bsp.sh +@@ -84,7 +84,7 @@ cp -r $BSP_DIR/libsrc/xilskey/src/include/*.h $BSP_DIR/include/ + BSP_SEQUENTIAL_MAKEFILES="$BSP_SEQUENTIAL_MAKEFILES $BSP_DIR/libsrc/xilskey/src/Makefile" + + # copy bsp standalone code +-cp $STANDALONE_DIR/common/* $BSP_DIR/libsrc/standalone/src/ ++cp -r $STANDALONE_DIR/common/* $BSP_DIR/libsrc/standalone/src/ + cp $STANDALONE_DIR/microblaze/* $BSP_DIR/libsrc/standalone/src/ + cp -r $STANDALONE_DIR/profile $BSP_DIR/libsrc/standalone/src/ + cp $WORKING_DIR/bspconfig.h $BSP_DIR/include diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc index 79d6791c..8ff96b64 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc @@ -8,7 +8,7 @@ require embeddedsw.inc inherit deploy COMPATIBLE_HOST = "microblaze.*-elf" -COMPATIBLE_MACHINE = "versal-mb" +COMPATIBLE_MACHINE = "microblaze-plm" S = "${WORKDIR}/git" B = "${S}/lib/sw_apps/versal_plm/src" diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2019.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2019.2.bb deleted file mode 100644 index 782c9dc4..00000000 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2019.2.bb +++ /dev/null @@ -1 +0,0 @@ -require plm-firmware.inc diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2020.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2020.2.bb index 69455dfa..a72b055d 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2020.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2020.2.bb @@ -1,3 +1,53 @@ require plm-firmware.inc -DEFAULT_PREFERENCE = "-1" +SRC_URI += " \ + file://0001-zynqmp_pmufw-Fix-reset-ops-for-assert.patch \ + file://0001-zynqmp_pmufw-Correct-structure-header-of-PmResetOps.patch \ + file://0001-sw_apps-versal_plm-Changes-to-ensure-versionless-bui.patch \ + file://0001-versal_psmfw-misc-Update-makefile-for-version-less-b.patch \ + file://zynqmp_pmufw-fixup.patch \ + file://makefile-skip-copy_bsp.sh.patch \ + " + +do_configure() { + # manually do the copy_bsp step first, so as to be able to fix up use of + # mb-* commands + . ${B}/../misc/copy_bsp.sh + echo "$BSP_SEQUENTIAL_MAKEFILES" > ${B}/seq.mak +} + +do_compile() { + # First process the sequential items + for i in $(cat seq.mak); do + echo Include Seq: $i + if [ ! -d $i ]; then + echo "Skipping...." + continue + fi + oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} + done + for i in $(cat seq.mak); do + echo Libs Seq: $i + if [ ! -d $i ]; then + echo "Skipping...." + continue + fi + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} + done + + # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc + # properly. So do its job manually. Preparing the includes first, then libs. + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + echo Include: $i + oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} + done + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + echo Libs: $i + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} + done + + # --build-id=none is required due to linker script not defining a location for it. + # Again, recipe-systoot include is necessary + echo Construct: executable + oe_runmake plm.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" +} diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc index 1e1c1e65..dc0e1c82 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc @@ -4,8 +4,6 @@ PROVIDES = "virtual/pmu-firmware" require embeddedsw.inc -SRC_URI += "file://fix-zynqmp-assert.patch" - inherit deploy COMPATIBLE_HOST = "microblaze.*-elf" diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2019.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2019.2.bb deleted file mode 100644 index 88b10b31..00000000 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2019.2.bb +++ /dev/null @@ -1 +0,0 @@ -require pmu-firmware.inc diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.1.bb index 88b10b31..047047bc 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.1.bb @@ -1 +1,7 @@ require pmu-firmware.inc + +SRC_URI += " \ + file://0001-zynqmp_pmufw-Fix-reset-ops-for-assert.patch \ + file://0001-zynqmp_pmufw-Correct-structure-header-of-PmResetOps.patch \ + " + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb index e2eca1b7..09c7492a 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb @@ -1,3 +1,45 @@ require pmu-firmware.inc -DEFAULT_PREFERENCE = "-1" +SRC_URI += " \ + file://0001-zynqmp_pmufw-Fix-reset-ops-for-assert.patch \ + file://0001-zynqmp_pmufw-Correct-structure-header-of-PmResetOps.patch \ + file://0001-sw_apps-versal_plm-Changes-to-ensure-versionless-bui.patch \ + file://0001-versal_psmfw-misc-Update-makefile-for-version-less-b.patch \ + file://zynqmp_pmufw-fixup.patch \ + file://makefile-skip-copy_bsp.sh.patch \ + " + +do_configure() { + # manually do the copy_bsp step first, so as to be able to fix up use of + # mb-* commands + . ${B}/../misc/copy_bsp.sh + echo "$BSP_SEQUENTIAL_MAKEFILES" > ${B}/seq.mak +} + +do_compile() { + # First process the sequential items + for i in $(cat seq.mak); do + echo Include Seq: $i + oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} + done + for i in $(cat seq.mak); do + echo Libs Seq: $i + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} + done + + # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc + # properly. So do its job manually. Preparing the includes first, then libs. + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + echo Include: $i + oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} + done + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + echo Libs: $i + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} + done + + # --build-id=none is required due to linker script not defining a location for it. + # Again, recipe-systoot include is necessary + echo Construct: executable + oe_runmake executable.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" +} diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc index f6f7590d..66754b08 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc @@ -8,7 +8,7 @@ require embeddedsw.inc inherit deploy COMPATIBLE_HOST = "microblaze.*-elf" -COMPATIBLE_MACHINE = "versal-mb" +COMPATIBLE_MACHINE = "microblaze-psm" S = "${WORKDIR}/git" diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2019.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2019.2.bb deleted file mode 100644 index 61509c7a..00000000 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2019.2.bb +++ /dev/null @@ -1 +0,0 @@ -require psm-firmware.inc diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.1.bb deleted file mode 100644 index 61509c7a..00000000 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.1.bb +++ /dev/null @@ -1 +0,0 @@ -require psm-firmware.inc diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.2.bb index 11ef4038..e3125c47 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2020.2.bb @@ -1,3 +1,53 @@ require psm-firmware.inc -DEFAULT_PREFERENCE = "-1" +SRC_URI += " \ + file://0001-zynqmp_pmufw-Fix-reset-ops-for-assert.patch \ + file://0001-zynqmp_pmufw-Correct-structure-header-of-PmResetOps.patch \ + file://0001-sw_apps-versal_plm-Changes-to-ensure-versionless-bui.patch \ + file://0001-versal_psmfw-misc-Update-makefile-for-version-less-b.patch \ + file://zynqmp_pmufw-fixup.patch \ + file://makefile-skip-copy_bsp.sh.patch \ + " + +do_configure() { + # manually do the copy_bsp step first, so as to be able to fix up use of + # mb-* commands + . ${B}/../misc/copy_bsp.sh + echo "$BSP_SEQUENTIAL_MAKEFILES" > ${B}/seq.mak +} + +do_compile() { + # First process the sequential items + for i in $(cat seq.mak); do + echo Include Seq: $i + if [ ! -d $i ]; then + echo "Skipping...." + continue + fi + oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} + done + for i in $(cat seq.mak); do + echo Libs Seq: $i + if [ ! -d $i ]; then + echo "Skipping...." + continue + fi + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} + done + + # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc + # properly. So do its job manually. Preparing the includes first, then libs. + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + echo Include: $i + oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} + done + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + echo Libs: $i + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} + done + + # --build-id=none is required due to linker script not defining a location for it. + # Again, recipe-systoot include is necessary + echo Construct: executable + oe_runmake psmfw.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" +} |