diff options
author | Mark Hatle <mhatle@xilinx.com> | 2022-05-23 08:13:16 -0700 |
---|---|---|
committer | Mark Hatle <mhatle@xilinx.com> | 2022-05-23 08:16:22 -0700 |
commit | 0f12dfc11fc95b4353afce5d14f7e40fc4f417bf (patch) | |
tree | e72d0b2fcab711c68cf098ec1b78aebde5008a96 | |
parent | 01f30a353aa0f369f35a8432d6a747b5432772b8 (diff) | |
download | meta-xilinx-0f12dfc11fc95b4353afce5d14f7e40fc4f417bf.tar.gz |
Revert "u-boot-xlnx: Move all u-boot FIT image (blob) implementation to here"
This reverts commit ca1bb9a66c01463565b8dfac043c9b854d67114d.
Patch missed the do_blob_generate function
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
-rw-r--r-- | meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc | 113 | ||||
-rw-r--r-- | meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc | 5 |
2 files changed, 3 insertions, 115 deletions
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc deleted file mode 100644 index f7c2b880..00000000 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | # U-boot fitimage/blob generator | ||
2 | |||
3 | UBOOT_IMAGE_BLOB ?= "" | ||
4 | DT_BLOB_DIR ?= "${B}/arch/arm/dts/dt-blob" | ||
5 | UBOOT_BLOB_NAME ?= "${MACHINE}-fit-dtb${IMAGE_VERSION_SUFFIX}.blob" | ||
6 | |||
7 | IMPORT_CC_DTBS ?= "" | ||
8 | CC_DTBS_DUP ?= "" | ||
9 | |||
10 | MKIMAGE_DTBLOB_OPTS ?= "-E -B 0x8" | ||
11 | |||
12 | # Everything is swtiched on with UBOOT_IMAGE_BLOB = '1' | ||
13 | inherit ${@'image-artifact-names' if d.getVar('UBOOT_IMAGE_BLOB') == "1" else ''} | ||
14 | |||
15 | python() { | ||
16 | if d.getVar('UBOOT_IMAGE_BLOB') == "1": | ||
17 | d.appendVarFlag('do_compile', 'postfuncs', ' do_blob_generate') | ||
18 | d.appendVarFlag('do_compile', 'cleandirs', ' ${DT_BLOB_DIR}') | ||
19 | d.appendVar('PROVIDES', ' u-boot-xlnx-fit-blob') | ||
20 | d.appendVar('DEPENDS', ' u-boot-mkimage-native') | ||
21 | } | ||
22 | |||
23 | |||
24 | dtblob_emit_its_section() { | ||
25 | case $2 in | ||
26 | header) | ||
27 | cat << EOF > $1 | ||
28 | /dts-v1/; | ||
29 | |||
30 | / { | ||
31 | description = "DT Blob Creation"; | ||
32 | EOF | ||
33 | ;; | ||
34 | imagestart) | ||
35 | cat << EOF >> $1 | ||
36 | |||
37 | images { | ||
38 | EOF | ||
39 | ;; | ||
40 | confstart) | ||
41 | cat << EOF >> $1 | ||
42 | |||
43 | configurations { | ||
44 | EOF | ||
45 | ;; | ||
46 | sectend) | ||
47 | cat << EOF >> $1 | ||
48 | }; | ||
49 | EOF | ||
50 | ;; | ||
51 | fitend) | ||
52 | cat << EOF >> $1 | ||
53 | }; | ||
54 | EOF | ||
55 | ;; | ||
56 | esac | ||
57 | } | ||
58 | |||
59 | dtblob_emit_dtb () { | ||
60 | dtb_csum="md5" | ||
61 | cat << EOF >> $1 | ||
62 | fdt-$2 { | ||
63 | description = "$(basename $3 .dtb)"; | ||
64 | data = /incbin/("$3"); | ||
65 | type = "flat_dt"; | ||
66 | arch = "arm64"; | ||
67 | compression = "none"; | ||
68 | hash-1 { | ||
69 | algo = "$dtb_csum"; | ||
70 | }; | ||
71 | }; | ||
72 | EOF | ||
73 | } | ||
74 | |||
75 | #1.file name | ||
76 | #2.config node | ||
77 | #3.config node description | ||
78 | #4.DTB count | ||
79 | dtblob_emit_config () { | ||
80 | default_dtb=1 | ||
81 | if [ $4 -eq $default_dtb ]; then | ||
82 | cat << EOF >> $1 | ||
83 | default = "config_$4"; | ||
84 | EOF | ||
85 | fi | ||
86 | cat << EOF >> $1 | ||
87 | config_$4 { | ||
88 | description = "$3"; | ||
89 | fdt = "fdt-$2"; | ||
90 | }; | ||
91 | EOF | ||
92 | } | ||
93 | |||
94 | do_install:append() { | ||
95 | ( | ||
96 | cd ${B} | ||
97 | |||
98 | if [ -e "${DT_BLOB_DIR}/${UBOOT_BLOB_NAME}" ]; then | ||
99 | install -d ${D}/boot | ||
100 | install -m 0644 ${DT_BLOB_DIR}/${UBOOT_BLOB_NAME} ${D}/boot | ||
101 | ln -sf `basename ${UBOOT_BLOB_NAME}` ${D}/boot/fit-dtb.blob | ||
102 | fi | ||
103 | ) | ||
104 | } | ||
105 | |||
106 | do_deploy:prepend() { | ||
107 | cd ${B} | ||
108 | |||
109 | if [ -e "${DT_BLOB_DIR}/${UBOOT_BLOB_NAME}" ]; then | ||
110 | install -m 0644 ${DT_BLOB_DIR}/${UBOOT_BLOB_NAME} ${DEPLOYDIR}/ | ||
111 | ln -sf `basename ${UBOOT_BLOB_NAME}` ${DEPLOYDIR}/fit-dtb.blob | ||
112 | fi | ||
113 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc index 909dd72a..f0ea2ca3 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc | |||
@@ -32,9 +32,10 @@ python __anonymous () { | |||
32 | d.appendVarFlag('do_configure', 'depends', ' virtual/dtb:do_populate_sysroot') | 32 | d.appendVarFlag('do_configure', 'depends', ' virtual/dtb:do_populate_sysroot') |
33 | if d.getVar("DTB_NAME") is not None: | 33 | if d.getVar("DTB_NAME") is not None: |
34 | d.setVar('DTB_NAME', d.getVar('BASE_DTS')+ '.dtb') | 34 | d.setVar('DTB_NAME', d.getVar('BASE_DTS')+ '.dtb') |
35 | } | ||
36 | 35 | ||
37 | require u-boot-xlnx-blob.inc | 36 | if d.getVar('UBOOT_IMAGE_BLOB') == "1": |
37 | d.appendVarFlag('do_compile', 'postfuncs', ' do_blob_generate') | ||
38 | } | ||
38 | 39 | ||
39 | UBOOTELF_NODTB_IMAGE ?= "u-boot-nodtb.elf" | 40 | UBOOTELF_NODTB_IMAGE ?= "u-boot-nodtb.elf" |
40 | UBOOTELF_NODTB_BINARY ?= "u-boot" | 41 | UBOOTELF_NODTB_BINARY ?= "u-boot" |