summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-core/recipes-bsp')
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb40
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc11
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb27
-rw-r--r--meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc19
-rw-r--r--meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb2
-rw-r--r--meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb59
-rw-r--r--meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb76
-rw-r--r--meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb11
-rw-r--r--meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb9
-rw-r--r--meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb36
-rw-r--r--meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb2
-rw-r--r--meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb19
-rw-r--r--meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb74
-rw-r--r--meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb69
-rw-r--r--meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb72
-rw-r--r--meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb25
-rw-r--r--meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb154
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb21
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.2.inc17
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc1
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb5
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic12
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root11
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb29
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.bb4
25 files changed, 703 insertions, 102 deletions
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb
new file mode 100644
index 00000000..a99f296a
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb
@@ -0,0 +1,40 @@
1SUMMARY = "Xilinx AI Engine runtime"
2DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP"
3
4require aie-rt-2024.2.inc
5
6SECTION = "libs"
7
8AIEDIR ?= "${S}/driver"
9S = "${WORKDIR}/git"
10I = "${AIEDIR}/include"
11
12IOBACKENDS ?= "Linux"
13
14DEPENDS = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}"
15RDEPENDS:${PN} = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}"
16
17PROVIDES = "libxaiengine"
18RPROVIDES:${PN} = "libxaiengine"
19
20# The makefile isn't ready for parallel execution at the moment
21PARALLEL_MAKE = "-j 1"
22
23CFLAGS += "-Wall -Wextra"
24CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}"
25CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}"
26EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'"
27
28
29do_compile(){
30 oe_runmake
31}
32
33do_install(){
34 install -d ${D}${includedir}
35 install ${I}/*.h ${D}${includedir}/
36 install -d ${D}${includedir}/xaiengine
37 install ${I}/xaiengine/*.h ${D}${includedir}/xaiengine/
38 install -d ${D}${libdir}
39 cp -dr ${AIEDIR}/src/*.so* ${D}${libdir}
40}
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc
new file mode 100644
index 00000000..9ccc7621
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc
@@ -0,0 +1,11 @@
1SECTION = "libs"
2
3REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https"
4
5BRANCH ?= "xlnx_rel_v2024.2"
6SRCREV ?= "8845d962e5b30b576c87dcf6635fb84a90ef1e36"
7
8LICENSE = "BSD-3-Clause"
9LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897"
10
11SRC_URI = "${REPO};branch=${BRANCH}"
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb
new file mode 100644
index 00000000..2e60941b
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb
@@ -0,0 +1,27 @@
1SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)"
2DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP"
3
4require aie-rt-2024.2.inc
5
6SECTION = "devel"
7
8XAIEFAL_DIR ?= "fal"
9S = "${WORKDIR}/git"
10
11IOBACKENDS ?= "Linux"
12
13PROVIDES = "aiefal"
14ALLOW_EMPTY:${PN} = "1"
15
16inherit pkgconfig cmake
17
18DEPENDS = "libxaiengine"
19
20OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}"
21
22EXTRA_OECMAKE = "-DWITH_TESTS=OFF -DFAL_LINUX=ON "
23EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}"
24
25FILES:${PN}-demos = " \
26 ${bindir}/* \
27"
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
index 67b97613..485d3b17 100644
--- a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
+++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
@@ -75,9 +75,6 @@ EXTRA_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.get
75EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" 75EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}"
76EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" 76EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}"
77 77
78ATF_PROVENCORE = "SPD=pncd SPD_PNCD_NS_IRQ=51 ZYNQMP_BL32_MEM_BASE=0x70000000 ZYNQMP_BL32_MEM_SIZE=0x0FF00000"
79EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'provencore', ' ${ATF_PROVENCORE}', '', d)}"
80
81TFA_BL33_LOAD ?= "" 78TFA_BL33_LOAD ?= ""
82EXTRA_OEMAKE:append = "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}" 79EXTRA_OEMAKE:append = "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}"
83 80
@@ -129,3 +126,19 @@ FILES:${PN} += "/boot/*.elf /boot/*.bin /boot/*.ub"
129# Disable buildpaths QA check warnings for Versal. 126# Disable buildpaths QA check warnings for Versal.
130INSANE_SKIP:${PN}:append:versal = " buildpaths" 127INSANE_SKIP:${PN}:append:versal = " buildpaths"
131INSANE_SKIP:${PN}:append:versal-net = " buildpaths" 128INSANE_SKIP:${PN}:append:versal-net = " buildpaths"
129
130python() {
131 soc_family = d.getVar('SOC_FAMILY')
132 atf_console = d.getVar('ATF_CONSOLE')
133
134 # See plat/xilinx/<soc_family>/platform.mk
135 if soc_family and soc_family == "zynqmp":
136 if not atf_console in [ 'cadence', 'cadence0', 'cadence1', 'dcc' ]:
137 raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for ZynqMP, only cadence, cadence0, cadence1, and dcc are valid options.' % (atf_console))
138 elif soc_family and soc_family == "versal":
139 if not atf_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]:
140 raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for Versal, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (atf_console))
141 elif soc_family and soc_family == "versal-net":
142 if not atf_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]:
143 raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for Versal-Net, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (atf_console))
144}
diff --git a/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb b/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb
index f3457640..9fd9c34a 100644
--- a/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb
+++ b/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb
@@ -4,6 +4,8 @@ LICENSE = "CLOSED"
4 4
5PROVIDES = "virtual/base-pdi" 5PROVIDES = "virtual/base-pdi"
6 6
7INHIBIT_DEFAULT_DEPS = "1"
8
7COMPATIBLE_MACHINE = "^$" 9COMPATIBLE_MACHINE = "^$"
8COMPATIBLE_MACHINE:microblaze = ".*" 10COMPATIBLE_MACHINE:microblaze = ".*"
9COMPATIBLE_MACHINE:versal = ".*" 11COMPATIBLE_MACHINE:versal = ".*"
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb
deleted file mode 100644
index f61761f4..00000000
--- a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb
+++ /dev/null
@@ -1,59 +0,0 @@
1DESCRIPTION = "Recipe to provide a bitstream via virtual/bitstream"
2
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6INHIBIT_DEFAULT_DEPS = "1"
7
8# We never want to prefer this over another provider
9DEFAULT_PREFERENCE = "-1"
10
11PROVIDES = "virtual/bitstream"
12
13COMPATIBLE_MACHINE = "$^"
14COMPATIBLE_MACHINE:zynq = ".*"
15COMPATIBLE_MACHINE:zynqmp = ".*"
16
17# Since we're just copying, we can run any config
18COMPATIBLE_HOST = ".*"
19
20PACKAGE_ARCH = "${MACHINE_ARCH}"
21
22# Path where the bitstream can be found
23BITSTREAM_PATH ?= ""
24
25inherit deploy
26
27do_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!
37SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}"
38do_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
45def 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
55python() {
56 # Need to allow bbappends to change the check
57 check_bitstream_vars(d)
58}
59
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb
new file mode 100644
index 00000000..97965279
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb
@@ -0,0 +1,76 @@
1DESCRIPTION = "Recipe to provide a bitstream via virtual/bitstream"
2
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6INHIBIT_DEFAULT_DEPS = "1"
7
8BITSTREAM_PATH_DEPENDS ??= ""
9DEPENDS += "${BITSTREAM_PATH_DEPENDS}"
10
11# We never want to prefer this over another provider
12DEFAULT_PREFERENCE = "-1"
13
14PROVIDES = "virtual/bitstream"
15
16COMPATIBLE_MACHINE = "$^"
17COMPATIBLE_MACHINE:zynq = ".*"
18COMPATIBLE_MACHINE:zynqmp = ".*"
19
20# Since we're just copying, we can run any config
21COMPATIBLE_HOST = ".*"
22
23PACKAGE_ARCH = "${MACHINE_ARCH}"
24
25# Path where the bitstream can be found
26BITSTREAM_PATH ?= ""
27
28inherit deploy
29
30BITSTREAM_NAME ?= "download"
31BITSTREAM_NAME:microblaze ?= "system"
32
33BITSTREAM_BASE_NAME ?= "${BITSTREAM_NAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
34
35SYSROOT_DIRS += "/boot/bitstream"
36
37do_install() {
38 if [ ! -e ${BITSTREAM_PATH} ]; then
39 echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})"
40 exit 1
41 fi
42 install -d ${D}/boot/bitstream/
43 install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/bitstream/${BITSTREAM_BASE_NAME}.bit
44}
45
46# If the item is already in OUR deploy_image_dir, nothing to deploy!
47SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}"
48do_deploy() {
49 # If the item is already in OUR deploy_image_dir, nothing to deploy!
50 if ${SHOULD_DEPLOY}; then
51 install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/${BITSTREAM_BASE_NAME}.bit
52 fi
53}
54
55addtask deploy before do_build after do_install
56
57FILES:${PN} += "/boot/bitstream/*.bit"
58
59def check_bitstream_vars(d):
60 # Assuming if BITSTREAM_PATH_DEPENDS exists, that the file will be available later.
61 if not d.getVar('BITSTREAM_PATH_DEPENDS'):
62 # Don't cache this, as the items on disk can change!
63 d.setVar('BB_DONT_CACHE', '1')
64
65 # If BITSTREAM_PATH is not found or defined, we error and instruct the user
66 if not d.getVar('BITSTREAM_PATH'):
67 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.")
68
69 if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')):
70 raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README." % d.getVar('BITSTREAM_PATH'))
71
72python() {
73 # Need to allow bbappends to change the check
74 check_bitstream_vars(d)
75}
76
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb
index 98eebc3e..f4a96f41 100644
--- a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb
+++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb
@@ -9,7 +9,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
9 9
10BOOTBIN_VER_MAIN ?= "" 10BOOTBIN_VER_MAIN ?= ""
11 11
12BOOTBIN_VER_SUFFIX ?= "${@(d.getVar('XILINX_VER_BUILD') or '')[:8] if d.getVar('XILINX_VER_UPDATE') != 'release' and not d.getVar('XILINX_VER_UPDATE').startswith('update') else ''}"
13BOOTBIN_VER_FILE = "bootbin-version-header.txt" 12BOOTBIN_VER_FILE = "bootbin-version-header.txt"
14BOOTBIN_VER_MAX_LEN = "36" 13BOOTBIN_VER_MAX_LEN = "36"
15 14
@@ -17,12 +16,16 @@ BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest"
17 16
18inherit deploy image-artifact-names 17inherit deploy image-artifact-names
19 18
19IMAGE_NAME_SUFFIX = ""
20
20python do_configure() { 21python do_configure() {
21 if d.getVar("BOOTBIN_VER_SUFFIX"): 22
22 version = version + "-" + d.getVar("BOOTBIN_VER_SUFFIX") 23 if not 'version' in locals():
24 version = d.getVar("MACHINE") + "-v" + d.getVar("BOOTBIN_VER_MAIN")
25 version += d.getVar("IMAGE_VERSION_SUFFIX")
23 26
24 if len(version) > int(d.getVar("BOOTBIN_VER_MAX_LEN")): 27 if len(version) > int(d.getVar("BOOTBIN_VER_MAX_LEN")):
25 bb.error("version string too long") 28 bb.fatal("version string too long")
26 29
27 with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: 30 with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f:
28 f.write(version.encode("utf-8").hex()) 31 f.write(version.encode("utf-8").hex())
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb
index af30a17d..765d35e8 100644
--- a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb
+++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb
@@ -15,9 +15,14 @@ BOOTBIN_VER_FILE = "bootbin-version-string.txt"
15 15
16inherit deploy image-artifact-names 16inherit deploy image-artifact-names
17 17
18IMAGE_NAME_SUFFIX = ""
19
18python do_configure() { 20python do_configure() {
19 if d.getVar("BOOTBIN_VER_SUFFIX"): 21
20 version = version + "-" + d.getVar("BOOTBIN_VER_SUFFIX") 22 if not 'version' in locals():
23 version = d.getVar("MACHINE") + "-v" + d.getVar("BOOTBIN_VER_MAIN")
24 version += d.getVar("IMAGE_VERSION_SUFFIX")
25
21 with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: 26 with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f:
22 f.write(version) 27 f.write(version)
23} 28}
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 e53d21f7..b9236f55 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
@@ -7,6 +7,8 @@ LICENSE = "BSD"
7 7
8include machine-xilinx-${SOC_FAMILY}.inc 8include machine-xilinx-${SOC_FAMILY}.inc
9 9
10BOOTBIN_INCLUDE ?= ""
11
10inherit deploy 12inherit deploy
11 13
12# Don't allow building for microblaze MACHINE 14# Don't allow building for microblaze MACHINE
@@ -18,10 +20,11 @@ COMPATIBLE_MACHINE:versal-net = ".*"
18 20
19PROVIDES = "virtual/boot-bin" 21PROVIDES = "virtual/boot-bin"
20 22
21DEPENDS += "bootgen-native" 23DEPENDS += "bootgen-native u-boot-xlnx-scr"
22 24
23# There is no bitstream recipe, so really depend on virtual/bitstream 25# There is no bitstream recipe, so really depend on virtual/bitstream
24DEPENDS += "${@(d.getVar('BIF_PARTITION_ATTR') or "").replace('bitstream', 'virtual/bitstream')}" 26# We need to refer to virtual/arm-trusted-firmware and not arm-trusted-firmware as there may be multiple providers
27DEPENDS += "${@(d.getVar('BIF_PARTITION_ATTR') or "").replace('bitstream', 'virtual/bitstream').replace('arm-trusted-firmware', 'virtual/arm-trusted-firmware')}"
25 28
26PACKAGE_ARCH = "${MACHINE_ARCH}" 29PACKAGE_ARCH = "${MACHINE_ARCH}"
27 30
@@ -45,8 +48,17 @@ BOOTGEN_ARCH_DEFAULT:versal-net = "versalnet"
45BOOTGEN_ARCH ?= "${BOOTGEN_ARCH_DEFAULT}" 48BOOTGEN_ARCH ?= "${BOOTGEN_ARCH_DEFAULT}"
46BOOTGEN_EXTRA_ARGS ?= "" 49BOOTGEN_EXTRA_ARGS ?= ""
47 50
51QEMU_FLASH_TYPE ?= "qspi"
52BOOTSCR_DEP = ''
53BOOTSCR_DEP:versal = 'u-boot-xlnx-scr:do_deploy'
54BOOTSCR_DEP:versal-net = 'u-boot-xlnx-scr:do_deploy'
55
56BIF_BITSTREAM_ATTR ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', '', 'bitstream', d)}"
57
48do_patch[noexec] = "1" 58do_patch[noexec] = "1"
49 59
60do_compile[depends] .= " ${BOOTSCR_DEP}"
61
50def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): 62def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d):
51 arch = d.getVar("SOC_FAMILY") 63 arch = d.getVar("SOC_FAMILY")
52 bb.error("create_bif function not defined for arch: %s" % (arch)) 64 bb.error("create_bif function not defined for arch: %s" % (arch))
@@ -177,6 +189,18 @@ do_compile() {
177 fi 189 fi
178} 190}
179 191
192do_compile:append:versal() {
193 dd if=/dev/zero bs=256M count=1 > ${B}/qemu-${QEMU_FLASH_TYPE}.bin
194 dd if=${B}/BOOT.bin of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=0 conv=notrunc
195 dd if=${DEPLOY_DIR_IMAGE}/boot.scr of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=66584576 conv=notrunc
196}
197
198do_compile:append:versal-net() {
199 dd if=/dev/zero bs=256M count=1 > ${B}/qemu-${QEMU_FLASH_TYPE}.bin
200 dd if=${B}/BOOT.bin of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=0 conv=notrunc
201 dd if=${DEPLOY_DIR_IMAGE}/boot.scr of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=66584576 conv=notrunc
202}
203
180do_install() { 204do_install() {
181 install -d ${D}/boot 205 install -d ${D}/boot
182 install -m 0644 ${B}/BOOT.bin ${D}/boot/BOOT.bin 206 install -m 0644 ${B}/BOOT.bin ${D}/boot/BOOT.bin
@@ -184,7 +208,7 @@ do_install() {
184 208
185inherit image-artifact-names 209inherit image-artifact-names
186 210
187QEMUQSPI_BASE_NAME ?= "QEMU_qspi-${MACHINE}${IMAGE_VERSION_SUFFIX}" 211QEMU_FLASH_IMAGE_NAME ?= "qemu-${QEMU_FLASH_TYPE}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
188 212
189BOOTBIN_BASE_NAME ?= "BOOT-${MACHINE}${IMAGE_VERSION_SUFFIX}" 213BOOTBIN_BASE_NAME ?= "BOOT-${MACHINE}${IMAGE_VERSION_SUFFIX}"
190 214
@@ -199,12 +223,18 @@ do_deploy:append:versal () {
199 223
200 install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin 224 install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin
201 ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin 225 ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin
226
227 install -m 0644 ${B}/qemu-${QEMU_FLASH_TYPE}.bin ${DEPLOYDIR}/${QEMU_FLASH_IMAGE_NAME}.bin
228 ln -sf ${QEMU_FLASH_IMAGE_NAME}.bin ${DEPLOYDIR}/qemu-${QEMU_FLASH_TYPE}-${MACHINE}.bin
202} 229}
203 230
204do_deploy:append:versal-net () { 231do_deploy:append:versal-net () {
205 232
206 install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin 233 install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin
207 ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin 234 ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin
235
236 install -m 0644 ${B}/qemu-${QEMU_FLASH_TYPE}.bin ${DEPLOYDIR}/${QEMU_FLASH_IMAGE_NAME}.bin
237 ln -sf ${QEMU_FLASH_IMAGE_NAME}.bin ${DEPLOYDIR}/qemu-${QEMU_FLASH_TYPE}-${MACHINE}.bin
208} 238}
209 239
210FILES:${PN} += "/boot/BOOT.bin" 240FILES:${PN} += "/boot/BOOT.bin"
diff --git a/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb b/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb
index b52c7853..17d8af8c 100644
--- a/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb
+++ b/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb
@@ -37,4 +37,4 @@ do_deploy() {
37 install -m 0644 ${B}/pmc_cdo.bin ${DEPLOYDIR}/pmc_cdo.bin 37 install -m 0644 ${B}/pmc_cdo.bin ${DEPLOYDIR}/pmc_cdo.bin
38} 38}
39 39
40addtask do_deploy after do_compile 40addtask deploy before do_build after do_install
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 4783a329..fbe85f96 100644
--- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
+++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
@@ -23,6 +23,9 @@ inherit devicetree image-artifact-names
23SYSTEM_DTFILE ??= "" 23SYSTEM_DTFILE ??= ""
24CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" 24CONFIG_DTFILE ??= "${SYSTEM_DTFILE}"
25 25
26SYSTEM_DTFILE_DEPENDS ??= ""
27DEPENDS += "${SYSTEM_DTFILE_DEPENDS}"
28
26BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" 29BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}"
27 30
28EXTRA_DT_FILES ?= "" 31EXTRA_DT_FILES ?= ""
@@ -31,12 +34,12 @@ EXTRA_DTFILES_BUNDLE ?= ""
31UBOOT_DT_FILES ?= "" 34UBOOT_DT_FILES ?= ""
32UBOOT_DTFILE_PREFIX ?= "system-top" 35UBOOT_DTFILE_PREFIX ?= "system-top"
33UBOOT_DTFILES_BUNDLE ?= "" 36UBOOT_DTFILES_BUNDLE ?= ""
34EXTRA_OVERLAYS ?= "" 37EXTRA_DT_INCLUDE_FILES ?= ""
35 38
36SYSTEM_DTFILE[doc] = "System Device Tree which accepts at 0...1 dts file" 39SYSTEM_DTFILE[doc] = "System Device Tree which accepts at 0...1 dts file"
37CONFIG_DTFILE[doc] = "Domain Specific Device Tree which accepts 0...1 dts file" 40CONFIG_DTFILE[doc] = "Domain Specific Device Tree which accepts 0...1 dts file"
38EXTRA_DT_FILES[doc] = "Add extra files to DT_FILES_PATH, it accepts 1...n dtsi files and adds to SRC_URI" 41EXTRA_DT_FILES[doc] = "Add extra files to DT_FILES_PATH, it accepts 1...n dtsi files and adds to SRC_URI"
39EXTRA_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" 42EXTRA_DT_INCLUDE_FILES[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 43
41# There should only be ONE CONFIG_DTFILE listed 44# There should only be ONE CONFIG_DTFILE listed
42# These need to be passed in from global, not from a bbappend 45# These need to be passed in from global, not from a bbappend
@@ -44,7 +47,7 @@ FILESEXTRAPATHS:prepend := "${@'%s:' % os.path.dirname(d.getVar('CONFIG_DTFILE')
44SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" 47SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}"
45 48
46SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_FILES') or "").split()])}" 49SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_FILES') or "").split()])}"
47SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_OVERLAYS') or "").split()])}" 50SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_INCLUDE_FILES') or "").split()])}"
48 51
49COMPATIBLE_MACHINE:zynq = ".*" 52COMPATIBLE_MACHINE:zynq = ".*"
50COMPATIBLE_MACHINE:zynqmp = ".*" 53COMPATIBLE_MACHINE:zynqmp = ".*"
@@ -62,7 +65,7 @@ DTB_FILE_NAME ?= "${BASE_DTS}.dtb"
62 65
63DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" 66DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}"
64 67
65# Copy the EXTRA_DT_FILES and EXTRA_OVERLAYS files in prepend operation so that 68# Copy the EXTRA_DT_FILES and EXTRA_DT_INCLUDE_FILES files in prepend operation so that
66# it can be preprocessed. 69# it can be preprocessed.
67do_configure:prepend () { 70do_configure:prepend () {
68 # Create DT_FILES_PATH directory if doesn't exist during prepend operation. 71 # Create DT_FILES_PATH directory if doesn't exist during prepend operation.
@@ -70,7 +73,7 @@ do_configure:prepend () {
70 mkdir -p ${DT_FILES_PATH} 73 mkdir -p ${DT_FILES_PATH}
71 fi 74 fi
72 75
73 for f in ${EXTRA_DT_FILES} ${EXTRA_OVERLAYS}; do 76 for f in ${EXTRA_DT_FILES} ${EXTRA_DT_INCLUDE_FILES}; do
74 if [ "$(realpath ${WORKDIR}/${f})" != "$(realpath ${DT_FILES_PATH}/`basename ${f}`)" ]; then 77 if [ "$(realpath ${WORKDIR}/${f})" != "$(realpath ${DT_FILES_PATH}/`basename ${f}`)" ]; then
75 cp ${WORKDIR}/${f} ${DT_FILES_PATH}/ 78 cp ${WORKDIR}/${f} ${DT_FILES_PATH}/
76 fi 79 fi
@@ -78,12 +81,12 @@ do_configure:prepend () {
78} 81}
79 82
80do_configure:append () { 83do_configure:append () {
81 for f in ${EXTRA_OVERLAYS}; do 84 for f in ${EXTRA_DT_INCLUDE_FILES}; do
82 if [ ! -e ${DT_FILES_PATH}/${BASE_DTS}.dts ]; then 85 if [ ! -e ${DT_FILES_PATH}/${BASE_DTS}.dts ]; then
83 if [ -e ${DT_FILES_PATH}/${BASE_DTS}.dtb ]; then 86 if [ -e ${DT_FILES_PATH}/${BASE_DTS}.dtb ]; then
84 bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must use a 'dts' and not 'dtb' in CONFIG_DTFILE" 87 bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_DT_INCLUDE_FILES you must use a 'dts' and not 'dtb' in CONFIG_DTFILE"
85 else 88 else
86 bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must set a valid CONFIG_DTFILE or use system-top.dts" 89 bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_DT_INCLUDE_FILES you must set a valid CONFIG_DTFILE or use system-top.dts"
87 fi 90 fi
88 exit 1 91 exit 1
89 fi 92 fi
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb
new file mode 100644
index 00000000..88dec7b8
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb
@@ -0,0 +1,74 @@
1SUMMARY = "Xilinx dfx-mgr libraries"
2DESCRIPTION = "Xilinx Runtime User Space Libraries and Binaries"
3
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=d67bcef754e935bf77b6d7051bd62b5e"
6
7REPO ?= "git://github.com/Xilinx/dfx-mgr.git;protocol=https"
8BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
9SRC_URI = "${REPO};${BRANCHARG}"
10
11BRANCH = "xlnx_rel_v2024.2"
12SRCREV = "839e8e646c54a63326e36c48a7bd879f5e8efa31"
13SOMAJOR = "2"
14SOMINOR = "0"
15SOVERSION = "${SOMAJOR}.${SOMINOR}"
16
17# Don't allow building for Zynq and Microblaze MACHINE unless it is supported.
18COMPATIBLE_MACHINE = "^$"
19COMPATIBLE_MACHINE:zynqmp = ".*"
20COMPATIBLE_MACHINE:versal = ".*"
21COMPATIBLE_MACHINE:versal-net = ".*"
22
23S = "${WORKDIR}/git"
24
25inherit cmake update-rc.d systemd
26
27DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm systemd"
28RDEPENDS:${PN} += " freeipmi"
29EXTRA_OECMAKE += " \
30 -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \
31 "
32
33INITSCRIPT_NAME = "dfx-mgr.sh"
34INITSCRIPT_PARAMS = "start 99 S ."
35
36SYSTEMD_PACKAGES="${PN}"
37SYSTEMD_SERVICE:${PN}="dfx-mgr.service"
38SYSTEMD_AUTO_ENABLE:${PN}="enable"
39
40
41do_install(){
42 install -d ${D}${bindir}
43 install -d ${D}${libdir}
44 install -d ${D}${includedir}
45 install -d ${D}${base_libdir}/firmware/xilinx
46 install -d ${D}${sysconfdir}/dfx-mgrd
47
48 cp ${B}/example/sys/linux/dfx-mgrd-static ${D}${bindir}/dfx-mgrd
49 cp ${B}/example/sys/linux/dfx-mgr-client-static ${D}${bindir}/dfx-mgr-client
50 chrpath -d ${D}${bindir}/dfx-mgrd
51 chrpath -d ${D}${bindir}/dfx-mgr-client
52 install -m 0644 ${S}/src/dfxmgr_client.h ${D}${includedir}
53
54 oe_soinstall ${B}/src/libdfx-mgr.so.${SOVERSION} ${D}${libdir}
55
56 install -m 0755 ${S}/src/daemon.conf ${D}${sysconfdir}/dfx-mgrd/
57
58 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
59 install -d ${D}${sysconfdir}/init.d/
60 install -m 0755 ${S}/src/dfx-mgr.sh ${D}${sysconfdir}/init.d/
61 fi
62
63 install -m 0755 ${S}/src/dfx-mgr.sh ${D}${bindir}
64 install -m 0755 ${S}/src/scripts/xlnx-firmware-detect ${D}${bindir}
65
66 install -d ${D}${systemd_system_unitdir}
67 install -m 0644 ${S}/src/dfx-mgr.service ${D}${systemd_system_unitdir}
68}
69
70PACKAGES =+ "libdfx-mgr"
71
72FILES:${PN} += "${base_libdir}/firmware/xilinx"
73FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}"
74FILES:libdfx-mgr = "${libdir}/libdfx-mgr.so.${SOVERSION} ${libdir}/libdfx-mgr.so.${SOMAJOR}"
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb
new file mode 100644
index 00000000..e87e8793
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb
@@ -0,0 +1,69 @@
1DESCRIPTION = "Image Recovery"
2
3LICENSE = "CLOSED"
4
5PROVIDES = "virtual/imgrcry"
6
7INHIBIT_DEFAULT_DEPS = "1"
8
9COMPATIBLE_MACHINE = "^$"
10COMPATIBLE_MACHINE:zynqmp = "zynqmp"
11
12# Since we're just copying, we can run any config
13COMPATIBLE_HOST = ".*"
14
15# Default expects the user to provide the imagerecovery in the deploy
16# directory, named "image-recovery-${MACHINE}.bin" and "image-recovery-${MACHINE}.bin"
17# A machine, multiconfig, or local.conf should override this
18IMGRCRY_DEPENDS ??= ""
19IMGRCRY_MCDEPENDS ??= ""
20IMGRCRY_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
21IMGRCRY_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
22IMGRCRY_IMAGE_NAME ??= "image-recovery-${MACHINE}"
23
24# Default is for the multilib case (without the extension .bin)
25IMGRCRY_FILE ??= "${IMGRCRY_DEPLOY_DIR}/${IMGRCRY_IMAGE_NAME}"
26IMGRCRY_FILE[vardepsexclude] = "IMGRCRY_DEPLOY_DIR"
27
28do_fetch[depends] += "${IMGRCRY_DEPENDS}"
29do_fetch[mcdepends] += "${IMGRCRY_MCDEPENDS}"
30
31inherit deploy
32
33# If the item is already in OUR deploy_image_dir, nothing to deploy!
34SHOULD_DEPLOY = "${@'false' if (d.getVar('IMGRCRY_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}"
35do_deploy() {
36 # If the item is already in OUR deploy_image_dir, nothing to deploy!
37 if ${SHOULD_DEPLOY}; then
38 install -Dm 0644 ${IMGRCRY_FILE}.bin ${DEPLOYDIR}/${IMGRCRY_IMAGE_NAME}.bin
39 install -Dm 0644 ${IMGRCRY_FILE}.elf ${DEPLOYDIR}/${IMGRCRY_IMAGE_NAME}.elf
40 fi
41}
42
43addtask deploy before do_build after do_install
44
45INSANE_SKIP:${PN} = "arch"
46INSANE_SKIP:${PN}-dbg = "arch"
47
48# Disable buildpaths QA check warnings.
49INSANE_SKIP:${PN} += "buildpaths"
50
51def check_imgrcry_variables(d):
52 # If both are blank, the user MUST pass in the path to the firmware!
53 if not d.getVar('IMGRCRY_DEPENDS') and not d.getVar('IMGRCRY_MCDEPENDS'):
54 # Don't cache this, as the items on disk can change!
55 d.setVar('BB_DONT_CACHE', '1')
56
57 if not os.path.exists(d.getVar('IMGRCRY_FILE') + ".bin"):
58 if not d.getVar('WITHIN_EXT_SDK'):
59 raise bb.parse.SkipRecipe("The expected file %s.bin is not available.\nSet IMGRCRY_FILE to the path with a precompiled IMGRCRY binary." % d.getVar('IMGRCRY_FILE'))
60 else:
61 # We found the file, so be sure to track it
62 d.setVar('SRC_URI', 'file://${IMGRCRY_FILE}.bin')
63 d.setVarFlag('do_install', 'file-checksums', '${IMGRCRY_FILE}.bin:True')
64 d.setVarFlag('do_deploy', 'file-checksums', '${IMGRCRY_FILE}.bin:True')
65
66python() {
67 # Need to allow bbappends to change the check
68 check_imgrcry_variables(d)
69}
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb
new file mode 100644
index 00000000..0c0f1549
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb
@@ -0,0 +1,72 @@
1DESCRIPTION = "Image Selector"
2
3LICENSE = "CLOSED"
4
5PROVIDES = "virtual/imgsel"
6
7INHIBIT_DEFAULT_DEPS = "1"
8
9COMPATIBLE_MACHINE = "^$"
10COMPATIBLE_MACHINE:zynqmp = "zynqmp"
11
12# Since we're just copying, we can run any config
13COMPATIBLE_HOST = ".*"
14
15# Default expects the user to provide the imageselector in the deploy
16# directory, named "image-selector-${MACHINE}.bin" and "image-selector-${MACHINE}.bin"
17# A machine, multiconfig, or local.conf should override this
18IMGSEL_DEPENDS ??= ""
19IMGSEL_MCDEPENDS ??= ""
20IMGSEL_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
21IMGSEL_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
22IMGSEL_IMAGE_NAME ??= "image-selector-${MACHINE}"
23
24# Default is for the multilib case (without the extension .bin)
25IMGSEL_FILE ??= "${IMGSEL_DEPLOY_DIR}/${IMGSEL_IMAGE_NAME}"
26IMGSEL_FILE[vardepsexclude] = "IMGSEL_DEPLOY_DIR"
27
28do_fetch[depends] += "${IMGSEL_DEPENDS}"
29do_fetch[mcdepends] += "${IMGSEL_MCDEPENDS}"
30
31inherit deploy
32
33# If the item is already in OUR deploy_image_dir, nothing to deploy!
34SHOULD_DEPLOY = "${@'false' if (d.getVar('IMGSEL_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}"
35do_deploy() {
36 # If the item is already in OUR deploy_image_dir, nothing to deploy!
37 if ${SHOULD_DEPLOY}; then
38 install -Dm 0644 ${IMGSEL_FILE}.bin ${DEPLOYDIR}/${IMGSEL_IMAGE_NAME}.bin
39 install -Dm 0644 ${IMGSEL_FILE}.elf ${DEPLOYDIR}/${IMGSEL_IMAGE_NAME}.elf
40 fi
41}
42
43addtask deploy before do_build after do_install
44
45INSANE_SKIP:${PN} = "arch"
46INSANE_SKIP:${PN}-dbg = "arch"
47
48# Disable buildpaths QA check warnings.
49INSANE_SKIP:${PN} += "buildpaths"
50
51#SYSROOT_DIRS += "/boot"
52#FILES:${PN} = "/boot/${PN}.bin"
53
54def check_imgsel_variables(d):
55 # If both are blank, the user MUST pass in the path to the firmware!
56 if not d.getVar('IMGSEL_DEPENDS') and not d.getVar('IMGSEL_MCDEPENDS'):
57 # Don't cache this, as the items on disk can change!
58 d.setVar('BB_DONT_CACHE', '1')
59
60 if not os.path.exists(d.getVar('IMGSEL_FILE') + ".bin"):
61 if not d.getVar('WITHIN_EXT_SDK'):
62 raise bb.parse.SkipRecipe("The expected file %s.bin is not available.\nSet IMGSEL_FILE to the path with a precompiled IMGSEL binary." % d.getVar('IMGSEL_FILE'))
63 else:
64 # We found the file, so be sure to track it
65 d.setVar('SRC_URI', 'file://${IMGSEL_FILE}.bin')
66 d.setVarFlag('do_install', 'file-checksums', '${IMGSEL_FILE}.bin:True')
67 d.setVarFlag('do_deploy', 'file-checksums', '${IMGSEL_FILE}.bin:True')
68
69python() {
70 # Need to allow bbappends to change the check
71 check_imgsel_variables(d)
72}
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb
new file mode 100644
index 00000000..3a097b24
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb
@@ -0,0 +1,25 @@
1SUMMARY = "Xilinx libdfx library"
2DESCRIPTION = "Xilinx libdfx Library and headers"
3
4LICENSE = "MIT & GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=94aba86aec117f003b958a52f019f1a7"
6
7BRANCH ?= "xlnx_rel_v2024.2"
8REPO ?= "git://github.com/Xilinx/libdfx.git;protocol=https"
9BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
10SRC_URI = "${REPO};${BRANCHARG}"
11SRCREV = "af8d735fae286e7bc94c830a86c960598a4ac014"
12
13# Don't allow building for Zynq and Microblaze MACHINE unless it is supported.
14COMPATIBLE_MACHINE = "^$"
15COMPATIBLE_MACHINE:zynqmp = ".*"
16COMPATIBLE_MACHINE:versal = ".*"
17COMPATIBLE_MACHINE:versal-net = ".*"
18
19S = "${WORKDIR}/git"
20
21inherit cmake
22
23# Due to an update where the soname/version was defined, we need to use an RREPLACES
24# so updates will work properly.
25RREPLACES:${PN} = "libdfx"
diff --git a/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb b/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb
new file mode 100644
index 00000000..e6ba4938
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb
@@ -0,0 +1,154 @@
1require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
2
3DEPENDS:remove:zynqmp:qemuall = " optee-os"
4DEPENDS:remove:versal:qemuall = " optee-os"
5DEPENDS:remove:versal-net:qemuall = " optee-os"
6
7# Xilinx TF-A v2.10
8SRC_URI_TRUSTED_FIRMWARE_A = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https"
9SRCREV_tfa = "14cea4616b6edaceabb607c7c92332436a1699e5"
10SRCBRANCH = "xlnx_rebase_v2.10"
11
12LIC_FILES_CHKSUM = "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde"
13
14# mbedtls-3.4.1 is not enabled in this configuration
15
16# The following are Xilinx specific settings
17PROVIDES = "virtual/arm-trusted-firmware"
18
19COMPATIBLE_MACHINE ?= "^$"
20COMPATIBLE_MACHINE:zynqmp = ".*"
21COMPATIBLE_MACHINE:versal = ".*"
22COMPATIBLE_MACHINE:versal-net = ".*"
23
24### Platform Settings
25TFA_PLATFORM:zynqmp = "zynqmp"
26TFA_PLATFORM:versal = "versal"
27TFA_PLATFORM:versal-net = "versal_net"
28
29
30### Console settings
31TFA_CONSOLE_DEFAULT = ""
32TFA_CONSOLE_DEFAULT:zynqmp = "cadence"
33TFA_CONSOLE_DEFAULT:versal = "pl011"
34TFA_CONSOLE_DEFAULT:versal-net = "pl011"
35
36# Use old name for compatibility
37ATF_CONSOLE ?= "${TFA_CONSOLE_DEFAULT}"
38
39# Old name to new name
40TFA_CONSOLE ?= "${ATF_CONSOLE}"
41
42TFA_CONSOLE_OEMAKE = ""
43TFA_CONSOLE_OEMAKE:append:zynqmp = "${@' ZYNQMP_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}"
44TFA_CONSOLE_OEMAKE:append:versal = "${@' VERSAL_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}"
45TFA_CONSOLE_OEMAKE:append:versal-net = "${@' VERSAL_NET_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}"
46
47EXTRA_OEMAKE += "${TFA_CONSOLE_OEMAKE}"
48
49
50### Debug settings
51DEBUG_ATF_DEFAULT = ""
52DEBUG_ATF_DEFAULT:versal = "1"
53DEBUG_ATF_DEFAULT:versal-net = "1"
54DEBUG_ATF ?= "${DEBUG_ATF_DEFAULT}"
55
56# Translate old to new name
57TFA_DEBUG = "${DEBUG_ATF}"
58
59
60### Mem Settings
61ATF_MEM_BASE ?= ""
62ATF_MEM_SIZE ?= ""
63
64TFA_MEM_BASE ?= "${ATF_MEM_BASE}"
65TFA_MEM_SIZE ?= "${ATF_MEM_SIZE}"
66
67TFA_MEM_OEMAKE = ""
68TFA_MEM_OEMAKE:append:zynqmp = "${@' ZYNQMP_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}"
69TFA_MEM_OEMAKE:append:zynqmp = "${@' ZYNQMP_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}"
70TFA_MEM_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}"
71TFA_MEM_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}"
72TFA_MEM_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}"
73TFA_MEM_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}"
74
75EXTRA_OEMAKE += "${TFA_MEM_OEMAKE}"
76
77
78### Preloaded Base
79TFA_BL33_LOAD ?= ""
80EXTRA_OEMAKE += "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}"
81
82
83# Workaround for bl31.elf has a LOAD segment with RWX permissions
84EXTRA_OEMAKE += ' TF_LDFLAGS="--no-warn-rwx-segments --fatal-warnings -O1 --gc-sections"'
85
86# We use bl31
87TFA_BUILD_TARGET = "bl31"
88TFA_INSTALL_TARGET = "bl31"
89
90inherit image-artifact-names
91
92# arm-trusted-firmware instead of ${PN} for compatibility
93ATF_BASE_NAME ?= "arm-trusted-firmware-${PKGE}-${PKGV}-${PKGR}${IMAGE_VERSION_SUFFIX}"
94
95do_install:append() {
96 # The first TFA_INSTALL_TARGET found will be copied as the standard boot firmware
97 for atfbin in ${TFA_INSTALL_TARGET} ; do
98 install -d ${D}/boot
99 if [ -e ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf ]; then
100 ln ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf ${D}/boot/${ATF_BASE_NAME}.elf
101 ln -sf ${ATF_BASE_NAME}.elf ${D}/boot/arm-trusted-firmware.elf
102 ln ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin ${D}/boot/${ATF_BASE_NAME}.bin
103 ln -sf ${ATF_BASE_NAME}.bin ${D}/boot/arm-trusted-firmware.bin
104
105 # Get the entry point address from the elf.
106 BL31_BASE_ADDR=$(${READELF} -h ${D}/boot/${ATF_BASE_NAME}.elf | egrep -m 1 -i "entry point.*?0x" | sed -r 's/.*?(0x.*?)/\1/g')
107 mkimage -A arm64 -O arm-trusted-firmware -T kernel -C none \
108 -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \
109 -d ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin ${D}/boot/${ATF_BASE_NAME}.ub
110 ln -sf ${ATF_BASE_NAME}.ub ${D}/boot/arm-trusted-firmware.ub
111 ln -sf ${ATF_BASE_NAME}.ub ${D}/boot/atf-uboot.ub
112 break
113 fi
114 done
115}
116
117inherit deploy
118
119DEPENDS += "u-boot-mkimage-native"
120
121do_deploy() {
122 # Copy the /boot items to deploy
123 install -d ${DEPLOYDIR}
124 install -m 0644 ${D}/boot/${ATF_BASE_NAME}.elf ${DEPLOYDIR}/${ATF_BASE_NAME}.elf
125 ln -sf ${ATF_BASE_NAME}.elf ${DEPLOYDIR}/arm-trusted-firmware.elf
126 install -m 0644 ${D}/boot/${ATF_BASE_NAME}.bin ${DEPLOYDIR}/${ATF_BASE_NAME}.bin
127 ln -sf ${ATF_BASE_NAME}.bin ${DEPLOYDIR}/arm-trusted-firmware.bin
128
129 install -m 0644 ${D}/boot/${ATF_BASE_NAME}.ub ${DEPLOYDIR}/${ATF_BASE_NAME}.ub
130 ln -sf ${ATF_BASE_NAME}.ub ${DEPLOYDIR}/arm-trusted-firmware.ub
131 ln -sf ${ATF_BASE_NAME}.ub ${DEPLOYDIR}/atf-uboot.ub
132}
133
134addtask deploy before do_build after do_compile
135
136SYSROOT_DIRS += "/boot"
137FILES:${PN} += "/boot/*.elf /boot/*.bin /boot/*.ub"
138RPROVIDES:${PN} += "arm-trusted-firmware"
139
140python() {
141 soc_family = d.getVar('SOC_FAMILY')
142 tfa_console = d.getVar('TFA_CONSOLE')
143
144 # See plat/xilinx/<soc_family>/platform.mk
145 if soc_family and soc_family == "zynqmp":
146 if not tfa_console in [ 'cadence', 'cadence0', 'cadence1', 'dcc' ]:
147 raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for ZynqMP, only cadence, cadence0, cadence1, and dcc are valid options.' % (tfa_console))
148 elif soc_family and soc_family == "versal":
149 if not tfa_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]:
150 raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for Versal, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (tfa_console))
151 elif soc_family and soc_family == "versal-net":
152 if not tfa_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]:
153 raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for Versal-Net, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (tfa_console))
154}
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb
new file mode 100644
index 00000000..4214fdd9
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb
@@ -0,0 +1,21 @@
1require u-boot-tools-xlnx.inc
2require u-boot-xlnx-2024.2.inc
3
4# MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct
5# bmp_logo.h
6SED_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.
11do_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-2024.2.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.2.inc
new file mode 100644
index 00000000..feb9bbcd
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.2.inc
@@ -0,0 +1,17 @@
1UBRANCH = "xlnx_rebase_v2024.01"
2
3SRCREV = "7f6ec94aac7eacfec07bd45c83a6d17df4b7d383"
4
5LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897"
7
8# u-boot-xlnx has support for these
9HAS_PLATFORM_INIT ?= " \
10 xilinx_zynqmp_virt_config \
11 xilinx_zynq_virt_defconfig \
12 xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \
13 "
14
15DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native"
16
17FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-v2024.01:"
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 bbf4125f..7eac6bfd 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
@@ -9,7 +9,6 @@ IMPORT_CC_DTBS ?= ""
9CC_DTBS_DUP ?= "" 9CC_DTBS_DUP ?= ""
10IMPORT_CC_UBOOT_DTBS ?= "" 10IMPORT_CC_UBOOT_DTBS ?= ""
11 11
12DEPENDS:append:eval-brd-sc-zynqmp = " uboot-device-tree"
13MKIMAGE_DTBLOB_OPTS ?= "-E -B 0x8" 12MKIMAGE_DTBLOB_OPTS ?= "-E -B 0x8"
14 13
15# Everything is swtiched on with UBOOT_IMAGE_BLOB = '1' 14# Everything is swtiched on with UBOOT_IMAGE_BLOB = '1'
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 678ae236..e13413a1 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
@@ -39,6 +39,9 @@ DDR_BASEADDR ?= "0x0"
39DDR_BASEADDR:microblaze ?= "0x80000000" 39DDR_BASEADDR:microblaze ?= "0x80000000"
40PRE_BOOTENV ?= "" 40PRE_BOOTENV ?= ""
41 41
42# Set debfault SD boot device to mmc 0 interface
43SDBOOTDEV ?= "0"
44
42SRC_URI = " \ 45SRC_URI = " \
43 file://boot.cmd.sd.zynq \ 46 file://boot.cmd.sd.zynq \
44 file://boot.cmd.sd.zynqmp \ 47 file://boot.cmd.sd.zynqmp \
@@ -81,7 +84,7 @@ DEVICETREE_OVERLAY_OFFSET:zynqmp ??= "0x100000"
81DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000" 84DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000"
82DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000" 85DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000"
83DEVICETREE_OVERLAY_OFFSET:versal-net ??= "0x1000" 86DEVICETREE_OVERLAY_OFFSET:versal-net ??= "0x1000"
84DEVICETREE_OVERLAY_PADSIZE ??= "0xf00000" 87DEVICETREE_OVERLAY_PADSIZE ??= "0x1f00000"
85 88
86DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(append_baseaddr(d,d.getVar('DEVICETREE_OVERLAY_OFFSET')),16) \ 89DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(append_baseaddr(d,d.getVar('DEVICETREE_OVERLAY_OFFSET')),16) \
87 + int(d.getVar('DEVICETREE_OVERLAY_PADSIZE'),16))}" 90 + int(d.getVar('DEVICETREE_OVERLAY_PADSIZE'),16))}"
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 e09bdfa9..f60a1ea9 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
@@ -13,7 +13,6 @@ rootfs_name=@@RAMDISK_IMAGE@@
13setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;' 13setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;'
14setenv 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' 14setenv 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 15
16
17for boot_target in ${boot_targets}; 16for boot_target in ${boot_targets};
18do 17do
19 echo "Trying to load boot images from ${boot_target}" 18 echo "Trying to load boot images from ${boot_target}"
@@ -83,4 +82,15 @@ do
83 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; 82 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@;
84 echo "Booting using Separate images failed" 83 echo "Booting using Separate images failed"
85 fi 84 fi
85 if test "${boot_target}" = "nor" || test "${boot_target}" = "nor0"; then
86 cp.b @@QSPI_FIT_IMAGE_OFFSET@@ @@FIT_IMAGE_LOAD_ADDRESS@@ @@QSPI_FIT_IMAGE_SIZE@@
87 bootm @@FIT_IMAGE_LOAD_ADDRESS@@;
88 echo "Booting using Fit image failed"
89
90 cp.b @@QSPI_KERNEL_OFFSET@@ @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_SIZE@@
91 cp.b @@QSPI_RAMDISK_OFFSET@@ @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_SIZE@@
92 run update_bootargs
93 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@;
94 echo "Booting using Separate images failed"
95fi
86done 96done
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 ed12f941..a3ec1286 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
@@ -9,6 +9,7 @@ ramdisk_name=@@RAMDISK_IMAGE1@@
9rootfs_name=@@RAMDISK_IMAGE@@ 9rootfs_name=@@RAMDISK_IMAGE@@
10@@PRE_BOOTENV@@ 10@@PRE_BOOTENV@@
11 11
12
12for boot_target in ${boot_targets}; 13for boot_target in ${boot_targets};
13do 14do
14 echo "Trying to load boot images from ${boot_target}" 15 echo "Trying to load boot images from ${boot_target}"
@@ -43,17 +44,17 @@ do
43 fi 44 fi
44 echo "Checking for /${kernel_name}" 45 echo "Checking for /${kernel_name}"
45 if test -e ${devtype} ${devnum}:${distro_bootpart} /${kernel_name}; then 46 if test -e ${devtype} ${devnum}:${distro_bootpart} /${kernel_name}; then
46 echo "Loading ${kernel_name}"; 47 echo "Loading ${kernel_name} at @@KERNEL_LOAD_ADDRESS@@";
47 fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; 48 fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name};
48 fi 49 fi
49 echo "Checking for /system.dtb" 50 echo "Checking for /system.dtb"
50 if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then 51 if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then
51 echo "Loading system.dtb"; 52 echo "Loading system.dtb at @@DEVICETREE_ADDRESS@@";
52 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; 53 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb;
53 fi 54 fi
54 echo "Checking for /devicetree/openamp.dtbo" 55 echo "Checking for /devicetree/openamp.dtbo"
55 if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then 56 if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then
56 echo "Loading and merging openamp.dtbo into device tree"; 57 echo "Loading and merging openamp.dtbo into device tree at @@DEVICETREE_OVERLAY_ADDRESS@@";
57 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; 58 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo;
58 fdt addr @@DEVICETREE_ADDRESS@@ 59 fdt addr @@DEVICETREE_ADDRESS@@
59 fdt resize 8192 60 fdt resize 8192
@@ -61,7 +62,7 @@ do
61 fi 62 fi
62 echo "Checking for /${ramdisk_name}" 63 echo "Checking for /${ramdisk_name}"
63 if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then 64 if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then
64 echo "Loading ${ramdisk_name}"; 65 echo "Loading ${ramdisk_name} at @@RAMDISK_IMAGE_ADDRESS@@";
65 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; 66 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name};
66 fdt addr @@DEVICETREE_ADDRESS@@ 67 fdt addr @@DEVICETREE_ADDRESS@@
67 fdt get value bootargs /chosen bootargs 68 fdt get value bootargs /chosen bootargs
@@ -70,7 +71,7 @@ do
70 fi 71 fi
71 echo "Checking for /${rootfs_name}" 72 echo "Checking for /${rootfs_name}"
72 if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then 73 if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then
73 echo "Loading ${rootfs_name}"; 74 echo "Loading ${rootfs_name} at @@RAMDISK_IMAGE_ADDRESS@@";
74 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; 75 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name};
75 fdt addr @@DEVICETREE_ADDRESS@@ 76 fdt addr @@DEVICETREE_ADDRESS@@
76 fdt get value bootargs /chosen bootargs 77 fdt get value bootargs /chosen bootargs
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb
index 1efc5392..dafaab25 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb
@@ -16,7 +16,7 @@ def remove_task_from_depends(d):
16 extra_imagedepends = d.getVar('EXTRA_IMAGEDEPENDS') or '' 16 extra_imagedepends = d.getVar('EXTRA_IMAGEDEPENDS') or ''
17 uenv_depends = '' 17 uenv_depends = ''
18 for imagedepend in extra_imagedepends.split(): 18 for imagedepend in extra_imagedepends.split():
19 if imagedepend == d.getVar("BPN"): 19 if imagedepend == d.getVar("BPN") or '':
20 continue 20 continue
21 elif ':' in imagedepend: 21 elif ':' in imagedepend:
22 uenv_depends += ' %s' % imagedepend.split(':')[0] 22 uenv_depends += ' %s' % imagedepend.split(':')[0]
@@ -25,16 +25,16 @@ def remove_task_from_depends(d):
25 return uenv_depends 25 return uenv_depends
26 26
27def uboot_boot_cmd(d): 27def uboot_boot_cmd(d):
28 if d.getVar("KERNEL_IMAGETYPE") in ["uImage", "fitImage"]: 28 if (d.getVar("KERNEL_IMAGETYPE") or '') in ["uImage", "fitImage"]:
29 return "bootm" 29 return "bootm"
30 if d.getVar("KERNEL_IMAGETYPE") in ["zImage"]: 30 if (d.getVar("KERNEL_IMAGETYPE") or '') in ["zImage"]:
31 return "bootz" 31 return "bootz"
32 if d.getVar("KERNEL_IMAGETYPE") in ["Image"]: 32 if (d.getVar("KERNEL_IMAGETYPE") or '') in ["Image"]:
33 return "booti" 33 return "booti"
34 raise bb.parse.SkipRecipe("Unsupport kernel image type") 34 raise bb.parse.SkipRecipe("Unsupport kernel image type")
35 35
36def get_sdbootdev(d): 36def get_sdbootdev(d):
37 if d.getVar("SOC_FAMILY") in ["zynqmp"]: 37 if (d.getVar("SOC_FAMILY") or '') in ["zynqmp"]:
38 return "${devnum}" 38 return "${devnum}"
39 else: 39 else:
40 return "0" 40 return "0"
@@ -43,24 +43,24 @@ def uenv_populate(d):
43 # populate the environment values 43 # populate the environment values
44 env = {} 44 env = {}
45 45
46 env["machine_name"] = d.getVar("MACHINE") 46 env["machine_name"] = d.getVar("MACHINE") or ''
47 47
48 env["kernel_image"] = d.getVar("KERNEL_IMAGETYPE") 48 env["kernel_image"] = d.getVar("KERNEL_IMAGETYPE") or ''
49 env["kernel_load_address"] = d.getVar("KERNEL_LOAD_ADDRESS") 49 env["kernel_load_address"] = d.getVar("KERNEL_LOAD_ADDRESS") or ''
50 50
51 env["devicetree_image"] = boot_files_dtb_filepath(d) 51 env["devicetree_image"] = boot_files_dtb_filepath(d)
52 env["devicetree_load_address"] = d.getVar("DEVICETREE_LOAD_ADDRESS") 52 env["devicetree_load_address"] = d.getVar("DEVICETREE_LOAD_ADDRESS") or ''
53 env["devicetree_overlay_load_address" ] = d.getVar("DEVICETREE_OVERLAY_LOAD_ADDRESS") 53 env["devicetree_overlay_load_address" ] = d.getVar("DEVICETREE_OVERLAY_LOAD_ADDRESS") or ''
54 54
55 env["bootargs"] = d.getVar("KERNEL_BOOTARGS") 55 env["bootargs"] = d.getVar("KERNEL_BOOTARGS") or ''
56 56
57 env["loadkernel"] = "fatload mmc " + get_sdbootdev(d) + " ${kernel_load_address} ${kernel_image}" 57 env["loadkernel"] = "fatload mmc " + get_sdbootdev(d) + " ${kernel_load_address} ${kernel_image}"
58 env["loaddtb"] = "fatload mmc " + get_sdbootdev(d) + " ${devicetree_load_address} ${devicetree_image}" 58 env["loaddtb"] = "fatload mmc " + get_sdbootdev(d) + " ${devicetree_load_address} ${devicetree_image}"
59 env["loaddtbo"] = "if test -e mmc " + get_sdbootdev(d) + " /devicetree/openamp.dtbo; then fatload mmc " + get_sdbootdev(d) + " ${devicetree_overlay_load_address} /devicetree/openamp.dtbo ; fdt addr ${devicetree_load_address} ; fdt resize 8192 ; fdt apply ${devicetree_overlay_load_address} ; fi" 59 env["loaddtbo"] = "if test -e mmc " + get_sdbootdev(d) + " /devicetree/openamp.dtbo; then fatload mmc " + get_sdbootdev(d) + " ${devicetree_overlay_load_address} /devicetree/openamp.dtbo ; fdt addr ${devicetree_load_address} ; fdt resize 8192 ; fdt apply ${devicetree_overlay_load_address} ; fi"
60 env["bootkernel"] = "run loadkernel && run loaddtb && run loaddtbo && " + uboot_boot_cmd(d) + " ${kernel_load_address} - ${devicetree_load_address}" 60 env["bootkernel"] = "run loadkernel && run loaddtb && run loaddtbo && " + uboot_boot_cmd(d) + " ${kernel_load_address} - ${devicetree_load_address}"
61 61
62 if d.getVar("SOC_FAMILY") in ["zynqmp"]: 62 if (d.getVar("SOC_FAMILY") or '') in ["zynqmp"]:
63 env["bootkernel"] = "setenv bootargs " + d.getVar("KERNEL_BOOTARGS") + " ; " + env["bootkernel"] 63 env["bootkernel"] = "setenv bootargs " + (d.getVar("KERNEL_BOOTARGS") or '') + " ; " + env["bootkernel"]
64 64
65 # default uenvcmd does not load bitstream 65 # default uenvcmd does not load bitstream
66 env["uenvcmd"] = "run bootkernel" 66 env["uenvcmd"] = "run bootkernel"
@@ -89,7 +89,8 @@ KERNEL_LOAD_ADDRESS:zynq = "0x2080000"
89KERNEL_LOAD_ADDRESS:zynqmp = "0x200000" 89KERNEL_LOAD_ADDRESS:zynqmp = "0x200000"
90DEVICETREE_LOAD_ADDRESS:zynq = "0x2000000" 90DEVICETREE_LOAD_ADDRESS:zynq = "0x2000000"
91DEVICETREE_LOAD_ADDRESS:zynqmp = "0x4000000" 91DEVICETREE_LOAD_ADDRESS:zynqmp = "0x4000000"
92DEVICETREE_OVERLAY_LOAD_ADDRESS = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" 92DEVICETREE_OVERLAY_LOAD_ADDRESS:zynq = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}"
93DEVICETREE_OVERLAY_LOAD_ADDRESS:zynqmp = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}"
93 94
94python do_compile() { 95python do_compile() {
95 env = uenv_populate(d) 96 env = uenv_populate(d)
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.bb
new file mode 100644
index 00000000..bcadf1e4
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.bb
@@ -0,0 +1,4 @@
1
2require u-boot-xlnx.inc
3require u-boot-spl-zynq-init.inc
4require u-boot-xlnx-2024.2.inc