diff options
Diffstat (limited to 'meta-xilinx-core/recipes-bsp')
18 files changed, 394 insertions, 49 deletions
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.2.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb index 810b51fd..f86c5985 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.2.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb | |||
@@ -12,7 +12,7 @@ I = "${AIEDIR}/include" | |||
12 | COMPATIBLE_MACHINE = "^$" | 12 | COMPATIBLE_MACHINE = "^$" |
13 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | 13 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" |
14 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | 14 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" |
15 | PV = "3.2" | 15 | PV = "3.3" |
16 | 16 | ||
17 | IOBACKENDS ?= "Linux" | 17 | IOBACKENDS ?= "Linux" |
18 | 18 | ||
@@ -25,7 +25,7 @@ RPROVIDES:${PN} = "libxaiengine" | |||
25 | # The makefile isn't ready for parallel execution at the moment | 25 | # The makefile isn't ready for parallel execution at the moment |
26 | PARALLEL_MAKE = "-j 1" | 26 | PARALLEL_MAKE = "-j 1" |
27 | 27 | ||
28 | CFLAGS += "-Wall -Wextra -fno-thread-jumps -fno-tree-pre" | 28 | CFLAGS += "-Wall -Wextra" |
29 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" | 29 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" |
30 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" | 30 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" |
31 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" | 31 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" |
@@ -45,3 +45,5 @@ do_install(){ | |||
45 | } | 45 | } |
46 | 46 | ||
47 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | 47 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" |
48 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
49 | |||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc index 5eeb69d4..11059465 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc | |||
@@ -2,10 +2,10 @@ SECTION = "libs" | |||
2 | 2 | ||
3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | 3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" |
4 | 4 | ||
5 | BRANCH ?= "xlnx_rel_v2023.1" | 5 | BRANCH ?= "xlnx_rel_v2023.2" |
6 | SRCREV ?= "1ad203de0b7f282b1c0659fd2ae3f218652c7274" | 6 | SRCREV ?= "84debe5d22c144fb09269b8410df4cb8a6aa3b2a" |
7 | 7 | ||
8 | LICENSE = "BSD-3-Clause" | 8 | LICENSE = "BSD-3-Clause" |
9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=b81abf1f508952331dd7d2ab36408f5b" | 9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" |
10 | 10 | ||
11 | SRC_URI = "${REPO};branch=${BRANCH}" | 11 | SRC_URI = "${REPO};branch=${BRANCH}" |
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.0.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb index 7bb4b849..2c6c9cd1 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb | |||
@@ -31,3 +31,5 @@ FILES:${PN}-demos = " \ | |||
31 | " | 31 | " |
32 | 32 | ||
33 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | 33 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" |
34 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.2.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.2.bb new file mode 100644 index 00000000..6ebd6cb5 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.2.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | ATF_VERSION = "2.8" | ||
2 | SRCREV = "6be857cb66300fb21e3f61308e4197911c8ac30d" | ||
3 | BRANCH = "xlnx_rebase_v2.8" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | ||
5 | |||
6 | |||
7 | include arm-trusted-firmware.inc | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb new file mode 100644 index 00000000..f61761f4 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb | |||
@@ -0,0 +1,59 @@ | |||
1 | DESCRIPTION = "Recipe to provide a bitstream via virtual/bitstream" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | # We never want to prefer this over another provider | ||
9 | DEFAULT_PREFERENCE = "-1" | ||
10 | |||
11 | PROVIDES = "virtual/bitstream" | ||
12 | |||
13 | COMPATIBLE_MACHINE = "$^" | ||
14 | COMPATIBLE_MACHINE:zynq = ".*" | ||
15 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
16 | |||
17 | # Since we're just copying, we can run any config | ||
18 | COMPATIBLE_HOST = ".*" | ||
19 | |||
20 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
21 | |||
22 | # Path where the bitstream can be found | ||
23 | BITSTREAM_PATH ?= "" | ||
24 | |||
25 | inherit deploy | ||
26 | |||
27 | do_install() { | ||
28 | if [ ! -e ${BITSTREAM_PATH} ]; then | ||
29 | echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})" | ||
30 | exit 1 | ||
31 | fi | ||
32 | |||
33 | install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/. | ||
34 | } | ||
35 | |||
36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
37 | SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
38 | do_deploy() { | ||
39 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
40 | if ${SHOULD_DEPLOY}; then | ||
41 | install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/. | ||
42 | fi | ||
43 | } | ||
44 | |||
45 | def check_bitstream_vars(d): | ||
46 | # If BITSTREAM_PATH is not defined, we error and instruct the user | ||
47 | # Don't cache this, as the items on disk can change! | ||
48 | d.setVar('BB_DONT_CACHE', '1') | ||
49 | if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')): | ||
50 | raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README.") | ||
51 | |||
52 | if not d.getVar('BITSTREAM_PATH'): | ||
53 | raise bb.parse.SkipRecipe("Something is depending on virtual/bitstream and you have not provided a bitstream using BITSTREAM_PATH variable.\n See the meta-xilinx-core README.") | ||
54 | |||
55 | python() { | ||
56 | # Need to allow bbappends to change the check | ||
57 | check_bitstream_vars(d) | ||
58 | } | ||
59 | |||
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb b/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb index 5133fbd8..4c8bfa0e 100644 --- a/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb | |||
@@ -44,6 +44,10 @@ BOOTGEN_EXTRA_ARGS ?= "" | |||
44 | do_patch[noexec] = "1" | 44 | do_patch[noexec] = "1" |
45 | 45 | ||
46 | def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): | 46 | def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): |
47 | arch = d.getVar("SOC_FAMILY") | ||
48 | bb.error("create_bif function not defined for arch: %s" % (arch)) | ||
49 | |||
50 | def create_zynq_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): | ||
47 | import re, os | 51 | import re, os |
48 | for cfg in config: | 52 | for cfg in config: |
49 | if cfg not in attrflags and common_attr: | 53 | if cfg not in attrflags and common_attr: |
@@ -117,23 +121,32 @@ def create_versal_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): | |||
117 | python do_configure() { | 121 | python do_configure() { |
118 | fp = d.getVar("BIF_FILE_PATH") | 122 | fp = d.getVar("BIF_FILE_PATH") |
119 | if fp == (d.getVar('B') + '/bootgen.bif'): | 123 | if fp == (d.getVar('B') + '/bootgen.bif'): |
120 | arch = d.getVar("SOC_FAMILY") | ||
121 | biffunc = {'versal':create_versal_bif, 'zynq':create_bif, 'zynqmp':create_bif} | ||
122 | biffd = open(fp, 'w') | 124 | biffd = open(fp, 'w') |
123 | biffd.write("the_ROM_image:\n") | 125 | biffd.write("the_ROM_image:\n") |
124 | biffd.write("{\n") | 126 | biffd.write("{\n") |
125 | 127 | ||
128 | arch = d.getVar("SOC_FAMILY") | ||
126 | bifattr = (d.getVar("BIF_COMMON_ATTR") or "").split() | 129 | bifattr = (d.getVar("BIF_COMMON_ATTR") or "").split() |
127 | if bifattr: | 130 | if bifattr: |
128 | attrflags = d.getVarFlags("BIF_COMMON_ATTR") or {} | 131 | attrflags = d.getVarFlags("BIF_COMMON_ATTR") or {} |
129 | biffunc[arch](bifattr, attrflags,'','', 1, biffd, d) | 132 | if arch in ['zynq', 'zynqmp']: |
133 | create_zynq_bif(bifattr, attrflags,'','', 1, biffd, d) | ||
134 | elif arch in ['versal']: | ||
135 | create_versal_bif(bifattr, attrflags,'','', 1, biffd, d) | ||
136 | else: | ||
137 | create_bif(bifattr, attrflags,'','', 1, biffd, d) | ||
130 | 138 | ||
131 | bifpartition = (d.getVar("BIF_PARTITION_ATTR") or "").split() | 139 | bifpartition = (d.getVar("BIF_PARTITION_ATTR") or "").split() |
132 | if bifpartition: | 140 | if bifpartition: |
133 | attrflags = d.getVarFlags("BIF_PARTITION_ATTR") or {} | 141 | attrflags = d.getVarFlags("BIF_PARTITION_ATTR") or {} |
134 | attrimage = d.getVarFlags("BIF_PARTITION_IMAGE") or {} | 142 | attrimage = d.getVarFlags("BIF_PARTITION_IMAGE") or {} |
135 | ids = d.getVarFlags("BIF_PARTITION_ID") or {} | 143 | ids = d.getVarFlags("BIF_PARTITION_ID") or {} |
136 | biffunc[arch](bifpartition, attrflags, attrimage, ids, 0, biffd, d) | 144 | if arch in ['zynq', 'zynqmp']: |
145 | create_zynq_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) | ||
146 | elif arch in ['versal']: | ||
147 | create_versal_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) | ||
148 | else: | ||
149 | create_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) | ||
137 | 150 | ||
138 | biffd.write("}") | 151 | biffd.write("}") |
139 | biffd.close() | 152 | biffd.close() |
diff --git a/meta-xilinx-core/recipes-bsp/bootgen/bootgen_2023.2.bb b/meta-xilinx-core/recipes-bsp/bootgen/bootgen_2023.2.bb new file mode 100644 index 00000000..03f323e1 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bootgen/bootgen_2023.2.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "Building and installing bootgen" | ||
2 | DESCRIPTION = "Building and installing bootgen, a Xilinx tool that lets you stitch binary files together and generate device boot images" | ||
3 | |||
4 | LICENSE = "Apache-2.0" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d526b6d0807bf263b97da1da876f39b1" | ||
6 | |||
7 | S = "${WORKDIR}/git" | ||
8 | |||
9 | DEPENDS += "openssl" | ||
10 | RDEPENDS:${PN} += "openssl" | ||
11 | |||
12 | REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" | ||
13 | BRANCH = "xlnx_rel_v2023.2" | ||
14 | SRCREV = "8e6702bb5064b806e45028486de7376962470a36" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | EXTRA_OEMAKE += 'CROSS_COMPILER="${CXX}" -C ${S}' | ||
20 | CXXFLAGS:append = " -std=c++0x" | ||
21 | |||
22 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
23 | |||
24 | do_install() { | ||
25 | install -d ${D}${bindir} | ||
26 | install -Dm 0755 ${S}/bootgen ${D}${bindir} | ||
27 | } | ||
28 | |||
29 | FILES:${PN} = "${bindir}/bootgen" | ||
30 | |||
31 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb index 91a13fa1..8d7211f5 100644 --- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb +++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb | |||
@@ -9,6 +9,11 @@ LIC_FILES_CHKSUM = " \ | |||
9 | file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c \ | 9 | file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c \ |
10 | " | 10 | " |
11 | 11 | ||
12 | # Since we're not based on a kernel default to nothing. | ||
13 | # This needs to be before the devicetree inherit, as it configured for use | ||
14 | # with a linux kernel by default. | ||
15 | KERNEL_INCLUDE ?= "" | ||
16 | |||
12 | inherit devicetree image-artifact-names | 17 | inherit devicetree image-artifact-names |
13 | 18 | ||
14 | # Fall back to SYSTEM_DTFILE if specified... | 19 | # Fall back to SYSTEM_DTFILE if specified... |
@@ -17,7 +22,29 @@ inherit devicetree image-artifact-names | |||
17 | # system. | 22 | # system. |
18 | SYSTEM_DTFILE ??= "" | 23 | SYSTEM_DTFILE ??= "" |
19 | CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" | 24 | CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" |
20 | DT_FILES_PATH = "${@os.path.dirname(d.getVar('CONFIG_DTFILE')) if d.getVar('CONFIG_DTFILE') else d.getVar('S')}" | 25 | |
26 | BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" | ||
27 | |||
28 | EXTRA_DT_FILES ?= "" | ||
29 | EXTRA_DTFILE_PREFIX ?= "system-top" | ||
30 | EXTRA_DTFILES_BUNDLE ?= "" | ||
31 | UBOOT_DT_FILES ?= "" | ||
32 | UBOOT_DTFILE_PREFIX ?= "system-top" | ||
33 | UBOOT_DTFILES_BUNDLE ?= "" | ||
34 | EXTRA_OVERLAYS ?= "" | ||
35 | |||
36 | SYSTEM_DTFILE[doc] = "System Device Tree which accepts at 0...1 dts file" | ||
37 | CONFIG_DTFILE[doc] = "Domain Specific Device Tree which accepts 0...1 dts file" | ||
38 | EXTRA_DT_FILES[doc] = "Add extra files to DT_FILES_PATH, it accepts 1...n dtsi files and adds to SRC_URI" | ||
39 | EXTRA_OVERLAYS[doc] = "Add extra files to DT_FILES_PATH and adds a #include for each to the BASE_DTS, it access 1..n dtsi files and adds to SRC_URI" | ||
40 | |||
41 | # There should only be ONE CONFIG_DTFILE listed | ||
42 | # These need to be passed in from global, not from a bbappend | ||
43 | FILESEXTRAPATHS:prepend := "${@'%s:' % os.path.dirname(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" | ||
44 | SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" | ||
45 | |||
46 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_FILES') or "").split()])}" | ||
47 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_OVERLAYS') or "").split()])}" | ||
21 | 48 | ||
22 | COMPATIBLE_MACHINE:zynq = ".*" | 49 | COMPATIBLE_MACHINE:zynq = ".*" |
23 | COMPATIBLE_MACHINE:zynqmp = ".*" | 50 | COMPATIBLE_MACHINE:zynqmp = ".*" |
@@ -30,11 +57,71 @@ PROVIDES = "virtual/dtb" | |||
30 | # common zynq include | 57 | # common zynq include |
31 | SRC_URI:append:zynq = " file://zynq-7000-qspi-dummy.dtsi" | 58 | SRC_URI:append:zynq = " file://zynq-7000-qspi-dummy.dtsi" |
32 | 59 | ||
33 | DTB_FILE_NAME = "${@os.path.basename(d.getVar('CONFIG_DTFILE')).replace('.dts', '.dtb') if d.getVar('CONFIG_DTFILE') else ''}" | 60 | DTB_FILE_NAME ?= "${BASE_DTS}.dtb" |
34 | 61 | ||
35 | DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" | 62 | DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" |
36 | 63 | ||
64 | # Copy the EXTRA_DT_FILES and EXTRA_OVERLAYS files in prepend operation so that | ||
65 | # it can be preprocessed. | ||
66 | do_configure:prepend () { | ||
67 | # Create DT_FILES_PATH directory if doesn't exist during prepend operation. | ||
68 | if [ ! -d ${DT_FILES_PATH} ]; then | ||
69 | mkdir -p ${DT_FILES_PATH} | ||
70 | fi | ||
71 | |||
72 | for f in ${EXTRA_DT_FILES} ${EXTRA_OVERLAYS}; do | ||
73 | if [ "$(realpath ${WORKDIR}/${f})" != "$(realpath ${DT_FILES_PATH}/`basename ${f}`)" ]; then | ||
74 | cp ${WORKDIR}/${f} ${DT_FILES_PATH}/ | ||
75 | fi | ||
76 | done | ||
77 | } | ||
78 | |||
79 | do_configure:append () { | ||
80 | for f in ${EXTRA_OVERLAYS}; do | ||
81 | if [ ! -e ${DT_FILES_PATH}/${BASE_DTS}.dts ]; then | ||
82 | if [ -e ${DT_FILES_PATH}/${BASE_DTS}.dtb ]; then | ||
83 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must use a 'dts' and not 'dtb' in CONFIG_DTFILE" | ||
84 | else | ||
85 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must set a valid CONFIG_DTFILE or use system-top.dts" | ||
86 | fi | ||
87 | exit 1 | ||
88 | fi | ||
89 | echo "/include/ \"$f\"" >> ${DT_FILES_PATH}/${BASE_DTS}.dts | ||
90 | done | ||
91 | } | ||
92 | |||
93 | devicetree_do_compile:append() { | ||
94 | import subprocess | ||
95 | |||
96 | dtb_file = d.getVar('DTB_FILE_NAME') or '' | ||
97 | if not dtb_file or not os.path.isfile(dtb_file): | ||
98 | bb.error("Expected file ${DTB_FILE_NAME} doesn't exist") | ||
99 | |||
100 | if d.getVar('EXTRA_DTFILES_BUNDLE'): | ||
101 | ccdtb_prefix = d.getVar('EXTRA_DTFILE_PREFIX') | ||
102 | extra_dt_files = d.getVar('EXTRA_DT_FILES').split() or [] | ||
103 | |||
104 | for dtsfile in extra_dt_files: | ||
105 | dtname = os.path.splitext(os.path.basename(dtsfile))[0] | ||
106 | if os.path.isfile(f"{dtname}.dtbo"): | ||
107 | fdtargs = ["fdtoverlay", "-o", f"{ccdtb_prefix}-{dtname}.dtb", "-i", dtb_file, f"{dtname}.dtbo"] | ||
108 | bb.note("Running {0}".format(" ".join(fdtargs))) | ||
109 | subprocess.run(fdtargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | ||
110 | |||
111 | if d.getVar('UBOOT_DTFILES_BUNDLE'): | ||
112 | uboot_ccdtb_prefix = d.getVar('UBOOT_DTFILE_PREFIX') | ||
113 | uboot_dt_files = d.getVar('UBOOT_DT_FILES').split() or [] | ||
114 | |||
115 | for dtsfile in uboot_dt_files: | ||
116 | dtname = os.path.splitext(os.path.basename(dtsfile))[0] | ||
117 | if os.path.isfile(f"{dtname}.dtbo"): | ||
118 | fdtargs = ["fdtoverlay", "-o", f"{uboot_ccdtb_prefix}-{dtname}.dtb", "-i", dtb_file, f"{dtname}.dtbo"] | ||
119 | bb.note("Running {0}".format(" ".join(fdtargs))) | ||
120 | subprocess.run(fdtargs, check = True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | ||
121 | } | ||
122 | |||
37 | FILES:${PN} += "/boot/system.dtb" | 123 | FILES:${PN} += "/boot/system.dtb" |
124 | |||
38 | devicetree_do_install:append() { | 125 | devicetree_do_install:append() { |
39 | if [ -n "${DTB_FILE_NAME}" ]; then | 126 | if [ -n "${DTB_FILE_NAME}" ]; then |
40 | # If it's already a dtb, we have to copy from the original location | 127 | # If it's already a dtb, we have to copy from the original location |
@@ -73,14 +160,6 @@ def check_devicetree_variables(d): | |||
73 | 160 | ||
74 | if not d.getVar('CONFIG_DTFILE'): | 161 | if not d.getVar('CONFIG_DTFILE'): |
75 | raise bb.parse.SkipRecipe("CONFIG_DTFILE or SYSTEM_DTFILE is not defined.") | 162 | raise bb.parse.SkipRecipe("CONFIG_DTFILE or SYSTEM_DTFILE is not defined.") |
76 | else: | ||
77 | if not os.path.exists(d.getVar('CONFIG_DTFILE')): | ||
78 | if not d.getVar('WITHIN_EXT_SDK'): | ||
79 | raise bb.parse.SkipRecipe("The device tree %s is not available." % d.getVar('CONFIG_DTFILE')) | ||
80 | else: | ||
81 | d.appendVar('SRC_URI', ' file://${CONFIG_DTFILE}') | ||
82 | d.setVarFlag('do_install', 'file-checksums', '${CONFIG_DTFILE}:True') | ||
83 | d.setVarFlag('do_deploy', 'file-checksums', '${CONFIG_DTFILE}:True') | ||
84 | 163 | ||
85 | python() { | 164 | python() { |
86 | # Need to allow bbappends to change the check | 165 | # Need to allow bbappends to change the check |
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.2.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.2.bb new file mode 100644 index 00000000..0d24c9fc --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.2.bb | |||
@@ -0,0 +1,72 @@ | |||
1 | SUMMARY = "Xilinx dfx-mgr libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and Binaries" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d67bcef754e935bf77b6d7051bd62b5e" | ||
6 | |||
7 | REPO ?= "git://github.com/Xilinx/dfx-mgr.git;protocol=https" | ||
8 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
9 | SRC_URI = "${REPO};${BRANCHARG}" | ||
10 | |||
11 | BRANCH = "xlnx_rel_v2023.2" | ||
12 | SRCREV = "4dbd33accb043bd92ecbec2a3507f85a22045c51" | ||
13 | SOMAJOR = "1" | ||
14 | SOMINOR = "0" | ||
15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" | ||
16 | |||
17 | COMPATIBLE_MACHINE = "^$" | ||
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
19 | COMPATIBLE_MACHINE:versal = "versal" | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | inherit cmake update-rc.d systemd | ||
24 | |||
25 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm" | ||
26 | RDEPENDS:${PN} += " freeipmi" | ||
27 | EXTRA_OECMAKE += " \ | ||
28 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ | ||
29 | " | ||
30 | |||
31 | INITSCRIPT_NAME = "dfx-mgr.sh" | ||
32 | INITSCRIPT_PARAMS = "start 99 S ." | ||
33 | |||
34 | SYSTEMD_PACKAGES="${PN}" | ||
35 | SYSTEMD_SERVICE:${PN}="dfx-mgr.service" | ||
36 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
37 | |||
38 | |||
39 | do_install(){ | ||
40 | install -d ${D}${bindir} | ||
41 | install -d ${D}${libdir} | ||
42 | install -d ${D}${includedir} | ||
43 | install -d ${D}${base_libdir}/firmware/xilinx | ||
44 | install -d ${D}${sysconfdir}/dfx-mgrd | ||
45 | |||
46 | cp ${B}/example/sys/linux/dfx-mgrd-static ${D}${bindir}/dfx-mgrd | ||
47 | cp ${B}/example/sys/linux/dfx-mgr-client-static ${D}${bindir}/dfx-mgr-client | ||
48 | chrpath -d ${D}${bindir}/dfx-mgrd | ||
49 | chrpath -d ${D}${bindir}/dfx-mgr-client | ||
50 | install -m 0644 ${S}/src/dfxmgr_client.h ${D}${includedir} | ||
51 | |||
52 | oe_soinstall ${B}/src/libdfx-mgr.so.${SOVERSION} ${D}${libdir} | ||
53 | |||
54 | install -m 0755 ${S}/src/daemon.conf ${D}${sysconfdir}/dfx-mgrd/ | ||
55 | |||
56 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
57 | install -d ${D}${sysconfdir}/init.d/ | ||
58 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${sysconfdir}/init.d/ | ||
59 | fi | ||
60 | |||
61 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${bindir} | ||
62 | install -m 0755 ${S}/src/scripts/xlnx-firmware-detect ${D}${bindir} | ||
63 | |||
64 | install -d ${D}${systemd_system_unitdir} | ||
65 | install -m 0644 ${S}/src/dfx-mgr.service ${D}${systemd_system_unitdir} | ||
66 | } | ||
67 | |||
68 | PACKAGES =+ "libdfx-mgr" | ||
69 | |||
70 | FILES:${PN} += "${base_libdir}/firmware/xilinx" | ||
71 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}" | ||
72 | FILES:libdfx-mgr = "${libdir}/libdfx-mgr.so.${SOVERSION} ${libdir}/libdfx-mgr.so.${SOMAJOR}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.2.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.2.bb new file mode 100644 index 00000000..b3ccb884 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.2.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | SUMMARY = "Xilinx libdfx library" | ||
2 | DESCRIPTION = "Xilinx libdfx Library and headers" | ||
3 | |||
4 | LICENSE = "MIT & GPL-2.0-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=94aba86aec117f003b958a52f019f1a7" | ||
6 | |||
7 | BRANCH ?= "xlnx_rel_v2023.2" | ||
8 | REPO ?= "git://github.com/Xilinx/libdfx.git;protocol=https" | ||
9 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
10 | SRC_URI = "${REPO};${BRANCHARG}" | ||
11 | SRCREV = "52c1d83c72a2b2e85d256411a199ed1baed12ae1" | ||
12 | |||
13 | COMPATIBLE_MACHINE = "^$" | ||
14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
15 | COMPATIBLE_MACHINE:versal = "versal" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit cmake | ||
20 | |||
21 | # Due to an update where the soname/version was defined, we need to use an RREPLACES | ||
22 | # so updates will work properly. | ||
23 | RREPLACES:${PN} = "libdfx" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.2.bb new file mode 100644 index 00000000..43fec635 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.2.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | require u-boot-tools-xlnx.inc | ||
2 | require u-boot-xlnx-2023.2.inc | ||
3 | |||
4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct | ||
5 | # bmp_logo.h | ||
6 | SED_CONFIG_EFI:append = ' -e "s/CONFIG_VIDEO=.*/# CONFIG_VIDEO is not set/"' | ||
7 | |||
8 | # Default do_compile fails with: | ||
9 | # | error: object directory ../downloads/git2/github.com.Xilinx.u-boot-xlnx.git/objects does not exist; check .git/objects/info/alternates. | ||
10 | # The regular workaround of calling 'git diff' seems to be problematic. | ||
11 | do_compile () { | ||
12 | oe_runmake -C ${S} tools-only_defconfig O=${B} | ||
13 | |||
14 | # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and | ||
15 | # generating it requires bin2header tool, which for target build | ||
16 | # is built with target tools and thus cannot be executed on host. | ||
17 | sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} ${B}/.config | ||
18 | |||
19 | oe_runmake -C ${S} cross_tools NO_SDL=1 O=${B} | ||
20 | } | ||
21 | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc new file mode 100644 index 00000000..0cfbd846 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | UBOOT_VERSION = "v2023.01" | ||
2 | |||
3 | UBRANCH = "xlnx_rebase_v2023.01" | ||
4 | |||
5 | SRCREV = "0fc19cad5a07a09958443e7a5b6f11e420ef195c" | ||
6 | |||
7 | LICENSE = "GPL-2.0-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
9 | |||
10 | # u-boot-xlnx has support for these | ||
11 | HAS_PLATFORM_INIT ?= " \ | ||
12 | xilinx_zynqmp_virt_config \ | ||
13 | xilinx_zynq_virt_defconfig \ | ||
14 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
15 | " | ||
16 | |||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | ||
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 index 86ba4fc6..bbf4125f 100644 --- 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 | |||
@@ -101,7 +101,7 @@ do_blob_generate () { | |||
101 | BASE_DTB=$(echo $CC_DTB | cut -d: -f2) | 101 | BASE_DTB=$(echo $CC_DTB | cut -d: -f2) |
102 | OUTPUT_DTB=$(echo $CC_DTB | cut -d: -f3) | 102 | OUTPUT_DTB=$(echo $CC_DTB | cut -d: -f3) |
103 | if [ "${SYSTEM_DTB_BLOB}" = "1" ]; then | 103 | if [ "${SYSTEM_DTB_BLOB}" = "1" ]; then |
104 | BASE_SYS_DTB="${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_NAME}" | 104 | BASE_SYS_DTB="${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_FILE_NAME}" |
105 | else | 105 | else |
106 | BASE_SYS_DTB="${B}/arch/arm/dts/${BASE_DTB}" | 106 | BASE_SYS_DTB="${B}/arch/arm/dts/${BASE_DTB}" |
107 | fi | 107 | fi |
@@ -125,13 +125,13 @@ do_blob_generate () { | |||
125 | its_filename="dtblob.its" | 125 | its_filename="dtblob.its" |
126 | dtblob_emit_its_section "${its_filename}" "header" | 126 | dtblob_emit_its_section "${its_filename}" "header" |
127 | dtblob_emit_its_section "${its_filename}" "imagestart" | 127 | dtblob_emit_its_section "${its_filename}" "imagestart" |
128 | for dtb in ${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_NAME} $(find ${DT_BLOB_DIR} -name '*.dtb' | sort); do | 128 | for dtb in ${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_FILE_NAME} $(find ${DT_BLOB_DIR} -name '*.dtb' | sort); do |
129 | dtblob_emit_dtb "${its_filename}" "$(basename $dtb .dtb)" "$dtb" | 129 | dtblob_emit_dtb "${its_filename}" "$(basename $dtb .dtb)" "$dtb" |
130 | done | 130 | done |
131 | dtblob_emit_its_section "${its_filename}" "sectend" | 131 | dtblob_emit_its_section "${its_filename}" "sectend" |
132 | dtblob_emit_its_section "${its_filename}" "confstart" | 132 | dtblob_emit_its_section "${its_filename}" "confstart" |
133 | dtbcount=1 | 133 | dtbcount=1 |
134 | for dtb in ${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_NAME} $(find ${DT_BLOB_DIR} -name '*.dtb' | sort); do | 134 | for dtb in ${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_FILE_NAME} $(find ${DT_BLOB_DIR} -name '*.dtb' | sort); do |
135 | dtblob_emit_config "${its_filename}" "$(basename $dtb .dtb)" "$(basename $dtb .dtb)" "$dtbcount" | 135 | dtblob_emit_config "${its_filename}" "$(basename $dtb .dtb)" "$(basename $dtb .dtb)" "$dtbcount" |
136 | dtbcount=`expr $dtbcount + 1` | 136 | dtbcount=`expr $dtbcount + 1` |
137 | done | 137 | done |
@@ -143,6 +143,8 @@ do_blob_generate () { | |||
143 | bbnote "Node ${DT_BLOB_DIR}/${DTB} with ${DT_BLOB_DIR}/${DUP_DTB}" | 143 | bbnote "Node ${DT_BLOB_DIR}/${DTB} with ${DT_BLOB_DIR}/${DUP_DTB}" |
144 | dtblob_emit_config "${its_filename}" "$DTB" "$DUP_DTB" "$dtbcount" | 144 | dtblob_emit_config "${its_filename}" "$DTB" "$DUP_DTB" "$dtbcount" |
145 | dtbcount=`expr $dtbcount + 1` | 145 | dtbcount=`expr $dtbcount + 1` |
146 | else | ||
147 | bberror "CC_DTBS_DUP file not found ${DT_BLOB_DIR}/${DTB}.dtb" | ||
146 | fi | 148 | fi |
147 | done | 149 | done |
148 | 150 | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb index afa4de23..6410fc25 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb | |||
@@ -71,7 +71,14 @@ DEVICETREE_OFFSET:zynqmp ??= "0x100000" | |||
71 | DEVICETREE_OFFSET:zynq ??= "0x100000" | 71 | DEVICETREE_OFFSET:zynq ??= "0x100000" |
72 | DEVICETREE_OFFSET:versal ??= "0x1000" | 72 | DEVICETREE_OFFSET:versal ??= "0x1000" |
73 | 73 | ||
74 | DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(d.getVar("DEVICETREE_ADDRESS"),16) + 0xf00000)}" | 74 | DEVICETREE_OVERLAY_OFFSET:microblaze ??= "0x1e00000" |
75 | DEVICETREE_OVERLAY_OFFSET:zynqmp ??= "0x100000" | ||
76 | DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000" | ||
77 | DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000" | ||
78 | DEVICETREE_OVERLAY_PADSIZE ??= "0xf00000" | ||
79 | |||
80 | DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(append_baseaddr(d,d.getVar('DEVICETREE_OVERLAY_OFFSET')),16) \ | ||
81 | + int(d.getVar('DEVICETREE_OVERLAY_PADSIZE'),16))}" | ||
75 | 82 | ||
76 | KERNEL_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('KERNEL_OFFSET'))}" | 83 | KERNEL_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('KERNEL_OFFSET'))}" |
77 | 84 | ||
@@ -162,14 +169,8 @@ NAND_FIT_IMAGE_OFFSET ??= "0x4180000" | |||
162 | NAND_FIT_IMAGE_OFFSET:zynq ??= "0x1080000" | 169 | NAND_FIT_IMAGE_OFFSET:zynq ??= "0x1080000" |
163 | NAND_FIT_IMAGE_SIZE ??= "0x6400000" | 170 | NAND_FIT_IMAGE_SIZE ??= "0x6400000" |
164 | 171 | ||
165 | # Xen boot script variables. Define here and set it from meta-virtualization | 172 | # Add variables as addendum. |
166 | XEN_OFFSET ??= "0xBA00000" | 173 | SCRIPT_SED_ADDENDUM = "" |
167 | XEN_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('XEN_OFFSET'))}" | ||
168 | XEN_IMAGE_NAME ??= "xen" | ||
169 | DOM0_MEM ??= "1500M" | ||
170 | XEN_SERIAL_CONSOLES ??= "serial0" | ||
171 | XEN_CMDLINE_APPEND ??= "" | ||
172 | DOM0_MAX_VCPUS ??= "1" | ||
173 | 174 | ||
174 | # Default to booting with the rootfs device being partition 2 for SD/eMMC | 175 | # Default to booting with the rootfs device being partition 2 for SD/eMMC |
175 | PARTNUM ?= "2" | 176 | PARTNUM ?= "2" |
@@ -181,6 +182,9 @@ KERNEL_ROOT_SD ?= "root=/dev/\${bootdev}${PARTNUM} ro rootwait" | |||
181 | # Set Kernel root filesystem parameter for JTAG/QSPI/OSPI/NAND(using RAMDISK) boot | 182 | # Set Kernel root filesystem parameter for JTAG/QSPI/OSPI/NAND(using RAMDISK) boot |
182 | KERNEL_ROOT_RAMDISK ?= "root=/dev/ram0 rw" | 183 | KERNEL_ROOT_RAMDISK ?= "root=/dev/ram0 rw" |
183 | 184 | ||
185 | # Append the kernel command line | ||
186 | KERNEL_COMMAND_APPEND ?= "" | ||
187 | |||
184 | BITSTREAM_LOAD_ADDRESS ?= "0x100000" | 188 | BITSTREAM_LOAD_ADDRESS ?= "0x100000" |
185 | 189 | ||
186 | do_configure[noexec] = "1" | 190 | do_configure[noexec] = "1" |
@@ -189,6 +193,9 @@ def append_baseaddr(d,offset): | |||
189 | skip_append = d.getVar('SKIP_APPEND_BASEADDR') or "" | 193 | skip_append = d.getVar('SKIP_APPEND_BASEADDR') or "" |
190 | if skip_append == "1": | 194 | if skip_append == "1": |
191 | return offset | 195 | return offset |
196 | if offset.startswith('$'): | ||
197 | # If offset startswith '$' Assuming as uboot env variable. | ||
198 | return offset | ||
192 | import subprocess | 199 | import subprocess |
193 | baseaddr = d.getVar('DDR_BASEADDR') or "0x0" | 200 | baseaddr = d.getVar('DDR_BASEADDR') or "0x0" |
194 | subcmd = "$((%s+%s));" % (baseaddr,offset) | 201 | subcmd = "$((%s+%s));" % (baseaddr,offset) |
@@ -240,13 +247,8 @@ do_compile() { | |||
240 | -e 's/@@PARTNUM@@/${PARTNUM}/' \ | 247 | -e 's/@@PARTNUM@@/${PARTNUM}/' \ |
241 | -e 's:@@KERNEL_ROOT_SD@@:${KERNEL_ROOT_SD}:' \ | 248 | -e 's:@@KERNEL_ROOT_SD@@:${KERNEL_ROOT_SD}:' \ |
242 | -e 's:@@KERNEL_ROOT_RAMDISK@@:${KERNEL_ROOT_RAMDISK}:' \ | 249 | -e 's:@@KERNEL_ROOT_RAMDISK@@:${KERNEL_ROOT_RAMDISK}:' \ |
243 | -e 's/@@XEN_IMAGE_NAME@@/${XEN_IMAGE_NAME}/' \ | 250 | -e 's:@@KERNEL_COMMAND_APPEND@@:${KERNEL_COMMAND_APPEND}:' \ |
244 | -e 's/@@XEN_OFFSET@@/${XEN_OFFSET}/' \ | 251 | ${SCRIPT_SED_ADDENDUM} \ |
245 | -e 's/@@XEN_LOAD_ADDRESS@@/${XEN_LOAD_ADDRESS}/' \ | ||
246 | -e 's/@@DOM0_MEM@@/${DOM0_MEM}/' \ | ||
247 | -e 's/@@DOM0_MAX_VCPUS@@/${DOM0_MAX_VCPUS}/' \ | ||
248 | -e 's:@@XEN_SERIAL_CONSOLES@@:${XEN_SERIAL_CONSOLES}:' \ | ||
249 | -e 's:@@XEN_CMDLINE_APPEND@@:${XEN_CMDLINE_APPEND}:' \ | ||
250 | "${WORKDIR}/boot.cmd.${BOOTMODE}${BOOTFILE_EXT}" > "${WORKDIR}/boot.cmd" | 252 | "${WORKDIR}/boot.cmd.${BOOTMODE}${BOOTFILE_EXT}" > "${WORKDIR}/boot.cmd" |
251 | 253 | ||
252 | mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr | 254 | mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic index ff2a5688..d99932ed 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic | |||
@@ -9,10 +9,16 @@ ramdisk_name=@@RAMDISK_IMAGE1@@ | |||
9 | rootfs_name=@@RAMDISK_IMAGE@@ | 9 | rootfs_name=@@RAMDISK_IMAGE@@ |
10 | @@PRE_BOOTENV@@ | 10 | @@PRE_BOOTENV@@ |
11 | 11 | ||
12 | |||
13 | setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;' | ||
14 | setenv update_bootargs 'if test -n ${launch_ramdisk_init} && test ${bootargs} = "";then if run get_bootargs;then setenv bootargs "\$bootargs launch_ramdisk_init=${launch_ramdisk_init} $extrabootargs";fi;fi' | ||
15 | |||
16 | |||
12 | for boot_target in ${boot_targets}; | 17 | for boot_target in ${boot_targets}; |
13 | do | 18 | do |
14 | echo "Trying to load boot images from ${boot_target}" | 19 | echo "Trying to load boot images from ${boot_target}" |
15 | if test "${boot_target}" = "jtag" ; then | 20 | if test "${boot_target}" = "jtag" ; then |
21 | run update_bootargs | ||
16 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 22 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ |
17 | fi | 23 | fi |
18 | if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" || test "${boot_target}" = "usb0" || test "${boot_target}" = "usb1"; then | 24 | if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" || test "${boot_target}" = "usb0" || test "${boot_target}" = "usb1"; then |
@@ -34,6 +40,7 @@ do | |||
34 | fi | 40 | fi |
35 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then | 41 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then |
36 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; | 42 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; |
43 | setenv fdtcontroladdr @@DEVICETREE_ADDRESS@@ | ||
37 | fi | 44 | fi |
38 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then | 45 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then |
39 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; | 46 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; |
@@ -41,6 +48,7 @@ do | |||
41 | fdt resize 8192 | 48 | fdt resize 8192 |
42 | fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@ | 49 | fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@ |
43 | fi | 50 | fi |
51 | run update_bootargs | ||
44 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then | 52 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then |
45 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; | 53 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; |
46 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 54 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ |
@@ -51,7 +59,7 @@ do | |||
51 | fi | 59 | fi |
52 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | 60 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ |
53 | fi | 61 | fi |
54 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then | 62 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "xspi1" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then |
55 | sf probe 0 0 0; | 63 | sf probe 0 0 0; |
56 | sf read @@FIT_IMAGE_LOAD_ADDRESS@@ @@QSPI_FIT_IMAGE_OFFSET@@ @@QSPI_FIT_IMAGE_SIZE@@ | 64 | sf read @@FIT_IMAGE_LOAD_ADDRESS@@ @@QSPI_FIT_IMAGE_OFFSET@@ @@QSPI_FIT_IMAGE_SIZE@@ |
57 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | 65 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; |
@@ -59,6 +67,7 @@ do | |||
59 | 67 | ||
60 | sf read @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_OFFSET@@ @@QSPI_KERNEL_SIZE@@ | 68 | sf read @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_OFFSET@@ @@QSPI_KERNEL_SIZE@@ |
61 | sf read @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_OFFSET@@ @@QSPI_RAMDISK_SIZE@@ | 69 | sf read @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_OFFSET@@ @@QSPI_RAMDISK_SIZE@@ |
70 | run update_bootargs | ||
62 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | 71 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; |
63 | echo "Booting using Separate images failed" | 72 | echo "Booting using Separate images failed" |
64 | fi | 73 | fi |
@@ -70,6 +79,7 @@ do | |||
70 | 79 | ||
71 | nand read @@KERNEL_LOAD_ADDRESS@@ @@NAND_KERNEL_OFFSET@@ @@NAND_KERNEL_SIZE@@ | 80 | nand read @@KERNEL_LOAD_ADDRESS@@ @@NAND_KERNEL_OFFSET@@ @@NAND_KERNEL_SIZE@@ |
72 | nand read @@RAMDISK_IMAGE_ADDRESS@@ @@NAND_RAMDISK_OFFSET@@ @@NAND_RAMDISK_SIZE@@ | 81 | nand read @@RAMDISK_IMAGE_ADDRESS@@ @@NAND_RAMDISK_OFFSET@@ @@NAND_RAMDISK_SIZE@@ |
82 | run update_bootargs | ||
73 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | 83 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; |
74 | echo "Booting using Separate images failed" | 84 | echo "Booting using Separate images failed" |
75 | fi | 85 | fi |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root index 816707cb..ed12f941 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root | |||
@@ -15,7 +15,7 @@ do | |||
15 | if test "${boot_target}" = "jtag" ; then | 15 | if test "${boot_target}" = "jtag" ; then |
16 | fdt addr @@DEVICETREE_ADDRESS@@ | 16 | fdt addr @@DEVICETREE_ADDRESS@@ |
17 | fdt get value bootargs /chosen bootargs | 17 | fdt get value bootargs /chosen bootargs |
18 | setenv bootargs $bootargs @@KERNEL_ROOT_RAMDISK@@ | 18 | setenv bootargs $bootargs @@KERNEL_COMMAND_APPEND@@ @@KERNEL_ROOT_RAMDISK@@ |
19 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 19 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ |
20 | fi | 20 | fi |
21 | if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" || test "${boot_target}" = "usb0" || test "${boot_target}" = "usb1"; then | 21 | if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" || test "${boot_target}" = "usb0" || test "${boot_target}" = "usb1"; then |
@@ -65,7 +65,7 @@ do | |||
65 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; | 65 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; |
66 | fdt addr @@DEVICETREE_ADDRESS@@ | 66 | fdt addr @@DEVICETREE_ADDRESS@@ |
67 | fdt get value bootargs /chosen bootargs | 67 | fdt get value bootargs /chosen bootargs |
68 | setenv bootargs $bootargs @@KERNEL_ROOT_RAMDISK@@ | 68 | setenv bootargs $bootargs @@KERNEL_COMMAND_APPEND@@ @@KERNEL_ROOT_RAMDISK@@ |
69 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 69 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ |
70 | fi | 70 | fi |
71 | echo "Checking for /${rootfs_name}" | 71 | echo "Checking for /${rootfs_name}" |
@@ -74,12 +74,12 @@ do | |||
74 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; | 74 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; |
75 | fdt addr @@DEVICETREE_ADDRESS@@ | 75 | fdt addr @@DEVICETREE_ADDRESS@@ |
76 | fdt get value bootargs /chosen bootargs | 76 | fdt get value bootargs /chosen bootargs |
77 | setenv bootargs $bootargs @@KERNEL_ROOT_RAMDISK@@ | 77 | setenv bootargs $bootargs @@KERNEL_COMMAND_APPEND@@ @@KERNEL_ROOT_RAMDISK@@ |
78 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 78 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ |
79 | fi | 79 | fi |
80 | fdt addr @@DEVICETREE_ADDRESS@@ | 80 | fdt addr @@DEVICETREE_ADDRESS@@ |
81 | fdt get value bootargs /chosen bootargs | 81 | fdt get value bootargs /chosen bootargs |
82 | setenv bootargs $bootargs @@KERNEL_ROOT_SD@@ | 82 | setenv bootargs $bootargs @@KERNEL_COMMAND_APPEND@@ @@KERNEL_ROOT_SD@@ |
83 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | 83 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ |
84 | fi | 84 | fi |
85 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then | 85 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then |
@@ -93,7 +93,7 @@ do | |||
93 | sf read @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_OFFSET@@ @@QSPI_RAMDISK_SIZE@@ | 93 | sf read @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_OFFSET@@ @@QSPI_RAMDISK_SIZE@@ |
94 | fdt addr @@DEVICETREE_ADDRESS@@ | 94 | fdt addr @@DEVICETREE_ADDRESS@@ |
95 | fdt get value bootargs /chosen bootargs | 95 | fdt get value bootargs /chosen bootargs |
96 | setenv bootargs $bootargs @@KERNEL_ROOT_RAMDISK@@ | 96 | setenv bootargs $bootargs @@KERNEL_COMMAND_APPEND@@ @@KERNEL_ROOT_RAMDISK@@ |
97 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | 97 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; |
98 | echo "Booting using Separate images failed" | 98 | echo "Booting using Separate images failed" |
99 | fi | 99 | fi |
@@ -108,7 +108,7 @@ do | |||
108 | nand read @@RAMDISK_IMAGE_ADDRESS@@ @@NAND_RAMDISK_OFFSET@@ @@NAND_RAMDISK_SIZE@@ | 108 | nand read @@RAMDISK_IMAGE_ADDRESS@@ @@NAND_RAMDISK_OFFSET@@ @@NAND_RAMDISK_SIZE@@ |
109 | fdt addr @@DEVICETREE_ADDRESS@@ | 109 | fdt addr @@DEVICETREE_ADDRESS@@ |
110 | fdt get value bootargs /chosen bootargs | 110 | fdt get value bootargs /chosen bootargs |
111 | setenv bootargs $bootargs @@KERNEL_ROOT_RAMDISK@@ | 111 | setenv bootargs $bootargs @@KERNEL_COMMAND_APPEND@@ @@KERNEL_ROOT_RAMDISK@@ |
112 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | 112 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; |
113 | echo "Booting using Separate images failed" | 113 | echo "Booting using Separate images failed" |
114 | fi | 114 | fi |
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 10dfbb60..4c7ea934 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 | |||
@@ -9,7 +9,7 @@ SYSROOT_DIRS += "/boot" | |||
9 | 9 | ||
10 | BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" | 10 | BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" |
11 | DTB_PATH ?= "boot/devicetree/" | 11 | DTB_PATH ?= "boot/devicetree/" |
12 | DTB_NAME ?= "" | 12 | DTB_FILE_NAME ?= "" |
13 | 13 | ||
14 | # This vairable is used for U-boot user specified dts from u-boot repo path | 14 | # This vairable is used for U-boot user specified dts from u-boot repo path |
15 | # u-boot-xlnx/arch/arm/dts/versal-vck190-revA-x-ebm-01-revA.dts. | 15 | # u-boot-xlnx/arch/arm/dts/versal-vck190-revA-x-ebm-01-revA.dts. |
@@ -17,7 +17,7 @@ DTB_NAME ?= "" | |||
17 | # Example: UBOOT_USER_SPECIFIED_DTS = "versal-vck190-revA-x-ebm-01-revA" | 17 | # Example: UBOOT_USER_SPECIFIED_DTS = "versal-vck190-revA-x-ebm-01-revA" |
18 | UBOOT_USER_SPECIFIED_DTS ?= "" | 18 | UBOOT_USER_SPECIFIED_DTS ?= "" |
19 | 19 | ||
20 | EXTRA_OEMAKE += "${@'EXT_DTB=${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_NAME}' if (d.getVar('DTB_NAME') != '' and d.getVar('UBOOT_USER_SPECIFIED_DTS') == '') else '' }" | 20 | EXTRA_OEMAKE += "${@'EXT_DTB=${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_FILE_NAME}' if (d.getVar('DTB_FILE_NAME') != '' and d.getVar('UBOOT_USER_SPECIFIED_DTS') == '') else '' }" |
21 | EXTRA_OEMAKE += "${@'DEVICE_TREE=${UBOOT_USER_SPECIFIED_DTS}' if (d.getVar('UBOOT_USER_SPECIFIED_DTS') != '') else '' }" | 21 | EXTRA_OEMAKE += "${@'DEVICE_TREE=${UBOOT_USER_SPECIFIED_DTS}' if (d.getVar('UBOOT_USER_SPECIFIED_DTS') != '') else '' }" |
22 | 22 | ||
23 | python __anonymous () { | 23 | python __anonymous () { |
@@ -25,8 +25,8 @@ python __anonymous () { | |||
25 | providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb") | 25 | providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb") |
26 | if providerdtb: | 26 | if providerdtb: |
27 | d.appendVarFlag('do_configure', 'depends', ' virtual/dtb:do_populate_sysroot') | 27 | d.appendVarFlag('do_configure', 'depends', ' virtual/dtb:do_populate_sysroot') |
28 | if d.getVar("DTB_NAME") is not None: | 28 | if d.getVar("DTB_FILE_NAME") is not None: |
29 | d.setVar('DTB_NAME', d.getVar('BASE_DTS')+ '.dtb') | 29 | d.setVar('DTB_FILE_NAME', d.getVar('BASE_DTS')+ '.dtb') |
30 | } | 30 | } |
31 | 31 | ||
32 | do_configure:prepend () { | 32 | do_configure:prepend () { |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.2.bb new file mode 100644 index 00000000..22075424 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.2.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | |||
2 | require u-boot-xlnx.inc | ||
3 | require u-boot-spl-zynq-init.inc | ||
4 | require u-boot-xlnx-2023.2.inc | ||