From 61de35ad4a36ee28ec38bd930967c8c10ef4fbac Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Tue, 2 Apr 2024 16:48:32 -0600 Subject: meta-xilinx-standalone: embeddedsw: fsbl/pmu-firmware Update integration for Scarthgap changes Fix 2022.2 and 2023.2 standalone ESW patching. Note, the standalone versions may or may not work by themselves. The bbappends in meta-xilinx-tools complete the implementation. Signed-off-by: Mark Hatle --- .../0001-versal_fw-Fixup-core-makefiles.patch | 101 ++++++++++++++++++++ .../2022.2/makefile-skip-copy_bsp.sh.patch | 104 +++++++++++++++++++++ .../0001-versal_fw-Fixup-core-makefiles.patch | 101 ++++++++++++++++++++ .../2023.2/makefile-skip-copy_bsp.sh.patch | 99 ++++++++++++++++++++ .../recipes-bsp/embeddedsw/fsbl-firmware.inc | 9 +- .../recipes-bsp/embeddedsw/fsbl-firmware_2022.2.bb | 2 +- .../recipes-bsp/embeddedsw/fsbl-firmware_2023.2.bb | 2 +- .../recipes-bsp/embeddedsw/pmu-firmware.inc | 40 ++++---- .../recipes-bsp/embeddedsw/pmu-firmware_2022.1.bb | 6 -- .../recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb | 6 -- .../recipes-bsp/embeddedsw/pmu-firmware_2023.1.bb | 6 -- .../recipes-bsp/embeddedsw/pmu-firmware_2023.2.bb | 6 -- .../recipes-bsp/embeddedsw/pmu-firmware_git.bb | 6 -- 13 files changed, 429 insertions(+), 59 deletions(-) create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/0001-versal_fw-Fixup-core-makefiles.patch create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/makefile-skip-copy_bsp.sh.patch create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.2/0001-versal_fw-Fixup-core-makefiles.patch create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.2/makefile-skip-copy_bsp.sh.patch (limited to 'meta-xilinx-standalone') diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/0001-versal_fw-Fixup-core-makefiles.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/0001-versal_fw-Fixup-core-makefiles.patch new file mode 100644 index 00000000..d6cb0e38 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/0001-versal_fw-Fixup-core-makefiles.patch @@ -0,0 +1,101 @@ +From 607322dafb2979affd329ea70a2a7952203188a4 Mon Sep 17 00:00:00 2001 +From: Mark Hatle +Date: Wed, 7 Dec 2022 15:42:15 -0800 +Subject: [PATCH] versal_fw: Fixup core makefiles + +The Yocto Project build environment needs to be able to override a few +additional variables that may not be appropriate to do on the regular +command line build version. This patch preserves the default while +allowing it to be overriden as necessary. + +Signed-off-by: Mark Hatle +--- + lib/sw_apps/versal_plm/misc/versal/Makefile | 6 ++++-- + lib/sw_apps/versal_plm/misc/versal_net/Makefile | 6 ++++-- + lib/sw_apps/versal_psmfw/misc/Makefile | 6 ++++-- + 3 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/lib/sw_apps/versal_plm/misc/versal/Makefile b/lib/sw_apps/versal_plm/misc/versal/Makefile +index 5c8e719e9c..af070716b6 100644 +--- a/lib/sw_apps/versal_plm/misc/versal/Makefile ++++ b/lib/sw_apps/versal_plm/misc/versal/Makefile +@@ -2,6 +2,8 @@ + COMPILER := mb-gcc + ARCHIVER := mb-gcc-ar + ASSEMBLER := mb-as ++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 + DRIVER_LIB_VERSION = 1.0 + PROCESSOR = psv_pmc_0 + LIBRARIES = ${PROCESSOR}/lib/libxil.a +@@ -40,11 +42,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=$(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) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(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) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +diff --git a/lib/sw_apps/versal_plm/misc/versal_net/Makefile b/lib/sw_apps/versal_plm/misc/versal_net/Makefile +index abffa6c5ed..4af5a02001 100644 +--- a/lib/sw_apps/versal_plm/misc/versal_net/Makefile ++++ b/lib/sw_apps/versal_plm/misc/versal_net/Makefile +@@ -2,6 +2,8 @@ + COMPILER := mb-gcc + ARCHIVER := mb-gcc-ar + ASSEMBLER := mb-as ++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 + DRIVER_LIB_VERSION = 1.0 + PROCESSOR = psx_pmc_0 + LIBRARIES = ${PROCESSOR}/lib/libxil.a +@@ -40,11 +42,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=$(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) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(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) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +diff --git a/lib/sw_apps/versal_psmfw/misc/Makefile b/lib/sw_apps/versal_psmfw/misc/Makefile +index 02d85e492e..f6386dcbed 100644 +--- a/lib/sw_apps/versal_psmfw/misc/Makefile ++++ b/lib/sw_apps/versal_psmfw/misc/Makefile +@@ -11,6 +11,8 @@ PAR_SUBDIRS := $(patsubst %/Makefile, %, $(BSP_PARALLEL_MAKEFILES)) + COMPILER := mb-gcc + ARCHIVER := mb-ar + ASSEMBLER := mb-as ++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 + + ifneq (,$(findstring win,$(RDI_PLATFORM))) + SHELL = CMD +@@ -41,11 +43,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=$(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" ++ $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(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" ++ $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +-- +2.17.1 + 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 00000000..1300c7e1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2022.2/makefile-skip-copy_bsp.sh.patch @@ -0,0 +1,104 @@ +From d703670357546d9aab66baea1f6751ba1cbdf7ad Mon Sep 17 00:00:00 2001 +From: Mark Hatle +Date: Wed, 7 Dec 2022 15:30:23 -0800 +Subject: [PATCH] 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 +--- + lib/sw_apps/versal_plm/src/versal/Makefile | 4 ++-- + lib/sw_apps/versal_plm/src/versal_net/Makefile | 4 ++-- + lib/sw_apps/versal_psmfw/src/versal/Makefile | 4 ++-- + lib/sw_apps/versal_psmfw/src/versal_net/Makefile | 6 +++--- + lib/sw_apps/zynqmp_pmufw/src/Makefile | 4 ++-- + 5 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/lib/sw_apps/versal_plm/src/versal/Makefile b/lib/sw_apps/versal_plm/src/versal/Makefile +index d1ebd1d374..bfb8c83adb 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_plm/src/versal_net/Makefile b/lib/sw_apps/versal_plm/src/versal_net/Makefile +index 39c7aa38e3..081d8f1b2e 100644 +--- a/lib/sw_apps/versal_plm/src/versal_net/Makefile ++++ b/lib/sw_apps/versal_plm/src/versal_net/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_net/copy_bsp.sh ++ #echo "Copying BSP files" ++ #../../misc/versal_net/copy_bsp.sh + echo "Compiling bsp" + $(MAKE) -C ../../misc/versal_net/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/versal_psmfw/src/versal_net/Makefile b/lib/sw_apps/versal_psmfw/src/versal_net/Makefile +index a72ffa1de2..3670310daa 100644 +--- a/lib/sw_apps/versal_psmfw/src/versal_net/Makefile ++++ b/lib/sw_apps/versal_psmfw/src/versal_net/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/versal_net/copy_bsp.sh ++ #echo "Copying BSP files" ++ #../../misc/versal_net/copy_bsp.sh + echo "Compiling bsp" + $(MAKE) -C ../../misc/versal_net/versal_psmfw_bsp + +@@ -44,4 +44,4 @@ $(LIBS): + + clean: + rm -rf $(OBJS) $(LIBS) $(EXEC) *.o *.d ../common/*.o ../common/*.d +- rm -rf ../../misc/versal_net/versal_psmfw_bsp +\ No newline at end of file ++ rm -rf ../../misc/versal_net/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 + +-- +2.17.1 + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.2/0001-versal_fw-Fixup-core-makefiles.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.2/0001-versal_fw-Fixup-core-makefiles.patch new file mode 100644 index 00000000..d6cb0e38 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.2/0001-versal_fw-Fixup-core-makefiles.patch @@ -0,0 +1,101 @@ +From 607322dafb2979affd329ea70a2a7952203188a4 Mon Sep 17 00:00:00 2001 +From: Mark Hatle +Date: Wed, 7 Dec 2022 15:42:15 -0800 +Subject: [PATCH] versal_fw: Fixup core makefiles + +The Yocto Project build environment needs to be able to override a few +additional variables that may not be appropriate to do on the regular +command line build version. This patch preserves the default while +allowing it to be overriden as necessary. + +Signed-off-by: Mark Hatle +--- + lib/sw_apps/versal_plm/misc/versal/Makefile | 6 ++++-- + lib/sw_apps/versal_plm/misc/versal_net/Makefile | 6 ++++-- + lib/sw_apps/versal_psmfw/misc/Makefile | 6 ++++-- + 3 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/lib/sw_apps/versal_plm/misc/versal/Makefile b/lib/sw_apps/versal_plm/misc/versal/Makefile +index 5c8e719e9c..af070716b6 100644 +--- a/lib/sw_apps/versal_plm/misc/versal/Makefile ++++ b/lib/sw_apps/versal_plm/misc/versal/Makefile +@@ -2,6 +2,8 @@ + COMPILER := mb-gcc + ARCHIVER := mb-gcc-ar + ASSEMBLER := mb-as ++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 + DRIVER_LIB_VERSION = 1.0 + PROCESSOR = psv_pmc_0 + LIBRARIES = ${PROCESSOR}/lib/libxil.a +@@ -40,11 +42,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=$(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) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(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) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +diff --git a/lib/sw_apps/versal_plm/misc/versal_net/Makefile b/lib/sw_apps/versal_plm/misc/versal_net/Makefile +index abffa6c5ed..4af5a02001 100644 +--- a/lib/sw_apps/versal_plm/misc/versal_net/Makefile ++++ b/lib/sw_apps/versal_plm/misc/versal_net/Makefile +@@ -2,6 +2,8 @@ + COMPILER := mb-gcc + ARCHIVER := mb-gcc-ar + ASSEMBLER := mb-as ++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 + DRIVER_LIB_VERSION = 1.0 + PROCESSOR = psx_pmc_0 + LIBRARIES = ${PROCESSOR}/lib/libxil.a +@@ -40,11 +42,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=$(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) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(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) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +diff --git a/lib/sw_apps/versal_psmfw/misc/Makefile b/lib/sw_apps/versal_psmfw/misc/Makefile +index 02d85e492e..f6386dcbed 100644 +--- a/lib/sw_apps/versal_psmfw/misc/Makefile ++++ b/lib/sw_apps/versal_psmfw/misc/Makefile +@@ -11,6 +11,8 @@ PAR_SUBDIRS := $(patsubst %/Makefile, %, $(BSP_PARALLEL_MAKEFILES)) + COMPILER := mb-gcc + ARCHIVER := mb-ar + ASSEMBLER := mb-as ++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 + + ifneq (,$(findstring win,$(RDI_PLATFORM))) + SHELL = CMD +@@ -41,11 +43,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=$(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" ++ $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.libs: include + @echo "Running Make libs in $(subst /make.libs,,$@)" +- $(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" ++ $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" + + %/make.clean: + $(MAKE) -C $(subst /make.clean,,$@) -s clean +-- +2.17.1 + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.2/makefile-skip-copy_bsp.sh.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.2/makefile-skip-copy_bsp.sh.patch new file mode 100644 index 00000000..4ce521cd --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.2/makefile-skip-copy_bsp.sh.patch @@ -0,0 +1,99 @@ +From d703670357546d9aab66baea1f6751ba1cbdf7ad Mon Sep 17 00:00:00 2001 +From: Mark Hatle +Date: Wed, 7 Dec 2022 15:30:23 -0800 +Subject: [PATCH] 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 +--- + lib/sw_apps/versal_plm/src/versal/Makefile | 4 ++-- + lib/sw_apps/versal_plm/src/versal_net/Makefile | 4 ++-- + lib/sw_apps/versal_psmfw/src/versal/Makefile | 4 ++-- + lib/sw_apps/versal_psmfw/src/versal_net/Makefile | 6 +++--- + lib/sw_apps/zynqmp_pmufw/src/Makefile | 4 ++-- + 5 files changed, 11 insertions(+), 11 deletions(-) + +Index: git/lib/sw_apps/versal_plm/src/versal/Makefile +=================================================================== +--- git.orig/lib/sw_apps/versal_plm/src/versal/Makefile ++++ git/lib/sw_apps/versal_plm/src/versal/Makefile +@@ -35,8 +35,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) + $(OBJS): $(LIBS) + + $(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 + +Index: git/lib/sw_apps/versal_plm/src/versal_net/Makefile +=================================================================== +--- git.orig/lib/sw_apps/versal_plm/src/versal_net/Makefile ++++ git/lib/sw_apps/versal_plm/src/versal_net/Makefile +@@ -35,8 +35,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) + $(OBJS): $(LIBS) + + $(LIBS): +- echo "Copying BSP files" +- ../../misc/versal_net/copy_bsp.sh ++ #echo "Copying BSP files" ++ #../../misc/versal_net/copy_bsp.sh + echo "Compiling bsp" + $(MAKE) -C ../../misc/versal_net/versal_plm_bsp + +Index: git/lib/sw_apps/versal_psmfw/src/versal/Makefile +=================================================================== +--- git.orig/lib/sw_apps/versal_psmfw/src/versal/Makefile ++++ git/lib/sw_apps/versal_psmfw/src/versal/Makefile +@@ -37,8 +37,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) + $(OBJS): $(LIBS) + + $(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 + +Index: git/lib/sw_apps/versal_psmfw/src/versal_net/Makefile +=================================================================== +--- git.orig/lib/sw_apps/versal_psmfw/src/versal_net/Makefile ++++ git/lib/sw_apps/versal_psmfw/src/versal_net/Makefile +@@ -37,8 +37,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) + $(OBJS): $(LIBS) + + $(LIBS): +- echo "Copying BSP files" +- ../../misc/versal_net/copy_bsp.sh ++ #echo "Copying BSP files" ++ #../../misc/versal_net/copy_bsp.sh + echo "Compiling bsp" + $(MAKE) -C ../../misc/versal_net/versal_psmfw_bsp + +@@ -47,4 +47,3 @@ $(LIBS): + + clean: + rm -rf $(OBJS) $(LIBS) $(EXEC) *.o *.d ../common/*.o ../common/*.d +- rm -rf ../../misc/versal_net/versal_psmfw_bsp +Index: git/lib/sw_apps/zynqmp_pmufw/src/Makefile +=================================================================== +--- git.orig/lib/sw_apps/zynqmp_pmufw/src/Makefile ++++ git/lib/sw_apps/zynqmp_pmufw/src/Makefile +@@ -30,8 +30,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) + $(OBJS): $(LIBS) + + $(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/fsbl-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc index 34051bfa..0fe837f8 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc @@ -20,13 +20,9 @@ B = "${S}/lib/sw_apps/${APP_DIR}/src" # The makefile does not handle parallelization PARALLEL_MAKE = "-j1" -do_configure() { - : -} - COMPILER = "${CC}" COMPILER_FLAGS = "-O2 -c" -EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra -Os -flto -ffat-lto-objects" +EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra ${ESW_CFLAGS}" ARCHIVER = "${AR}" BSP_DIR ?= "${B}/../misc/undefined" @@ -46,9 +42,6 @@ def bsp_make_vars(d): EXTRA_OEMAKE = "${@bsp_make_vars(d)}" ARM_INSTRUCTION_SET:eabi:arm = "arm" -do_compile() { - oe_runmake -} do_install() { : 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 3f9740a0..13a2f1c5 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 @@ -1,6 +1,6 @@ require fsbl-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2022.2:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.2.bb index 8816dc4d..dbeaebc4 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.2.bb @@ -1,6 +1,6 @@ require fsbl-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.2:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc index ed3ac959..92dc3cd3 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc @@ -14,11 +14,11 @@ B = "${S}/lib/sw_apps/zynqmp_pmufw/src" # The makefile does not handle parallelization PARALLEL_MAKE = "-j1" -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 -} +#do_configure:prepend() { +# # manually do the copy_bsp step first, so as to be able to fix up use of +# # mb-* commands +# ${B}/../misc/copy_bsp.sh +#} # All do_compiles need this, even if it's overriden MB_OBJCOPY ??= "${OBJCOPY}" @@ -40,20 +40,22 @@ def bsp_make_vars(d): EXTRA_OEMAKE = "${@bsp_make_vars(d)}" -do_compile() { - # 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 - oe_runmake -C $(dirname $i) -s include - done - for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do - oe_runmake -C $(dirname $i) -s libs - done - - # --build-id=none is required due to linker script not defining a location for it. - # Again, recipe-systoot include is necessary - oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" - +#do_compile() { +# # 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 +# # oe_runmake -C $(dirname $i) -s include +# #done +# #for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do +# # oe_runmake -C $(dirname $i) -s libs +# #done +# +# # --build-id=none is required due to linker script not defining a location for it. +# # Again, recipe-systoot include is necessary +# oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" +#} + +do_compile:append() { ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin } 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 2c554d6d..50dbf97d 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 @@ -8,9 +8,3 @@ SRC_URI += " \ " EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" - -do_compile() { - oe_runmake - - ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin -} 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 2c554d6d..50dbf97d 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 @@ -8,9 +8,3 @@ SRC_URI += " \ " EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" - -do_compile() { - oe_runmake - - ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin -} diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.1.bb index fe6deddc..65d986c8 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.1.bb @@ -8,9 +8,3 @@ SRC_URI += " \ " EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" - -do_compile() { - oe_runmake - - ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin -} diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.2.bb index fe6deddc..65d986c8 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.2.bb @@ -8,9 +8,3 @@ SRC_URI += " \ " EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" - -do_compile() { - oe_runmake - - ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin -} 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 c55cd149..606708c4 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb @@ -11,9 +11,3 @@ SRC_URI += " \ " EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" - -do_compile() { - oe_runmake - - ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin -} -- cgit v1.2.3-54-g00ecf