1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-16 03:47:19 +00:00

add corstone 700 bsp support

Change-Id: Ib5568e274f14efdaad18d9fb4add461578f51270
Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
This commit is contained in:
Tushar Khandelwal
2019-05-28 22:39:02 +01:00
parent c4057679c8
commit c1a92ede20
10 changed files with 260 additions and 0 deletions
+17
View File
@@ -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.
@@ -0,0 +1,16 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2018 ARM Limited
#
# Iota OpenEmbedded distribution configuration file
#
require conf/distro/poky-tiny.conf
DISTRO_NAME = "Iota - Tiny Linux Distribution"
DISTRO = "iota-tiny"
DISTRO_VERSION = "0.1"
INHERIT += "image-buildinfo"
TCLIBC = "musl"
+17
View File
@@ -0,0 +1,17 @@
# corstone700 has a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# corstone700 has a packages directory, add to BBFILES
BBFILES += " \
${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-corstone700"
BBFILE_PATTERN_meta-corstone700 := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-corstone700 = "10"
LAYERSERIES_COMPAT_meta-corstone700 = "thud"
NAME_GCC_ARM_NONE_EABI = "gcc-arm-none-eabi"
INSTALL_GCC_ARM_NONE_EABI = "${bindir}/${NAME_GCC_ARM_NONE_EABI}"
TC_GCC_ARM_NONE_EABI = "${STAGING_BINDIR_NATIVE}/${NAME_GCC_ARM_NONE_EABI}"
TC_GCC_ARM_NONE_EABI_BIN = "${TC_GCC_ARM_NONE_EABI}/bin"
@@ -0,0 +1,17 @@
#@TYPE: Machine
#@NAME: corstone700 machine
#@DESCRIPTION: Machine configuration for the corstone700 board
TUNE_FEATURES = "aarch32"
require conf/machine/include/arm/arch-armv8.inc
PREFERRED_PROVIDER_virtual/kernel = "linux-iota-corstone700"
IMAGE_FSTYPES += "tar.bz2 wic cpio.gz"
WKS_FILE = "iota-corstone700.wks"
EXTRA_IMAGEDEPENDS_append = " trusted-firmware-a boot-firmware"
SERIAL_CONSOLES = "115200;ttyAMA0"
@@ -0,0 +1,46 @@
SUMMARY = "Boot Processor firmware"
DESCRIPTION = "Boot Processor firmware"
DEPENDS += " coreutils-native gcc-arm-none-eabi-native trusted-firmware-a "
LICENSE="BSD"
LIC_FILES_CHKSUM = "file://license.md;md5=e44b2531cd6ffe9dece394dbe988d9a0"
# Use Yocto-built python3 executable
inherit python3native
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI = "gitsm://${USER}@git.linaro.org/landing-teams/working/arm/boot-firmware.git;protocol=https;branch=corstone700-19.02"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
COMPATIBLE_MACHINE = "(corstone700)"
PLATFORM = "corstone-700"
LDFLAGS[unexport] = "1"
do_compile() {
export PATH=${TC_GCC_ARM_NONE_EABI_BIN}:$PATH
mkdir -p ${B}
oe_runmake -C ${S} BUILD_BASE=${B} \
BUILD_PLAT=${B}/${PLATFORM}/ \
PRODUCT=${PLATFORM} \
CROSS_COMPILE=arm-none-eabi- \
clean \
all
cp ${S}/build/product/${PLATFORM}/se_ramfw/release/bin/firmware.bin ${B}/se_ramfw.bin
cp ${S}/build/product/${PLATFORM}/se_romfw/release/bin/firmware.bin ${B}/se_romfw.bin
oe_runmake -C ${S}/tools/spitoc BUILD_BASE=${B} \
BUILD_PLAT=${B}/${PLATFORM}/ \
all
cp ${S}/tools/spitoc/spitoc ${B}/spitoc
}
do_install() {
install -D -p -m 0644 ${B}/se_ramfw.bin ${DEPLOY_DIR_IMAGE}/se_ramfw.bin
install -D -p -m 0644 ${B}/se_romfw.bin ${DEPLOY_DIR_IMAGE}/se_romfw.bin
${B}/spitoc --seram ${DEPLOY_DIR_IMAGE}/se_ramfw.bin --offset 1 --fip ${DEPLOY_DIR_IMAGE}/corstone700.fip --offset 33 --out ${DEPLOY_DIR_IMAGE}/spitoc.bin
}
@@ -0,0 +1,39 @@
License
=======
Copyright (c) 2011-2017, Arm Limited. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of Arm nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---
__Note:__
Individual files contain the following tag instead of the full license text.
SPDX-License-Identifier: BSD-3-Clause
This enables machine processing of license information based on the SPDX
License Identifiers that are available here: http://spdx.org/licenses/
@@ -0,0 +1,43 @@
DEPENDS_corstone700 += " dtc-native coreutils-native "
LIC_FILES_CHKSUM_corstone700 = "file://license.rst;md5=c709b197e22b81ede21109dbffd5f363"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_corstone700 = "\
git://${USER}@git.linaro.org/landing-teams/working/arm/arm-tf.git;protocol=https;branch=corstone700-19.02 \
"
SRCREV_corstone700 = "${AUTOREV}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
COMPATIBLE_MACHINE = "(corstone700)"
PLATFORM_corstone700 = "corstone700"
LDFLAGS[unexport] = "1"
do_compile_corstone700() {
mkdir -p ${B}
oe_runmake -C ${S} BUILD_BASE=${B} \
BUILD_PLAT=${B}/${PLATFORM}/ \
PLAT=${PLATFORM} \
DEBUG=1 \
ARCH=aarch32 \
CROSS_COMPILE=${TARGET_PREFIX} \
AARCH32_SP=sp_min \
RESET_TO_SP_MIN=1 \
ARM_LINUX_KERNEL_AS_BL33=1 \
PRELOADED_BL33_BASE=0x08500000 \
ARM_PRELOADED_DTB_BASE=0x02800000 \
ENABLE_STACK_PROTECTOR=strong \
ENABLE_PIE=1 \
all \
fip
}
do_install_corstone700() {
install -D -p -m 0644 ${B}/${PLATFORM}/fip.bin ${DEPLOY_DIR_IMAGE}/${PLATFORM}.fip
}
@@ -0,0 +1,31 @@
# Recipe for fetching and installing the prebuilt gcc-arm toolchain for
# bare-metal targets.
# Recipe based on the meta-ti layer:
# http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-ti/devtools/gcc-arm-none-eabi-native_4.9.2015q3.bb?h=master
#
# Whilst most of the tools built in sdk-700 relies on the linaro-provided
# toolchain, some recipes require the baremetal ARM GCC toolchain. The baremetal
# ARM GCC toolchain is distributed as precompiled binaries. This recipe fetches
# the toolchain and installs it in sysroot.
# Recipes may then 'DEPENDS' on this recipe to fetch the toolchain, making the
# toolchain available in the staging directory of the depending recipe.
GCC_ARM_VERSION = "gcc-arm-none-eabi-7-2018-q2-update"
LICENSE="GPLv3"
LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=f77466c63f5787f4bd669c402aabe061"
inherit native
SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/${GCC_ARM_VERSION}-linux.tar.bz2;name=tc32"
SRC_URI[tc32.md5sum] = "299ebd3f1c2c90930d28ab82e5d8d6c0"
S = "${WORKDIR}/${GCC_ARM_VERSION}"
do_install() {
install -d ${D}${INSTALL_GCC_ARM_NONE_EABI}
cp -r ${S}/. ${D}${INSTALL_GCC_ARM_NONE_EABI}
}
FILES_${PN} = "${INSTALL_GCC_ARM_NONE_EABI}/"
INSANE_SKIP_${PN} = "already-stripped"
@@ -0,0 +1,18 @@
SUMMARY = "Linux Kernel provided and supported by ARM/Linaro for Cortex-A32"
require recipes-kernel/linux/linux-iota.inc
# Override do_kernel_configme to avoid kernel being assembled into a linux-yocto style kernel
# https://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#ref-tasks-kernel_configme
do_kernel_configme() {
}
KERNEL_IMAGETYPE = "xipImage"
KBUILD_DEFCONFIG = "corstone700_defconfig"
KBRANCH = ""
SRC_URI = "\
git://${USER}@git.linaro.org/landing-teams/working/arm/kernel-release.git;protocol=https;branch=corstone700-19.02 \
"
SRCREV = "${AUTOREV}"
@@ -0,0 +1,16 @@
DESCRIPTION = "Linux Kernel provided and supported by ARM and Linaro with \
focus on vexpress and other ARM models and hardware. Trying to be as much \
as possible close to upstream tree."
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
SRCREV = "${AUTOREV}"
SRCREV_FORMAT = "kernel"
require recipes-kernel/linux/linux-yocto.inc
KERNEL_VERSION_SANITY_SKIP = "1"
S = "${WORKDIR}/git"
COMPATIBLE_MACHINE = "(corstone700)"