diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/qemuboot-xilinx.bbclass | 27 | ||||
-rw-r--r-- | classes/xilinx-fetch-restricted.bbclass | 35 | ||||
-rw-r--r-- | classes/xilinx-platform-init.bbclass | 14 | ||||
-rw-r--r-- | classes/zynqmp-pmu.bbclass | 122 |
4 files changed, 0 insertions, 198 deletions
diff --git a/classes/qemuboot-xilinx.bbclass b/classes/qemuboot-xilinx.bbclass deleted file mode 100644 index 024626cb..00000000 --- a/classes/qemuboot-xilinx.bbclass +++ /dev/null @@ -1,27 +0,0 @@ - -# enable the overrides for the context of the conf only -OVERRIDES .= ":qemuboot-xilinx" - -# setup the target binary -QB_SYSTEM_NAME_prepend = "qemu-xilinx/" - -# Default machine targets for Xilinx QEMU (FDT Generic) -QB_MACHINE_aarch64 = "-machine arm-generic-fdt" -QB_MACHINE_arm = "-machine arm-generic-fdt-7series" -QB_MACHINE_microblaze = "-machine microblaze-generic-fdt-plnx" - -# defaults -QB_DEFAULT_KERNEL ?= "none" - -inherit qemuboot - -# rewrite the qemuboot with the custom sysroot bindir -python do_write_qemuboot_conf_append() { - val = os.path.join(d.getVar('BASE_WORKDIR'), d.getVar('BUILD_SYS'), 'qemu-xilinx-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/') - cf.set('config_bsp', 'STAGING_BINDIR_NATIVE', '%s' % val) - - # write out the updated version from this append - with open(qemuboot, 'w') as f: - cf.write(f) -} - diff --git a/classes/xilinx-fetch-restricted.bbclass b/classes/xilinx-fetch-restricted.bbclass deleted file mode 100644 index a778ec7d..00000000 --- a/classes/xilinx-fetch-restricted.bbclass +++ /dev/null @@ -1,35 +0,0 @@ -# This class is setup to override the default fetching for the target recipe. -# When fetching it forces PREMIRROR only fetching so that no attempts are made -# to fetch the Xilinx downloads that are restricted to authenticated users only. -# -# The purpose of this class is to allow for automatation with pre-downloaded -# content or content that is available with curated/user defined pre-mirrors -# and or pre-populated downloads/ directories. - -python do_fetch() { - xilinx_restricted_url = "xilinx.com/member/forms/download" - - src_uri = (d.getVar('SRC_URI') or "").split() - if len(src_uri) == 0: - return - - for i in src_uri: - if xilinx_restricted_url in i: - # force the use of premirrors only, do not attempt download from xilinx.com - d.setVar("BB_FETCH_PREMIRRORONLY", "1") - break - - try: - fetcher = bb.fetch2.Fetch(src_uri, d) - fetcher.download() - except bb.fetch2.NetworkAccess as e: - if xilinx_restricted_url in e.url: - # fatal on access to xilinx.com restricted downloads, print the url for manual download - bb.fatal("The following download cannot be fetched automatically. " \ - "Please manually download the file and place it in the 'downloads' directory (or on an available PREMIRROR).\n" \ - " %s" % (e.url.split(";")[0])) - else: - bb.fatal(str(e)) - except bb.fetch2.BBFetchException as e: - bb.fatal(str(e)) -} diff --git a/classes/xilinx-platform-init.bbclass b/classes/xilinx-platform-init.bbclass deleted file mode 100644 index 5d099500..00000000 --- a/classes/xilinx-platform-init.bbclass +++ /dev/null @@ -1,14 +0,0 @@ -# This class should be included by any recipe that wants to access or provide -# the platform init source files which are used to initialize a Zynq or ZynqMP -# SoC. - -# Define the path to the xilinx platform init code/headers -PLATFORM_INIT_DIR ?= "/usr/src/xilinx-platform-init" - -PLATFORM_INIT_STAGE_DIR = "${STAGING_DIR_HOST}${PLATFORM_INIT_DIR}" - -# Target files use for platform init -PLATFORM_INIT_FILES ?= "" -PLATFORM_INIT_FILES_zynq = "ps7_init_gpl.c ps7_init_gpl.h" -PLATFORM_INIT_FILES_zynqmp = "psu_init_gpl.c psu_init_gpl.h" - diff --git a/classes/zynqmp-pmu.bbclass b/classes/zynqmp-pmu.bbclass deleted file mode 100644 index 714eb96a..00000000 --- a/classes/zynqmp-pmu.bbclass +++ /dev/null @@ -1,122 +0,0 @@ -# -# This class handles configuring a recipe to build for the ZynqMP PMU -# architecture. The reason for this class is due to limitations of multilib -# with regards to multiple architectures (which do not work correctly). -# -# This class is specifically intended to extend the binutils-cross, gcc-cross, -# newlib, libgloss and pmu-firmware recipes so that binaries can be emitted -# which target the PMU architecture alongside building for the APU architecture -# (ARM64). But the class can be applied globally via BBCLASSEXTEND in for -# example a <machine>.conf. -# -# This class is almost the same as a multilib variant with custom TUNE_* setup -# to allow for a switched TUNE_ARCH. -# - -ORIG_TARGET_ARCH := "${TARGET_ARCH}" - -# zynqmp-pmu target arch (hardcoded based on pre-gen data from arch-microblaze.inc) -DEFAULTTUNE = "microblaze" -ABIEXTENSION = "" -TUNE_ARCH = "microblazeel" -#TUNE_FEATURES_tune-microblaze += "v9.2 barrel-shift pattern-compare" -TUNE_CCARGS = "-mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mno-xl-reorder -mcpu=v9.2 -mxl-soft-mul -mxl-soft-div" -TUNE_LDARGS = "" -TUNE_ASARGS = "" -TUNE_PKGARCH = "microblazeel-v9.2-bs-cmp" -TARGET_OS = "elf" -TARGET_FPU = "fpu-soft" - -# rebuild the MACHINE overrides -MACHINEOVERRIDES = "${MACHINE}${@':${SOC_FAMILY}' if d.getVar('SOC_FAMILY') else ''}:microblaze" - -# override tune provided archs -PACKAGE_EXTRA_ARCHS = "${TUNE_PKGARCH}" - -# baremetal equivalent config (note the tclibc is not included, this is purely -# for recipes/etc that check for the value) -TCLIBC = "baremetal" -LIBCEXTENSION = "" -LIBCOVERRIDE = ":libc-baremetal" -USE_NLS = "no" -IMAGE_LINGUAS = "" -LIBC_DEPENDENCIES = "" - -# gcc-cross specific baremetal setup (due to the override order this is important) -EXTRA_OECONF_pn-${MLPREFIX}gcc-cross-${TARGET_ARCH}_append = " --without-headers" - -EXTRA_OECONF_GCC_FLOAT = "" - -# Setup a multiarch like prefix. -prefix = "/usr/${TARGET_SYS}" -# Make sure GCC can search in the prefix dir (for libgcc) -TOOLCHAIN_OPTIONS += "-B${RECIPE_SYSROOT}${includedir}/ -B${RECIPE_SYSROOT}${libdir}/" -TOOLCHAIN_OPTIONS += "-I =${includedir} -L =${libdir}" - -python multitarget_zynqmp_pmu_virtclass_handler () { - variant = "zynqmp-pmu" - pn = d.getVar("PN") - if not (pn.startswith(variant + "-") or pn.endswith("-" + variant)): - return - - if bb.data.inherits_class('native', e.data) or bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data): - raise bb.parse.SkipPackage("Can't extend native/nativesdk/crosssdk recipes") - - initialpn = e.data.getVar("PN").replace("-" + variant, "").replace(variant + "-", "") - e.data.setVar("MLPREFIX", variant + "-") - e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-" + variant) - - # hide multilib variants, this class is not one but this works around recipes thinking it is (due to MLPREFIX). - e.data.setVar("MULTILIB_VARIANTS", "") - - # work around for -cross recipes that embed the TARGET_ARCH value - if bb.data.inherits_class('cross', e.data): - if initialpn.endswith("-" + d.getVar("ORIG_TARGET_ARCH")): - initialpn = initialpn.replace("-" + d.getVar("ORIG_TARGET_ARCH"), "-" + d.getVar("TARGET_ARCH")) - - e.data.setVar("PN", variant + "-" + initialpn) -} - -addhandler multitarget_zynqmp_pmu_virtclass_handler -multitarget_zynqmp_pmu_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise" - -python () { - variant = "zynqmp-pmu" - pn = d.getVar("PN") - if not pn.startswith(variant + "-"): - return - - if pn.endswith("gcc-cross-" + d.getVar("TARGET_ARCH")): - # work around, DEPENDS _remove being immediate in gcc-cross - d.setVar("DEPENDS_remove", "virtual/%slibc-for-gcc" % d.getVar("TARGET_PREFIX")) - - if pn.endswith("libgcc"): - # work around, strip depends on libc via do_package* tasks (this class cannot set ASSUME_PROVIDED += libc) - for i in ["do_package", "do_package_write_ipk", "do_package_write_deb", "do_package_write_rpm"]: - sanitized = " ".join([dep for dep in d.getVarFlag(i, "depends").split() if not dep.startswith("virtual/%s-libc" % variant)]) - d.setVarFlag(i, "depends", sanitized) - - import oe.classextend - - clsextend = oe.classextend.ClassExtender(variant, d) - - clsextend.map_depends_variable("DEPENDS") - clsextend.map_variable("PROVIDES") - - clsextend.rename_packages() - clsextend.rename_package_variables((d.getVar("PACKAGEVARS") or "").split()) - - clsextend.map_packagevars() - clsextend.map_regexp_variable("PACKAGES_DYNAMIC") - clsextend.map_variable("PACKAGE_INSTALL") -} - -# microblaze elf insane definitions not currently in insane.bbclass -PACKAGEQA_EXTRA_MACHDEFFUNCS += "package_qa_get_machine_dict_microblazeelf" -def package_qa_get_machine_dict_microblazeelf(machdata, d): - machdata["elf"] = { - "microblaze": (189, 0, 0, False, 32), - "microblazeeb":(189, 0, 0, False, 32), - "microblazeel":(189, 0, 0, True, 32), - } - return machdata |