From a2e4b30b9263517e022e1781e0991a20fa6634fd Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Wed, 7 Dec 2022 18:55:01 -0800 Subject: meta-xilinx-standalone: Update 2023.1 embeddedsw and git version Update the integration to match 2023 changes. Update the Makefile and versal pathes for 2023 specific version Add a workaround for -Werror -Wnull-dereference failing during some compiles Signed-off-by: Mark Hatle --- .../embeddedsw/fsbl-firmware_%.bbappend | 12 ++- ...0001-Workaround-Disable-Wnull-dereference.patch | 42 +++++++++ .../0001-versal_fw-Fixup-core-makefiles.patch | 101 ++++++++++++++++++++ .../2023.1/makefile-skip-copy_bsp.sh.patch | 104 +++++++++++++++++++++ .../recipes-bsp/embeddedsw/fsbl-firmware.inc | 2 +- .../recipes-bsp/embeddedsw/fsbl-firmware_2023.1.bb | 3 +- .../recipes-bsp/embeddedsw/fsbl-firmware_git.bb | 4 +- .../recipes-bsp/embeddedsw/plm-firmware_2023.1.bb | 23 ++++- .../recipes-bsp/embeddedsw/plm-firmware_git.bb | 57 +++++------ .../recipes-bsp/embeddedsw/pmu-firmware_2023.1.bb | 3 +- .../recipes-bsp/embeddedsw/pmu-firmware_git.bb | 37 +------- .../recipes-bsp/embeddedsw/psm-firmware_2023.1.bb | 21 ++++- .../recipes-bsp/embeddedsw/psm-firmware_git.bb | 55 ++++------- 13 files changed, 350 insertions(+), 114 deletions(-) create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/0001-Workaround-Disable-Wnull-dereference.patch create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/0001-versal_fw-Fixup-core-makefiles.patch create mode 100644 meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/makefile-skip-copy_bsp.sh.patch diff --git a/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend b/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend index 509a0dbb..6a23dc47 100644 --- a/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend +++ b/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend @@ -1,16 +1,20 @@ # QEMU for the Kria SOM requires a section from the FSBL to be extracted -FSBL_DEFAULT_NAME = "executable.elf" -PMU_CONF_NAME = "pmu-conf.bin" +PMU_CONF_NAME ?= "pmu-conf" +PMU_CONF_BASE_NAME ?= "${PMU_CONF_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" + +# Required so we can run objcopy in do_compile +DEPENDS:append:zynqmp = " virtual/${TARGET_PREFIX}binutils" do_compile:append:zynqmp () { if [ -z "${SYSTEM_DTFILE}" ]; then - aarch64-none-elf-objcopy --dump-section .sys_cfg_data=../${PMU_CONF_NAME} ${FSBL_DEFAULT_NAME} + ${OBJCOPY} --dump-section .sys_cfg_data=${B}/${PMU_CONF_NAME}.bin ${B}/${ESW_COMPONENT} fi } do_deploy:append:zynqmp () { if [ -z "${SYSTEM_DTFILE}" ]; then - install -Dm 0644 ${B}/${PMU_CONF_NAME} ${DEPLOYDIR}/${PMU_CONF_NAME} + install -Dm 0644 ${B}/${PMU_CONF_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_BASE_NAME}.bin + ln -s ${PMU_CONF_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_NAME}.bin fi } diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/0001-Workaround-Disable-Wnull-dereference.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/0001-Workaround-Disable-Wnull-dereference.patch new file mode 100644 index 00000000..a71a4c11 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/0001-Workaround-Disable-Wnull-dereference.patch @@ -0,0 +1,42 @@ +From 98b3377a70ee057f7529bd3381fa6d844ba6fe09 Mon Sep 17 00:00:00 2001 +From: Mark Hatle +Date: Wed, 7 Dec 2022 17:36:22 -0800 +Subject: [PATCH] Workaround: Disable -Wnull-dereference + + xpm_domain_iso.c:724:42: error: potential null pointer dereference [-Werror=null-dereference] + +Signed-off-by: Mark Hatle +--- + lib/sw_services/xilpm/src/versal/common/Makefile | 2 +- + lib/sw_services/xilpm/src/versal_net/common/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/sw_services/xilpm/src/versal/common/Makefile b/lib/sw_services/xilpm/src/versal/common/Makefile +index 0b61e37bbb..6c5f776ef0 100644 +--- a/lib/sw_services/xilpm/src/versal/common/Makefile ++++ b/lib/sw_services/xilpm/src/versal/common/Makefile +@@ -10,7 +10,7 @@ COMPILER_FLAGS= + EXTRA_COMPILER_FLAGS= + CUSTOM_COMPILER_FLAGS=-Werror + ifeq ($(findstring gcc, $(COMPILER)), gcc) +-CUSTOM_COMPILER_FLAGS+=-Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wno-main -Wimplicit-function-declaration -Wmissing-prototypes -Wmissing-braces -Wmultistatement-macros -Wparentheses -Wreturn-type -Wsequence-point -Wbool-compare -Wbool-operation -Wchar-subscripts -Wenum-compare -Winit-self -fno-strict-aliasing -Wtautological-compare -Wuninitialized -Wunused-function -Wunused-label -Wunused-variable -Wcast-function-type -Wenum-conversion -Wmissing-parameter-type -Wtype-limits -Wshift-negative-value -Wshadow -Wdouble-promotion -fno-common -Wnull-dereference -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wswitch-bool -Wshift-overflow=2 -Wswitch-outside-range -Wswitch-unreachable -Wunused-parameter -Wduplicated-branches -Wduplicated-cond -Wdiv-by-zero -Wshadow=local -Wpointer-arith -Wunused-macros -Wdangling-else -Waggressive-loop-optimizations -Wstrict-prototypes -Woverflow -Wredundant-decls -Wvla -Wlogical-op -Wconversion -Wundef ++CUSTOM_COMPILER_FLAGS+=-Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wno-main -Wimplicit-function-declaration -Wmissing-prototypes -Wmissing-braces -Wmultistatement-macros -Wparentheses -Wreturn-type -Wsequence-point -Wbool-compare -Wbool-operation -Wchar-subscripts -Wenum-compare -Winit-self -fno-strict-aliasing -Wtautological-compare -Wuninitialized -Wunused-function -Wunused-label -Wunused-variable -Wcast-function-type -Wenum-conversion -Wmissing-parameter-type -Wtype-limits -Wshift-negative-value -Wshadow -Wdouble-promotion -fno-common -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wswitch-bool -Wshift-overflow=2 -Wswitch-outside-range -Wswitch-unreachable -Wunused-parameter -Wduplicated-branches -Wduplicated-cond -Wdiv-by-zero -Wshadow=local -Wpointer-arith -Wunused-macros -Wdangling-else -Waggressive-loop-optimizations -Wstrict-prototypes -Woverflow -Wredundant-decls -Wvla -Wlogical-op -Wconversion -Wundef + endif + LIB= libxilpm.a + +diff --git a/lib/sw_services/xilpm/src/versal_net/common/Makefile b/lib/sw_services/xilpm/src/versal_net/common/Makefile +index 36460a1b18..257ad694e3 100644 +--- a/lib/sw_services/xilpm/src/versal_net/common/Makefile ++++ b/lib/sw_services/xilpm/src/versal_net/common/Makefile +@@ -10,7 +10,7 @@ COMPILER_FLAGS= + EXTRA_COMPILER_FLAGS= + CUSTOM_COMPILER_FLAGS=-Werror + ifeq ($(findstring gcc, $(COMPILER)), gcc) +-CUSTOM_COMPILER_FLAGS+=-Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wno-main -Wimplicit-function-declaration -Wmissing-prototypes -Wmissing-braces -Wmultistatement-macros -Wparentheses -Wreturn-type -Wsequence-point -Wbool-compare -Wbool-operation -Wchar-subscripts -Wenum-compare -Winit-self -fno-strict-aliasing -Wtautological-compare -Wuninitialized -Wunused-function -Wunused-label -Wunused-variable -Wcast-function-type -Wenum-conversion -Wmissing-parameter-type -Wtype-limits -Wshift-negative-value -Wshadow -Wdouble-promotion -fno-common -Wnull-dereference -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wswitch-bool -Wshift-overflow=2 -Wswitch-outside-range -Wswitch-unreachable -Wunused-parameter -Wduplicated-branches -Wduplicated-cond -Wdiv-by-zero -Wshadow=local -Wpointer-arith -Wunused-macros -Wdangling-else -Waggressive-loop-optimizations -Wstrict-prototypes -Woverflow -Wredundant-decls -Wvla -Wlogical-op -Wconversion -Wundef ++CUSTOM_COMPILER_FLAGS+=-Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wno-main -Wimplicit-function-declaration -Wmissing-prototypes -Wmissing-braces -Wmultistatement-macros -Wparentheses -Wreturn-type -Wsequence-point -Wbool-compare -Wbool-operation -Wchar-subscripts -Wenum-compare -Winit-self -fno-strict-aliasing -Wtautological-compare -Wuninitialized -Wunused-function -Wunused-label -Wunused-variable -Wcast-function-type -Wenum-conversion -Wmissing-parameter-type -Wtype-limits -Wshift-negative-value -Wshadow -Wdouble-promotion -fno-common -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wswitch-bool -Wshift-overflow=2 -Wswitch-outside-range -Wswitch-unreachable -Wunused-parameter -Wduplicated-branches -Wduplicated-cond -Wdiv-by-zero -Wshadow=local -Wpointer-arith -Wunused-macros -Wdangling-else -Waggressive-loop-optimizations -Wstrict-prototypes -Woverflow -Wredundant-decls -Wvla -Wlogical-op -Wconversion -Wundef + endif + LIB= libxilpm.a + +-- +2.17.1 + diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/0001-versal_fw-Fixup-core-makefiles.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/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.1/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.1/makefile-skip-copy_bsp.sh.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/makefile-skip-copy_bsp.sh.patch new file mode 100644 index 00000000..1300c7e1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/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/fsbl-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc index dd87ff31..ceb49417 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc @@ -2,7 +2,7 @@ DESCRIPTION = "First Stage Bootloader" inherit xlnx-embeddedsw deploy -COMPATIBLE_HOST = ".*-(elf|eabi)" +COMPATIBLE_HOST = ".*-(elf|.*eabi)" COMPATIBLE_MACHINE = "none" COMPATIBLE_MACHINE:zynq = ".*" COMPATIBLE_MACHINE:zynqmp = ".*" diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.1.bb index 3f9740a0..9055ac6c 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.1.bb @@ -1,10 +1,11 @@ require fsbl-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ file://fsbl-fixups.patch \ + file://0001-Workaround-Disable-Wnull-dereference.patch \ " # This version does not build for zynq diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_git.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_git.bb index 697431ad..dc3b0ca9 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_git.bb @@ -3,10 +3,12 @@ DEFAULT_PREFERENCE = "-1" require fsbl-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ + file://makefile-skip-copy_bsp.sh.patch \ file://fsbl-fixups.patch \ + file://0001-Workaround-Disable-Wnull-dereference.patch \ " # This version does not build for zynq diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2023.1.bb index cc810241..22626f4d 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2023.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2023.1.bb @@ -1,15 +1,36 @@ require plm-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +# Separate build directories for versal and versal-net +SOC_DIR = "versal" +SOC_DIR:versal-net = "versal_net" +B = "${S}/lib/sw_apps/versal_plm/src/${SOC_DIR}" + +BSP_DIR ?= "${B}/../../misc/versal_plm_bsp" + +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ file://0001-versal_fw-Fixup-core-makefiles.patch \ + file://0001-Workaround-Disable-Wnull-dereference.patch \ " EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" +# Workaround for: ../../../include/xparameters.h:1021:67: warning: conversion from 'long long unsigned int' to 'unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow] +EXTRA_COMPILER_FLAGS += "-Wno-overflow" + +# Workaround for: xpm_domain_iso.c:724:42: error: potential null pointer dereference [-Werror=null-dereference] +EXTRA_COMPILER_FLAGS += "-Wno-null-dereference" + +do_configure() { + # manually do the copy_bsp step first, so as to be able to fix up use of + # mb-* commands + ${B}/../../misc/${SOC_DIR}/copy_bsp.sh +} + do_compile() { + pwd oe_runmake ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin 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 af906e5e..aae0e8af 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_git.bb @@ -3,53 +3,38 @@ DEFAULT_PREFERENCE = "-1" require plm-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +# Separate build directories for versal and versal-net +SOC_DIR = "versal" +SOC_DIR:versal-net = "versal_net" +B = "${S}/lib/sw_apps/versal_plm/src/${SOC_DIR}" + +BSP_DIR ?= "${B}/../../misc/versal_plm_bsp" + +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ + file://0001-versal_fw-Fixup-core-makefiles.patch \ + file://0001-Workaround-Disable-Wnull-dereference.patch \ " +EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" + +# Workaround for: ../../../include/xparameters.h:1021:67: warning: conversion from 'long long unsigned int' to 'unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow] +EXTRA_COMPILER_FLAGS += "-Wno-overflow" + +# Workaround for: xpm_domain_iso.c:724:42: error: potential null pointer dereference [-Werror=null-dereference] +EXTRA_COMPILER_FLAGS += "-Wno-null-dereference" + 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 + ${B}/../../misc/${SOC_DIR}/copy_bsp.sh } 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" + pwd + 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 2c554d6d..b1e8c005 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 @@ -1,10 +1,11 @@ require pmu-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ + file://0001-Workaround-Disable-Wnull-dereference.patch \ " EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" 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 a17aad55..e55edd1d 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb @@ -3,45 +3,18 @@ DEFAULT_PREFERENCE = "-1" require pmu-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ + file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ + file://0001-Workaround-Disable-Wnull-dereference.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 -} +EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" 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 - done - for i in $(cat seq.mak); do - echo Libs Seq: $i - oe_runmake -C $(dirname $i) -s libs - 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 - done - for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do - echo Libs: $i - 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 - echo Construct: executable - oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" + oe_runmake ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin } diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2023.1.bb index d861fb1c..bd992e41 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2023.1.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2023.1.bb @@ -1,14 +1,33 @@ require psm-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +# Separate build directories for versal and versal-net +SOC_DIR = "versal" +SOC_DIR:versal-net = "versal_net" +B = "${S}/lib/sw_apps/versal_psmfw/src/${SOC_DIR}" + +BSP_DIR ?= "${B}/../../misc/versal_psmfw_bsp" + +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ file://0001-versal_fw-Fixup-core-makefiles.patch \ + file://0001-Workaround-Disable-Wnull-dereference.patch \ " EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra" +# Override default since we're in a subdirectory deeper now... +do_configure() { + # manually do the copy_bsp step first, so as to be able to fix up use of + # mb-* commands + if [ ${SOC_DIR} != "versal" ]; then + ${B}/../../misc/${SOC_DIR}/copy_bsp.sh + else + ${B}/../../misc/copy_bsp.sh + fi +} + do_compile() { oe_runmake 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 94a2c22d..a70c7a8d 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_git.bb @@ -3,53 +3,36 @@ DEFAULT_PREFERENCE = "-1" require psm-firmware.inc -FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" +# Separate build directories for versal and versal-net +SOC_DIR = "versal" +SOC_DIR:versal-net = "versal_net" +B = "${S}/lib/sw_apps/versal_psmfw/src/${SOC_DIR}" + +BSP_DIR ?= "${B}/../../misc/versal_psmfw_bsp" + +FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" SRC_URI += " \ file://makefile-skip-copy_bsp.sh.patch \ + file://0001-versal_fw-Fixup-core-makefiles.patch \ + file://0001-Workaround-Disable-Wnull-dereference.patch \ " +EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra" + +# Override default since we're in a subdirectory deeper now... 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 + if [ ${SOC_DIR} != "versal" ]; then + ${B}/../../misc/${SOC_DIR}/copy_bsp.sh + else + ${B}/../../misc/copy_bsp.sh + fi } 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" + oe_runmake ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin } -- cgit v1.2.3-54-g00ecf