summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/fsbl-zynqmp/fsbl_git.bb53
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend47
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc8
3 files changed, 52 insertions, 56 deletions
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/fsbl-zynqmp/fsbl_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/fsbl-zynqmp/fsbl_git.bb
deleted file mode 100644
index 27c0081b..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/fsbl-zynqmp/fsbl_git.bb
+++ /dev/null
@@ -1,53 +0,0 @@
1inherit esw deploy
2
3COMPATIBLE_HOST = "aarch64.*-elf"
4COMPATIBLE_MACHINE = "none"
5COMPATIBLE_MACHINE_zynqmp = ".*"
6
7ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_fsbl/src"
8
9DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm"
10
11do_copy_psu_init[depends] += "device-tree-lops:do_deploy"
12python do_copy_psu_init() {
13 import glob, subprocess, os
14
15 system_dt = d.getVar('SYSTEM_DTFILE')
16 src_dir = glob.glob(d.getVar('OECMAKE_SOURCEPATH'))
17 psu_init_src = os.path.dirname(system_dt)
18 src_file = psu_init_src + str("/psu_init.c")
19 hdr_file = psu_init_src + str("/psu_init.h")
20 if os.path.exists(src_file):
21 command = ["install"] + ["-m"] + ["0755"] + [src_file] + [src_dir[0]]
22 subprocess.run(command, check = True)
23 command = ["install"] + ["-m"] + ["0755"] + [hdr_file] + [src_dir[0]]
24 subprocess.run(command, check = True)
25}
26addtask do_copy_psu_init before do_configure after do_prepare_recipe_sysroot
27do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
28
29do_install() {
30 install -d ${D}/${base_libdir}/firmware
31 # Note that we have to make the ELF executable for it to be stripped
32 install -m 0755 ${B}/zynqmp_fsbl* ${D}/${base_libdir}/firmware
33}
34
35ZYNQMP_FSBL_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
36ZYNQMP_FSBL_BASE_NAME[vardepsexclude] = "DATETIME"
37
38do_deploy() {
39
40 # We need to deploy the stripped elf, hence why not doing it from ${D}
41 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.elf ${DEPLOYDIR}/${ZYNQMP_FSBL_BASE_NAME}.elf
42 ln -sf ${ZYNQMP_FSBL_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
43 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.elf ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.bin
44 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.bin ${DEPLOYDIR}/${ZYNQMP_FSBL_BASE_NAME}.bin
45 ln -sf ${ZYNQMP_FSBL_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
46}
47
48addtask deploy before do_build after do_package
49
50CFLAGS_append_aarch64 = " -DARMA53_64"
51CFLAGS_append_armrm = " -DARMR5"
52
53FILES_${PN} = "${base_libdir}/firmware/zynqmp_fsbl*"
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend
new file mode 100644
index 00000000..a50ea86c
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend
@@ -0,0 +1,47 @@
1# We WANT to default to this version when available
2DEFAULT_PREFERENCE = "100"
3
4# Reset this
5SRC_URI = "${EMBEDDEDSW_SRCURI}"
6
7inherit esw
8
9# Not compatible with Zynq
10COMPATIBLE_MACHINE_zynq = "none"
11
12ESW_COMPONENT_SRC = "/lib/sw_apps/undefined/src"
13ESW_COMPONENT_SRC_zynq = "/lib/sw_apps/zynq_fsbl/src"
14ESW_COMPONENT_SRC_zynqmp = "/lib/sw_apps/zynqmp_fsbl/src"
15
16DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm"
17
18do_copy_psu_init[depends] += "device-tree-lops:do_deploy"
19python do_copy_psu_init() {
20 import glob, subprocess, os
21
22 system_dt = d.getVar('SYSTEM_DTFILE')
23 src_dir = glob.glob(d.getVar('OECMAKE_SOURCEPATH'))
24 psu_init_src = os.path.dirname(system_dt)
25 src_file = psu_init_src + str("/psu_init.c")
26 hdr_file = psu_init_src + str("/psu_init.h")
27 if os.path.exists(src_file):
28 command = ["install"] + ["-m"] + ["0755"] + [src_file] + [src_dir[0]]
29 subprocess.run(command, check = True)
30 command = ["install"] + ["-m"] + ["0755"] + [hdr_file] + [src_dir[0]]
31 subprocess.run(command, check = True)
32}
33addtask do_copy_psu_init before do_configure after do_prepare_recipe_sysroot
34do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
35
36do_install() {
37 :
38}
39
40addtask deploy before do_build after do_package
41
42ESW_COMPONENT = "undefined"
43ESW_COMPONENT_zynq = "zynq_fsbl.elf"
44ESW_COMPONENT_zynqmp = "zynqmp_fsbl.elf"
45
46CFLAGS_append_aarch64 = " -DARMA53_64"
47CFLAGS_append_armrm = " -DARMR5"
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc
index 8d2ea1b6..15265547 100644
--- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware.inc
@@ -9,9 +9,11 @@ COMPATIBLE_MACHINE_zynqmp = ".*"
9 9
10S = "${WORKDIR}/git" 10S = "${WORKDIR}/git"
11 11
12B = "${S}/lib/sw_apps/undefined/src" 12APP_DIR = "undefined"
13B_zynq = "${S}/lib/sw_apps/zynq_fsbl/src" 13APP_DIR_zynq = "zynq_fsbl"
14B_zynqmp = "${S}/lib/sw_apps/zynqmp_fsbl/src" 14APP_DIR_zynqmp = "zynqmp_fsbl"
15
16B = "${S}/lib/sw_apps/${APP_DIR}/src"
15 17
16# The makefile does not handle parallelization 18# The makefile does not handle parallelization
17PARALLEL_MAKE = "-j1" 19PARALLEL_MAKE = "-j1"