diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-10-02 22:21:57 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-10-02 22:25:59 +0300 |
commit | 286d45cc649a5b852a27b48e61b51bf75e9d1cee (patch) | |
tree | 90095cb0d2c571fd8de164caf2ca2f2e4d3f7247 /meta-xilinx/meta-xilinx-bsp/conf/machine/include | |
parent | d4b38429f6dec208547bf3d250a0c06f5d0fbcb2 (diff) | |
download | openbmc-286d45cc649a5b852a27b48e61b51bf75e9d1cee.tar.xz |
Add meta-xilinx subtree
Import git://git.yoctoproject.org/meta-xilinx from 5fccc46503 as
meta-xilinx subtree.
Change-Id: I3d59bcf3a57cee588aab7f5cdd0287af66450c8a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/conf/machine/include')
7 files changed, 174 insertions, 0 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-board.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-board.inc new file mode 100644 index 000000000..ba9a36be8 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-board.inc @@ -0,0 +1,6 @@ +# Default Xilinx Board settings + +EXTRA_IMAGEDEPENDS += "virtual/bootloader" + +IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE} ${UBOOT_BINARY}" + diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc new file mode 100644 index 000000000..77fbec884 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc @@ -0,0 +1,42 @@ +# Default Xilinx BSP Machine settings + +MACHINE_FEATURES_BACKFILL_CONSIDERED += "rtc" + +# File System Configuration +IMAGE_FSTYPES ?= "tar.gz cpio cpio.gz.u-boot" + +# Kernel Configuration +XILINX_DEFAULT_KERNEL := "linux-xlnx" +XILINX_DEFAULT_KERNEL_microblaze := "linux-yocto" +XILINX_DEFAULT_KERNEL_zynqmp := "linux-yocto" +PREFERRED_PROVIDER_virtual/kernel ??= "${XILINX_DEFAULT_KERNEL}" + +# U-Boot Configuration +XILINX_DEFAULT_UBOOT := "u-boot-xlnx" +XILINX_DEFAULT_UBOOT_zynqmp := "u-boot" +PREFERRED_PROVIDER_virtual/bootloader ??= "${XILINX_DEFAULT_UBOOT}" +PREFERRED_PROVIDER_virtual/boot-bin ??= "${PREFERRED_PROVIDER_virtual/bootloader}" + +UBOOT_SUFFIX ?= "img" +UBOOT_SUFFIX_zynqmp ?= "bin" +UBOOT_SUFFIX_microblaze ?= "bin" + +UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" +UBOOT_ELF ?= "u-boot" +UBOOT_ELF_aarch64 ?= "u-boot.elf" + +XSERVER ?= " \ + xserver-xorg \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-input-keyboard \ + xf86-video-fbdev \ + ${XSERVER_EXT} \ + " + +XSERVER_EXT ?= "" +XSERVER_EXT_zynqmp ?= "xf86-video-armsoc" + +# For MicroBlaze default all microblaze machines to use GDB 7.7.1 (for gdbserver/gdb) +PREFERRED_VERSION_gdb_microblaze = "7.7.1" + diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-overrides.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-overrides.inc new file mode 100644 index 000000000..30049bc04 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-overrides.inc @@ -0,0 +1,21 @@ +SOC_VARIANT ??= "" +MACHINEOVERRIDES =. "${@['', '${SOC_FAMILY}${SOC_VARIANT}:']['${SOC_VARIANT}' != '']}" + +# Here we can extend overrides for the corresponding family and variant +def get_soc_overrides(fam, var, d): + extender = '' + if (fam == 'zynqmp'): + if (var == 'eg'): + extender = 'mali400:' + elif (var == 'ev'): + extender = 'mali400:vcu:' + return extender + +# Gets OVERRIDES extender depending on the board +SOC_OVERRIDES = "${@get_soc_overrides(d.getVar('SOC_FAMILY'),d.getVar('SOC_VARIANT'), d)}" + +MACHINEOVERRIDES =. "${SOC_OVERRIDES}" + +PACKAGE_EXTRA_ARCHS_append = " ${SOC_FAMILY}" +PACKAGE_EXTRA_ARCHS_append = "${@['', ' ${SOC_FAMILY}${SOC_VARIANT}']['${SOC_VARIANT}' != '']}" + diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc new file mode 100644 index 000000000..dd275f3b4 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc @@ -0,0 +1,49 @@ +# This include is used to setup default QEMU and qemuboot config for meta-xilinx +# machines. + +# depend on qemu-helper-native, which will depend on QEMU +EXTRA_IMAGEDEPENDS += "qemu-helper-native" + +def qemu_default_dtb(d): + if d.getVar("IMAGE_BOOT_FILES", True): + dtbs = d.getVar("IMAGE_BOOT_FILES", True).split(" ") + # IMAGE_BOOT_FILES has extra renaming info in the format '<source>;<target>' + dtbs = [f.split(";")[0] for f in dtbs] + dtbs = [f for f in dtbs if f.endswith(".dtb")] + if len(dtbs) != 0: + return dtbs[0] + if d.getVar("KERNEL_DEVICETREE", True): + dtbs = d.getVar("KERNEL_DEVICETREE", True).split(" ") + dtbs = [os.path.basename(d) for d in dtbs] + if len(dtbs) != 0: + return d.getVar("KERNEL_IMAGETYPE", True) + "-" + dtbs[0] + return "" + +def qemu_default_serial(d): + if d.getVar("SERIAL_CONSOLE", True): + speed, console = d.getVar("SERIAL_CONSOLE", True).split(" ", 1) + # zynqmp uses earlycon and stdout (in dtb) + if "zynqmp" in d.getVar("MACHINEOVERRIDES", True).split(":"): + return "" + return "console=%s,%s earlyprintk" % (console, speed) + return "" + +def qemu_target_binary(d): + ta = d.getVar("TARGET_ARCH", True) + if ta == "microblazeeb": + ta = "microblaze" + elif ta == "arm": + ta = "aarch64" + return "qemu-system-%s" % ta + +def qemu_zynqmp_unhalt(d, multiarch): + if multiarch: + return "-global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true" + return "-device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4 -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4" + +# For qemuboot, default setup across all machines in meta-xilinx +QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" +QB_DEFAULT_FSTYPE ?= "cpio" +QB_DTB ?= "${@qemu_default_dtb(d)}" +QB_KERNEL_CMDLINE_APPEND ?= "${@qemu_default_serial(d)}" + diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynq.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynq.inc new file mode 100644 index 000000000..270e2d937 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynq.inc @@ -0,0 +1,18 @@ +DEFAULTTUNE ?= "cortexa9thf-neon" +SOC_FAMILY ?= "zynq" + +# Available SOC_VARIANT's for zynq: +# 7zs - Zynq-7000 Single A9 Core +# 7z - Zynq-7000 Dual A9 Core + +SOC_VARIANT ?= "7z" + +require conf/machine/include/tune-cortexa9.inc +require conf/machine/include/soc-family.inc + +# Linux Configuration +KERNEL_IMAGETYPE ?= "uImage" + +# Set default load address. +# Override with KERNEL_EXTRA_ARGS_<board> += "..." in machine file if required +KERNEL_EXTRA_ARGS_zynq += "UIMAGE_LOADADDR=0x8000" diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynqmp.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynqmp.inc new file mode 100644 index 000000000..225fa65cf --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynqmp.inc @@ -0,0 +1,18 @@ +DEFAULTTUNE ?= "aarch64" +SOC_FAMILY ?= "zynqmp" + +# Available SOC_VARIANT's for zynqmp: +# "cg" - Zynq UltraScale+ CG Devices +# "eg" - Zynq UltraScale+ EG Devices +# "ev" - Zynq UltraScale+ EV Devices + +SOC_VARIANT ?= "eg" + +require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/soc-family.inc + +# Linux Configuration +KERNEL_IMAGETYPE ?= "Image" + +# Support multilib on zynqmp +DEFAULTTUNE_virtclass-multilib-lib32 ?= "armv7vethf-neon-vfpv4" diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/zynqmp-pmu-config.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/zynqmp-pmu-config.inc new file mode 100644 index 000000000..fd9e98090 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/zynqmp-pmu-config.inc @@ -0,0 +1,20 @@ + +# Enable the use of zynqmp-pmu for specific recipes only +def zynqmp_pmu_enable_for_bpns(d): + bpn = d.getVar("BPN") + crossbpns = ["binutils", "gcc"] + targetbpns = ["libgcc", "newlib", "libgloss"] + if bpn in targetbpns: + return True + if bpn in crossbpns and bb.data.inherits_class('cross', d): + return True + return False + +BBCLASSEXTEND_append = "${@' zynqmp-pmu' if zynqmp_pmu_enable_for_bpns(d) else ''}" + +# Add the pkgarch to the extra list, this is done to avoid warnings about +# missing manifests due to implicit dependency chains on populate_sysroot when +# a recipe/task depends on a IMAGE_EXTRADEPENDS/do_deploy task which is +# provided by a zynqmp-pmu-* target. +PACKAGE_EXTRA_ARCHS_append = " microblazeel-v9.2-bs-cmp" + |