From 1a4b7ee28bf7413af6513fb45ad0d0736048f866 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Sun, 16 Dec 2018 17:11:34 -0800 Subject: reset upstream subtrees to yocto 2.6 Reset the following subtrees on thud HEAD: poky: 87e3a9739d meta-openembedded: 6094ae18c8 meta-security: 31dc4e7532 meta-raspberrypi: a48743dc36 meta-xilinx: c42016e2e6 Also re-apply backports that didn't make it into thud: poky: 17726d0 systemd-systemctl-native: handle Install wildcards meta-openembedded: 4321a5d libtinyxml2: update to 7.0.1 042f0a3 libcereal: Add native and nativesdk classes e23284f libcereal: Allow empty package 030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG 179a1b9 gtest: update to 1.8.1 Squashed OpenBMC subtree compatibility updates: meta-aspeed: Brad Bishop (1): aspeed: add yocto 2.6 compatibility meta-ibm: Brad Bishop (1): ibm: prepare for yocto 2.6 meta-ingrasys: Brad Bishop (1): ingrasys: set layer compatibility to yocto 2.6 meta-openpower: Brad Bishop (1): openpower: set layer compatibility to yocto 2.6 meta-phosphor: Brad Bishop (3): phosphor: set layer compatibility to thud phosphor: libgpg-error: drop patches phosphor: react to fitimage artifact rename Ed Tanous (4): Dropbear: upgrade options for latest upgrade yocto2.6: update openssl options busybox: remove upstream watchdog patch systemd: Rebase CONFIG_CGROUP_BPF patch Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7 Signed-off-by: Brad Bishop --- .../classes/image-wic-utils.bbclass | 51 +++++++++ .../classes/kernel-simpleimage.bbclass | 22 ++++ .../classes/xilinx-testimage.bbclass | 9 ++ .../meta-xilinx-bsp/classes/zynqmp-pmu.bbclass | 122 --------------------- 4 files changed, 82 insertions(+), 122 deletions(-) create mode 100644 meta-xilinx/meta-xilinx-bsp/classes/image-wic-utils.bbclass create mode 100644 meta-xilinx/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass create mode 100644 meta-xilinx/meta-xilinx-bsp/classes/xilinx-testimage.bbclass delete mode 100644 meta-xilinx/meta-xilinx-bsp/classes/zynqmp-pmu.bbclass (limited to 'meta-xilinx/meta-xilinx-bsp/classes') diff --git a/meta-xilinx/meta-xilinx-bsp/classes/image-wic-utils.bbclass b/meta-xilinx/meta-xilinx-bsp/classes/image-wic-utils.bbclass new file mode 100644 index 000000000..6f66d553e --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/classes/image-wic-utils.bbclass @@ -0,0 +1,51 @@ +# Helper/utility functions to work with the IMAGE_BOOT_FILES variable and its +# expected behvaior with regards to the contents of the DEPLOY_DIR_IMAGE. +# +# The use of these functions assume that the deploy directory is populated with +# any dependent files/etc. Such that the recipe using these functions depends +# on the recipe that provides the files being used/queried. + +def boot_files_split_expand(d): + # IMAGE_BOOT_FILES has extra renaming info in the format ';' + for f in (d.getVar("IMAGE_BOOT_FILES") or "").split(" "): + parts = f.split(";", 1) + sources = [parts[0]] + if "*" in parts[0]: + # has glob part + import glob + deployroot = d.getVar("DEPLOY_DIR_IMAGE") + sources = [] + for i in glob.glob(os.path.join(deployroot, parts[0])): + sources.append(os.path.basename(i)) + + # for all sources, yield an entry + for s in sources: + if len(parts) == 2: + yield s, parts[1] + yield s, s + +def boot_files_bitstream(d): + expectedfiles = [("bitstream", True)] + expectedexts = [(".bit", True), (".bin", False)] + # search for bitstream paths, use the renamed file. First matching is used + for source, target in boot_files_split_expand(d): + # skip boot.bin and u-boot.bin, it is not a bitstream + skip = ["boot.bin", "u-boot.bin"] + if source in skip or target in skip: + continue + + for e, t in expectedfiles: + if source == e or target == e: + return target, t + for e, t in expectedexts: + if source.endswith(e) or target.endswith(e): + return target, t + return "", False + +def boot_files_dtb_filepath(d): + dtbs = (d.getVar("IMAGE_BOOT_FILES") or "").split(" ") + for source, target in boot_files_split_expand(d): + if target.endswith(".dtb"): + return target + return "" + diff --git a/meta-xilinx/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass b/meta-xilinx/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass new file mode 100644 index 000000000..be70ffa38 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/classes/kernel-simpleimage.bbclass @@ -0,0 +1,22 @@ +python __anonymous () { + kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split()) + kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split()) + if any(t.startswith("simpleImage.") for t in kerneltypes): + # Enable building of simpleImage + bb.build.addtask('do_prep_simpleimage', 'do_compile', 'do_configure', d) + uarch = d.getVar("UBOOT_ARCH") + if uarch == "microblaze": + d.appendVarFlag('do_prep_simpleimage', 'depends', ' virtual/dtb:do_populate_sysroot') +} + +do_prep_simpleimage[dirs] += "${B}" +do_prep_simpleimage () { + install -d ${B}/arch/${ARCH}/boot/dts + for type in ${KERNEL_IMAGETYPES} ; do + if [[ "${type}" =~ "simpleImage" ]] && [ ${ARCH} = "microblaze" ]; then + ext="${type##*.}" + cp ${RECIPE_SYSROOT}/boot/devicetree/${ext}.dtb ${B}/arch/${ARCH}/boot/dts/ + fi + done +} + diff --git a/meta-xilinx/meta-xilinx-bsp/classes/xilinx-testimage.bbclass b/meta-xilinx/meta-xilinx-bsp/classes/xilinx-testimage.bbclass new file mode 100644 index 000000000..d9086ec04 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/classes/xilinx-testimage.bbclass @@ -0,0 +1,9 @@ +inherit testimage + +HOSTTOOLS += 'ip ping ps scp ssh stty' + +python do_testimage_prepend () { + from oeqa.core.target.qemu import supported_fstypes + supported_fstypes.append('wic.qemu-sd') +} + diff --git a/meta-xilinx/meta-xilinx-bsp/classes/zynqmp-pmu.bbclass b/meta-xilinx/meta-xilinx-bsp/classes/zynqmp-pmu.bbclass deleted file mode 100644 index 714eb96a7..000000000 --- a/meta-xilinx/meta-xilinx-bsp/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 .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 -- cgit v1.2.3