diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2021-09-13 12:48:40 -0700 |
---|---|---|
committer | Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> | 2021-09-28 08:20:16 -0700 |
commit | d1f455cfd8b502a069858b51771bb36c8fbb122a (patch) | |
tree | 998f74983fd0891009716bad9d39ccfa085d5139 | |
parent | aba5951e6fb6ddfc37075eb65eafacb54a7b9c3e (diff) | |
download | meta-xilinx-d1f455cfd8b502a069858b51771bb36c8fbb122a.tar.gz |
meta-xilinx-standalone-experimental: Move from device-tree-lops to device-tree
The device trees are now generated by the user as part of the configuration
steps. As such, we need to simply copy/process these device trees as part
of the system build so adjust the various usages to the new variable
CONFIG_DTFILE, which is a full path reference to the device tree for a
particular configuration.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
4 files changed, 20 insertions, 90 deletions
diff --git a/meta-xilinx-standalone-experimental/classes/esw.bbclass b/meta-xilinx-standalone-experimental/classes/esw.bbclass index a7bc7e2d..0d6e78a6 100644 --- a/meta-xilinx-standalone-experimental/classes/esw.bbclass +++ b/meta-xilinx-standalone-experimental/classes/esw.bbclass | |||
@@ -23,14 +23,14 @@ inherit ccmake | |||
23 | COMPATIBLE_HOST = ".*-elf" | 23 | COMPATIBLE_HOST = ".*-elf" |
24 | COMPATIBLE_HOST_arm = "[^-]*-[^-]*-eabi" | 24 | COMPATIBLE_HOST_arm = "[^-]*-[^-]*-eabi" |
25 | 25 | ||
26 | DTS_FILE = "${DEPLOY_DIR_IMAGE}/${ESW_MACHINE}-baremetal.dtb" | 26 | DTS_FILE = "${DEPLOY_DIR_IMAGE}/devicetree/${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" |
27 | 27 | ||
28 | DEPENDS += "python3-pyyaml-native lopper-native device-tree-lops python3-dtc-native" | 28 | DEPENDS += "python3-pyyaml-native lopper-native device-tree python3-dtc-native" |
29 | 29 | ||
30 | # We need the deployed output | 30 | # We need the deployed output |
31 | do_configure[depends] += "device-tree-lops:do_deploy" | 31 | do_configure[depends] += "device-tree:do_deploy" |
32 | do_compile[depends] += "device-tree-lops:do_deploy" | 32 | do_compile[depends] += "device-tree:do_deploy" |
33 | do_install[depends] += "device-tree-lops:do_deploy" | 33 | do_install[depends] += "device-tree:do_deploy" |
34 | 34 | ||
35 | def get_xlnx_cmake_machine(fam, d): | 35 | def get_xlnx_cmake_machine(fam, d): |
36 | cmake_machine = fam | 36 | cmake_machine = fam |
@@ -106,7 +106,7 @@ python(){ | |||
106 | } | 106 | } |
107 | 107 | ||
108 | do_generate_driver_data[dirs] = "${B}" | 108 | do_generate_driver_data[dirs] = "${B}" |
109 | do_generate_driver_data[depends] += "device-tree-lops:do_deploy" | 109 | do_generate_driver_data[depends] += "device-tree:do_deploy" |
110 | python do_generate_driver_data() { | 110 | python do_generate_driver_data() { |
111 | import glob, subprocess, os | 111 | import glob, subprocess, os |
112 | 112 | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/device-tree/device-tree.bbappend new file mode 100644 index 00000000..6aadcb48 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-bsp/device-tree/device-tree.bbappend | |||
@@ -0,0 +1,13 @@ | |||
1 | CONFIG_DTFILE ?= "" | ||
2 | |||
3 | do_install_append_xilinx-standalone() { | ||
4 | for DTB_FILE in ${CONFIG_DTFILE}; do | ||
5 | install -Dm 0644 ${DTB_FILE} ${D}/boot/devicetree/$(basename ${DTB_FILE}) | ||
6 | done | ||
7 | } | ||
8 | |||
9 | do_deploy_append_xilinx-standalone() { | ||
10 | for DTB_FILE in ${CONFIG_DTFILE}; do | ||
11 | install -Dm 0644 ${DTB_FILE} ${DEPLOYDIR}/devicetree/$(basename ${DTB_FILE}) | ||
12 | done | ||
13 | } | ||
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 index a50ea86c..d241df32 100644 --- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend +++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend | |||
@@ -15,7 +15,7 @@ ESW_COMPONENT_SRC_zynqmp = "/lib/sw_apps/zynqmp_fsbl/src" | |||
15 | 15 | ||
16 | DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm" | 16 | DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm" |
17 | 17 | ||
18 | do_copy_psu_init[depends] += "device-tree-lops:do_deploy" | 18 | do_copy_psu_init[depends] += "device-tree:do_deploy" |
19 | python do_copy_psu_init() { | 19 | python do_copy_psu_init() { |
20 | import glob, subprocess, os | 20 | import glob, subprocess, os |
21 | 21 | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-kernel/lopper/device-tree-lops.bb b/meta-xilinx-standalone-experimental/recipes-kernel/lopper/device-tree-lops.bb deleted file mode 100644 index 37d48480..00000000 --- a/meta-xilinx-standalone-experimental/recipes-kernel/lopper/device-tree-lops.bb +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | SUMMARY = "Device tree lops" | ||
2 | SECTION = "bootloader" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | DEPENDS += "lopper-native" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = '1' | ||
7 | |||
8 | inherit deploy | ||
9 | inherit python3native | ||
10 | |||
11 | ESW_MACHINE ?= "${MACHINE}" | ||
12 | |||
13 | DTB_FILE = "${ESW_MACHINE}-system.dtb" | ||
14 | DTS_FILE = "${ESW_MACHINE}-baremetal.dtb" | ||
15 | |||
16 | COMPATIBLE_HOST = "^.*" | ||
17 | |||
18 | LOPS_DIR = "${RECIPE_SYSROOT_NATIVE}/usr/share/lopper/lops" | ||
19 | |||
20 | python() { | ||
21 | if not d.getVar('SYSTEM_DTFILE'): | ||
22 | raise bb.parse.SkipRecipe("SYSTEM_DTFILE is not configured with the system device tree filename") | ||
23 | } | ||
24 | |||
25 | # All microblaze | ||
26 | do_compile_microblaze_xilinx-standalone() { | ||
27 | LOPPER_DTC_FLAGS="-b 0 -@" lopper.py -f -O ${WORKDIR} ${SYSTEM_DTFILE} ${B}/${DTS_FILE} | ||
28 | } | ||
29 | |||
30 | # All Cortex R5 | ||
31 | do_compile_append_armrm_xilinx-standalone() { | ||
32 | LOPPER_DTC_FLAGS="-b 0 -@" lopper.py -f --enhanced -i ${LOPS_DIR}/lop-r5-imux.dts -O ${WORKDIR} ${SYSTEM_DTFILE} ${B}/${DTS_FILE} | ||
33 | } | ||
34 | |||
35 | # Only ZynqMP & Cortex A53 (baremetal) | ||
36 | do_compile_append_zynqmp_aarch64_xilinx-standalone() { | ||
37 | LOPPER_DTC_FLAGS="-b 0 -@" lopper.py -f --enhanced -i ${LOPS_DIR}/lop-a53-imux.dts -O ${WORKDIR} ${SYSTEM_DTFILE} ${B}/${DTS_FILE} | ||
38 | } | ||
39 | |||
40 | # Only ZynqMP & Cortex A53 (Linux) | ||
41 | do_compile_append_zynqmp_aarch64_linux() { | ||
42 | LOPPER_DTC_FLAGS="-b 0 -@" lopper.py -f --enhanced -i ${LOPS_DIR}/lop-a53-imux.dts -i ${LOPS_DIR}/lop-domain-linux-a53.dts -O ${WORKDIR} ${SYSTEM_DTFILE} ${B}/${DTB_FILE} | ||
43 | } | ||
44 | |||
45 | # Only Versal and Cortex A72 (baremetal) | ||
46 | do_compile_append_versal_aarch64_xilinx-standalone() { | ||
47 | LOPPER_DTC_FLAGS="-b 0 -@" lopper.py -f --enhanced -i ${LOPS_DIR}/lop-a72-imux.dts -O ${WORKDIR} ${SYSTEM_DTFILE} ${B}/${DTS_FILE} | ||
48 | } | ||
49 | |||
50 | do_compile_append_versal_aarch64_linux() { | ||
51 | LOPPER_DTC_FLAGS="-b 0 -@" lopper.py -f --enhanced -i ${LOPS_DIR}/lop-a72-imux.dts -i ${LOPS_DIR}/lop-domain-a72.dts -O ${WORKDIR} ${SYSTEM_DTFILE} ${B}/${DTB_FILE} | ||
52 | } | ||
53 | |||
54 | do_install() { | ||
55 | : | ||
56 | } | ||
57 | |||
58 | PACKAGES = "" | ||
59 | |||
60 | do_fetch[noexec] = "1" | ||
61 | do_unpack[noexec] = "1" | ||
62 | do_patch[noexec] = "1" | ||
63 | do_configure[noexec] = "1" | ||
64 | do_install[noexec] = "1" | ||
65 | deltask do_populate_lic | ||
66 | deltask do_populate_sysroot | ||
67 | deltask do_pacakge | ||
68 | deltask do_package_qa | ||
69 | deltask do_packagedata | ||
70 | deltask do_package_write_ipk | ||
71 | deltask do_package_write_deb | ||
72 | deltask do_package_write_rpm | ||
73 | |||
74 | # Linux | ||
75 | do_deploy() { | ||
76 | install -Dm 0644 ${B}/${DTB_FILE} ${DEPLOYDIR}/${DTB_FILE} | ||
77 | } | ||
78 | |||
79 | # Baremetal | ||
80 | do_deploy_xilinx-standalone() { | ||
81 | install -Dm 0644 ${B}/${DTS_FILE} ${DEPLOYDIR}/${DTS_FILE} | ||
82 | } | ||
83 | addtask deploy before do_build after do_install | ||