diff options
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/conf/machine/include')
12 files changed, 124 insertions, 71 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/baremetal-tc.conf b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/baremetal-tc.conf new file mode 100644 index 000000000..a53ceac25 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/baremetal-tc.conf @@ -0,0 +1,7 @@ +# This is specific to baremetal toolchains only. +# +# Some of the operations we want to do are different then regular Yocto +# Project SDK workflows, so wrap baremetal toolchain items in a custom +# override: + +MACHINEOVERRIDES_append = ":baremetal-multilib-tc" 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 index 1367e57ab..f2533be70 100644 --- 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 @@ -6,26 +6,20 @@ MACHINE_FEATURES_BACKFILL_CONSIDERED += "rtc" 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}" +PREFERRED_PROVIDER_virtual/kernel ??= "linux-xlnx" # 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/bootloader ??= "u-boot-xlnx" PREFERRED_PROVIDER_virtual/boot-bin ??= "${PREFERRED_PROVIDER_virtual/bootloader}" +do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}" + UBOOT_SUFFIX ?= "img" -UBOOT_SUFFIX_zynqmp ?= "bin" UBOOT_SUFFIX_microblaze ?= "bin" UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" UBOOT_ELF ?= "u-boot" -UBOOT_ELF_zynq ?= "u-boot.elf" UBOOT_ELF_aarch64 ?= "u-boot.elf" -UBOOT_ELF_versal ?= "u-boot.elf" #Hardware accelaration PREFERRED_PROVIDER_virtual/libgles1_mali400 = "libmali-xlnx" @@ -39,6 +33,8 @@ GCCPIE_microblaze = "" GLIBCPIE_microblaze = "" SECURITY_CFLAGS_microblaze = "" SECURITY_LDFLAGS_microblaze = "" +# Microblaze does not support gnu hash style +LINKER_HASH_STYLE_microblaze = "sysv" XSERVER ?= " \ xserver-xorg \ @@ -79,9 +75,5 @@ def get_default_image_boot_files(d): return " ".join(files) 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" FPGA_MNGR_RECONFIG_ENABLE ?= "${@bb.utils.contains('IMAGE_FEATURES', 'fpga-manager', '1', '0', d)}" 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 deleted file mode 100644 index 30049bc04..000000000 --- a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-overrides.inc +++ /dev/null @@ -1,21 +0,0 @@ -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 index 5eb4b5c47..b804112b5 100644 --- 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 @@ -1,9 +1,17 @@ # This include is used to setup default QEMU and qemuboot config for meta-xilinx # machines. +# Use the xilinx specific version for these users +IMAGE_CLASSES += "qemuboot-xilinx" + # depend on qemu-helper-native, which will depend on QEMU EXTRA_IMAGEDEPENDS += "qemu-helper-native" +PREFERRED_PROVIDER_qemu-helper-native = "qemu-xilinx-helper-native" +PREFERRED_PROVIDER_qemu = "qemu-xilinx" +PREFERRED_PROVIDER_qemu-native = "qemu-xilinx-native" +PREFERRED_PROVIDER_nativesdk-qemu = "nativesdk-qemu-xilinx" + def qemu_default_dtb(d): if d.getVar("IMAGE_BOOT_FILES", True): dtbs = d.getVar("IMAGE_BOOT_FILES", True).split(" ") @@ -16,8 +24,9 @@ def qemu_default_dtb(d): return "" def qemu_default_serial(d): - if d.getVar("SERIAL_CONSOLE", True): - speed, console = d.getVar("SERIAL_CONSOLE", True).split(" ", 1) + if d.getVar("SERIAL_CONSOLES", True): + first_console = d.getVar("SERIAL_CONSOLES", True).split(" ")[0] + speed, console = first_console.split(";", 1) # zynqmp uses earlycon and stdout (in dtb) if "zynqmp" in d.getVar("MACHINEOVERRIDES", True).split(":"): return "" @@ -38,6 +47,7 @@ def qemu_zynqmp_unhalt(d, multiarch): 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_aarch64 ?= "${@qemu_target_binary(d)}-multiarch" QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" QB_DEFAULT_FSTYPE ?= "cpio" QB_DTB ?= "${@qemu_default_dtb(d)}" diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-tune-include.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-tune-include.inc new file mode 100644 index 000000000..7b6bd12ab --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-tune-include.inc @@ -0,0 +1,14 @@ +# Unfortunately various tunefiles don't include each other, so create +# a list of things to require based on the DEFAULTTUNE setting. +TUNEFILE[cortexr5] = "conf/machine/include/tune-cortexrm.inc" +TUNEFILE[cortexr5f] = "conf/machine/include/tune-cortexrm.inc" +TUNEFILE[cortexa9thf-neon] = "conf/machine/include/tune-cortexa9.inc" +TUNEFILE[cortexa53] = "conf/machine/include/tune-cortexa53.inc" +TUNEFILE[cortexa72] = "conf/machine/include/tune-cortexa72.inc" +TUNEFILE[cortexa72-cortexa53] = "conf/machine/include/tune-cortexa72-cortexa53.inc" +TUNEFILE[microblaze] = "conf/machine/include/tune-microblaze.inc" + +# Default to arch-armv8a.inc +TUNEFILE = "${@ d.getVarFlag('TUNEFILE', d.getVar('DEFAULTTUNE')) if d.getVarFlag('TUNEFILE', d.getVar('DEFAULTTUNE')) else 'conf/machine/include/arm/arch-armv8a.inc'}" + +require ${TUNEFILE} diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-versal.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-versal.inc new file mode 100644 index 000000000..d15f4909a --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-versal.inc @@ -0,0 +1,19 @@ +DEFAULTTUNE ?= "cortexa72-cortexa53" +SOC_FAMILY ?= "versal" + +# Available SOC_VARIANT's for versal: +# "-prime" - Versal deafult Prime Devices +# "-ai-core" - Versal AI-core Devices +# "-premium" - Versal Premium Devices + +SOC_VARIANT ?= "-prime" + +require soc-tune-include.inc +require xilinx-soc-family.inc + +# Linux Configuration +KERNEL_IMAGETYPE ?= "Image" + +WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" + +UBOOT_ELF ?= "u-boot.elf" diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynq.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-zynq.inc index f7006026a..0111cbd98 100644 --- a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynq.inc +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-zynq.inc @@ -7,8 +7,8 @@ SOC_FAMILY ?= "zynq" SOC_VARIANT ?= "7z" -require conf/machine/include/tune-cortexa9.inc -require conf/machine/include/soc-family.inc +require soc-tune-include.inc +require xilinx-soc-family.inc # Linux Configuration KERNEL_IMAGETYPE ?= "uImage" @@ -17,3 +17,8 @@ KERNEL_IMAGETYPES += "zImage" # Set default load address. # Override with KERNEL_EXTRA_ARGS_<board> += "..." in machine file if required KERNEL_EXTRA_ARGS_zynq += "UIMAGE_LOADADDR=0x8000" + +# WIC Specific dependencies +WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin" + +UBOOT_ELF ?= "u-boot.elf" diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-zynqmp.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-zynqmp.inc new file mode 100644 index 000000000..8d421fb36 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/soc-zynqmp.inc @@ -0,0 +1,28 @@ +DEFAULTTUNE ?= "cortexa72-cortexa53" +SOC_FAMILY ?= "zynqmp" + +# Available SOC_VARIANT's for zynqmp: +# "cg" - Zynq UltraScale+ CG Devices +# "eg" - Zynq UltraScale+ EG Devices +# "ev" - Zynq UltraScale+ EV Devices +# "dr" - Zynq UltraScale+ DR Devices + +SOC_VARIANT ?= "eg" + +MACHINEOVERRIDES_prepend_zynqmpeg = "mali400:" +MACHINEOVERRIDES_prepend_zynqmpev = "mali400:vcu:" + +require soc-tune-include.inc +require xilinx-soc-family.inc + +# Linux Configuration +KERNEL_IMAGETYPE ?= "Image" + +# Support multilib on zynqmp +DEFAULTTUNE_virtclass-multilib-lib32 ?= "armv7vethf-neon-vfpv4" + +WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" + +UBOOT_SUFFIX ?= "bin" + +XSERVER_EXT_zynqmp ?= "xf86-video-armsoc" diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-cortexrm.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-cortexrm.inc new file mode 100644 index 000000000..66edbdbdb --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-cortexrm.inc @@ -0,0 +1,21 @@ +DEFAULTTUNE ?= "cortexr5" + +require conf/machine/include/arm/arch-armv8a.inc + +TUNEVALID[armrm] = "Enable ARM Cortex-R/M Family" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armrm', 'armrm:', '' ,d)}" + +TUNEVALID[cortexr5] = "Enable Cortex-r5 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr5', ' -mcpu=cortex-r5', '', d)}" + +AVAILTUNES += "cortexr5" +ARMPKGARCH_tune-cortexr5 = "cortexr5" + +TUNE_FEATURES_tune-cortexr5 = "armrm cortexr5" +PACKAGE_EXTRA_ARCHS_tune-cortexr5 = "${TUNE_PKGARCH}" + +AVAILTUNES += "cortexr5f" +ARMPKGARCH_tune-cortexr5f = "cortexr5f" + +TUNE_FEATURES_tune-cortexr5f = "armrm cortexr5 vfpv3d16 callconvention-hard" +PACKAGE_EXTRA_ARCHS_tune-cortexr5f = "${TUNE_PKGARCH}" diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-versal.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-versal.inc deleted file mode 100644 index 83acf6e08..000000000 --- a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-versal.inc +++ /dev/null @@ -1,14 +0,0 @@ -DEFAULTTUNE ?= "aarch64" -SOC_FAMILY ?= "versal" - -# Available SOC_VARIANT's for versal: -# virt - -SOC_VARIANT ?= "" - -require conf/machine/include/arm/arch-armv8.inc -require conf/machine/include/soc-family.inc - -# Linux Configuration -KERNEL_IMAGETYPE ?= "Image" - 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 deleted file mode 100644 index cbfa47b89..000000000 --- a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/tune-zynqmp.inc +++ /dev/null @@ -1,18 +0,0 @@ -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-armv8a.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/xilinx-soc-family.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/xilinx-soc-family.inc new file mode 100644 index 000000000..e6c62ccc6 --- /dev/null +++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/xilinx-soc-family.inc @@ -0,0 +1,10 @@ +require conf/machine/include/soc-family.inc + +SOC_VARIANT ??= "" +MACHINEOVERRIDES =. "${@['', '${SOC_FAMILY}${SOC_VARIANT}:']['${SOC_VARIANT}' != '']}" + +SOC_FAMILY_ARCH ?= "${SOC_FAMILY}" +SOC_VARIANT_ARCH ?= "${SOC_FAMILY}${SOC_VARIANT}" + +PACKAGE_EXTRA_ARCHS_append = " ${SOC_FAMILY_ARCH}" +PACKAGE_EXTRA_ARCHS_append = "${@['', ' ${SOC_VARIANT_ARCH}'][d.getVar('SOC_VARIANT_ARCH') != d.getVar('SOC_FAMILY_ARCH')]}" |