diff options
Diffstat (limited to 'meta-xilinx-core/recipes-bsp')
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 @@ | |||
| 1 | SUMMARY = "Xilinx AI Engine runtime" | ||
| 2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" | ||
| 3 | |||
| 4 | require aie-rt-2024.2.inc | ||
| 5 | |||
| 6 | SECTION = "libs" | ||
| 7 | |||
| 8 | AIEDIR ?= "${S}/driver" | ||
| 9 | S = "${WORKDIR}/git" | ||
| 10 | I = "${AIEDIR}/include" | ||
| 11 | |||
| 12 | IOBACKENDS ?= "Linux" | ||
| 13 | |||
| 14 | DEPENDS = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
| 15 | RDEPENDS:${PN} = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
| 16 | |||
| 17 | PROVIDES = "libxaiengine" | ||
| 18 | RPROVIDES:${PN} = "libxaiengine" | ||
| 19 | |||
| 20 | # The makefile isn't ready for parallel execution at the moment | ||
| 21 | PARALLEL_MAKE = "-j 1" | ||
| 22 | |||
| 23 | CFLAGS += "-Wall -Wextra" | ||
| 24 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" | ||
| 25 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" | ||
| 26 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" | ||
| 27 | |||
| 28 | |||
| 29 | do_compile(){ | ||
| 30 | oe_runmake | ||
| 31 | } | ||
| 32 | |||
| 33 | do_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 @@ | |||
| 1 | SECTION = "libs" | ||
| 2 | |||
| 3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | ||
| 4 | |||
| 5 | BRANCH ?= "xlnx_rel_v2024.2" | ||
| 6 | SRCREV ?= "8845d962e5b30b576c87dcf6635fb84a90ef1e36" | ||
| 7 | |||
| 8 | LICENSE = "BSD-3-Clause" | ||
| 9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" | ||
| 10 | |||
| 11 | SRC_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 @@ | |||
| 1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" | ||
| 2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" | ||
| 3 | |||
| 4 | require aie-rt-2024.2.inc | ||
| 5 | |||
| 6 | SECTION = "devel" | ||
| 7 | |||
| 8 | XAIEFAL_DIR ?= "fal" | ||
| 9 | S = "${WORKDIR}/git" | ||
| 10 | |||
| 11 | IOBACKENDS ?= "Linux" | ||
| 12 | |||
| 13 | PROVIDES = "aiefal" | ||
| 14 | ALLOW_EMPTY:${PN} = "1" | ||
| 15 | |||
| 16 | inherit pkgconfig cmake | ||
| 17 | |||
| 18 | DEPENDS = "libxaiengine" | ||
| 19 | |||
| 20 | OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}" | ||
| 21 | |||
| 22 | EXTRA_OECMAKE = "-DWITH_TESTS=OFF -DFAL_LINUX=ON " | ||
| 23 | EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}" | ||
| 24 | |||
| 25 | FILES:${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 | |||
| 75 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | 75 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" |
| 76 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | 76 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" |
| 77 | 77 | ||
| 78 | ATF_PROVENCORE = "SPD=pncd SPD_PNCD_NS_IRQ=51 ZYNQMP_BL32_MEM_BASE=0x70000000 ZYNQMP_BL32_MEM_SIZE=0x0FF00000" | ||
| 79 | EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'provencore', ' ${ATF_PROVENCORE}', '', d)}" | ||
| 80 | |||
| 81 | TFA_BL33_LOAD ?= "" | 78 | TFA_BL33_LOAD ?= "" |
| 82 | EXTRA_OEMAKE:append = "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}" | 79 | EXTRA_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. |
| 130 | INSANE_SKIP:${PN}:append:versal = " buildpaths" | 127 | INSANE_SKIP:${PN}:append:versal = " buildpaths" |
| 131 | INSANE_SKIP:${PN}:append:versal-net = " buildpaths" | 128 | INSANE_SKIP:${PN}:append:versal-net = " buildpaths" |
| 129 | |||
| 130 | python() { | ||
| 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 | ||
| 5 | PROVIDES = "virtual/base-pdi" | 5 | PROVIDES = "virtual/base-pdi" |
| 6 | 6 | ||
| 7 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 8 | |||
| 7 | COMPATIBLE_MACHINE = "^$" | 9 | COMPATIBLE_MACHINE = "^$" |
| 8 | COMPATIBLE_MACHINE:microblaze = ".*" | 10 | COMPATIBLE_MACHINE:microblaze = ".*" |
| 9 | COMPATIBLE_MACHINE:versal = ".*" | 11 | COMPATIBLE_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 @@ | |||
| 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/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 @@ | |||
| 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 | BITSTREAM_PATH_DEPENDS ??= "" | ||
| 9 | DEPENDS += "${BITSTREAM_PATH_DEPENDS}" | ||
| 10 | |||
| 11 | # We never want to prefer this over another provider | ||
| 12 | DEFAULT_PREFERENCE = "-1" | ||
| 13 | |||
| 14 | PROVIDES = "virtual/bitstream" | ||
| 15 | |||
| 16 | COMPATIBLE_MACHINE = "$^" | ||
| 17 | COMPATIBLE_MACHINE:zynq = ".*" | ||
| 18 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
| 19 | |||
| 20 | # Since we're just copying, we can run any config | ||
| 21 | COMPATIBLE_HOST = ".*" | ||
| 22 | |||
| 23 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 24 | |||
| 25 | # Path where the bitstream can be found | ||
| 26 | BITSTREAM_PATH ?= "" | ||
| 27 | |||
| 28 | inherit deploy | ||
| 29 | |||
| 30 | BITSTREAM_NAME ?= "download" | ||
| 31 | BITSTREAM_NAME:microblaze ?= "system" | ||
| 32 | |||
| 33 | BITSTREAM_BASE_NAME ?= "${BITSTREAM_NAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
| 34 | |||
| 35 | SYSROOT_DIRS += "/boot/bitstream" | ||
| 36 | |||
| 37 | do_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! | ||
| 47 | SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
| 48 | do_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 | |||
| 55 | addtask deploy before do_build after do_install | ||
| 56 | |||
| 57 | FILES:${PN} += "/boot/bitstream/*.bit" | ||
| 58 | |||
| 59 | def 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 | |||
| 72 | python() { | ||
| 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 | ||
| 10 | BOOTBIN_VER_MAIN ?= "" | 10 | BOOTBIN_VER_MAIN ?= "" |
| 11 | 11 | ||
| 12 | BOOTBIN_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 ''}" | ||
| 13 | BOOTBIN_VER_FILE = "bootbin-version-header.txt" | 12 | BOOTBIN_VER_FILE = "bootbin-version-header.txt" |
| 14 | BOOTBIN_VER_MAX_LEN = "36" | 13 | BOOTBIN_VER_MAX_LEN = "36" |
| 15 | 14 | ||
| @@ -17,12 +16,16 @@ BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest" | |||
| 17 | 16 | ||
| 18 | inherit deploy image-artifact-names | 17 | inherit deploy image-artifact-names |
| 19 | 18 | ||
| 19 | IMAGE_NAME_SUFFIX = "" | ||
| 20 | |||
| 20 | python do_configure() { | 21 | python 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 | ||
| 16 | inherit deploy image-artifact-names | 16 | inherit deploy image-artifact-names |
| 17 | 17 | ||
| 18 | IMAGE_NAME_SUFFIX = "" | ||
| 19 | |||
| 18 | python do_configure() { | 20 | python 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 | ||
| 8 | include machine-xilinx-${SOC_FAMILY}.inc | 8 | include machine-xilinx-${SOC_FAMILY}.inc |
| 9 | 9 | ||
| 10 | BOOTBIN_INCLUDE ?= "" | ||
| 11 | |||
| 10 | inherit deploy | 12 | inherit 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 | ||
| 19 | PROVIDES = "virtual/boot-bin" | 21 | PROVIDES = "virtual/boot-bin" |
| 20 | 22 | ||
| 21 | DEPENDS += "bootgen-native" | 23 | DEPENDS += "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 |
| 24 | DEPENDS += "${@(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 |
| 27 | DEPENDS += "${@(d.getVar('BIF_PARTITION_ATTR') or "").replace('bitstream', 'virtual/bitstream').replace('arm-trusted-firmware', 'virtual/arm-trusted-firmware')}" | ||
| 25 | 28 | ||
| 26 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 29 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 27 | 30 | ||
| @@ -45,8 +48,17 @@ BOOTGEN_ARCH_DEFAULT:versal-net = "versalnet" | |||
| 45 | BOOTGEN_ARCH ?= "${BOOTGEN_ARCH_DEFAULT}" | 48 | BOOTGEN_ARCH ?= "${BOOTGEN_ARCH_DEFAULT}" |
| 46 | BOOTGEN_EXTRA_ARGS ?= "" | 49 | BOOTGEN_EXTRA_ARGS ?= "" |
| 47 | 50 | ||
| 51 | QEMU_FLASH_TYPE ?= "qspi" | ||
| 52 | BOOTSCR_DEP = '' | ||
| 53 | BOOTSCR_DEP:versal = 'u-boot-xlnx-scr:do_deploy' | ||
| 54 | BOOTSCR_DEP:versal-net = 'u-boot-xlnx-scr:do_deploy' | ||
| 55 | |||
| 56 | BIF_BITSTREAM_ATTR ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', '', 'bitstream', d)}" | ||
| 57 | |||
| 48 | do_patch[noexec] = "1" | 58 | do_patch[noexec] = "1" |
| 49 | 59 | ||
| 60 | do_compile[depends] .= " ${BOOTSCR_DEP}" | ||
| 61 | |||
| 50 | def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): | 62 | def 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 | ||
| 192 | do_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 | |||
| 198 | do_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 | |||
| 180 | do_install() { | 204 | do_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 | ||
| 185 | inherit image-artifact-names | 209 | inherit image-artifact-names |
| 186 | 210 | ||
| 187 | QEMUQSPI_BASE_NAME ?= "QEMU_qspi-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 211 | QEMU_FLASH_IMAGE_NAME ?= "qemu-${QEMU_FLASH_TYPE}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
| 188 | 212 | ||
| 189 | BOOTBIN_BASE_NAME ?= "BOOT-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 213 | BOOTBIN_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 | ||
| 204 | do_deploy:append:versal-net () { | 231 | do_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 | ||
| 210 | FILES:${PN} += "/boot/BOOT.bin" | 240 | FILES:${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 | ||
| 40 | addtask do_deploy after do_compile | 40 | addtask 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 | |||
| 23 | SYSTEM_DTFILE ??= "" | 23 | SYSTEM_DTFILE ??= "" |
| 24 | CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" | 24 | CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" |
| 25 | 25 | ||
| 26 | SYSTEM_DTFILE_DEPENDS ??= "" | ||
| 27 | DEPENDS += "${SYSTEM_DTFILE_DEPENDS}" | ||
| 28 | |||
| 26 | BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" | 29 | BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" |
| 27 | 30 | ||
| 28 | EXTRA_DT_FILES ?= "" | 31 | EXTRA_DT_FILES ?= "" |
| @@ -31,12 +34,12 @@ EXTRA_DTFILES_BUNDLE ?= "" | |||
| 31 | UBOOT_DT_FILES ?= "" | 34 | UBOOT_DT_FILES ?= "" |
| 32 | UBOOT_DTFILE_PREFIX ?= "system-top" | 35 | UBOOT_DTFILE_PREFIX ?= "system-top" |
| 33 | UBOOT_DTFILES_BUNDLE ?= "" | 36 | UBOOT_DTFILES_BUNDLE ?= "" |
| 34 | EXTRA_OVERLAYS ?= "" | 37 | EXTRA_DT_INCLUDE_FILES ?= "" |
| 35 | 38 | ||
| 36 | SYSTEM_DTFILE[doc] = "System Device Tree which accepts at 0...1 dts file" | 39 | 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" | 40 | 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" | 41 | 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" | 42 | EXTRA_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') | |||
| 44 | SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" | 47 | SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" |
| 45 | 48 | ||
| 46 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_FILES') or "").split()])}" | 49 | 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()])}" | 50 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_INCLUDE_FILES') or "").split()])}" |
| 48 | 51 | ||
| 49 | COMPATIBLE_MACHINE:zynq = ".*" | 52 | COMPATIBLE_MACHINE:zynq = ".*" |
| 50 | COMPATIBLE_MACHINE:zynqmp = ".*" | 53 | COMPATIBLE_MACHINE:zynqmp = ".*" |
| @@ -62,7 +65,7 @@ DTB_FILE_NAME ?= "${BASE_DTS}.dtb" | |||
| 62 | 65 | ||
| 63 | DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" | 66 | DTB_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. |
| 67 | do_configure:prepend () { | 70 | do_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 | ||
| 80 | do_configure:append () { | 83 | do_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 @@ | |||
| 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_v2024.2" | ||
| 12 | SRCREV = "839e8e646c54a63326e36c48a7bd879f5e8efa31" | ||
| 13 | SOMAJOR = "2" | ||
| 14 | SOMINOR = "0" | ||
| 15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" | ||
| 16 | |||
| 17 | # Don't allow building for Zynq and Microblaze MACHINE unless it is supported. | ||
| 18 | COMPATIBLE_MACHINE = "^$" | ||
| 19 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
| 20 | COMPATIBLE_MACHINE:versal = ".*" | ||
| 21 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
| 22 | |||
| 23 | S = "${WORKDIR}/git" | ||
| 24 | |||
| 25 | inherit cmake update-rc.d systemd | ||
| 26 | |||
| 27 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm systemd" | ||
| 28 | RDEPENDS:${PN} += " freeipmi" | ||
| 29 | EXTRA_OECMAKE += " \ | ||
| 30 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ | ||
| 31 | " | ||
| 32 | |||
| 33 | INITSCRIPT_NAME = "dfx-mgr.sh" | ||
| 34 | INITSCRIPT_PARAMS = "start 99 S ." | ||
| 35 | |||
| 36 | SYSTEMD_PACKAGES="${PN}" | ||
| 37 | SYSTEMD_SERVICE:${PN}="dfx-mgr.service" | ||
| 38 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
| 39 | |||
| 40 | |||
| 41 | do_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 | |||
| 70 | PACKAGES =+ "libdfx-mgr" | ||
| 71 | |||
| 72 | FILES:${PN} += "${base_libdir}/firmware/xilinx" | ||
| 73 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}" | ||
| 74 | FILES: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 @@ | |||
| 1 | DESCRIPTION = "Image Recovery" | ||
| 2 | |||
| 3 | LICENSE = "CLOSED" | ||
| 4 | |||
| 5 | PROVIDES = "virtual/imgrcry" | ||
| 6 | |||
| 7 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 8 | |||
| 9 | COMPATIBLE_MACHINE = "^$" | ||
| 10 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
| 11 | |||
| 12 | # Since we're just copying, we can run any config | ||
| 13 | COMPATIBLE_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 | ||
| 18 | IMGRCRY_DEPENDS ??= "" | ||
| 19 | IMGRCRY_MCDEPENDS ??= "" | ||
| 20 | IMGRCRY_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
| 21 | IMGRCRY_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
| 22 | IMGRCRY_IMAGE_NAME ??= "image-recovery-${MACHINE}" | ||
| 23 | |||
| 24 | # Default is for the multilib case (without the extension .bin) | ||
| 25 | IMGRCRY_FILE ??= "${IMGRCRY_DEPLOY_DIR}/${IMGRCRY_IMAGE_NAME}" | ||
| 26 | IMGRCRY_FILE[vardepsexclude] = "IMGRCRY_DEPLOY_DIR" | ||
| 27 | |||
| 28 | do_fetch[depends] += "${IMGRCRY_DEPENDS}" | ||
| 29 | do_fetch[mcdepends] += "${IMGRCRY_MCDEPENDS}" | ||
| 30 | |||
| 31 | inherit deploy | ||
| 32 | |||
| 33 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 34 | SHOULD_DEPLOY = "${@'false' if (d.getVar('IMGRCRY_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
| 35 | do_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 | |||
| 43 | addtask deploy before do_build after do_install | ||
| 44 | |||
| 45 | INSANE_SKIP:${PN} = "arch" | ||
| 46 | INSANE_SKIP:${PN}-dbg = "arch" | ||
| 47 | |||
| 48 | # Disable buildpaths QA check warnings. | ||
| 49 | INSANE_SKIP:${PN} += "buildpaths" | ||
| 50 | |||
| 51 | def 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 | |||
| 66 | python() { | ||
| 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 @@ | |||
| 1 | DESCRIPTION = "Image Selector" | ||
| 2 | |||
| 3 | LICENSE = "CLOSED" | ||
| 4 | |||
| 5 | PROVIDES = "virtual/imgsel" | ||
| 6 | |||
| 7 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 8 | |||
| 9 | COMPATIBLE_MACHINE = "^$" | ||
| 10 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
| 11 | |||
| 12 | # Since we're just copying, we can run any config | ||
| 13 | COMPATIBLE_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 | ||
| 18 | IMGSEL_DEPENDS ??= "" | ||
| 19 | IMGSEL_MCDEPENDS ??= "" | ||
| 20 | IMGSEL_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
| 21 | IMGSEL_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
| 22 | IMGSEL_IMAGE_NAME ??= "image-selector-${MACHINE}" | ||
| 23 | |||
| 24 | # Default is for the multilib case (without the extension .bin) | ||
| 25 | IMGSEL_FILE ??= "${IMGSEL_DEPLOY_DIR}/${IMGSEL_IMAGE_NAME}" | ||
| 26 | IMGSEL_FILE[vardepsexclude] = "IMGSEL_DEPLOY_DIR" | ||
| 27 | |||
| 28 | do_fetch[depends] += "${IMGSEL_DEPENDS}" | ||
| 29 | do_fetch[mcdepends] += "${IMGSEL_MCDEPENDS}" | ||
| 30 | |||
| 31 | inherit deploy | ||
| 32 | |||
| 33 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
| 34 | SHOULD_DEPLOY = "${@'false' if (d.getVar('IMGSEL_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
| 35 | do_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 | |||
| 43 | addtask deploy before do_build after do_install | ||
| 44 | |||
| 45 | INSANE_SKIP:${PN} = "arch" | ||
| 46 | INSANE_SKIP:${PN}-dbg = "arch" | ||
| 47 | |||
| 48 | # Disable buildpaths QA check warnings. | ||
| 49 | INSANE_SKIP:${PN} += "buildpaths" | ||
| 50 | |||
| 51 | #SYSROOT_DIRS += "/boot" | ||
| 52 | #FILES:${PN} = "/boot/${PN}.bin" | ||
| 53 | |||
| 54 | def 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 | |||
| 69 | python() { | ||
| 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 @@ | |||
| 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_v2024.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 = "af8d735fae286e7bc94c830a86c960598a4ac014" | ||
| 12 | |||
| 13 | # Don't allow building for Zynq and Microblaze MACHINE unless it is supported. | ||
| 14 | COMPATIBLE_MACHINE = "^$" | ||
| 15 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
| 16 | COMPATIBLE_MACHINE:versal = ".*" | ||
| 17 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | inherit 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. | ||
| 25 | RREPLACES:${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 @@ | |||
| 1 | require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | ||
| 2 | |||
| 3 | DEPENDS:remove:zynqmp:qemuall = " optee-os" | ||
| 4 | DEPENDS:remove:versal:qemuall = " optee-os" | ||
| 5 | DEPENDS:remove:versal-net:qemuall = " optee-os" | ||
| 6 | |||
| 7 | # Xilinx TF-A v2.10 | ||
| 8 | SRC_URI_TRUSTED_FIRMWARE_A = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https" | ||
| 9 | SRCREV_tfa = "14cea4616b6edaceabb607c7c92332436a1699e5" | ||
| 10 | SRCBRANCH = "xlnx_rebase_v2.10" | ||
| 11 | |||
| 12 | LIC_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 | ||
| 17 | PROVIDES = "virtual/arm-trusted-firmware" | ||
| 18 | |||
| 19 | COMPATIBLE_MACHINE ?= "^$" | ||
| 20 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
| 21 | COMPATIBLE_MACHINE:versal = ".*" | ||
| 22 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
| 23 | |||
| 24 | ### Platform Settings | ||
| 25 | TFA_PLATFORM:zynqmp = "zynqmp" | ||
| 26 | TFA_PLATFORM:versal = "versal" | ||
| 27 | TFA_PLATFORM:versal-net = "versal_net" | ||
| 28 | |||
| 29 | |||
| 30 | ### Console settings | ||
| 31 | TFA_CONSOLE_DEFAULT = "" | ||
| 32 | TFA_CONSOLE_DEFAULT:zynqmp = "cadence" | ||
| 33 | TFA_CONSOLE_DEFAULT:versal = "pl011" | ||
| 34 | TFA_CONSOLE_DEFAULT:versal-net = "pl011" | ||
| 35 | |||
| 36 | # Use old name for compatibility | ||
| 37 | ATF_CONSOLE ?= "${TFA_CONSOLE_DEFAULT}" | ||
| 38 | |||
| 39 | # Old name to new name | ||
| 40 | TFA_CONSOLE ?= "${ATF_CONSOLE}" | ||
| 41 | |||
| 42 | TFA_CONSOLE_OEMAKE = "" | ||
| 43 | TFA_CONSOLE_OEMAKE:append:zynqmp = "${@' ZYNQMP_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
| 44 | TFA_CONSOLE_OEMAKE:append:versal = "${@' VERSAL_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
| 45 | TFA_CONSOLE_OEMAKE:append:versal-net = "${@' VERSAL_NET_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
| 46 | |||
| 47 | EXTRA_OEMAKE += "${TFA_CONSOLE_OEMAKE}" | ||
| 48 | |||
| 49 | |||
| 50 | ### Debug settings | ||
| 51 | DEBUG_ATF_DEFAULT = "" | ||
| 52 | DEBUG_ATF_DEFAULT:versal = "1" | ||
| 53 | DEBUG_ATF_DEFAULT:versal-net = "1" | ||
| 54 | DEBUG_ATF ?= "${DEBUG_ATF_DEFAULT}" | ||
| 55 | |||
| 56 | # Translate old to new name | ||
| 57 | TFA_DEBUG = "${DEBUG_ATF}" | ||
| 58 | |||
| 59 | |||
| 60 | ### Mem Settings | ||
| 61 | ATF_MEM_BASE ?= "" | ||
| 62 | ATF_MEM_SIZE ?= "" | ||
| 63 | |||
| 64 | TFA_MEM_BASE ?= "${ATF_MEM_BASE}" | ||
| 65 | TFA_MEM_SIZE ?= "${ATF_MEM_SIZE}" | ||
| 66 | |||
| 67 | TFA_MEM_OEMAKE = "" | ||
| 68 | TFA_MEM_OEMAKE:append:zynqmp = "${@' ZYNQMP_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
| 69 | TFA_MEM_OEMAKE:append:zynqmp = "${@' ZYNQMP_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
| 70 | TFA_MEM_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
| 71 | TFA_MEM_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
| 72 | TFA_MEM_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
| 73 | TFA_MEM_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
| 74 | |||
| 75 | EXTRA_OEMAKE += "${TFA_MEM_OEMAKE}" | ||
| 76 | |||
| 77 | |||
| 78 | ### Preloaded Base | ||
| 79 | TFA_BL33_LOAD ?= "" | ||
| 80 | EXTRA_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 | ||
| 84 | EXTRA_OEMAKE += ' TF_LDFLAGS="--no-warn-rwx-segments --fatal-warnings -O1 --gc-sections"' | ||
| 85 | |||
| 86 | # We use bl31 | ||
| 87 | TFA_BUILD_TARGET = "bl31" | ||
| 88 | TFA_INSTALL_TARGET = "bl31" | ||
| 89 | |||
| 90 | inherit image-artifact-names | ||
| 91 | |||
| 92 | # arm-trusted-firmware instead of ${PN} for compatibility | ||
| 93 | ATF_BASE_NAME ?= "arm-trusted-firmware-${PKGE}-${PKGV}-${PKGR}${IMAGE_VERSION_SUFFIX}" | ||
| 94 | |||
| 95 | do_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 | |||
| 117 | inherit deploy | ||
| 118 | |||
| 119 | DEPENDS += "u-boot-mkimage-native" | ||
| 120 | |||
| 121 | do_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 | |||
| 134 | addtask deploy before do_build after do_compile | ||
| 135 | |||
| 136 | SYSROOT_DIRS += "/boot" | ||
| 137 | FILES:${PN} += "/boot/*.elf /boot/*.bin /boot/*.ub" | ||
| 138 | RPROVIDES:${PN} += "arm-trusted-firmware" | ||
| 139 | |||
| 140 | python() { | ||
| 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 @@ | |||
| 1 | require u-boot-tools-xlnx.inc | ||
| 2 | require u-boot-xlnx-2024.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-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 @@ | |||
| 1 | UBRANCH = "xlnx_rebase_v2024.01" | ||
| 2 | |||
| 3 | SRCREV = "7f6ec94aac7eacfec07bd45c83a6d17df4b7d383" | ||
| 4 | |||
| 5 | LICENSE = "GPL-2.0-or-later" | ||
| 6 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
| 7 | |||
| 8 | # u-boot-xlnx has support for these | ||
| 9 | HAS_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 | |||
| 15 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | ||
| 16 | |||
| 17 | FILESEXTRAPATHS: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 ?= "" | |||
| 9 | CC_DTBS_DUP ?= "" | 9 | CC_DTBS_DUP ?= "" |
| 10 | IMPORT_CC_UBOOT_DTBS ?= "" | 10 | IMPORT_CC_UBOOT_DTBS ?= "" |
| 11 | 11 | ||
| 12 | DEPENDS:append:eval-brd-sc-zynqmp = " uboot-device-tree" | ||
| 13 | MKIMAGE_DTBLOB_OPTS ?= "-E -B 0x8" | 12 | MKIMAGE_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" | |||
| 39 | DDR_BASEADDR:microblaze ?= "0x80000000" | 39 | DDR_BASEADDR:microblaze ?= "0x80000000" |
| 40 | PRE_BOOTENV ?= "" | 40 | PRE_BOOTENV ?= "" |
| 41 | 41 | ||
| 42 | # Set debfault SD boot device to mmc 0 interface | ||
| 43 | SDBOOTDEV ?= "0" | ||
| 44 | |||
| 42 | SRC_URI = " \ | 45 | SRC_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" | |||
| 81 | DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000" | 84 | DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000" |
| 82 | DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000" | 85 | DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000" |
| 83 | DEVICETREE_OVERLAY_OFFSET:versal-net ??= "0x1000" | 86 | DEVICETREE_OVERLAY_OFFSET:versal-net ??= "0x1000" |
| 84 | DEVICETREE_OVERLAY_PADSIZE ??= "0xf00000" | 87 | DEVICETREE_OVERLAY_PADSIZE ??= "0x1f00000" |
| 85 | 88 | ||
| 86 | DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(append_baseaddr(d,d.getVar('DEVICETREE_OVERLAY_OFFSET')),16) \ | 89 | DEVICETREE_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@@ | |||
| 13 | setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;' | 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' | 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 | 15 | ||
| 16 | |||
| 17 | for boot_target in ${boot_targets}; | 16 | for boot_target in ${boot_targets}; |
| 18 | do | 17 | do |
| 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" | ||
| 95 | fi | ||
| 86 | done | 96 | done |
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@@ | |||
| 9 | rootfs_name=@@RAMDISK_IMAGE@@ | 9 | rootfs_name=@@RAMDISK_IMAGE@@ |
| 10 | @@PRE_BOOTENV@@ | 10 | @@PRE_BOOTENV@@ |
| 11 | 11 | ||
| 12 | |||
| 12 | for boot_target in ${boot_targets}; | 13 | for boot_target in ${boot_targets}; |
| 13 | do | 14 | do |
| 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 | ||
| 27 | def uboot_boot_cmd(d): | 27 | def 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 | ||
| 36 | def get_sdbootdev(d): | 36 | def 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" | |||
| 89 | KERNEL_LOAD_ADDRESS:zynqmp = "0x200000" | 89 | KERNEL_LOAD_ADDRESS:zynqmp = "0x200000" |
| 90 | DEVICETREE_LOAD_ADDRESS:zynq = "0x2000000" | 90 | DEVICETREE_LOAD_ADDRESS:zynq = "0x2000000" |
| 91 | DEVICETREE_LOAD_ADDRESS:zynqmp = "0x4000000" | 91 | DEVICETREE_LOAD_ADDRESS:zynqmp = "0x4000000" |
| 92 | DEVICETREE_OVERLAY_LOAD_ADDRESS = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" | 92 | DEVICETREE_OVERLAY_LOAD_ADDRESS:zynq = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" |
| 93 | DEVICETREE_OVERLAY_LOAD_ADDRESS:zynqmp = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" | ||
| 93 | 94 | ||
| 94 | python do_compile() { | 95 | python 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 | |||
| 2 | require u-boot-xlnx.inc | ||
| 3 | require u-boot-spl-zynq-init.inc | ||
| 4 | require u-boot-xlnx-2024.2.inc | ||
