From 4feb727cd6b77a68bdaca63e121b378d814f5eaf Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 13:30:07 -0700 Subject: [Subtree] Move board support packages to top level The new subtree paradigm has moved the meta-bsp layers to the top level Change-Id: Ic4f64c39465be699bed3649e125e027d17daf938 Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- meta-nuvoton/COPYING.MIT | 17 +++ meta-nuvoton/LICENSE | 8 ++ meta-nuvoton/README.md | 8 ++ meta-nuvoton/conf/layer.conf | 10 ++ meta-nuvoton/conf/machine/evb-npcm750.conf | 13 +++ meta-nuvoton/conf/machine/include/npcm7xx.inc | 22 ++++ meta-nuvoton/conf/machine/include/nuvoton.inc | 6 ++ .../conf/machine/include/tune-arm7a-novfp.inc | 11 ++ .../u-boot/u-boot-fw-utils-nuvoton_git.bb | 49 +++++++++ .../recipes-bsp/u-boot/u-boot-nuvoton_git.bb | 19 ++++ .../recipes-kernel/linux/linux-nuvoton.inc | 21 ++++ .../recipes-kernel/linux/linux-nuvoton/defconfig | 114 +++++++++++++++++++++ .../recipes-kernel/linux/linux-nuvoton_git.bb | 6 ++ meta-nuvoton/recipes.txt | 2 + 14 files changed, 306 insertions(+) create mode 100644 meta-nuvoton/COPYING.MIT create mode 100644 meta-nuvoton/LICENSE create mode 100644 meta-nuvoton/README.md create mode 100644 meta-nuvoton/conf/layer.conf create mode 100644 meta-nuvoton/conf/machine/evb-npcm750.conf create mode 100644 meta-nuvoton/conf/machine/include/npcm7xx.inc create mode 100644 meta-nuvoton/conf/machine/include/nuvoton.inc create mode 100644 meta-nuvoton/conf/machine/include/tune-arm7a-novfp.inc create mode 100644 meta-nuvoton/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_git.bb create mode 100644 meta-nuvoton/recipes-bsp/u-boot/u-boot-nuvoton_git.bb create mode 100644 meta-nuvoton/recipes-kernel/linux/linux-nuvoton.inc create mode 100644 meta-nuvoton/recipes-kernel/linux/linux-nuvoton/defconfig create mode 100644 meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb create mode 100644 meta-nuvoton/recipes.txt (limited to 'meta-nuvoton') diff --git a/meta-nuvoton/COPYING.MIT b/meta-nuvoton/COPYING.MIT new file mode 100644 index 000000000..fb950dc69 --- /dev/null +++ b/meta-nuvoton/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/meta-nuvoton/LICENSE b/meta-nuvoton/LICENSE new file mode 100644 index 000000000..1ed34d75f --- /dev/null +++ b/meta-nuvoton/LICENSE @@ -0,0 +1,8 @@ +Different components of Phosphor OpenBMC are under different licenses (a mix +Please see: + +COPYING.MIT (MIT) + +All metadata is MIT licensed unless otherwise stated. Source code +included in tree for individual recipes is under the LICENSE stated in +the associated recipe (.bb file) unless otherwise stated. diff --git a/meta-nuvoton/README.md b/meta-nuvoton/README.md new file mode 100644 index 000000000..a93a03c6e --- /dev/null +++ b/meta-nuvoton/README.md @@ -0,0 +1,8 @@ +Nuvoton NPCM7XX +================ + +This is the Nuvoton NPCM7XX Board Support Package (BSP) layer. +The NPCM7XX is an ARM based SoC with external DDR RAM and +supports a large set of peripherals made by Nuvoton. +More information about the NPCM7XX can be found +[here](http://www.nuvoton.com/hq/products/cloud-computing/ibmc/?__locale=en). diff --git a/meta-nuvoton/conf/layer.conf b/meta-nuvoton/conf/layer.conf new file mode 100644 index 000000000..fe22772f8 --- /dev/null +++ b/meta-nuvoton/conf/layer.conf @@ -0,0 +1,10 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "nuvoton-layer" +BBFILE_PATTERN_nuvoton-layer = "" +LAYERVERSION_nuvoton-layer = "1" +LAYERSERIES_COMPAT_nuvoton-layer = "sumo" diff --git a/meta-nuvoton/conf/machine/evb-npcm750.conf b/meta-nuvoton/conf/machine/evb-npcm750.conf new file mode 100644 index 000000000..38c02ed19 --- /dev/null +++ b/meta-nuvoton/conf/machine/evb-npcm750.conf @@ -0,0 +1,13 @@ +KMACHINE = "nuvoton" +KERNEL_DEVICETREE = "${KMACHINE}-npcm750-evb.dtb" + +UBOOT_MACHINE = "PolegSVB_config" + +FLASH_SIZE = "32768" + +require conf/machine/include/npcm7xx.inc +require conf/machine/include/obmc-bsp-common.inc + +# Don't generate MTD flash images until we're able to include the primary +# bootloader and the Linux MTD driver is ready. +IMAGE_FSTYPES = "cpio.${INITRAMFS_CTYPE}.u-boot" diff --git a/meta-nuvoton/conf/machine/include/npcm7xx.inc b/meta-nuvoton/conf/machine/include/npcm7xx.inc new file mode 100644 index 000000000..3d8847dc4 --- /dev/null +++ b/meta-nuvoton/conf/machine/include/npcm7xx.inc @@ -0,0 +1,22 @@ +#@TYPE: Machine +#@NAME: Nuvoton NPCM7XX +#@DESCRIPTION: Common machine configuration for Nuvoton NPCM7XX Chip + +require conf/machine/include/nuvoton.inc + +KERNEL_IMAGETYPE ?= "uImage" +KERNEL_EXTRA_ARGS ?= "UIMAGE_LOADADDR=0x00008000" + +UBOOT_MACHINE ?= "PolegSVB_config" +UBOOT_ENTRYPOINT ?= "0x00008000" +UBOOT_LOADADDRESS ?= "0x00008000" + +DEFAULTTUNE ?= "arm7a-novfp" + +SERIAL_CONSOLES = "115200;ttyS3" + +SOC_FAMILY = "npcm7xx" +include conf/machine/include/soc-family.inc +MACHINEOVERRIDES .= ":npcm7xx" + +require conf/machine/include/tune-arm7a-novfp.inc diff --git a/meta-nuvoton/conf/machine/include/nuvoton.inc b/meta-nuvoton/conf/machine/include/nuvoton.inc new file mode 100644 index 000000000..068fe3507 --- /dev/null +++ b/meta-nuvoton/conf/machine/include/nuvoton.inc @@ -0,0 +1,6 @@ +PREFERRED_PROVIDER_virtual/kernel ?= "linux-nuvoton" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-nuvoton" +PREFERRED_PROVIDER_u-boot ?= "u-boot-nuvoton" +PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils-nuvoton" + +MACHINEOVERRIDES .= ":nuvoton" diff --git a/meta-nuvoton/conf/machine/include/tune-arm7a-novfp.inc b/meta-nuvoton/conf/machine/include/tune-arm7a-novfp.inc new file mode 100644 index 000000000..18730db69 --- /dev/null +++ b/meta-nuvoton/conf/machine/include/tune-arm7a-novfp.inc @@ -0,0 +1,11 @@ +DEFAULTTUNE ?= "arm7a-novfp" + +require conf/machine/include/arm/arch-armv7a.inc + +TUNEVALID[arm7a-novfp] = "Enable arm7a-novfp specific processor optimizations" + +AVAILTUNES += "arm7a-novfp" +ARMPKGARCH_tune-arm7a-novfp = "armv7a" +TUNE_FEATURES_tune-armv7a = "arm armv7a" +TUNE_FEATURES_tune-arm7a-novfp = "${TUNE_FEATURES_tune-armv7a} arm7a-novfp" +PACKAGE_EXTRA_ARCHS_tune-arm7a-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv7a}" diff --git a/meta-nuvoton/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_git.bb b/meta-nuvoton/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_git.bb new file mode 100644 index 000000000..cefdea803 --- /dev/null +++ b/meta-nuvoton/recipes-bsp/u-boot/u-boot-fw-utils-nuvoton_git.bb @@ -0,0 +1,49 @@ +SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" +SECTION = "bootloader" +DEPENDS = "mtd-utils" + +PROVIDES += "u-boot-fw-utils" + +UBRANCH = "npcm7xx" +SRC_URI = "git://github.com/Nuvoton-Israel/u-boot.git;branch=${UBRANCH}" +SRCREV = "196461383f7d043f18cab3bb34dded89fba4712a" + +PV .= "+${UBRANCH}+" + +S = "${WORKDIR}/git" + +INSANE_SKIP_${PN} = "already-stripped" + +EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" HOSTCC="${BUILD_CC} ${BUILD_FLAGS} ${BUILD_LDFLAGS}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1' +EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' + +inherit uboot-config + +do_compile () { + oe_runmake ${UBOOT_MACHINE} + oe_runmake env +} + +do_install () { + install -d ${D}${base_sbindir} + install -d ${D}${sysconfdir} + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv + install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config +} + +do_install_class-cross () { + install -d ${D}${bindir_cross} + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv +} + +SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross" +uboot_fw_utils_cross() { + sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross} +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +BBCLASSEXTEND = "cross" diff --git a/meta-nuvoton/recipes-bsp/u-boot/u-boot-nuvoton_git.bb b/meta-nuvoton/recipes-bsp/u-boot/u-boot-nuvoton_git.bb new file mode 100644 index 000000000..ea1fdbebe --- /dev/null +++ b/meta-nuvoton/recipes-bsp/u-boot/u-boot-nuvoton_git.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "U-boot for Nuvoton NPCM7xx Baseboard Management Controller" + +require recipes-bsp/u-boot/u-boot.inc + +PROVIDES += "u-boot" + +DEPENDS += "dtc-native" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" + +S = "${WORKDIR}/git" + +UBRANCH = "npcm7xx" +SRC_URI = "git://github.com/Nuvoton-Israel/u-boot.git;branch=${UBRANCH}" +SRCREV = "196461383f7d043f18cab3bb34dded89fba4712a" + +PV .= "+${UBRANCH}+" + diff --git a/meta-nuvoton/recipes-kernel/linux/linux-nuvoton.inc b/meta-nuvoton/recipes-kernel/linux/linux-nuvoton.inc new file mode 100644 index 000000000..5380478e8 --- /dev/null +++ b/meta-nuvoton/recipes-kernel/linux/linux-nuvoton.inc @@ -0,0 +1,21 @@ +DESCRIPTION = "Linux kernel for Nuvoton NPCM7xx" +SECTION = "kernel" +LICENSE = "GPLv2" + +PROVIDES += "virtual/kernel" + +KCONFIG_MODE="--alldefconfig" + +KSRC ?= "git://github.com/openbmc/linux;protocol=git;branch=${KBRANCH}" +SRC_URI = "${KSRC}" +SRC_URI_append_npcm7xx = " file://defconfig" + +LINUX_VERSION_EXTENSION ?= "-${SRCREV}" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +# From 4.16+ the COPYING file changed +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" diff --git a/meta-nuvoton/recipes-kernel/linux/linux-nuvoton/defconfig b/meta-nuvoton/recipes-kernel/linux/linux-nuvoton/defconfig new file mode 100644 index 000000000..07e0f4ad1 --- /dev/null +++ b/meta-nuvoton/recipes-kernel/linux/linux-nuvoton/defconfig @@ -0,0 +1,114 @@ +CONFIG_SYSVIPC=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_LOG_BUF_SHIFT=21 +CONFIG_CGROUPS=y +CONFIG_SYSFS_DEPRECATED=y +CONFIG_SYSFS_DEPRECATED_V2=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_KERNEL_XZ=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_EMBEDDED=y +CONFIG_SLAB=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_DEFAULT_DEADLINE=y +CONFIG_ARCH_NPCM=y +CONFIG_ARCH_NPCM7XX=y +CONFIG_SMP=y +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_BINFMT_MISC=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_MTD=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_RAM=y +CONFIG_MTD_COMPLEX_MAPPINGS=y +CONFIG_MTD_SPI_NOR=y +CONFIG_SPI_NPCM=y +CONFIG_OF_OVERLAY=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_NETDEVICES=y +CONFIG_NPCM7XX_EMC_ETH=y +CONFIG_STMMAC_ETH=y +CONFIG_BROADCOM_PHY=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_NPCM750_OTP=y +CONFIG_NPCM750_OTP_WRITE_ENABLE=y +CONFIG_NPCM7XX_KCS_IPMI_BMC=y +CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_NPCM7XX=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_GENERIC_PLATFORM=y +CONFIG_SENSORS_LM75=y +CONFIG_SENSORS_TMP102=y +CONFIG_SENSORS_NPCM7XX=y +CONFIG_WATCHDOG=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_NPCMX50_USB2=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB=y +#CONFIG_USB_MASS_STORAGE=m +#CONFIG_USB_EDM_KBD_MOUSE=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_NPCM750=y +CONFIG_IIO=y +CONFIG_NPCM7XX_ADC=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_ROMFS_FS=y +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +CONFIG_CIFS=y +CONFIG_CIFS_XATTR=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_REDUCED=y +CONFIG_READABLE_ASM=y +CONFIG_DEBUG_SECTION_MISMATCH=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_FUNCTION_TRACER=y +CONFIG_EARLY_PRINTK=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_USER_API_SKCIPHER=y +CONFIG_CRYPTO_DEV_NPCMX50=y +CONFIG_ARM_CRYPTO=y diff --git a/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb b/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb new file mode 100644 index 000000000..bdd08bc97 --- /dev/null +++ b/meta-nuvoton/recipes-kernel/linux/linux-nuvoton_git.bb @@ -0,0 +1,6 @@ +KBRANCH ?= "dev-4.17" +LINUX_VERSION ?= "4.17.14" + +SRCREV="4b44547f456a87e8456fe3f4ed2b62ab696249b7" + +require linux-nuvoton.inc diff --git a/meta-nuvoton/recipes.txt b/meta-nuvoton/recipes.txt new file mode 100644 index 000000000..149509f3e --- /dev/null +++ b/meta-nuvoton/recipes.txt @@ -0,0 +1,2 @@ +recipes-bsp - Anything with links to specific hardware or hardware configuration information +recipes-kernel - The kernel and generic applications/libraries with strong kernel dependencies -- cgit v1.2.1