summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2021-09-13 12:48:40 -0700
committerSai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>2021-09-28 08:20:16 -0700
commitd1f455cfd8b502a069858b51771bb36c8fbb122a (patch)
tree998f74983fd0891009716bad9d39ccfa085d5139
parentaba5951e6fb6ddfc37075eb65eafacb54a7b9c3e (diff)
downloadmeta-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>
-rw-r--r--meta-xilinx-standalone-experimental/classes/esw.bbclass12
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/device-tree/device-tree.bbappend13
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend2
-rw-r--r--meta-xilinx-standalone-experimental/recipes-kernel/lopper/device-tree-lops.bb83
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
23COMPATIBLE_HOST = ".*-elf" 23COMPATIBLE_HOST = ".*-elf"
24COMPATIBLE_HOST_arm = "[^-]*-[^-]*-eabi" 24COMPATIBLE_HOST_arm = "[^-]*-[^-]*-eabi"
25 25
26DTS_FILE = "${DEPLOY_DIR_IMAGE}/${ESW_MACHINE}-baremetal.dtb" 26DTS_FILE = "${DEPLOY_DIR_IMAGE}/devicetree/${@os.path.basename(d.getVar('CONFIG_DTFILE'))}"
27 27
28DEPENDS += "python3-pyyaml-native lopper-native device-tree-lops python3-dtc-native" 28DEPENDS += "python3-pyyaml-native lopper-native device-tree python3-dtc-native"
29 29
30# We need the deployed output 30# We need the deployed output
31do_configure[depends] += "device-tree-lops:do_deploy" 31do_configure[depends] += "device-tree:do_deploy"
32do_compile[depends] += "device-tree-lops:do_deploy" 32do_compile[depends] += "device-tree:do_deploy"
33do_install[depends] += "device-tree-lops:do_deploy" 33do_install[depends] += "device-tree:do_deploy"
34 34
35def get_xlnx_cmake_machine(fam, d): 35def get_xlnx_cmake_machine(fam, d):
36 cmake_machine = fam 36 cmake_machine = fam
@@ -106,7 +106,7 @@ python(){
106} 106}
107 107
108do_generate_driver_data[dirs] = "${B}" 108do_generate_driver_data[dirs] = "${B}"
109do_generate_driver_data[depends] += "device-tree-lops:do_deploy" 109do_generate_driver_data[depends] += "device-tree:do_deploy"
110python do_generate_driver_data() { 110python 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 @@
1CONFIG_DTFILE ?= ""
2
3do_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
9do_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
16DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm" 16DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm"
17 17
18do_copy_psu_init[depends] += "device-tree-lops:do_deploy" 18do_copy_psu_init[depends] += "device-tree:do_deploy"
19python do_copy_psu_init() { 19python 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 @@
1SUMMARY = "Device tree lops"
2SECTION = "bootloader"
3LICENSE = "BSD-3-Clause"
4DEPENDS += "lopper-native"
5
6INHIBIT_DEFAULT_DEPS = '1'
7
8inherit deploy
9inherit python3native
10
11ESW_MACHINE ?= "${MACHINE}"
12
13DTB_FILE = "${ESW_MACHINE}-system.dtb"
14DTS_FILE = "${ESW_MACHINE}-baremetal.dtb"
15
16COMPATIBLE_HOST = "^.*"
17
18LOPS_DIR = "${RECIPE_SYSROOT_NATIVE}/usr/share/lopper/lops"
19
20python() {
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
26do_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
31do_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)
36do_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)
41do_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)
46do_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
50do_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
54do_install() {
55 :
56}
57
58PACKAGES = ""
59
60do_fetch[noexec] = "1"
61do_unpack[noexec] = "1"
62do_patch[noexec] = "1"
63do_configure[noexec] = "1"
64do_install[noexec] = "1"
65deltask do_populate_lic
66deltask do_populate_sysroot
67deltask do_pacakge
68deltask do_package_qa
69deltask do_packagedata
70deltask do_package_write_ipk
71deltask do_package_write_deb
72deltask do_package_write_rpm
73
74# Linux
75do_deploy() {
76 install -Dm 0644 ${B}/${DTB_FILE} ${DEPLOYDIR}/${DTB_FILE}
77}
78
79# Baremetal
80do_deploy_xilinx-standalone() {
81 install -Dm 0644 ${B}/${DTS_FILE} ${DEPLOYDIR}/${DTS_FILE}
82}
83addtask deploy before do_build after do_install