From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- bsp/meta-synopsys/conf/layer.conf | 21 +++++++++ bsp/meta-synopsys/conf/machine/axs101.conf | 9 ++++ bsp/meta-synopsys/conf/machine/axs103.conf | 9 ++++ bsp/meta-synopsys/conf/machine/hsdk.conf | 20 +++++++++ .../conf/machine/include/arch-arc.inc | 16 +++++++ .../conf/machine/include/arcv2-tune.inc | 51 ++++++++++++++++++++++ .../conf/machine/include/tune-arcompact.inc | 38 ++++++++++++++++ bsp/meta-synopsys/conf/machine/nsim700.conf | 10 +++++ bsp/meta-synopsys/conf/machine/nsimhs.conf | 10 +++++ 9 files changed, 184 insertions(+) create mode 100644 bsp/meta-synopsys/conf/layer.conf create mode 100644 bsp/meta-synopsys/conf/machine/axs101.conf create mode 100644 bsp/meta-synopsys/conf/machine/axs103.conf create mode 100644 bsp/meta-synopsys/conf/machine/hsdk.conf create mode 100644 bsp/meta-synopsys/conf/machine/include/arch-arc.inc create mode 100644 bsp/meta-synopsys/conf/machine/include/arcv2-tune.inc create mode 100644 bsp/meta-synopsys/conf/machine/include/tune-arcompact.inc create mode 100644 bsp/meta-synopsys/conf/machine/nsim700.conf create mode 100644 bsp/meta-synopsys/conf/machine/nsimhs.conf (limited to 'bsp/meta-synopsys/conf') diff --git a/bsp/meta-synopsys/conf/layer.conf b/bsp/meta-synopsys/conf/layer.conf new file mode 100644 index 00000000..005bbf67 --- /dev/null +++ b/bsp/meta-synopsys/conf/layer.conf @@ -0,0 +1,21 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "synopsys" +BBFILE_PATTERN_synopsys = "^${LAYERDIR}/" +BBFILE_PRIORITY_synopsys = "6" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_synopsys = "1" +LAYERSERIES_COMPAT_synopsys-layer = "sumo thud" + +LAYERDEPENDS_synopsys = "core" +BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" +BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" + diff --git a/bsp/meta-synopsys/conf/machine/axs101.conf b/bsp/meta-synopsys/conf/machine/axs101.conf new file mode 100644 index 00000000..8c3eb710 --- /dev/null +++ b/bsp/meta-synopsys/conf/machine/axs101.conf @@ -0,0 +1,9 @@ +require conf/machine/include/tune-arcompact.inc + +SERIAL_CONSOLES = "115200;ttyS3" + +KERNEL_IMAGETYPE = "uImage" + +WKS_FILE ?= "sdimage-bootpart.wks" +IMAGE_FSTYPES += "wic" +IMAGE_BOOT_FILES ?= "uImage" diff --git a/bsp/meta-synopsys/conf/machine/axs103.conf b/bsp/meta-synopsys/conf/machine/axs103.conf new file mode 100644 index 00000000..999e6982 --- /dev/null +++ b/bsp/meta-synopsys/conf/machine/axs103.conf @@ -0,0 +1,9 @@ +require conf/machine/include/arcv2-tune.inc + +SERIAL_CONSOLES = "115200;ttyS3" + +KERNEL_IMAGETYPE = "uImage" + +WKS_FILE ?= "sdimage-bootpart.wks" +IMAGE_FSTYPES += "wic" +IMAGE_BOOT_FILES ?= "uImage" diff --git a/bsp/meta-synopsys/conf/machine/hsdk.conf b/bsp/meta-synopsys/conf/machine/hsdk.conf new file mode 100644 index 00000000..18f020f3 --- /dev/null +++ b/bsp/meta-synopsys/conf/machine/hsdk.conf @@ -0,0 +1,20 @@ +require conf/machine/include/arcv2-tune.inc + +SERIAL_CONSOLES = "115200;ttyS0" + +KERNEL_IMAGETYPE = "uImage" + +WKS_FILE ?= "hsdk-bootpart.wks" +IMAGE_FSTYPES += "wic" +IMAGE_BOOT_FILES ?= "uImage uboot.env" +IMAGE_INSTALL_append += " u-boot" + +UBOOT_MACHINE ?= "hsdk_defconfig" +MACHINE_EXTRA_RRECOMMENDS += " kernel-modules" + + +UBOOT_ENV = "uboot" +UBOOT_ENV_SUFFIX = "env" +GCCVERSION ?= "arc" +BINUVERSION ?= "arc" +SDKGCCVERSION ?= "arc" diff --git a/bsp/meta-synopsys/conf/machine/include/arch-arc.inc b/bsp/meta-synopsys/conf/machine/include/arch-arc.inc new file mode 100644 index 00000000..01831a46 --- /dev/null +++ b/bsp/meta-synopsys/conf/machine/include/arch-arc.inc @@ -0,0 +1,16 @@ +TUNEVALID[bigendian] = "Enable big-endian mode" + +TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'arceb', 'arc', d)}" + +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " qemu-usermode" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-arc" + +# Otherwise huge binaries (>32MiB) might fail to link due to +# limitation of 25-bit R_ARC_S25H_PCREL_PLT relocation +GLIBC_EXTRA_OECONF_arc += " --with-nonshared-cflags=-mlong-calls" + +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" +UBOOT_MACHINE = "hsdk_config" +EXTRA_IMAGEDEPENDS += "u-boot" + diff --git a/bsp/meta-synopsys/conf/machine/include/arcv2-tune.inc b/bsp/meta-synopsys/conf/machine/include/arcv2-tune.inc new file mode 100644 index 00000000..a3605292 --- /dev/null +++ b/bsp/meta-synopsys/conf/machine/include/arcv2-tune.inc @@ -0,0 +1,51 @@ +require arch-arc.inc + +DEFAULTTUNE ?= "archs" +TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}" + +TUNEVALID[hs] = "Enable ARC HS core with 32-bit atomic ops" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'hs', ' -mcpu=hs', '', d)}" + +TUNEVALID[llsc64] = "Enable 64-bit LL/SC operations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'llsc64', ' -mll64', '', d)}" + +TUNEVALID[div_rem] = "Enable simple divider" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'div_rem', ' -mdiv-rem', '', d)}" + +TUNEVALID[mpy] = "Enable simple hardware multiplier" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mpy', ' -mmpy-option=mpy', '', d)}" + +TUNEVALID[plus_qmacw] = "Enable most powerful hardware multiplier" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'plus_qmacw', ' -mmpy-option=plus_qmacw', '', d)}" + +TUNEVALID[fpud_all] = "Enable double-precision FPU" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpud_all', ' -mfpu=fpud_all', '', d)}" + +AVAILTUNES += "archs hs38 hs38linux" + +TUNE_FEATURES_tune-archs = "hs llsc64 mpy" +TUNE_PKGARCH_tune-archs = "archs" +PACKAGE_EXTRA_ARCHS_tune-archs = "archs hs38 hs38linux" + +TUNE_FEATURES_tune-hs38 = "hs llsc64 plus_qmacw" +TUNE_PKGARCH_tune-hs38 = "hs38" +PACKAGE_EXTRA_ARCHS_tune-hs38 = "hs38 hs38linux" + +TUNE_FEATURES_tune-hs38linux = "hs llsc64 plus_qmacw fpud_all" +TUNE_PKGARCH_tune-hs38linux = "hs38linux" +PACKAGE_EXTRA_ARCHS_tune-hs38linux = "hs38linux" + +def arc_machine_dict(machdata, d): + machdata = { + "elf" : { + "arc" : (195, 0, 0, True, 32), + "arceb" : (195, 0, 0, False, 32), + }, + "linux" : { + "arc" : (195, 0, 0, True, 32), + "arceb" : (195, 0, 0, False, 32), + }, + } + return machdata + +PACKAGEQA_EXTRA_MACHDEFFUNCS = "arc_machine_dict" diff --git a/bsp/meta-synopsys/conf/machine/include/tune-arcompact.inc b/bsp/meta-synopsys/conf/machine/include/tune-arcompact.inc new file mode 100644 index 00000000..2e992909 --- /dev/null +++ b/bsp/meta-synopsys/conf/machine/include/tune-arcompact.inc @@ -0,0 +1,38 @@ +require arch-arc.inc + +DEFAULTTUNE ?= "arc770" +TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}" + +TUNEVALID[arc750] = "Standard ARComact ARC750 core" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arc700', ' -mcpu=arc700', '', d)}" + +TUNEVALID[llsc] = "Use load-locked/store-conditional instructions" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'llsc', ' -matomic', '', d)}" + +TUNEVALID[swape] = "Use endian swap instruction" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'swape', ' -mswape', '', d)}" + +AVAILTUNES += "arc750 arc770" + +TUNE_FEATURES_tune-arc750 = "arc750" +TUNE_PKGARCH_tune-arc750 = "arc750" +PACKAGE_EXTRA_ARCHS_tune-arc750 = "arc750 arc770" + +TUNE_FEATURES_tune-arc770 = "arc750 llsc swape" +TUNE_PKGARCH_tune-arc770 = "arc770" +PACKAGE_EXTRA_ARCHS_tune-arc770 = "arc770" + +def arc_machine_dict(machdata, d): + machdata = { + "elf" : { + "arc" : (93, 0, 0, True, 32), + "arceb" : (93, 0, 0, False, 32), + }, + "linux" : { + "arc" : (93, 0, 0, True, 32), + "arceb" : (93, 0, 0, False, 32), + }, + } + return machdata + +PACKAGEQA_EXTRA_MACHDEFFUNCS = "arc_machine_dict" diff --git a/bsp/meta-synopsys/conf/machine/nsim700.conf b/bsp/meta-synopsys/conf/machine/nsim700.conf new file mode 100644 index 00000000..a430e17c --- /dev/null +++ b/bsp/meta-synopsys/conf/machine/nsim700.conf @@ -0,0 +1,10 @@ +require conf/machine/include/tune-arcompact.inc + +SERIAL_CONSOLES = "115200;ttyARC0" + +KERNEL_IMAGETYPE = "vmlinux" +KERNEL_OUTPUT_DIR = "." + +IMAGE_FSTYPES += "${INITRAMFS_FSTYPES}" +INITRAMFS_IMAGE ?= "core-image-minimal" +INITRAMFS_IMAGE_BUNDLE = "1" diff --git a/bsp/meta-synopsys/conf/machine/nsimhs.conf b/bsp/meta-synopsys/conf/machine/nsimhs.conf new file mode 100644 index 00000000..a5e1bd22 --- /dev/null +++ b/bsp/meta-synopsys/conf/machine/nsimhs.conf @@ -0,0 +1,10 @@ +require conf/machine/include/arcv2-tune.inc + +SERIAL_CONSOLES = "115200;ttyARC0" + +KERNEL_IMAGETYPE = "vmlinux" +KERNEL_OUTPUT_DIR = "." + +IMAGE_FSTYPES += "${INITRAMFS_FSTYPES}" +INITRAMFS_IMAGE ?= "core-image-minimal" +INITRAMFS_IMAGE_BUNDLE = "1" -- cgit 1.2.3-korg