diff options
Diffstat (limited to 'meta-xilinx/meta-xilinx-standalone')
109 files changed, 1869 insertions, 74 deletions
diff --git a/meta-xilinx/meta-xilinx-standalone/README.md b/meta-xilinx/meta-xilinx-standalone/README.md index c7bdeb6ea..50ac9ad76 100644 --- a/meta-xilinx/meta-xilinx-standalone/README.md +++ b/meta-xilinx/meta-xilinx-standalone/README.md @@ -1,21 +1,28 @@ meta-xilinx-standalone ====================== -This layer is meant to augment Yocto/OE functionality to provide a Baremetal/Standalone Toolchain. +This layer is meant to augment Yocto/OE functionality to provide a +Baremetal/Standalone Toolchain as well as the foundation for building +the embeddedsw components that enable non-Linux software required for +Xilinx based FPGA/SOCs. + +Note, the non-Linux software components are still in development and +this should be considered to be a preview release only. For instance, +some components may not be buildable, expect APIs to change on various +parts and pieces. Maintainers, Mailing list, Patches ================================== -Please send any patches, pull requests, comments or questions for this layer to -the [meta-xilinx mailing list](https://lists.yoctoproject.org/listinfo/meta-xilinx): +Please send any patches, pull requests, comments or questions for this +layer to the [meta-xilinx mailing list] +(https://lists.yoctoproject.org/listinfo/meta-xilinx): meta-xilinx@lists.yoctoproject.org Maintainers: - Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> - Manjukumar Harthikote Matha <manjukumar.harthikote-matha@xilinx.com> Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Mark Hatle <mark.hatle@xilinx.com> @@ -37,13 +44,12 @@ Usage 3.- Add this layer to BBLAYERS on conf/bblayers.conf -4.- Add the following to your conf/local.conf to build for the microblaze architecture: +4.- Add the following to your conf/local.conf to build for the +microblaze architecture: DISTRO="xilinx-standalone" -MACHINE="zynqmp-pmu" - -GCCVERSION="7.%" +MACHINE="microblaze-pmu" 5.- Build a package: diff --git a/meta-xilinx/meta-xilinx-standalone/classes/esw.bbclass b/meta-xilinx/meta-xilinx-standalone/classes/esw.bbclass new file mode 100644 index 000000000..565b37127 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/classes/esw.bbclass @@ -0,0 +1,106 @@ +inherit pkgconfig cmake + +LICENSE = "Proprietary" +LICFILENAME = "license.txt" +LIC_FILES_CHKSUM = "file://${S}/${LICFILENAME};md5=39ab6ab638f4d1836ba994ec6852de94" + +# We should move to an actual SRCREV eventually +include conf/xilinx/esw-srcrev.inc + +SRCREV ?= "${AUTOREV}" +PV = "${XILINX_RELEASE_VERSION}+git${SRCPV}" +REPO ?= "git://github.com/xilinx/embeddedsw.git;protocol=https" +BRANCH ?= "master" +SRC_URI = "${REPO};branch=${BRANCH}" + +SRCREV_FORMAT = "src_decouple" + +S = "${WORKDIR}/git/" +B = "${WORKDIR}/build/" +OECMAKE_SOURCEPATH = "${S}/${ESW_COMPONENT_SRC}" + +SPECFILE_PATH_arm = "${S}/scripts/specs/arm/Xilinx.spec" +SPECFILE_PATH_aarch64 = "${S}/scripts/specs/arm/Xilinx.spec" +SPECFILE_PATH_microblaze = "${S}/scripts/specs/microblaze/Xilinx.spec" + +ESW_CFLAGS += "-specs=${SPECFILE_PATH}" + +inherit ccmake + +COMPATIBLE_HOST = ".*-elf" +COMPATIBLE_HOST_arm = "[^-]*-[^-]*-eabi" + +DTBFILE ?= "${RECIPE_SYSROOT}/boot/devicetree/system-top.dtb" + +def get_xlnx_cmake_machine(fam, d): + cmake_machine = fam + if (fam == 'zynqmp'): + cmake_machine = 'ZynqMP' + elif (fam == 'versal'): + cmake_machine = 'Versal' + elif (fam == 'zynq'): + cmake_machine = 'Zynq' + return cmake_machine + +def get_xlnx_cmake_processor(tune, machine, d): + cmake_processor = tune + if tune.startswith('microblaze'): + if (machine == 'microblaze-pmu'): + cmake_processor = 'pmu_microblaze' + elif (machine == 'microblaze-plm'): + cmake_processor = 'plm_microblaze' + else: + cmake_processor = 'microblaze' + elif (tune in [ 'cortexr5', 'cortexr5f' ]): + cmake_processor = 'cortexr5' + elif tune.startswith('cortexa9'): + cmake_processor = 'cortexa9' + elif (tune in [ 'cortexa53', 'cortexa72-cortexa53' ]): + cmake_processor = 'cortexa53' + elif tune == 'cortexa72': + cmake_processor = 'cortexa72' + return cmake_processor + +XLNX_CMAKE_MACHINE = "${@get_xlnx_cmake_machine(d.getVar('SOC_FAMILY'), d)}" +XLNX_CMAKE_PROCESSOR = "${@get_xlnx_cmake_processor(d.getVar('DEFAULTTUNE'), d.getVar('MACHINE'), d)}" +XLNX_CMAKE_SYSTEM_NAME ?= "Generic" + +cmake_do_generate_toolchain_file_append() { + cat >> ${WORKDIR}/toolchain.cmake <<EOF + include(CMakeForceCompiler) + CMAKE_FORCE_C_COMPILER("${OECMAKE_C_COMPILER}" GNU) + CMAKE_FORCE_CXX_COMPILER("${OECMAKE_CXX_COMPILER}" GNU) + set( CMAKE_SYSTEM_PROCESSOR "${XLNX_CMAKE_PROCESSOR}" ) + set( CMAKE_MACHINE "${XLNX_CMAKE_MACHINE}" ) + # Will need this in the future to make cmake understand esw variables + # set( CMAKE_SYSTEM_NAME `echo elf | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` ) + set( CMAKE_SYSTEM_NAME "${XLNX_CMAKE_SYSTEM_NAME}" ) +EOF +} + +do_install() { + install -d ${D}${libdir} + install -d ${D}${includedir} + install -m 0755 ${B}/${ESW_COMPONENT_NAME} ${D}${libdir} + install -m 0644 ${B}/include/*.h ${D}${includedir} +} + +CFLAGS_append = " ${ESW_CFLAGS}" + +# We need to find the license file, which vaires depending on the component +# recurse a maximum of x times, could be fancier but it gets complicated since +# we dont know for certain we are running devtool or just externalsrc +python(){ + import os.path + if bb.data.inherits_class('externalsrc', d) and d.getVar('EXTERNALSRC'): + externalsrc = d.getVar('EXTERNALSRC') + lic_file = d.getVar('LIC_FILES_CHKSUM', False) + licpath=externalsrc + for i in range(5): + if os.path.isfile(licpath + '/' + d.getVar('LICFILENAME',True)): + lic_file = lic_file.replace('${S}',licpath) + d.setVar('LIC_FILES_CHKSUM', lic_file) + return + licpath=os.path.dirname(licpath) + bb.error("Couldn't find license file: %s, within directory %s or his parent directories" % (d.getVar('LICFILENAME',True), externalsrc)) +} diff --git a/meta-xilinx/meta-xilinx-standalone/classes/esw_examples.bbclass b/meta-xilinx/meta-xilinx-standalone/classes/esw_examples.bbclass new file mode 100644 index 000000000..391f388e4 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/classes/esw_examples.bbclass @@ -0,0 +1,27 @@ +inherit esw deploy python3native + +DEPENDS += "dtc-native python3-dtc-native python3-pyyaml-native xilstandalone libxil xiltimer device-tree" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_eglist () { + cd ${S} + nativepython3 ${S}/scripts/example.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask generate_eglist before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware +} + +do_deploy() { + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/ +} +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/*.elf" diff --git a/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-freertos.conf b/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-freertos.conf new file mode 100644 index 000000000..cba5fd904 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-freertos.conf @@ -0,0 +1,9 @@ +require conf/distro/xilinx-standalone.inc + +DISTRO_NAME_append = " (freertos)" + +XLNX_CMAKE_SYSTEM_NAME = "FreeRTOS" + +# We need to pass FREERTOS_BSP compliler flag it is consumed +# esw components. +ESW_CFLAGS += " -DFREERTOS_BSP" diff --git a/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone-nolto.conf b/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone-nolto.conf new file mode 100644 index 000000000..315f555cb --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone-nolto.conf @@ -0,0 +1 @@ +require conf/distro/xilinx-standalone.inc diff --git a/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone.conf b/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone.conf index 7cd23ccdb..4273230f0 100644 --- a/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone.conf +++ b/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone.conf @@ -1,13 +1,14 @@ -DISTRO = "xilinx-standalone" -DISTRO_NAME = "Xilinx Standalone Distro" -DISTRO_VERSION = "1.0" -TARGET_VENDOR = "-xilinx" +require conf/distro/xilinx-standalone.inc -TCLIBC = "newlib" -TCLIBCAPPEND ="" +DISTRO_NAME_append = " (lto)" -# Change SDK name -SDK_VERSION = "xilinx-standalone" +# By default we want to optimize for size. +FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" + +# Workaround for microblaze -Os bug +FULL_OPTIMIZATION_microblaze = "-O2 -pipe ${DEBUG_FLAGS}" + +# We also need to use Link Time Optimization for many items, make this the +# default. +ESW_CFLAGS += " -flto -ffat-lto-objects" -require conf/distro/include/yocto-uninative.inc -INHERIT += "uninative" diff --git a/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc b/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc new file mode 100644 index 000000000..5c8ae67a1 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc @@ -0,0 +1,47 @@ +DISTRO_NAME = "Xilinx Standalone Distro" +DISTRO_VERSION = "1.0" +TARGET_VENDOR = "-xilinx" + +# Make sure any users get the xilinx-standalone distro override +DISTROOVERRIDES_prepend = "${@'xilinx-standalone:' if d.getVar('DISTRO') != "xilinx-standalone" else ''}" + +TCLIBC = "newlib" +TCLIBCAPPEND ="" + +# Change SDK name +SDK_VERSION = "xilinx-standalone" + +require conf/distro/include/yocto-uninative.inc +INHERIT += "uninative" + +# Hold this until it gets merged in core, we need libc.a and libgloss.a for cross-canadian +LIBC_DEPENDENCIES_append = " newlib-staticdev libgloss-staticdev" + +ESW_CFLAGS ?= "" + +INHERIT += "buildhistory" + +# Cortex R5 requires an additional cflag to be passed for compatibility with the embeddedsw +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr5', ' -DARMR5', '', d)}" + +# Make sure all regular recipes are excluded from compatibility +# Avoid using this for native, nativesdk or cross recipes +COMPATOS = "" +# Set the regex for target recipes only, follow TARGET_OS default +COMPATOS_class-target = ".*-linux${LIBCEXTENSION}${ABIEXTENSION}" +COMPATIBLE_HOST ?= "${COMPATOS}" + +# Clear defaults +DISTRO_FEATURES_BACKFILL_xilinx-standalone = "" +VIRTUAL-RUNTIME_init_manager_xilinx-standalone = "" + +PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" + +# Hold this until it gets merged in core, we need libc.a and libgloss.a for cross-canadian +LIBC_DEPENDENCIES_append = " newlib-staticdev libgloss-staticdev" + +# No cached configsite files +TOOLCHAIN_NEED_CONFIGSITE_CACHE = "" + +# Workaround for pulling in nativesdk-mingw-w64-winpthreads +TOOLCHAIN_HOST_TASK_append_sdkmingw32 = " nativesdk-mingw-w64-winpthreads" diff --git a/meta-xilinx/meta-xilinx-standalone/conf/layer.conf b/meta-xilinx/meta-xilinx-standalone/conf/layer.conf index 16bfb74ae..223059a95 100644 --- a/meta-xilinx/meta-xilinx-standalone/conf/layer.conf +++ b/meta-xilinx/meta-xilinx-standalone/conf/layer.conf @@ -3,12 +3,16 @@ BBPATH .= ":${LAYERDIR}" # We have recipes-* directories, add to BBFILES BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" + ${LAYERDIR}/recipes-*/*/*.bbappend \ + ${LAYERDIR}/recipes-*/*.bb \ + ${LAYERDIR}/recipes-*/*.bbappend \ + " BBFILE_COLLECTIONS += "xilinx-standalone" BBFILE_PATTERN_xilinx-standalone = "^${LAYERDIR}/" -BBFILE_PRIORITY_xilinx-standalone = "5" +BBFILE_PRIORITY_xilinx-standalone = "7" LAYERDEPENDS_xilinx-standalone = "core xilinx" -LAYERSERIES_COMPAT_xilinx-standalone = "warrior" +LAYERSERIES_COMPAT_xilinx-standalone = "dunfell gatesgarth" +XILINX_RELEASE_VERSION = "v2020.1" diff --git a/meta-xilinx/meta-xilinx-standalone/conf/machine/zynqmp-pmu.conf b/meta-xilinx/meta-xilinx-standalone/conf/machine/zynqmp-pmu.conf deleted file mode 100644 index 2f692db0d..000000000 --- a/meta-xilinx/meta-xilinx-standalone/conf/machine/zynqmp-pmu.conf +++ /dev/null @@ -1,11 +0,0 @@ -DEFAULTTUNE ?= "microblaze" - -require conf/machine/include/microblaze/arch-microblaze.inc - -# Endianess, multiplier, barrel shift, pattern compare, floating point double or single, are the possibilities -AVAILTUNES += "microblaze" -TUNE_FEATURES_tune-microblaze = "microblaze v9.2 barrel-shift pattern-compare" -PACKAGE_EXTRA_ARCHS_tune-microblaze = "${TUNE_PKGARCH}" -SOC_FAMILY = "zynqmp" - -TARGET_LINK_HASH_STYLE_microblaze = "" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb new file mode 100644 index 000000000..9b5bb1103 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb @@ -0,0 +1,33 @@ +inherit esw deploy + +ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_hello_world/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil xilstandalone xiltimer freertos10-xilinx device-tree" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/freertos_hello_world* ${D}/${base_libdir}/firmware +} + +FREERTOS_HELLO_WORLD_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +FREERTOS_HELLO_WORLD_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.elf ${DEPLOYDIR}/${FREERTOS_HELLO_WORLD_BASE_NAME}.elf + ln -sf ${FREERTOS_HELLO_WORLD_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.bin ${DEPLOYDIR}/${FREERTOS_HELLO_WORLD_BASE_NAME}.bin + ln -sf ${FREERTOS_HELLO_WORLD_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/freertos_hello_world*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb new file mode 100644 index 000000000..ebfc85aaa --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_echo_server/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native freertos10-xilinx" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/freertos_lwip_echo* ${D}/${base_libdir}/firmware +} + +FREERTOS_LWIP_ECHO_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +FREERTOS_LWIP_ECHO_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_ECHO_BASE_NAME}.elf + ln -sf ${FREERTOS_LWIP_ECHO_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_ECHO_BASE_NAME}.bin + ln -sf ${FREERTOS_LWIP_ECHO_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/freertos_lwip_echo*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb new file mode 100644 index 000000000..eb199d39e --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_client/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native freertos10-xilinx" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/freertos_lwip_tcp_perf_client* ${D}/${base_libdir}/firmware +} + +FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf + ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin + ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_client*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb new file mode 100644 index 000000000..c22825934 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_server/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native freertos10-xilinx" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/freertos_lwip_tcp_perf_server* ${D}/${base_libdir}/firmware +} + +FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.elf + ln -sf ${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.bin + ln -sf ${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_server*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb new file mode 100644 index 000000000..ccf8f09e4 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_client/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native freertos10-xilinx" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/freertos_lwip_udp_perf_client* ${D}/${base_libdir}/firmware +} + +FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf + ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin + ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_client*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb new file mode 100644 index 000000000..f2c9eaed1 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_server/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native freertos10-xilinx" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/freertos_lwip_udp_perf_server* ${D}/${base_libdir}/firmware +} + +FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.elf + ln -sf ${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.bin + ln -sf ${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_server*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/hello-world/hello-world_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/hello-world/hello-world_git.bb new file mode 100644 index 000000000..c67fb5f5f --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/hello-world/hello-world_git.bb @@ -0,0 +1,35 @@ +inherit esw deploy + +ESW_COMPONENT_SRC = "/lib/sw_apps/hello_world/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil xiltimer device-tree" + +inherit python3native + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/hello_world* ${D}/${base_libdir}/firmware +} + +HELLO_WORLD_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +HELLO_WORLD_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/hello_world.elf ${DEPLOYDIR}/${HELLO_WORLD_BASE_NAME}.elf + ln -sf ${HELLO_WORLD_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/hello_world.elf ${WORKDIR}/package/${base_libdir}/firmware/hello_world.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/hello_world.bin ${DEPLOYDIR}/${HELLO_WORLD_BASE_NAME}.bin + ln -sf ${HELLO_WORLD_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/hello_world*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb new file mode 100644 index 000000000..e0d6f13cf --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_echo_server/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/lwip_echo* ${D}/${base_libdir}/firmware +} + +LWIP_ECHO_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +LWIP_ECHO_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo_server.elf ${DEPLOYDIR}/${LWIP_ECHO_BASE_NAME}.elf + ln -sf ${LWIP_ECHO_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo.bin ${DEPLOYDIR}/${LWIP_ECHO_BASE_NAME}.bin + ln -sf ${LWIP_ECHO_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/lwip_echo*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb new file mode 100644 index 000000000..6f0c9b4a2 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_client/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/lwip_tcp_perf_client* ${D}/${base_libdir}/firmware +} + +LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +LWIP_TCP_PERF_CLIENT_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.elf ${DEPLOYDIR}/${LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf + ln -sf ${LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.bin ${DEPLOYDIR}/${LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin + ln -sf ${LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/lwip_tcp_perf_client*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb new file mode 100644 index 000000000..d9f990c4c --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_server/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/lwip_tcp_perf_server* ${D}/${base_libdir}/firmware +} + +LWIP_TCP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +LWIP_TCP_PERF_SERVER_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.elf ${DEPLOYDIR}/${LWIP_TCP_PERF_SERVER_BASE_NAME}.elf + ln -sf ${LWIP_TCP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.bin ${DEPLOYDIR}/${LWIP_TCP_PERF_SERVER_BASE_NAME}.bin + ln -sf ${LWIP_TCP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/lwip_tcp_perf_server*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb new file mode 100644 index 000000000..fc89c13ec --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_client/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/lwip_udp_perf_client* ${D}/${base_libdir}/firmware +} + +LWIP_UDP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +LWIP_UDP_PERF_CLIENT_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.elf ${DEPLOYDIR}/${LWIP_UDP_PERF_CLIENT_BASE_NAME}.elf + ln -sf ${LWIP_UDP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.bin ${DEPLOYDIR}/${LWIP_UDP_PERF_CLIENT_BASE_NAME}.bin + ln -sf ${LWIP_UDP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/lwip_udp_perf_client*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb new file mode 100644 index 000000000..8b9114ac3 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb @@ -0,0 +1,41 @@ +inherit esw deploy python3native + +ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_server/src/" + +DEPENDS += "dtc-native python3-dtc-native libxil lwip xiltimer device-tree python3-pyyaml-native" + +do_configure_prepend() { + cd ${S} + nativepython3 ${S}/scripts/linker_gen.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_generate_app_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} +addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/lwip_udp_perf_server* ${D}/${base_libdir}/firmware +} + +LWIP_UDP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +LWIP_UDP_PERF_SERVER_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.elf ${DEPLOYDIR}/${LWIP_UDP_PERF_SERVER_BASE_NAME}.elf + ln -sf ${LWIP_UDP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.bin ${DEPLOYDIR}/${LWIP_UDP_PERF_SERVER_BASE_NAME}.bin + ln -sf ${LWIP_UDP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/lwip_udp_perf_server*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/pmufw/pmufw_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/pmufw/pmufw_git.bb new file mode 100644 index 000000000..19238f97a --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/pmufw/pmufw_git.bb @@ -0,0 +1,30 @@ +inherit esw deploy + +COMPATIBLE_MACHINE = "microblaze-pmu" + +ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_pmufw/src" + +DEPENDS += "xilstandalone xiltimer xilfpga xilskey" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/pmufw* ${D}/${base_libdir}/firmware +} + +PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/pmufw.elf ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf + ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/pmufw.elf ${WORKDIR}/package/${base_libdir}/firmware/pmufw.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/pmufw.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin + ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/pmufw*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-applications/zynqmp-fsbl/zynqmp-fsbl_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-applications/zynqmp-fsbl/zynqmp-fsbl_git.bb new file mode 100644 index 000000000..a0d2d2b9d --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-applications/zynqmp-fsbl/zynqmp-fsbl_git.bb @@ -0,0 +1,40 @@ +inherit esw deploy + +COMPATIBLE_MACHINE = ".*-zynqmp" + +ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_fsbl/src" + +DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm device-tree" + +PSU_INIT = "${RECIPE_SYSROOT}/${includedir}/devicetree/psu_init*" + +do_configure_prepend() { + # Copy psu_init* files to fsbl source code + cp ${PSU_INIT} ${S}/${ESW_COMPONENT_SRC} +} + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/zynqmp_fsbl* ${D}/${base_libdir}/firmware +} + +ZYNQMP_FSBL_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +ZYNQMP_FSBL_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # We need to deploy the stripped elf, hence why not doing it from ${D} + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.elf ${DEPLOYDIR}/${ZYNQMP_FSBL_BASE_NAME}.elf + ln -sf ${ZYNQMP_FSBL_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.elf ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/zynqmp_fsbl.bin ${DEPLOYDIR}/${ZYNQMP_FSBL_BASE_NAME}.bin + ln -sf ${ZYNQMP_FSBL_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +CFLAGS_append_aarch64 = " -DARMA53_64" +CFLAGS_append_armrm = " -DARMR5" + +FILES_${PN} = "${base_libdir}/firmware/zynqmp_fsbl*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-bsp/device-tree/device-tree.bbappend new file mode 100644 index 000000000..2cc088f27 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-bsp/device-tree/device-tree.bbappend @@ -0,0 +1,28 @@ +COMPATIBLE_HOST_xilinx-standalone = "${HOST_SYS}" + +COMPATIBLE_MACHINE_cortexa53-zynqmp = ".*" +COMPATIBLE_MACHINE_cortexr5-zynqmp = ".*" +COMPATIBLE_MACHINE_microblaze-pmu = ".*" +COMPATIBLE_MACHINE_microblaze-plm = ".*" +COMPATIBLE_MACHINE_cortexa72-versal = ".*" +COMPATIBLE_MACHINE_cortexr5-versal = ".*" +COMPATIBLE_MACHINE_cortexa9-zynq = ".*" + +XSCTH_PROC_cortexa53-zynqmp ??= "psu_cortexa53_0" +XSCTH_PROC_cortexr5-zynqmp ??= "psu_cortexr5_0" +XSCTH_PROC_microblaze-pmu ??= "psu_pmu_0" +XSCTH_PROC_cortexa72-versal ??= "psv_cortexa72_0" +XSCTH_PROC_microblaze-plm ??= "psv_pmc_0" +XSCTH_PROC_cortexr5-versal ??= "psv_cortexr5_0" +XSCTH_PROC_cortexa9-zynq ??= "ps7_cortexa9_0" + +# Enable @ flag on dtc which is required by libxil +DTC_FLAGS_append_xilinx-standalone = " -@" +DT_INCLUDE_append_xilinx-standalone = " ${WORKDIR}/git/device_tree/data/kernel_dtsi/${XILINX_RELEASE_VERSION}/include/" + + +do_install_append_zynqmp_xilinx-standalone() { + install -d ${D}${includedir}/devicetree + install -m 0644 ${B}/${PN}/psu_init.c ${D}/${includedir}/devicetree/psu_init.c + install -m 0644 ${B}/${PN}/psu_init.h ${D}/${includedir}/devicetree/psu_init.h +} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-core/meta/gnu-toolchain-canadian.bb b/meta-xilinx/meta-xilinx-standalone/recipes-core/meta/gnu-toolchain-canadian.bb new file mode 100644 index 000000000..ca8885b87 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-core/meta/gnu-toolchain-canadian.bb @@ -0,0 +1,25 @@ +inherit cross-canadian + +SUMMARY = "Links to the various GNU toolchains for use with the Xilinx multilib toolchain" +PN = "gnu-toolchain-canadian-${TARGET_SYS}" +BPN = "gnu-toolchain-canadian" + +LICENSE = "MIT" + +do_install () { + if [ "${TARGET_SYS_MULTILIB_ORIGINAL}" != "" -a "${TARGET_SYS_MULTILIB_ORIGINAL}" != "${TARGET_SYS}" ]; then + mkdir -p ${D}${bindir} + + # Create a link for each item references by the environment files + for each in gcc g++ as ld gdb strip ranlib objcopy objdump readelf ar nm ; do + ln -s ../${TARGET_SYS_MULTILIB_ORIGINAL}/${TARGET_SYS_MULTILIB_ORIGINAL}-${each} ${D}${bindir}/${TARGET_SYS}-$each + done + fi +} + +INHIBIT_DEFAULT_DEPS = "1" + +ALLOW_EMPTY_${PN} = "1" +FILES_${PN} = "${bindir}" + +PACKAGES = "${PN}" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-core/meta/meta-toolchain.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-core/meta/meta-toolchain.bbappend new file mode 100644 index 000000000..51b700357 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-core/meta/meta-toolchain.bbappend @@ -0,0 +1,3 @@ +COMPATIBLE_HOST = "${HOST_SYS}" + +TOOLCHAIN_TARGET_TASK_xilinx-standalone = "${@multilib_pkg_extend(d, 'packagegroup-newlib-standalone-sdk-target')}" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-core/newlib/libgloss_3.1.0.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-core/newlib/libgloss_3.1.0.bbappend new file mode 100644 index 000000000..b2245022e --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-core/newlib/libgloss_3.1.0.bbappend @@ -0,0 +1,13 @@ +COMPATIBLE_HOST = ".*-elf" +COMPATIBLE_HOST_arm = "[^-]*-[^-]*-eabi" + +# When building multiple, we need to depend on the multilib newlib +DEPENDS_append_xilinx-standalone = " ${MLPREFIX}newlib" + +EXTRA_OECONF_append_xilinx-standalone = " \ + --enable-newlib-io-c99-formats \ + --enable-newlib-io-long-long \ + --enable-newlib-io-float \ + --enable-newlib-io-long-double \ + --disable-newlib-supplied-syscalls \ +" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-core/newlib/newlib_3.1.0.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-core/newlib/newlib_3.1.0.bbappend new file mode 100644 index 000000000..536a23a1a --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-core/newlib/newlib_3.1.0.bbappend @@ -0,0 +1,21 @@ +COMPATIBLE_HOST = ".*-elf" +COMPATIBLE_HOST_arm = "[^-]*-[^-]*-eabi" + +EXTRA_OECONF_append_xilinx-standalone = " \ + --enable-newlib-io-c99-formats \ + --enable-newlib-io-long-long \ + --enable-newlib-io-float \ + --enable-newlib-io-long-double \ + --disable-newlib-supplied-syscalls \ +" + +# Avoid trimmping CCARGS from CC by newlib configure +do_configure_prepend_xilinx-standalone(){ + export CC_FOR_TARGET="${CC}" +} + +# Fix for multilib newlib installations +do_install_prepend_xilinx-standalone() { + mkdir -p $(dirname ${D}${libdir}) + mkdir -p $(dirname ${D}${includedir}) +} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend new file mode 100644 index 000000000..456ec6c1c --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend @@ -0,0 +1,14 @@ +# Avoid installing all of the alternative toolchains +# due to multilib enabled in the primary toolchain. + +# Create the links to the multilib toolchain components +GNUTCLINKS = "gnu-toolchain-canadian-${TARGET_SYS}" + +# Without the := the eval during do_package is occasionally missing multilibs +RDEPENDS_${PN}_xilinx-standalone := " \ + ${@all_multilib_tune_values(d, 'GNUTCLINKS')} \ + ${BINUTILS} \ + ${GCC} \ + ${GDB} \ + meta-environment-${MACHINE} \ +" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-newlib-standalone-sdk-target.bb b/meta-xilinx/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-newlib-standalone-sdk-target.bb new file mode 100644 index 000000000..b64554d35 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-core/packagegroups/packagegroup-newlib-standalone-sdk-target.bb @@ -0,0 +1,13 @@ +COMPATIBLE_HOST = "${HOST_SYS}" + +SUMMARY = "Target packages for the standalone SDK" + +PACKAGE_ARCH = "${TUNE_PKGARCH}" + +inherit packagegroup + +RDEPENDS_${PN} = "\ + libgcc-dev \ + libstdc++-dev \ + ${LIBC_DEPENDENCIES} \ + " diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-cross-canadian_%.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-cross-canadian_%.bbappend new file mode 100644 index 000000000..5ba6039bd --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-cross-canadian_%.bbappend @@ -0,0 +1 @@ +require binutils-xilinx-standalone.inc diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-cross_%.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-cross_%.bbappend new file mode 100644 index 000000000..5ba6039bd --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-cross_%.bbappend @@ -0,0 +1 @@ +require binutils-xilinx-standalone.inc diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-xilinx-standalone.inc b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-xilinx-standalone.inc new file mode 100644 index 000000000..ac5697362 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/binutils/binutils-xilinx-standalone.inc @@ -0,0 +1,19 @@ +LDGOLD_xilinx-standalone = "" +LDGOLD_ALTS_xilinx-standalone = "" + +EXTRA_OECONF_append_xilinx-standalone = " \ + --disable-gprof \ + --disable-shared \ + --enable-lto \ + --enable-static \ + --enable-multilib \ +" + +# CortexR5 and 32-bit arm are both "arm" +EXTRA_OECONF_append_xilinx-standalone_arm = " \ + --enable-interwork \ +" + +EXTRA_OECONF_append_xilinx-standalone_microblaze = " \ + --disable-initfini-array \ +" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-9/additional-microblaze-multilibs.patch b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-9/additional-microblaze-multilibs.patch new file mode 100644 index 000000000..3d520d0f9 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-9/additional-microblaze-multilibs.patch @@ -0,0 +1,86 @@ +Change the multilib settings to match the expectations of Vitis and related. + +The multilib list is as follows: + +.; +le;@mlittle-endian +bs;@mxl-barrel-shift +p;@mxl-pattern-compare +m;@mno-xl-soft-mul +fpd;@mhard-float +m/fpd;@mno-xl-soft-mul@mhard-float +p/m;@mxl-pattern-compare@mno-xl-soft-mul +p/fpd;@mxl-pattern-compare@mhard-float +p/m/fpd;@mxl-pattern-compare@mno-xl-soft-mul@mhard-float +bs/p;@mxl-barrel-shift@mxl-pattern-compare +bs/m;@mxl-barrel-shift@mno-xl-soft-mul +bs/fpd;@mxl-barrel-shift@mhard-float +bs/m/fpd;@mxl-barrel-shift@mno-xl-soft-mul@mhard-float +bs/p/m;@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul +bs/p/fpd;@mxl-barrel-shift@mxl-pattern-compare@mhard-float +bs/p/m/fpd;@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float +le/m64;@mlittle-endian@m64 +le/bs;@mlittle-endian@mxl-barrel-shift +le/p;@mlittle-endian@mxl-pattern-compare +le/m;@mlittle-endian@mno-xl-soft-mul +le/fpd;@mlittle-endian@mhard-float +le/m/fpd;@mlittle-endian@mno-xl-soft-mul@mhard-float +le/p/m;@mlittle-endian@mxl-pattern-compare@mno-xl-soft-mul +le/p/fpd;@mlittle-endian@mxl-pattern-compare@mhard-float +le/p/m/fpd;@mlittle-endian@mxl-pattern-compare@mno-xl-soft-mul@mhard-float +le/bs/p;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare +le/bs/m;@mlittle-endian@mxl-barrel-shift@mno-xl-soft-mul +le/bs/fpd;@mlittle-endian@mxl-barrel-shift@mhard-float +le/bs/m/fpd;@mlittle-endian@mxl-barrel-shift@mno-xl-soft-mul@mhard-float +le/bs/p/m;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul +le/bs/p/fpd;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mhard-float +le/bs/p/m/fpd;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float +le/m64/bs;@mlittle-endian@m64@mxl-barrel-shift +le/m64/p;@mlittle-endian@m64@mxl-pattern-compare +le/m64/m;@mlittle-endian@m64@mno-xl-soft-mul +le/m64/fpd;@mlittle-endian@m64@mhard-float +le/m64/m/fpd;@mlittle-endian@m64@mno-xl-soft-mul@mhard-float +le/m64/p/m;@mlittle-endian@m64@mxl-pattern-compare@mno-xl-soft-mul +le/m64/p/fpd;@mlittle-endian@m64@mxl-pattern-compare@mhard-float +le/m64/p/m/fpd;@mlittle-endian@m64@mxl-pattern-compare@mno-xl-soft-mul@mhard-float +le/m64/bs/p;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare +le/m64/bs/m;@mlittle-endian@m64@mxl-barrel-shift@mno-xl-soft-mul +le/m64/bs/fpd;@mlittle-endian@m64@mxl-barrel-shift@mhard-float +le/m64/bs/m/fpd;@mlittle-endian@m64@mxl-barrel-shift@mno-xl-soft-mul@mhard-float +le/m64/bs/p/m;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul +le/m64/bs/p/fpd;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mhard-float +le/m64/bs/p/m/fpd;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float + +As part of this the order of the multilibs was changes from upstream to make +it easier to avoid big-endian m64, which is not supported by the toolchain. + +Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> + +Index: gcc-9.2.0/gcc/config/microblaze/t-microblaze +=================================================================== +--- gcc-9.2.0.orig/gcc/config/microblaze/t-microblaze ++++ gcc-9.2.0/gcc/config/microblaze/t-microblaze +@@ -1,17 +1,11 @@ +-MULTILIB_OPTIONS = m64 mxl-barrel-shift mlittle-endian mno-xl-soft-mul mxl-multiply-high +-#MULTILIB_DIRNAMES = m64 bs le m mh +-MULTILIB_DIRNAMES = . . . . . +-MULTILIB_EXCEPTIONS = *m64/mxl-multiply-high mxl-multiply-high +-MULTILIB_EXCEPTIONS += *m64 +-MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift +-MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul +-MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mno-xl-soft-mul +-MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul +-MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mno-xl-soft-mul/mxl-multiply-high +-MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul/mxl-multiply-high ++MULTILIB_OPTIONS = mlittle-endian m64 mxl-barrel-shift mxl-pattern-compare mno-xl-soft-mul mhard-float ++MULTILIB_DIRNAMES = le m64 bs p m fpd ++MULTILIB_EXCEPTIONS = mxl-multiply-high + MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high + MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high +-MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high ++MULTILIB_EXCEPTIONS += *mxl-pattern-compare*/*mxl-multiply-high* ++# Big endian m64 is not supported ++MULTILIB_EXCEPTIONS += m64* + + # Extra files + microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.c \ diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-configure-xilinx-standalone.inc b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-configure-xilinx-standalone.inc new file mode 100644 index 000000000..b9bfe83dd --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-configure-xilinx-standalone.inc @@ -0,0 +1,7 @@ +# Mimic the file gcc-configure-common from the Yocto Project +LINKER_HASH_STYLE_xilinx-standalone = "" +SYMVERS_CONF_xilinx-standalone = "" + +EXTRA_OECONF_append_xilinx-standalone_microblaze = " --disable-initfini_array" + +EXTRA_OECONF_append_xilinx-standalone_microblaze = " --disable-__cxa_atexit" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend new file mode 100644 index 000000000..152348486 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend @@ -0,0 +1,20 @@ +require gcc-configure-xilinx-standalone.inc +require gcc-xilinx-standalone.inc + +# We want to use the stock multilib configs, when available +EXTRACONFFUNCS_xilinx-standalone = "" + +EXTRA_OECONF_append_xilinx-standalone = " \ + --enable-multilib \ +" + +# Temporary hack to build gcc cross canadian for tclibc-newlib as --with-sysroot=/not/exist +# has been removed from TARGET_OS for elf and eabi in gcc-cross-canadian.inc + +python() { + if 'xilinx-standalone' in d.getVar("DISTROOVERRIDES").split(':'): + extraoeconfgcc = d.getVar('EXTRA_OECONF') + extraoeconfgcc += " --with-sysroot=/not/exist" + d.delVar('EXTRA_OECONF') + d.setVar('EXTRA_OECONF', extraoeconfgcc) +} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend new file mode 100644 index 000000000..22a3e3a9b --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-cross_%.bbappend @@ -0,0 +1,6 @@ +require gcc-configure-xilinx-standalone.inc +require gcc-xilinx-standalone.inc + +# We want to use the stock multilib configs, when available +EXTRACONFFUNCS_xilinx-standalone = "" + diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend new file mode 100644 index 000000000..7057a0576 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend @@ -0,0 +1,74 @@ +require gcc-configure-xilinx-standalone.inc + +COMPATIBLE_HOST = "${HOST_SYS}" + +EXTRA_OECONF_append_xilinx-standalone_class-target = " \ + --disable-libstdcxx-pch \ + --with-newlib \ + --disable-threads \ + --enable-plugins \ + --with-gnu-as \ + --disable-libitm \ +" + +EXTRA_OECONF_append_xilinx-standalone_aarch64_class-target = " \ + --disable-multiarch \ + --with-arch=armv8-a \ + " + +# Both arm and armrm overrides are set w/ cortex r5 +# So only set rmprofile if armrm is defined. +ARM_PROFILE = "aprofile" +ARM_PROFILE_armrm = "rmprofile" + +EXTRA_OECONF_append_xilinx-standalone_arm_class-target = " \ + --with-multilib-list=${ARM_PROFILE} \ + " + +EXTRA_OECONF_append_xilinx-standalone_armrm_class-target = " \ + --disable-tls \ + --disable-decimal-float \ + " + +EXTRA_OECONF_append_xilinx-standalone_microblaze_class-target = " \ + --enable-target-optspace \ + --without-long-double-128 \ + " + +# Changes local to gcc-runtime... + +# Dont build libitm, etc. +RUNTIMETARGET_xilinx-standalone_class-target = "libstdc++-v3" + +do_install_append_xilinx-standalone_class-target() { + # Fixup what gcc-runtime normally would do, we don't want linux directories! + rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux + + # The multilibs have different headers, so stop combining them! + if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then + rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} + fi + + # link the C++ header into the place that multilib gcc expects + # C++ compiler looks at usr/include/c++/version/canonical-arch/mlib + if [ "${TARGET_SYS_MULTILIB_ORIGINAL}" != "" -a "${TARGET_SYS_MULTILIB_ORIGINAL}" != "${TARGET_SYS}" ]; then + mlib=${BASE_LIB_tune-${DEFAULTTUNE}} + mlib=${mlib##lib/} + + link_name=${D}${includedir}/c++/${BINV}/${TARGET_SYS_MULTILIB_ORIGINAL}/${mlib} + target=${D}${includedir}/c++/${BINV}/${TARGET_SYS} + + echo mkdir -p $link_name + mkdir -p $link_name + for each in bits ext ; do + relpath=$(python3 -c "import os.path; print(os.path.relpath('$target/$each', '$(dirname $link_name/$each)'))") + + echo ln -s $relpath $link_name/$each + ln -s $relpath $link_name/$each + done + fi +} + +FILES_${PN}-dbg_append_xilinx-standalone_class-target = "\ + ${libdir}/libstdc++.a-gdb.py \ +" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_9.%.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_9.%.bbappend new file mode 100644 index 000000000..6a4a8c5a3 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_9.%.bbappend @@ -0,0 +1,7 @@ +COMPATIBLE_HOST = "${HOST_SYS}" + +# Add MicroBlaze Patches (only when using MicroBlaze) +FILESEXTRAPATHS_append_microblaze_xilinx-standalone := ":${THISDIR}/gcc-9" +SRC_URI_append_microblaze_xilinx-standalone = " \ + file://additional-microblaze-multilibs.patch \ +" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc new file mode 100644 index 000000000..29f67aff2 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc @@ -0,0 +1,31 @@ +EXTRA_OECONF_append_xilinx-standalone = " \ + --disable-libstdcxx-pch \ + --with-newlib \ + --disable-threads \ + --enable-plugins \ + --with-gnu-as \ + --disable-libitm \ +" + +EXTRA_OECONF_append_xilinx-standalone_aarch64 = " \ + --disable-multiarch \ + --with-arch=armv8-a \ + " + +# Both arm and armrm overrides are set w/ cortex r5 +# So only set rmprofile if armrm is defined. +ARM_PROFILE = "aprofile" +ARM_PROFILE_armrm = "rmprofile" +EXTRA_OECONF_append_xilinx-standalone_arm = " \ + --with-multilib-list=${ARM_PROFILE} \ + " + +EXTRA_OECONF_append_xilinx-standalone_armrm = " \ + --disable-tls \ + --disable-decimal-float \ + " + +EXTRA_OECONF_append_xilinx-standalone_microblaze = " \ + --enable-target-optspace \ + --without-long-double-128 \ + " diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend new file mode 100644 index 000000000..e80b0b79f --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend @@ -0,0 +1,26 @@ +require gcc-configure-xilinx-standalone.inc + +COMPATIBLE_HOST = "${HOST_SYS}" + +python do_multilib_install_xilinx-standalone_class-target () { + pass +} + +standalone_fixup () { + ( + cd ${D}${libdir} + for each in ${TARGET_SYS}/*/* ; do + ln -s $each $(basename $each) + done + ) +} + +FIXUP_FUNCTION = "" +FIXUP_FUNCTION_xilinx-standalone_class-target = " standalone_fixup" + +do_install[postfuncs] .= "${FIXUP_FUNCTION}" + +FILES_${PN}-dev_append_xilinx-standalone_class-target = " \ + ${libdir}/*.a \ + ${libdir}/*.o \ +" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert-head.sh b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert-head.sh new file mode 100755 index 000000000..b59dff1e0 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert-head.sh @@ -0,0 +1,16 @@ +#! /bin/bash + +# Call using: +#../microblaze/sysroots/x86_64-oesdk-linux/usr/bin/microblaze-xilinx-elf/microblaze-xilinx-elf-gcc -print-multi-lib | mb-convert-head.sh + +# Then copy the output into the special microblaze-tc BSP + +sed -e 's,;, ,' | + while read mlib args ; do + if [ $mlib = '.' ]; then + continue + fi + multilib="libmb$(echo $mlib | sed -e 's,/,,g')" + + echo 'MULTILIBS += "multilib:'${multilib}'"' + done diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert.sh b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert.sh new file mode 100755 index 000000000..e05145ec4 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/gcc/mb-convert.sh @@ -0,0 +1,60 @@ +#! /bin/bash + +# Call using: +#../microblaze/sysroots/x86_64-oesdk-linux/usr/bin/microblaze-xilinx-elf/microblaze-xilinx-elf-gcc -print-multi-lib | mb-convert.sh + +# Then copy the output into the special microblaze-tc BSP + +mlib_to_feature() { + feature_base="microblaze" + feature_endian=" bigendian" + feature_barrel="" + feature_pattern="" + feature_multiply="" + feature_multiplyhigh="" + feature_sixtyfour="" + feature_math="" + while read feature ; do + case $feature in + le) feature_endian="";; + bs) feature_barrel=" barrel-shift";; + p) feature_pattern=" pattern-compare";; + m) if [ -z ${feature_multiplyhigh} ]; then feature_multiply=" multiply-low" ; fi ;; + mh) feature_multiply="" ; feature_multiplyhigh=" multiply-high";; + m64) feature_sixtyfour=" 64-bit";; + fpd) feature_math=" fpu-hard";; + *) echo "UNKNOWN $feature";; + esac + done + echo "${feature_base}${feature_sixtyfour}${feature_endian}${feature_barrel}${feature_pattern}${feature_multiply}${feature_multiplyhigh}${feature_math}" +} + +sed -e 's,;, ,' | + while read mlib args ; do + if [ $mlib = '.' ]; then + echo '# Base configuration' + echo '# CFLAGS:' + echo 'DEFAULTTUNE = "microblaze"' + echo + echo 'AVAILTUNES += "microblaze"' + echo 'BASE_LIB_tune-microblaze = "lib"' + echo 'TUNE_FEATURES_tune-microblaze = "microblaze bigendian"' + echo 'PACKAGE_EXTRA_ARCHS_tune-microblaze = "${TUNE_PKGARCH}"' + continue + fi + + cflags=$(echo $args | sed -e 's,@, -,g') + multilib="libmb$(echo $mlib | sed -e 's,/,,g')" + tune="microblaze$(echo $mlib | sed -e 's,m64,64,' -e 's,/,,g')" + features=$(echo $mlib | sed -e 's,/, ,g' | xargs -n 1 echo | mlib_to_feature) + echo + echo + echo "# $mlib" + echo "# CFLAGS:${cflags}" + echo "DEFAULTTUNE_virtclass-multilib-$multilib = \"$tune\"" + echo + echo "AVAILTUNES += \"$tune\"" + echo "BASE_LIB_tune-$tune = \"lib/$mlib\"" + echo "TUNE_FEATURES_tune-$tune = \"${features}\"" + echo "PACKAGE_EXTRA_ARCHS_tune-$tune = \"\${TUNE_PKGARCH}\"" + done diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-devtools/qemu/qemuwrapper-cross_1.0.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/qemu/qemuwrapper-cross_1.0.bbappend new file mode 100644 index 000000000..0d8243241 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-devtools/qemu/qemuwrapper-cross_1.0.bbappend @@ -0,0 +1 @@ +COMPATIBLE_HOST = "${HOST_SYS}" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axicdma_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axicdma_git.bb new file mode 100644 index 000000000..442ffb7b3 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axicdma_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axicdma/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axidma_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axidma_git.bb new file mode 100644 index 000000000..05f4c342b --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axidma_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axidma/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axiethernet_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axiethernet_git.bb new file mode 100644 index 000000000..1dc83406f --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axiethernet_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axiethernet/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axivdma_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axivdma_git.bb new file mode 100644 index 000000000..415cb9b4b --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/axivdma_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axivdma/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/can_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/can_git.bb new file mode 100644 index 000000000..3f688c3b3 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/can_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/can/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/canfd_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/canfd_git.bb new file mode 100644 index 000000000..36fa367ba --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/canfd_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/canfd/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/canps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/canps_git.bb new file mode 100644 index 000000000..ab6f6478f --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/canps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/canps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/clockps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/clockps_git.bb new file mode 100644 index 000000000..b0bb1ccb9 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/clockps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clockps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/csudma_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/csudma_git.bb new file mode 100644 index 000000000..f505a8af3 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/csudma_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/csudma/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/devcfg_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/devcfg_git.bb new file mode 100644 index 000000000..044144655 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/devcfg_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/devcfg/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/dmaps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/dmaps_git.bb new file mode 100644 index 000000000..0891fb86a --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/dmaps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dmaps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/emaclite_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/emaclite_git.bb new file mode 100644 index 000000000..927bc93be --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/emaclite_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/emaclite/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/emacps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/emacps_git.bb new file mode 100644 index 000000000..530087a49 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/emacps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/emacps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/gpio_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/gpio_git.bb new file mode 100644 index 000000000..8302d66d3 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/gpio_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/gpio/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/gpiops_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/gpiops_git.bb new file mode 100644 index 000000000..9ece49a95 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/gpiops_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/gpiops/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ipipsu_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ipipsu_git.bb new file mode 100644 index 000000000..83a107eb1 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ipipsu_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ipipsu/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/llfifo_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/llfifo_git.bb new file mode 100644 index 000000000..dbc1945fe --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/llfifo_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/llfifo/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mbox_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mbox_git.bb new file mode 100644 index 000000000..085a459eb --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mbox_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mbox/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mcdma_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mcdma_git.bb new file mode 100644 index 000000000..4b45d0037 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mcdma_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mcdma/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mutex_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mutex_git.bb new file mode 100644 index 000000000..6a7b39b4c --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/mutex_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mutex/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/nandpsu_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/nandpsu_git.bb new file mode 100644 index 000000000..8fd7251b0 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/nandpsu_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/nandpsu/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ospipsv_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ospipsv_git.bb new file mode 100644 index 000000000..b98f9b517 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ospipsv_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ospipsv/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/qspips_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/qspips_git.bb new file mode 100644 index 000000000..1f0a12409 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/qspips_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/qspips/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/qspipsu_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/qspipsu_git.bb new file mode 100644 index 000000000..f1c97e972 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/qspipsu_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/qspipsu/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/resetps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/resetps_git.bb new file mode 100644 index 000000000..51e4eaad6 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/resetps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/resetps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/rtcpsu_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/rtcpsu_git.bb new file mode 100644 index 000000000..19f17f731 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/rtcpsu_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/rtcpsu/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/scugic_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/scugic_git.bb new file mode 100644 index 000000000..f20c82411 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/scugic_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/scugic/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/sdps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/sdps_git.bb new file mode 100644 index 000000000..cba4543cd --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/sdps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sdps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/spips_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/spips_git.bb new file mode 100644 index 000000000..d1395a1e1 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/spips_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/spips/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/sysmon_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/sysmon_git.bb new file mode 100644 index 000000000..cc10bbc1e --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/sysmon_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sysmon/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/tmrctr_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/tmrctr_git.bb new file mode 100644 index 000000000..2e675fb7f --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/tmrctr_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/tmrctr/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ttcps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ttcps_git.bb new file mode 100644 index 000000000..72a215665 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/ttcps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ttcps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/uartlite_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/uartlite_git.bb new file mode 100644 index 000000000..0f6d688ff --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/uartlite_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartlite/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/uartps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/uartps_git.bb new file mode 100644 index 000000000..e898f011c --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/uartps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/usbpsu_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/usbpsu_git.bb new file mode 100644 index 000000000..976453758 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/usbpsu_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/usbpsu/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/wdtps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/wdtps_git.bb new file mode 100644 index 000000000..de70d5fce --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/wdtps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/wdtps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/xadcps_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/xadcps_git.bb new file mode 100644 index 000000000..2e6075213 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/xadcps_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/xadcps/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/xxvethernet_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/xxvethernet_git.bb new file mode 100644 index 000000000..66e6bcd62 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/xxvethernet_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/xxvethernet/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-drivers/zdma_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/zdma_git.bb new file mode 100644 index 000000000..584a1b204 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-drivers/zdma_git.bb @@ -0,0 +1,3 @@ +inherit esw_examples + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/zdma/examples/" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-kernel/linux/linux-dummy.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-kernel/linux/linux-dummy.bbappend new file mode 100644 index 000000000..0d8243241 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-kernel/linux/linux-dummy.bbappend @@ -0,0 +1 @@ +COMPATIBLE_HOST = "${HOST_SYS}" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/freertos10-xilinx_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/freertos10-xilinx_git.bb new file mode 100644 index 000000000..870524d20 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/freertos10-xilinx_git.bb @@ -0,0 +1,12 @@ +inherit esw python3native + +ESW_COMPONENT_SRC = "/ThirdParty/bsp/freertos10_xilinx/src/" +ESW_COMPONENT_NAME = "libfreertos.a" + +DEPENDS += "libxil xilstandalone xilmem dtc-native python3-pyyaml-native python3-dtc-native xiltimer" + +do_configure_prepend() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/libxil_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/libxil_git.bb new file mode 100644 index 000000000..4ac7c1150 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/libxil_git.bb @@ -0,0 +1,27 @@ +inherit esw python3native + +ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/" +ESW_COMPONENT_NAME = "libxil.a" + +DEPENDS += "dtc-native python3-dtc-native python3-pyyaml-native xilstandalone xilmem device-tree" + +do_configure_prepend() { + # This will generate CMakeLists.txt which contains + # drivers for the libxil + cd ${S} + #TODO + # This call was initially used to get the list of drivers and libraries required + # by the design to the build system to use as dependencies to the application + # being built, at this point this is all done in a single cmake build bundling + # everything in libxil, which is undesired. + DRIVERS_LIST=$(nativepython3 ${S}/scripts/getdrvlist.py -d ${DTBFILE}) +} + +do_generate_driver_data() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/generate_drvdata.py -d ${DTBFILE} +} + +addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot +do_prepare_recipe_sysroot[rdeptask] = "do_unpack" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/lwip_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/lwip_git.bb new file mode 100644 index 000000000..7e31b32e8 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/lwip_git.bb @@ -0,0 +1,23 @@ +inherit esw python3native + +ESW_COMPONENT_SRC = "/ThirdParty/sw_services/lwip211/src/" +ESW_COMPONENT_NAME = "liblwip211.a" + +DEPENDS += "dtc-native python3-dtc-native libxil python3-pyyaml-native" +DEPENDS_append_xilinx-freertos = "freertos10-xilinx" + +do_configure_prepend() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} + +do_install() { + install -d ${D}${libdir} + install -d ${D}${includedir} + install -m 0755 ${B}/${ESW_COMPONENT_NAME} ${D}${libdir} + install -m 0644 ${B}/include/*.h ${D}${includedir} + cp -r ${B}/include/arch/ ${D}${includedir} + cp -r ${B}/include/include/lwip/ ${D}${includedir} + cp -r ${B}/include/include/netif/ ${D}${includedir} +} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilffs_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilffs_git.bb new file mode 100644 index 000000000..fdfbb7cff --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilffs_git.bb @@ -0,0 +1,10 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilffs/src/" +ESW_COMPONENT_NAME = "libxilffs.a" + +EXTRA_OECMAKE += "-DXILFFS_use_mkfs=OFF" +EXTRA_OECMAKE += "-DXILFFS_read_only=ON" +EXTRA_OECMAKE += "-DXILFFS_word_access=OFF" + +DEPENDS += "xilstandalone libxil" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilfpga_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilfpga_git.bb new file mode 100644 index 000000000..41405fdfb --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilfpga_git.bb @@ -0,0 +1,7 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilfpga/src/" +ESW_COMPONENT_NAME = "libxilfpga.a" + +DEPENDS += " libxil xilsecure" + diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilloader_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilloader_git.bb new file mode 100644 index 000000000..682908adb --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilloader_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilloader/src/" +ESW_COMPONENT_NAME = "libxilloader.a" + +DEPENDS += "xilstandalone libxil xilpm xilpdi xilffs xilsecure xilpuf" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilmailbox_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilmailbox_git.bb new file mode 100644 index 000000000..ff61d95d3 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilmailbox_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilmailbox/src/" +ESW_COMPONENT_NAME = "libxilmailbox.a" + +DEPENDS += "xilstandalone libxil" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilmem_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilmem_git.bb new file mode 100644 index 000000000..de9425408 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilmem_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilmem/src/" +ESW_COMPONENT_NAME = "libxilmem.a" + +DEPENDS += "xilstandalone" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpdi_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpdi_git.bb new file mode 100644 index 000000000..c008b0698 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpdi_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilpdi/src/" +ESW_COMPONENT_NAME = "libxilpdi.a" + +DEPENDS += "xilstandalone libxil" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilplmi_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilplmi_git.bb new file mode 100644 index 000000000..e866e98f9 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilplmi_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilplmi/src/" +ESW_COMPONENT_NAME = "libxilplmi.a" + +DEPENDS += "xilstandalone libxil" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpm_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpm_git.bb new file mode 100644 index 000000000..80132c90c --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpm_git.bb @@ -0,0 +1,7 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilpm/src/" +ESW_COMPONENT_NAME = "libxilpm.a" + +DEPENDS = "libxil" +DEPENDS_microblaze-plm_append = "xilplmi" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpuf_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpuf_git.bb new file mode 100644 index 000000000..31f06288b --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilpuf_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/src/" +ESW_COMPONENT_NAME = "libxilpuf.a" + +DEPENDS += "libxil" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilsecure_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilsecure_git.bb new file mode 100644 index 000000000..0ad555105 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilsecure_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/src/" +ESW_COMPONENT_NAME = "libxilsecure.a" + +DEPENDS += "libxil" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilsem_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilsem_git.bb new file mode 100644 index 000000000..3631d7f0f --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilsem_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilsem/src/" +ESW_COMPONENT_NAME = "libxilsem.a" + +DEPENDS += "xilstandalone libxil" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilskey_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilskey_git.bb new file mode 100644 index 000000000..847825546 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilskey_git.bb @@ -0,0 +1,6 @@ +inherit esw + +ESW_COMPONENT_SRC = "/lib/sw_services/xilskey/src/" +ESW_COMPONENT_NAME = "libxilskey.a" + +DEPENDS += "libxil" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilstandalone_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilstandalone_git.bb new file mode 100644 index 000000000..a4a393c37 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xilstandalone_git.bb @@ -0,0 +1,12 @@ +inherit esw python3native + +ESW_COMPONENT_SRC = "/lib/bsp/standalone/src/" +ESW_COMPONENT_NAME = "libxilstandalone.a" + +DEPENDS += "dtc-native python3-dtc-native python3-pyyaml-native libgloss device-tree" + +do_configure_prepend() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/generate_libdata.py -d ${DTBFILE} +} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xiltimer_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xiltimer_git.bb new file mode 100644 index 000000000..428fa6869 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-libraries/xiltimer_git.bb @@ -0,0 +1,12 @@ +inherit esw python3native + +ESW_COMPONENT_SRC = "/lib/sw_services/xiltimer/src/" +ESW_COMPONENT_NAME = "libxiltimer.a" + +DEPENDS += "dtc-native python3-dtc-native python3-pyyaml-native libxil device-tree" + +do_configure_prepend() { + # This script should also not rely on relative paths and such + cd ${S} + nativepython3 ${S}/scripts/lib_parser.py -d ${DTBFILE} -o ${OECMAKE_SOURCEPATH} +} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/gcc/gcc-cross_%.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/gcc/gcc-cross_%.bbappend deleted file mode 100644 index bfcda3d0d..000000000 --- a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/gcc/gcc-cross_%.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -# By using tclibc-baremetal we loose sysroot functionality due to some -# append/override behavior We need to get that back , the following append -# overrides everything on EXTRA_OECONF for gcc cross target it avoids -# overlapping with crt0 because of --enable-linker-id from EXTRA_OECONF - -EXTRA_OECONF_BASE_pn-gcc-cross-${TARGET_ARCH}_append = " \ - ${LTO} \ - ${SSP} \ - --enable-libitm \ - --disable-bootstrap \ - --disable-libmudflap \ - --with-system-zlib \ - --with-ppl=no \ - --with-cloog=no \ - --enable-checking=release \ - --enable-cheaders=c_global \ - --without-isl \ -" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/newlib/libgloss_3.0.0.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/newlib/libgloss_3.0.0.bbappend deleted file mode 100644 index fc4db8840..000000000 --- a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/newlib/libgloss_3.0.0.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -do_configure_prepend_microblaze() { - # hack for microblaze, which needs xilinx.ld to literally do any linking (its hard coded in its LINK_SPEC) - export CC="${CC} -L${S}/libgloss/microblaze" -} - - -# We use libgloss as if it was libxil, to avoid linking issues -do_install_append_zynqmp-pmu(){ - cp ${D}/${libdir}/libgloss.a ${D}/${libdir}/libxil.a -} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/newlib/newlib_3.0.0.bbappend b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/newlib/newlib_3.0.0.bbappend deleted file mode 100644 index e5249ab0d..000000000 --- a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/newlib/newlib_3.0.0.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -do_configure_prepend_microblaze() { - # hack for microblaze, which needs xilinx.ld to literally do any linking (its hard coded in its LINK_SPEC) - export CC="${CC} -L${S}/libgloss/microblaze" -} diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/plm/plm-standalone_git.bb b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/plm/plm-standalone_git.bb new file mode 100644 index 000000000..25988eb9e --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/plm/plm-standalone_git.bb @@ -0,0 +1,32 @@ +inherit esw deploy + +ESW_COMPONENT_SRC = "/lib/sw_apps/versal_plm/src/" + +DEPENDS += "xilstandalone xiltimer xilffs xilpdi xilplmi xilloader xilpm xilsecure xilsem" + +do_install() { + install -d ${D}/${base_libdir}/firmware + # Note that we have to make the ELF executable for it to be stripped + install -m 0755 ${B}/versal_plm* ${D}/${base_libdir}/firmware +} + +PLM_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +PLM_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + + # Not a huge fan of deploying from package but we want the stripped elf to be deployed. + # We could, technically create another task that runs after do_install that strips it but it + # seems unnecessarily convoluted, unless there's an objection on performing do_install we + # should do it this way since it easier to keep up with changes in oe-core. + + install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/versal_plm.elf ${DEPLOYDIR}/${PLM_FIRMWARE_BASE_NAME}.elf + ln -sf ${PLM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/versal_plm.elf ${WORKDIR}/package/${base_libdir}/firmware/versal_plm.bin + install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/versal_plm.bin ${DEPLOYDIR}/${PLM_FIRMWARE_BASE_NAME}.bin + ln -sf ${PLM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_package + +FILES_${PN} = "${base_libdir}/firmware/plm*" diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/plm/plm_2020.1.bb b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/plm/plm_2020.1.bb new file mode 100644 index 000000000..c5a68ef17 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/plm/plm_2020.1.bb @@ -0,0 +1,69 @@ +inherit deploy + +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://../../../../license.txt;md5=39ab6ab638f4d1836ba994ec6852de94" + +SRCREV = "e8db5fb118229fdc621e0ec7848641a23bf60998" +PV = "${XILINX_RELEASE_VERSION}+git${SRCPV}" + +SRC_URI = "git://github.com/Xilinx/embeddedsw.git;protocol=https;nobranch=1" + +COMPATIBLE_HOST = "microblaze.*-elf" +COMPATIBLE_MACHINE = "versal-mb" + + +S = "${WORKDIR}/git/lib/sw_apps/versal_plm/src" + +# The makefile does not handle parallelization +PARALLEL_MAKE = "" + +do_configure() { + # manually do the copy_bsp step first, so as to be able to fix up use of + # mb-* commands + ${S}/../misc/copy_bsp.sh +} + +COMPILER = "${CC}" +COMPILER_FLAGS = "-O2 -c" +EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra -Os -flto -ffat-lto-objects" +ARCHIVER = "${AR}" + +BSP_DIR ?= "${S}/../misc/versal_plm_bsp" +BSP_TARGETS_DIR ?= "${BSP_DIR}/psv_pmc_0/libsrc" + +def bsp_make_vars(d): + s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", "ARCHIVER", "AR", "AS"] + return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) + +do_compile() { + # the Makefile in ${S}/../misc/Makefile, does not handle CC, AR, AS, etc + # properly. So do its job manually. Preparing the includes first, then libs. + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} + done + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} + done + + # --build-id=none is required due to linker script not defining a location for it. + # Again, recipe-systoot include is necessary + oe_runmake CC="${CC}" CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" +} + +do_install() { + : +} + +PLM_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +PLM_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + install -Dm 0644 ${B}/plm.elf ${DEPLOYDIR}/${PLM_BASE_NAME}.elf + ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${B}/plm.elf ${B}/plm.bin + install -m 0644 ${B}/plm.bin ${DEPLOYDIR}/${PLM_BASE_NAME}.bin + ln -sf ${PLM_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_install + diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2019.1.bb b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2020.1.bb index 030de0540..652241c0a 100644 --- a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2019.1.bb +++ b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/pmu-firmware/pmu-firmware_2020.1.bb @@ -1,18 +1,15 @@ inherit deploy LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://../../../../license.txt;md5=e9b6d01d45faccfbf05d8caea53f0a35" +LIC_FILES_CHKSUM = "file://../../../../license.txt;md5=39ab6ab638f4d1836ba994ec6852de94" -XILINX_RELEASE_VERSION = "v2019.1" -SRCREV = "26c14d9861010a0e3a55c73fb79efdb816eb42ca" +SRCREV = "e8db5fb118229fdc621e0ec7848641a23bf60998" PV = "${XILINX_RELEASE_VERSION}+git${SRCPV}" SRC_URI = "git://github.com/Xilinx/embeddedsw.git;protocol=https;nobranch=1" COMPATIBLE_HOST = "microblaze.*-elf" -COMPATIBLE_MACHINE = "^$" -COMPATIBLE_MACHINE_zynqmp-pmu = "zynqmp-pmu" - +COMPATIBLE_MACHINE = "microblaze-pmu" S = "${WORKDIR}/git/lib/sw_apps/zynqmp_pmufw/src" @@ -56,8 +53,7 @@ do_install() { : } -PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" -PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" +PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" do_deploy() { install -Dm 0644 ${B}/executable.elf ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf @@ -68,4 +64,3 @@ do_deploy() { } addtask deploy before do_build after do_install - diff --git a/meta-xilinx/meta-xilinx-standalone/recipes-standalone/psm-firmware/psm-firmware_2020.1.bb b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/psm-firmware/psm-firmware_2020.1.bb new file mode 100644 index 000000000..cd346b123 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/recipes-standalone/psm-firmware/psm-firmware_2020.1.bb @@ -0,0 +1,69 @@ +inherit deploy + +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://../../../../license.txt;md5=39ab6ab638f4d1836ba994ec6852de94" + +SRCREV = "e8db5fb118229fdc621e0ec7848641a23bf60998" +PV = "${XILINX_RELEASE_VERSION}+git${SRCPV}" + +SRC_URI = "git://github.com/Xilinx/embeddedsw.git;protocol=https;nobranch=1" + +COMPATIBLE_HOST = "microblaze.*-elf" +COMPATIBLE_MACHINE = "versal-mb" + + +S = "${WORKDIR}/git/lib/sw_apps/versal_psmfw/src" + +# The makefile does not handle parallelization +PARALLEL_MAKE = "" + +do_configure() { + # manually do the copy_bsp step first, so as to be able to fix up use of + # mb-* commands + ${S}/../misc/copy_bsp.sh +} + +COMPILER = "${CC}" +COMPILER_FLAGS = "-O2 -c" +EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra -Os -flto -ffat-lto-objects" +ARCHIVER = "${AR}" + +BSP_DIR ?= "${S}/../misc/versal_psmfw_bsp" +BSP_TARGETS_DIR ?= "${BSP_DIR}/psv_psm_0/libsrc" + +def bsp_make_vars(d): + s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", "ARCHIVER", "AR", "AS"] + return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) + +do_compile() { + # the Makefile in ${S}/../misc/Makefile, does not handle CC, AR, AS, etc + # properly. So do its job manually. Preparing the includes first, then libs. + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} + done + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} + done + + # --build-id=none is required due to linker script not defining a location for it. + # Again, recipe-systoot include is necessary + oe_runmake CC="${CC}" CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" +} + +do_install() { + : +} + +PSM_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +PSM_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" + +do_deploy() { + install -Dm 0644 ${B}/psmfw.elf ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf + ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf + ${OBJCOPY} -O binary ${B}/psmfw.elf ${B}/psmfw.bin + install -m 0644 ${B}/psmfw.bin ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.bin + ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin +} + +addtask deploy before do_build after do_install + diff --git a/meta-xilinx/meta-xilinx-standalone/scripts/microblaze_dtb.py b/meta-xilinx/meta-xilinx-standalone/scripts/microblaze_dtb.py new file mode 100644 index 000000000..1c5ed8352 --- /dev/null +++ b/meta-xilinx/meta-xilinx-standalone/scripts/microblaze_dtb.py @@ -0,0 +1,170 @@ +import argparse +import libfdt +import os +import sys + +# Format: FEATURE : (dtb property, condition_operator, condition_value) +# If dtb property is None, then the item is always on +# +# If the condition_operator is None, then enable if it exists for existance +# +# If the condition_operator is '!', and condition_value is None then enable if +# if is not defined +# +# Otherwise 'condition' and value are evaluated by type. +# +# If the condition is = then any value of condition_values will set it +# If the condition is ! then no value of condition_values will set it + +microblaze_tune_features = { + 'microblaze' : (None, None, None), + 'bigendian': ('xlnx,endianness', '!', 1), + '64-bit' : ('xlnx,data-size', '=', 64), + 'barrel-shift': ('xlnx,use-barrel', '=', 1), + 'pattern-compare': ('xlnx,use-pcmp-instr', '=', 1), + 'reorder' : ('xlnx,use-reorder-instr', '!', 0), + 'frequency-optimized': ('xlnx,area-optimized', '=', 2), + 'multiply-low': ('xlnx,use-hw-mul', '=', 1), + 'multiply-high': ('xlnx,use-hw-mul', '=', 2), + 'divide-hard': ('xlnx,use-div', '=', 1), + 'fpu-soft': ('xlnx,use-fpu', '!', [1,2]), + 'fpu-hard': ('xlnx,use-fpu', '=', 1), + 'fpu-hard-extended':('xlnx,use-fpu', '=', 2), +} + +def processProperties(fdt, node): + TUNE_FEATURES = [] + + for feature in microblaze_tune_features: + (property, cop, cvalue) = microblaze_tune_features[feature] + + if not property: + TUNE_FEATURES.append(feature) + + # Special processing to get the version + if feature == "microblaze": + ver = microblazeVersion(fdt, node) + if ver: + TUNE_FEATURES.append(ver) + continue + + prop_value = fdt.getprop( node, property, libfdt.QUIET_NOTFOUND) + + if not prop_value or prop_value == -1: + if cop == '!': + if not cvalue: + TUNE_FEATURES.append(ver) + continue + continue + + # If no operator + if not cop or (cop == '=' and not cvalue): + TUNE_FEATURES.append(feature) + continue + + ctype = type(cvalue) + if ctype == type(list()): + val_list = cvalue + else: + val_list = [ cvalue ] + + result = False + for value in val_list: + ctype = type(value) + if ctype == type(int()): + val = prop_value.as_uint32() + else: + raise TypeError('Unknown type %s' % ctype) + + if value == val: + result = True + break + else: + result = False + + if (cop == '!' and result == False) or \ + (cop == '=' and result == True): + TUNE_FEATURES.append(feature) + + return TUNE_FEATURES + +def microblazeVersion(fdt, node): + version = None + + val = fdt.getprop( node, 'model', libfdt.QUIET_NOTFOUND) + + if val and val != -1: + val = fdt.getprop( node, 'model' ).as_str() + version = val[val.find('microblaze,') + 11:] + + if version.startswith('8'): + # Strip 8.xx.y, to just 8.xx + v = version.split('.') + version = '.'.join(v[0:2]) + + version = 'v' + version + + return version + +def MicroblazeConfig(dtbfile, out): + fdt = libfdt.Fdt(open(dtbfile, mode='rb').read()) + + cpu = -1 + while (True): + cpu = cpu + 1 + try: + node = fdt.path_offset('/cpus/cpu@%d' % cpu) + + try: + prop = fdt.getprop( node, 'compatible' ) + + prop_val = prop[:-1].decode('utf-8').split('\x00') + + microblaze = False + for val in prop_val: + if "microblaze" in val: + microblaze = True + break + + if not microblaze: + continue + + # Construct TUNE_FEATURE here + TUNE_FEATURES = processProperties(fdt, node) + + out.write('AVAILTUNES += "microblaze-cpu%s"\n' % (cpu)) + out.write('TUNE_FEATURES_tune-microblaze-cpu%s = "%s"\n' % (cpu, ' '.join(TUNE_FEATURES))) + out.write('PACKAGE_EXTRA_ARCHS_tune-microblaze-cpu%s = "${TUNE_PKGARCH}"\n' % (cpu)) + + except Exception as e: + sys.stderr.write("Exception looking at properties: %s\n" % e) + + continue + + except Exception as e: + # CPUs SHOULD be consecutive w/o gaps, so no more to search + break + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Generate MicroBlaze TUNE_FEATURES') + + parser.add_argument('-d', '--dtb-file', action='store', + help='DTB file to process') + + parser.add_argument('-o', '--output', action='store', + help='Output file to store TUNE_FEATURE settings') + + args = parser.parse_args() + + if not args.dtb_file: + sys.stderr.write('ERROR: You must specify a DTB_FILE to process.\n') + sys.exit(1) + + outputf = sys.stdout + if args.output: + if os.path.exists(args.output): + sys.stderr.write('ERROR: The output file "%s" exists!\n' % args.output) + sys.exit(1) + outputf = open(args.output, 'w') + + MicroblazeConfig(args.dtb_file, outputf) |