summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2022-12-07 18:55:01 -0800
committerMark Hatle <mark.hatle@amd.com>2022-12-08 11:37:07 -0800
commita2e4b30b9263517e022e1781e0991a20fa6634fd (patch)
tree7b61b0032b9b14ce031823be389f28dff2a3e34b
parent2ce669e1a5321111853f891e1bfb3cc17c5097af (diff)
downloadmeta-xilinx-a2e4b30b9263517e022e1781e0991a20fa6634fd.tar.gz
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 <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend12
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/0001-Workaround-Disable-Wnull-dereference.patch42
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/0001-versal_fw-Fixup-core-makefiles.patch101
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2023.1/makefile-skip-copy_bsp.sh.patch104
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc2
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2023.1.bb3
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_git.bb4
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2023.1.bb23
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_git.bb57
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2023.1.bb3
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb37
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2023.1.bb21
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_git.bb55
13 files changed, 350 insertions, 114 deletions
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 @@
1# QEMU for the Kria SOM requires a section from the FSBL to be extracted 1# QEMU for the Kria SOM requires a section from the FSBL to be extracted
2 2
3FSBL_DEFAULT_NAME = "executable.elf" 3PMU_CONF_NAME ?= "pmu-conf"
4PMU_CONF_NAME = "pmu-conf.bin" 4PMU_CONF_BASE_NAME ?= "${PMU_CONF_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
5
6# Required so we can run objcopy in do_compile
7DEPENDS:append:zynqmp = " virtual/${TARGET_PREFIX}binutils"
5 8
6do_compile:append:zynqmp () { 9do_compile:append:zynqmp () {
7 if [ -z "${SYSTEM_DTFILE}" ]; then 10 if [ -z "${SYSTEM_DTFILE}" ]; then
8 aarch64-none-elf-objcopy --dump-section .sys_cfg_data=../${PMU_CONF_NAME} ${FSBL_DEFAULT_NAME} 11 ${OBJCOPY} --dump-section .sys_cfg_data=${B}/${PMU_CONF_NAME}.bin ${B}/${ESW_COMPONENT}
9 fi 12 fi
10} 13}
11 14
12do_deploy:append:zynqmp () { 15do_deploy:append:zynqmp () {
13 if [ -z "${SYSTEM_DTFILE}" ]; then 16 if [ -z "${SYSTEM_DTFILE}" ]; then
14 install -Dm 0644 ${B}/${PMU_CONF_NAME} ${DEPLOYDIR}/${PMU_CONF_NAME} 17 install -Dm 0644 ${B}/${PMU_CONF_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_BASE_NAME}.bin
18 ln -s ${PMU_CONF_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_NAME}.bin
15 fi 19 fi
16} 20}
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 @@
1From 98b3377a70ee057f7529bd3381fa6d844ba6fe09 Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@amd.com>
3Date: Wed, 7 Dec 2022 17:36:22 -0800
4Subject: [PATCH] Workaround: Disable -Wnull-dereference
5
6 xpm_domain_iso.c:724:42: error: potential null pointer dereference [-Werror=null-dereference]
7
8Signed-off-by: Mark Hatle <mark.hatle@amd.com>
9---
10 lib/sw_services/xilpm/src/versal/common/Makefile | 2 +-
11 lib/sw_services/xilpm/src/versal_net/common/Makefile | 2 +-
12 2 files changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/lib/sw_services/xilpm/src/versal/common/Makefile b/lib/sw_services/xilpm/src/versal/common/Makefile
15index 0b61e37bbb..6c5f776ef0 100644
16--- a/lib/sw_services/xilpm/src/versal/common/Makefile
17+++ b/lib/sw_services/xilpm/src/versal/common/Makefile
18@@ -10,7 +10,7 @@ COMPILER_FLAGS=
19 EXTRA_COMPILER_FLAGS=
20 CUSTOM_COMPILER_FLAGS=-Werror
21 ifeq ($(findstring gcc, $(COMPILER)), gcc)
22-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
23+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
24 endif
25 LIB= libxilpm.a
26
27diff --git a/lib/sw_services/xilpm/src/versal_net/common/Makefile b/lib/sw_services/xilpm/src/versal_net/common/Makefile
28index 36460a1b18..257ad694e3 100644
29--- a/lib/sw_services/xilpm/src/versal_net/common/Makefile
30+++ b/lib/sw_services/xilpm/src/versal_net/common/Makefile
31@@ -10,7 +10,7 @@ COMPILER_FLAGS=
32 EXTRA_COMPILER_FLAGS=
33 CUSTOM_COMPILER_FLAGS=-Werror
34 ifeq ($(findstring gcc, $(COMPILER)), gcc)
35-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
36+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
37 endif
38 LIB= libxilpm.a
39
40--
412.17.1
42
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 @@
1From 607322dafb2979affd329ea70a2a7952203188a4 Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@amd.com>
3Date: Wed, 7 Dec 2022 15:42:15 -0800
4Subject: [PATCH] versal_fw: Fixup core makefiles
5
6The Yocto Project build environment needs to be able to override a few
7additional variables that may not be appropriate to do on the regular
8command line build version. This patch preserves the default while
9allowing it to be overriden as necessary.
10
11Signed-off-by: Mark Hatle <mark.hatle@amd.com>
12---
13 lib/sw_apps/versal_plm/misc/versal/Makefile | 6 ++++--
14 lib/sw_apps/versal_plm/misc/versal_net/Makefile | 6 ++++--
15 lib/sw_apps/versal_psmfw/misc/Makefile | 6 ++++--
16 3 files changed, 12 insertions(+), 6 deletions(-)
17
18diff --git a/lib/sw_apps/versal_plm/misc/versal/Makefile b/lib/sw_apps/versal_plm/misc/versal/Makefile
19index 5c8e719e9c..af070716b6 100644
20--- a/lib/sw_apps/versal_plm/misc/versal/Makefile
21+++ b/lib/sw_apps/versal_plm/misc/versal/Makefile
22@@ -2,6 +2,8 @@
23 COMPILER := mb-gcc
24 ARCHIVER := mb-gcc-ar
25 ASSEMBLER := mb-as
26+COMPILER_FLAGS := -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare
27+EXTRA_COMPILER_FLAGS := -g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects
28 DRIVER_LIB_VERSION = 1.0
29 PROCESSOR = psv_pmc_0
30 LIBRARIES = ${PROCESSOR}/lib/libxil.a
31@@ -40,11 +42,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a
32
33 %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,)
34 @echo "Running Make include in $(subst /make.include,,$@)"
35- $(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"
36+ $(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)"
37
38 %/make.libs: include
39 @echo "Running Make libs in $(subst /make.libs,,$@)"
40- $(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"
41+ $(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)"
42
43 %/make.clean:
44 $(MAKE) -C $(subst /make.clean,,$@) -s clean
45diff --git a/lib/sw_apps/versal_plm/misc/versal_net/Makefile b/lib/sw_apps/versal_plm/misc/versal_net/Makefile
46index abffa6c5ed..4af5a02001 100644
47--- a/lib/sw_apps/versal_plm/misc/versal_net/Makefile
48+++ b/lib/sw_apps/versal_plm/misc/versal_net/Makefile
49@@ -2,6 +2,8 @@
50 COMPILER := mb-gcc
51 ARCHIVER := mb-gcc-ar
52 ASSEMBLER := mb-as
53+COMPILER_FLAGS := -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare
54+EXTRA_COMPILER_FLAGS := -g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects
55 DRIVER_LIB_VERSION = 1.0
56 PROCESSOR = psx_pmc_0
57 LIBRARIES = ${PROCESSOR}/lib/libxil.a
58@@ -40,11 +42,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a
59
60 %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,)
61 @echo "Running Make include in $(subst /make.include,,$@)"
62- $(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"
63+ $(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)"
64
65 %/make.libs: include
66 @echo "Running Make libs in $(subst /make.libs,,$@)"
67- $(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"
68+ $(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)"
69
70 %/make.clean:
71 $(MAKE) -C $(subst /make.clean,,$@) -s clean
72diff --git a/lib/sw_apps/versal_psmfw/misc/Makefile b/lib/sw_apps/versal_psmfw/misc/Makefile
73index 02d85e492e..f6386dcbed 100644
74--- a/lib/sw_apps/versal_psmfw/misc/Makefile
75+++ b/lib/sw_apps/versal_psmfw/misc/Makefile
76@@ -11,6 +11,8 @@ PAR_SUBDIRS := $(patsubst %/Makefile, %, $(BSP_PARALLEL_MAKEFILES))
77 COMPILER := mb-gcc
78 ARCHIVER := mb-ar
79 ASSEMBLER := mb-as
80+COMPILER_FLAGS := -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare
81+EXTRA_COMPILER_FLAGS := -g -ffunction-sections -fdata-sections -Wall -Wextra
82
83 ifneq (,$(findstring win,$(RDI_PLATFORM)))
84 SHELL = CMD
85@@ -41,11 +43,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a
86
87 %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,)
88 @echo "Running Make include in $(subst /make.include,,$@)"
89- $(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"
90+ $(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)"
91
92 %/make.libs: include
93 @echo "Running Make libs in $(subst /make.libs,,$@)"
94- $(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"
95+ $(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)"
96
97 %/make.clean:
98 $(MAKE) -C $(subst /make.clean,,$@) -s clean
99--
1002.17.1
101
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 @@
1From d703670357546d9aab66baea1f6751ba1cbdf7ad Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@amd.com>
3Date: Wed, 7 Dec 2022 15:30:23 -0800
4Subject: [PATCH] Prevent makefile from calling copy_bsp.sh
5
6If we call copy_bsp.sh we will undo any manual compliation steps we
7have already done. Avoid this.
8
9YP integration specific
10
11Signed-off-by: Mark Hatle <mark.hatle@amd.com>
12---
13 lib/sw_apps/versal_plm/src/versal/Makefile | 4 ++--
14 lib/sw_apps/versal_plm/src/versal_net/Makefile | 4 ++--
15 lib/sw_apps/versal_psmfw/src/versal/Makefile | 4 ++--
16 lib/sw_apps/versal_psmfw/src/versal_net/Makefile | 6 +++---
17 lib/sw_apps/zynqmp_pmufw/src/Makefile | 4 ++--
18 5 files changed, 11 insertions(+), 11 deletions(-)
19
20diff --git a/lib/sw_apps/versal_plm/src/versal/Makefile b/lib/sw_apps/versal_plm/src/versal/Makefile
21index d1ebd1d374..bfb8c83adb 100644
22--- a/lib/sw_apps/versal_plm/src/versal/Makefile
23+++ b/lib/sw_apps/versal_plm/src/versal/Makefile
24@@ -32,8 +32,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES)
25 $(CC) -o $@ $(OBJS) $(CC_FLAGS) $(CFLAGS) $(LN_FLAGS) $(LIBPATH) $(LSCRIPT)
26
27 $(LIBS):
28- echo "Copying BSP files"
29- ../../misc/versal/copy_bsp.sh
30+ #echo "Copying BSP files"
31+ #../../misc/versal/copy_bsp.sh
32 echo "Compiling bsp"
33 $(MAKE) -C ../../misc/versal/versal_plm_bsp
34
35diff --git a/lib/sw_apps/versal_plm/src/versal_net/Makefile b/lib/sw_apps/versal_plm/src/versal_net/Makefile
36index 39c7aa38e3..081d8f1b2e 100644
37--- a/lib/sw_apps/versal_plm/src/versal_net/Makefile
38+++ b/lib/sw_apps/versal_plm/src/versal_net/Makefile
39@@ -32,8 +32,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES)
40 $(CC) -o $@ $(OBJS) $(CC_FLAGS) $(CFLAGS) $(LN_FLAGS) $(LIBPATH) $(LSCRIPT)
41
42 $(LIBS):
43- echo "Copying BSP files"
44- ../../misc/versal_net/copy_bsp.sh
45+ #echo "Copying BSP files"
46+ #../../misc/versal_net/copy_bsp.sh
47 echo "Compiling bsp"
48 $(MAKE) -C ../../misc/versal_net/versal_plm_bsp
49
50diff --git a/lib/sw_apps/versal_psmfw/src/versal/Makefile b/lib/sw_apps/versal_psmfw/src/versal/Makefile
51index 1572bbbca9..ce182acaa7 100644
52--- a/lib/sw_apps/versal_psmfw/src/versal/Makefile
53+++ b/lib/sw_apps/versal_psmfw/src/versal/Makefile
54@@ -34,8 +34,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES)
55 $(CC) -o $@ $(OBJS) $(CC_FLAGS) $(CFLAGS) $(LN_FLAGS) $(LIBPATH) $(LSCRIPT)
56
57 $(LIBS):
58- echo "Copying BSP files"
59- ../../misc/copy_bsp.sh
60+ #echo "Copying BSP files"
61+ #../../misc/copy_bsp.sh
62 echo "Compiling bsp"
63 $(MAKE) -C ../../misc/versal_psmfw_bsp
64
65diff --git a/lib/sw_apps/versal_psmfw/src/versal_net/Makefile b/lib/sw_apps/versal_psmfw/src/versal_net/Makefile
66index a72ffa1de2..3670310daa 100644
67--- a/lib/sw_apps/versal_psmfw/src/versal_net/Makefile
68+++ b/lib/sw_apps/versal_psmfw/src/versal_net/Makefile
69@@ -34,8 +34,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES)
70 $(CC) -o $@ $(OBJS) $(CC_FLAGS) $(CFLAGS) $(LN_FLAGS) $(LIBPATH) $(LSCRIPT)
71
72 $(LIBS):
73- echo "Copying BSP files"
74- ../../misc/versal_net/copy_bsp.sh
75+ #echo "Copying BSP files"
76+ #../../misc/versal_net/copy_bsp.sh
77 echo "Compiling bsp"
78 $(MAKE) -C ../../misc/versal_net/versal_psmfw_bsp
79
80@@ -44,4 +44,4 @@ $(LIBS):
81
82 clean:
83 rm -rf $(OBJS) $(LIBS) $(EXEC) *.o *.d ../common/*.o ../common/*.d
84- rm -rf ../../misc/versal_net/versal_psmfw_bsp
85\ No newline at end of file
86+ rm -rf ../../misc/versal_net/versal_psmfw_bsp
87diff --git a/lib/sw_apps/zynqmp_pmufw/src/Makefile b/lib/sw_apps/zynqmp_pmufw/src/Makefile
88index 1750c0a329..17f6a545ea 100644
89--- a/lib/sw_apps/zynqmp_pmufw/src/Makefile
90+++ b/lib/sw_apps/zynqmp_pmufw/src/Makefile
91@@ -28,8 +28,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES)
92 $(CC) -o $@ $(OBJS) $(CC_FLAGS) $(CFLAGS) $(LN_FLAGS) $(LIBPATH) $(LSCRIPT)
93
94 $(LIBS):
95- echo "Copying BSP files"
96- ../misc/copy_bsp.sh
97+ #echo "Copying BSP files"
98+ #../misc/copy_bsp.sh
99 echo "Compiling bsp"
100 $(MAKE) -C ../misc/zynqmp_pmufw_bsp
101
102--
1032.17.1
104
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"
2 2
3inherit xlnx-embeddedsw deploy 3inherit xlnx-embeddedsw deploy
4 4
5COMPATIBLE_HOST = ".*-(elf|eabi)" 5COMPATIBLE_HOST = ".*-(elf|.*eabi)"
6COMPATIBLE_MACHINE = "none" 6COMPATIBLE_MACHINE = "none"
7COMPATIBLE_MACHINE:zynq = ".*" 7COMPATIBLE_MACHINE:zynq = ".*"
8COMPATIBLE_MACHINE:zynqmp = ".*" 8COMPATIBLE_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 @@
1require fsbl-firmware.inc 1require fsbl-firmware.inc
2 2
3FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" 3FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
4 4
5SRC_URI += " \ 5SRC_URI += " \
6 file://makefile-skip-copy_bsp.sh.patch \ 6 file://makefile-skip-copy_bsp.sh.patch \
7 file://fsbl-fixups.patch \ 7 file://fsbl-fixups.patch \
8 file://0001-Workaround-Disable-Wnull-dereference.patch \
8 " 9 "
9 10
10# This version does not build for zynq 11# 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"
3 3
4require fsbl-firmware.inc 4require fsbl-firmware.inc
5 5
6FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" 6FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
7 7
8SRC_URI += " \ 8SRC_URI += " \
9 file://makefile-skip-copy_bsp.sh.patch \
9 file://fsbl-fixups.patch \ 10 file://fsbl-fixups.patch \
11 file://0001-Workaround-Disable-Wnull-dereference.patch \
10 " 12 "
11 13
12# This version does not build for zynq 14# 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 @@
1require plm-firmware.inc 1require plm-firmware.inc
2 2
3FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" 3# Separate build directories for versal and versal-net
4SOC_DIR = "versal"
5SOC_DIR:versal-net = "versal_net"
6B = "${S}/lib/sw_apps/versal_plm/src/${SOC_DIR}"
7
8BSP_DIR ?= "${B}/../../misc/versal_plm_bsp"
9
10FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
4 11
5SRC_URI += " \ 12SRC_URI += " \
6 file://makefile-skip-copy_bsp.sh.patch \ 13 file://makefile-skip-copy_bsp.sh.patch \
7 file://0001-versal_fw-Fixup-core-makefiles.patch \ 14 file://0001-versal_fw-Fixup-core-makefiles.patch \
15 file://0001-Workaround-Disable-Wnull-dereference.patch \
8 " 16 "
9 17
10EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" 18EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects"
11 19
20# Workaround for: ../../../include/xparameters.h:1021:67: warning: conversion from 'long long unsigned int' to 'unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
21EXTRA_COMPILER_FLAGS += "-Wno-overflow"
22
23# Workaround for: xpm_domain_iso.c:724:42: error: potential null pointer dereference [-Werror=null-dereference]
24EXTRA_COMPILER_FLAGS += "-Wno-null-dereference"
25
26do_configure() {
27 # manually do the copy_bsp step first, so as to be able to fix up use of
28 # mb-* commands
29 ${B}/../../misc/${SOC_DIR}/copy_bsp.sh
30}
31
12do_compile() { 32do_compile() {
33 pwd
13 oe_runmake 34 oe_runmake
14 35
15 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin 36 ${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"
3 3
4require plm-firmware.inc 4require plm-firmware.inc
5 5
6FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" 6# Separate build directories for versal and versal-net
7SOC_DIR = "versal"
8SOC_DIR:versal-net = "versal_net"
9B = "${S}/lib/sw_apps/versal_plm/src/${SOC_DIR}"
10
11BSP_DIR ?= "${B}/../../misc/versal_plm_bsp"
12
13FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
7 14
8SRC_URI += " \ 15SRC_URI += " \
9 file://makefile-skip-copy_bsp.sh.patch \ 16 file://makefile-skip-copy_bsp.sh.patch \
17 file://0001-versal_fw-Fixup-core-makefiles.patch \
18 file://0001-Workaround-Disable-Wnull-dereference.patch \
10 " 19 "
11 20
21EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects"
22
23# Workaround for: ../../../include/xparameters.h:1021:67: warning: conversion from 'long long unsigned int' to 'unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
24EXTRA_COMPILER_FLAGS += "-Wno-overflow"
25
26# Workaround for: xpm_domain_iso.c:724:42: error: potential null pointer dereference [-Werror=null-dereference]
27EXTRA_COMPILER_FLAGS += "-Wno-null-dereference"
28
12do_configure() { 29do_configure() {
13 # manually do the copy_bsp step first, so as to be able to fix up use of 30 # manually do the copy_bsp step first, so as to be able to fix up use of
14 # mb-* commands 31 # mb-* commands
15 . ${B}/../misc/copy_bsp.sh 32 ${B}/../../misc/${SOC_DIR}/copy_bsp.sh
16 echo "$BSP_SEQUENTIAL_MAKEFILES" > ${B}/seq.mak
17} 33}
18 34
19do_compile() { 35do_compile() {
20 # First process the sequential items 36 pwd
21 for i in $(cat seq.mak); do 37 oe_runmake
22 echo Include Seq: $i
23 if [ ! -d $i ]; then
24 echo "Skipping...."
25 continue
26 fi
27 oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)}
28 done
29 for i in $(cat seq.mak); do
30 echo Libs Seq: $i
31 if [ ! -d $i ]; then
32 echo "Skipping...."
33 continue
34 fi
35 oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)}
36 done
37
38 # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc
39 # properly. So do its job manually. Preparing the includes first, then libs.
40 for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do
41 echo Include: $i
42 oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)}
43 done
44 for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do
45 echo Libs: $i
46 oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)}
47 done
48
49 # --build-id=none is required due to linker script not defining a location for it.
50 # Again, recipe-systoot include is necessary
51 echo Construct: executable
52 oe_runmake plm.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include"
53 38
54 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin 39 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
55} 40}
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 @@
1require pmu-firmware.inc 1require pmu-firmware.inc
2 2
3FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" 3FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
4 4
5SRC_URI += " \ 5SRC_URI += " \
6 file://makefile-skip-copy_bsp.sh.patch \ 6 file://makefile-skip-copy_bsp.sh.patch \
7 file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ 7 file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \
8 file://0001-Workaround-Disable-Wnull-dereference.patch \
8 " 9 "
9 10
10EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" 11EXTRA_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"
3 3
4require pmu-firmware.inc 4require pmu-firmware.inc
5 5
6FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" 6FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
7 7
8SRC_URI += " \ 8SRC_URI += " \
9 file://makefile-skip-copy_bsp.sh.patch \ 9 file://makefile-skip-copy_bsp.sh.patch \
10 file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \
11 file://0001-Workaround-Disable-Wnull-dereference.patch \
10 " 12 "
11 13
12do_configure() { 14EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects"
13 # manually do the copy_bsp step first, so as to be able to fix up use of
14 # mb-* commands
15 . ${B}/../misc/copy_bsp.sh
16 echo "$BSP_SEQUENTIAL_MAKEFILES" > ${B}/seq.mak
17}
18 15
19do_compile() { 16do_compile() {
20 # First process the sequential items 17 oe_runmake
21 for i in $(cat seq.mak); do
22 echo Include Seq: $i
23 oe_runmake -C $(dirname $i) -s include
24 done
25 for i in $(cat seq.mak); do
26 echo Libs Seq: $i
27 oe_runmake -C $(dirname $i) -s libs
28 done
29
30 # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc
31 # properly. So do its job manually. Preparing the includes first, then libs.
32 for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do
33 echo Include: $i
34 oe_runmake -C $(dirname $i) -s include
35 done
36 for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do
37 echo Libs: $i
38 oe_runmake -C $(dirname $i) -s libs
39 done
40
41 # --build-id=none is required due to linker script not defining a location for it.
42 # Again, recipe-systoot include is necessary
43 echo Construct: executable
44 oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include"
45 18
46 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin 19 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
47} 20}
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 @@
1require psm-firmware.inc 1require psm-firmware.inc
2 2
3FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" 3# Separate build directories for versal and versal-net
4SOC_DIR = "versal"
5SOC_DIR:versal-net = "versal_net"
6B = "${S}/lib/sw_apps/versal_psmfw/src/${SOC_DIR}"
7
8BSP_DIR ?= "${B}/../../misc/versal_psmfw_bsp"
9
10FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
4 11
5SRC_URI += " \ 12SRC_URI += " \
6 file://makefile-skip-copy_bsp.sh.patch \ 13 file://makefile-skip-copy_bsp.sh.patch \
7 file://0001-versal_fw-Fixup-core-makefiles.patch \ 14 file://0001-versal_fw-Fixup-core-makefiles.patch \
15 file://0001-Workaround-Disable-Wnull-dereference.patch \
8 " 16 "
9 17
10EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra" 18EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra"
11 19
20# Override default since we're in a subdirectory deeper now...
21do_configure() {
22 # manually do the copy_bsp step first, so as to be able to fix up use of
23 # mb-* commands
24 if [ ${SOC_DIR} != "versal" ]; then
25 ${B}/../../misc/${SOC_DIR}/copy_bsp.sh
26 else
27 ${B}/../../misc/copy_bsp.sh
28 fi
29}
30
12do_compile() { 31do_compile() {
13 oe_runmake 32 oe_runmake
14 33
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"
3 3
4require psm-firmware.inc 4require psm-firmware.inc
5 5
6FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" 6# Separate build directories for versal and versal-net
7SOC_DIR = "versal"
8SOC_DIR:versal-net = "versal_net"
9B = "${S}/lib/sw_apps/versal_psmfw/src/${SOC_DIR}"
10
11BSP_DIR ?= "${B}/../../misc/versal_psmfw_bsp"
12
13FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
7 14
8SRC_URI += " \ 15SRC_URI += " \
9 file://makefile-skip-copy_bsp.sh.patch \ 16 file://makefile-skip-copy_bsp.sh.patch \
17 file://0001-versal_fw-Fixup-core-makefiles.patch \
18 file://0001-Workaround-Disable-Wnull-dereference.patch \
10 " 19 "
11 20
21EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra"
22
23# Override default since we're in a subdirectory deeper now...
12do_configure() { 24do_configure() {
13 # manually do the copy_bsp step first, so as to be able to fix up use of 25 # manually do the copy_bsp step first, so as to be able to fix up use of
14 # mb-* commands 26 # mb-* commands
15 . ${B}/../misc/copy_bsp.sh 27 if [ ${SOC_DIR} != "versal" ]; then
16 echo "$BSP_SEQUENTIAL_MAKEFILES" > ${B}/seq.mak 28 ${B}/../../misc/${SOC_DIR}/copy_bsp.sh
29 else
30 ${B}/../../misc/copy_bsp.sh
31 fi
17} 32}
18 33
19do_compile() { 34do_compile() {
20 # First process the sequential items 35 oe_runmake
21 for i in $(cat seq.mak); do
22 echo Include Seq: $i
23 if [ ! -d $i ]; then
24 echo "Skipping...."
25 continue
26 fi
27 oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)}
28 done
29 for i in $(cat seq.mak); do
30 echo Libs Seq: $i
31 if [ ! -d $i ]; then
32 echo "Skipping...."
33 continue
34 fi
35 oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)}
36 done
37
38 # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc
39 # properly. So do its job manually. Preparing the includes first, then libs.
40 for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do
41 echo Include: $i
42 oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)}
43 done
44 for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do
45 echo Libs: $i
46 oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)}
47 done
48
49 # --build-id=none is required due to linker script not defining a location for it.
50 # Again, recipe-systoot include is necessary
51 echo Construct: executable
52 oe_runmake psmfw.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include"
53 36
54 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin 37 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
55} 38}