diff options
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 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | COMPATIBLE_HOST = "aarch64.*-elf" | ||
4 | COMPATIBLE_MACHINE = "none" | ||
5 | COMPATIBLE_MACHINE_zynqmp = ".*" | ||
6 | |||
7 | ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_fsbl/src" | ||
8 | |||
9 | DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm" | ||
10 | |||
11 | do_copy_psu_init[depends] += "device-tree-lops:do_deploy" | ||
12 | python 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 | } | ||
26 | addtask do_copy_psu_init before do_configure after do_prepare_recipe_sysroot | ||
27 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
28 | |||
29 | do_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 | |||
35 | ZYNQMP_FSBL_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" | ||
36 | ZYNQMP_FSBL_BASE_NAME[vardepsexclude] = "DATETIME" | ||
37 | |||
38 | do_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 | |||
48 | addtask deploy before do_build after do_package | ||
49 | |||
50 | CFLAGS_append_aarch64 = " -DARMA53_64" | ||
51 | CFLAGS_append_armrm = " -DARMR5" | ||
52 | |||
53 | FILES_${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 | ||
2 | DEFAULT_PREFERENCE = "100" | ||
3 | |||
4 | # Reset this | ||
5 | SRC_URI = "${EMBEDDEDSW_SRCURI}" | ||
6 | |||
7 | inherit esw | ||
8 | |||
9 | # Not compatible with Zynq | ||
10 | COMPATIBLE_MACHINE_zynq = "none" | ||
11 | |||
12 | ESW_COMPONENT_SRC = "/lib/sw_apps/undefined/src" | ||
13 | ESW_COMPONENT_SRC_zynq = "/lib/sw_apps/zynq_fsbl/src" | ||
14 | ESW_COMPONENT_SRC_zynqmp = "/lib/sw_apps/zynqmp_fsbl/src" | ||
15 | |||
16 | DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm" | ||
17 | |||
18 | do_copy_psu_init[depends] += "device-tree-lops:do_deploy" | ||
19 | python 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 | } | ||
33 | addtask do_copy_psu_init before do_configure after do_prepare_recipe_sysroot | ||
34 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
35 | |||
36 | do_install() { | ||
37 | : | ||
38 | } | ||
39 | |||
40 | addtask deploy before do_build after do_package | ||
41 | |||
42 | ESW_COMPONENT = "undefined" | ||
43 | ESW_COMPONENT_zynq = "zynq_fsbl.elf" | ||
44 | ESW_COMPONENT_zynqmp = "zynqmp_fsbl.elf" | ||
45 | |||
46 | CFLAGS_append_aarch64 = " -DARMA53_64" | ||
47 | CFLAGS_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 | ||
10 | S = "${WORKDIR}/git" | 10 | S = "${WORKDIR}/git" |
11 | 11 | ||
12 | B = "${S}/lib/sw_apps/undefined/src" | 12 | APP_DIR = "undefined" |
13 | B_zynq = "${S}/lib/sw_apps/zynq_fsbl/src" | 13 | APP_DIR_zynq = "zynq_fsbl" |
14 | B_zynqmp = "${S}/lib/sw_apps/zynqmp_fsbl/src" | 14 | APP_DIR_zynqmp = "zynqmp_fsbl" |
15 | |||
16 | B = "${S}/lib/sw_apps/${APP_DIR}/src" | ||
15 | 17 | ||
16 | # The makefile does not handle parallelization | 18 | # The makefile does not handle parallelization |
17 | PARALLEL_MAKE = "-j1" | 19 | PARALLEL_MAKE = "-j1" |