diff options
| author | Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> | 2018-10-08 13:26:07 -0700 |
|---|---|---|
| committer | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2019-01-01 20:03:46 -0800 |
| commit | 911bdde428f4981c2873602873914968d6ea8e32 (patch) | |
| tree | 7b4fc388f643a278644f277d79c7a7f0d305e2cb /meta-xilinx-bsp/classes | |
| parent | ac55f70931bd4218a3517dfaeb48871a53cc6414 (diff) | |
| download | meta-xilinx-911bdde428f4981c2873602873914968d6ea8e32.tar.gz | |
zynqmp-pmu: Remove class that uses a multilib hack to build standalone components
The zynqmp-pmu class was being used to build standalone components (PMU)
for several devices, with the introduction of the meta-xilinx-standalone
layer and the xilinx-standalone distro, this is not necessary anymore.
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Diffstat (limited to 'meta-xilinx-bsp/classes')
| -rw-r--r-- | meta-xilinx-bsp/classes/zynqmp-pmu.bbclass | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/meta-xilinx-bsp/classes/zynqmp-pmu.bbclass b/meta-xilinx-bsp/classes/zynqmp-pmu.bbclass deleted file mode 100644 index 714eb96a..00000000 --- a/meta-xilinx-bsp/classes/zynqmp-pmu.bbclass +++ /dev/null | |||
| @@ -1,122 +0,0 @@ | |||
| 1 | # | ||
| 2 | # This class handles configuring a recipe to build for the ZynqMP PMU | ||
| 3 | # architecture. The reason for this class is due to limitations of multilib | ||
| 4 | # with regards to multiple architectures (which do not work correctly). | ||
| 5 | # | ||
| 6 | # This class is specifically intended to extend the binutils-cross, gcc-cross, | ||
| 7 | # newlib, libgloss and pmu-firmware recipes so that binaries can be emitted | ||
| 8 | # which target the PMU architecture alongside building for the APU architecture | ||
| 9 | # (ARM64). But the class can be applied globally via BBCLASSEXTEND in for | ||
| 10 | # example a <machine>.conf. | ||
| 11 | # | ||
| 12 | # This class is almost the same as a multilib variant with custom TUNE_* setup | ||
| 13 | # to allow for a switched TUNE_ARCH. | ||
| 14 | # | ||
| 15 | |||
| 16 | ORIG_TARGET_ARCH := "${TARGET_ARCH}" | ||
| 17 | |||
| 18 | # zynqmp-pmu target arch (hardcoded based on pre-gen data from arch-microblaze.inc) | ||
| 19 | DEFAULTTUNE = "microblaze" | ||
| 20 | ABIEXTENSION = "" | ||
| 21 | TUNE_ARCH = "microblazeel" | ||
| 22 | #TUNE_FEATURES_tune-microblaze += "v9.2 barrel-shift pattern-compare" | ||
| 23 | TUNE_CCARGS = "-mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mno-xl-reorder -mcpu=v9.2 -mxl-soft-mul -mxl-soft-div" | ||
| 24 | TUNE_LDARGS = "" | ||
| 25 | TUNE_ASARGS = "" | ||
| 26 | TUNE_PKGARCH = "microblazeel-v9.2-bs-cmp" | ||
| 27 | TARGET_OS = "elf" | ||
| 28 | TARGET_FPU = "fpu-soft" | ||
| 29 | |||
| 30 | # rebuild the MACHINE overrides | ||
| 31 | MACHINEOVERRIDES = "${MACHINE}${@':${SOC_FAMILY}' if d.getVar('SOC_FAMILY') else ''}:microblaze" | ||
| 32 | |||
| 33 | # override tune provided archs | ||
| 34 | PACKAGE_EXTRA_ARCHS = "${TUNE_PKGARCH}" | ||
| 35 | |||
| 36 | # baremetal equivalent config (note the tclibc is not included, this is purely | ||
| 37 | # for recipes/etc that check for the value) | ||
| 38 | TCLIBC = "baremetal" | ||
| 39 | LIBCEXTENSION = "" | ||
| 40 | LIBCOVERRIDE = ":libc-baremetal" | ||
| 41 | USE_NLS = "no" | ||
| 42 | IMAGE_LINGUAS = "" | ||
| 43 | LIBC_DEPENDENCIES = "" | ||
| 44 | |||
| 45 | # gcc-cross specific baremetal setup (due to the override order this is important) | ||
| 46 | EXTRA_OECONF_pn-${MLPREFIX}gcc-cross-${TARGET_ARCH}_append = " --without-headers" | ||
| 47 | |||
| 48 | EXTRA_OECONF_GCC_FLOAT = "" | ||
| 49 | |||
| 50 | # Setup a multiarch like prefix. | ||
| 51 | prefix = "/usr/${TARGET_SYS}" | ||
| 52 | # Make sure GCC can search in the prefix dir (for libgcc) | ||
| 53 | TOOLCHAIN_OPTIONS += "-B${RECIPE_SYSROOT}${includedir}/ -B${RECIPE_SYSROOT}${libdir}/" | ||
| 54 | TOOLCHAIN_OPTIONS += "-I =${includedir} -L =${libdir}" | ||
| 55 | |||
| 56 | python multitarget_zynqmp_pmu_virtclass_handler () { | ||
| 57 | variant = "zynqmp-pmu" | ||
| 58 | pn = d.getVar("PN") | ||
| 59 | if not (pn.startswith(variant + "-") or pn.endswith("-" + variant)): | ||
| 60 | return | ||
| 61 | |||
| 62 | if bb.data.inherits_class('native', e.data) or bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data): | ||
| 63 | raise bb.parse.SkipPackage("Can't extend native/nativesdk/crosssdk recipes") | ||
| 64 | |||
| 65 | initialpn = e.data.getVar("PN").replace("-" + variant, "").replace(variant + "-", "") | ||
| 66 | e.data.setVar("MLPREFIX", variant + "-") | ||
| 67 | e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-" + variant) | ||
| 68 | |||
| 69 | # hide multilib variants, this class is not one but this works around recipes thinking it is (due to MLPREFIX). | ||
| 70 | e.data.setVar("MULTILIB_VARIANTS", "") | ||
| 71 | |||
| 72 | # work around for -cross recipes that embed the TARGET_ARCH value | ||
| 73 | if bb.data.inherits_class('cross', e.data): | ||
| 74 | if initialpn.endswith("-" + d.getVar("ORIG_TARGET_ARCH")): | ||
| 75 | initialpn = initialpn.replace("-" + d.getVar("ORIG_TARGET_ARCH"), "-" + d.getVar("TARGET_ARCH")) | ||
| 76 | |||
| 77 | e.data.setVar("PN", variant + "-" + initialpn) | ||
| 78 | } | ||
| 79 | |||
| 80 | addhandler multitarget_zynqmp_pmu_virtclass_handler | ||
| 81 | multitarget_zynqmp_pmu_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise" | ||
| 82 | |||
| 83 | python () { | ||
| 84 | variant = "zynqmp-pmu" | ||
| 85 | pn = d.getVar("PN") | ||
| 86 | if not pn.startswith(variant + "-"): | ||
| 87 | return | ||
| 88 | |||
| 89 | if pn.endswith("gcc-cross-" + d.getVar("TARGET_ARCH")): | ||
| 90 | # work around, DEPENDS _remove being immediate in gcc-cross | ||
| 91 | d.setVar("DEPENDS_remove", "virtual/%slibc-for-gcc" % d.getVar("TARGET_PREFIX")) | ||
| 92 | |||
| 93 | if pn.endswith("libgcc"): | ||
| 94 | # work around, strip depends on libc via do_package* tasks (this class cannot set ASSUME_PROVIDED += libc) | ||
| 95 | for i in ["do_package", "do_package_write_ipk", "do_package_write_deb", "do_package_write_rpm"]: | ||
| 96 | sanitized = " ".join([dep for dep in d.getVarFlag(i, "depends").split() if not dep.startswith("virtual/%s-libc" % variant)]) | ||
| 97 | d.setVarFlag(i, "depends", sanitized) | ||
| 98 | |||
| 99 | import oe.classextend | ||
| 100 | |||
| 101 | clsextend = oe.classextend.ClassExtender(variant, d) | ||
| 102 | |||
| 103 | clsextend.map_depends_variable("DEPENDS") | ||
| 104 | clsextend.map_variable("PROVIDES") | ||
| 105 | |||
| 106 | clsextend.rename_packages() | ||
| 107 | clsextend.rename_package_variables((d.getVar("PACKAGEVARS") or "").split()) | ||
| 108 | |||
| 109 | clsextend.map_packagevars() | ||
| 110 | clsextend.map_regexp_variable("PACKAGES_DYNAMIC") | ||
| 111 | clsextend.map_variable("PACKAGE_INSTALL") | ||
| 112 | } | ||
| 113 | |||
| 114 | # microblaze elf insane definitions not currently in insane.bbclass | ||
| 115 | PACKAGEQA_EXTRA_MACHDEFFUNCS += "package_qa_get_machine_dict_microblazeelf" | ||
| 116 | def package_qa_get_machine_dict_microblazeelf(machdata, d): | ||
| 117 | machdata["elf"] = { | ||
| 118 | "microblaze": (189, 0, 0, False, 32), | ||
| 119 | "microblazeeb":(189, 0, 0, False, 32), | ||
| 120 | "microblazeel":(189, 0, 0, True, 32), | ||
| 121 | } | ||
| 122 | return machdata | ||
