diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2022-08-03 16:55:16 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2022-08-03 17:56:03 +0300 |
commit | bec4ebc22c43c1ff5c3fddb820d44a88bd3aebf0 (patch) | |
tree | cd378e3e0eaff8fe11880bd397f41671e2347a39 /meta-arm/meta-atp/recipes-devtools | |
parent | 79161d7a7126cad324ff0c11a93d8e57d80203ed (diff) | |
download | openbmc-bec4ebc22c43c1ff5c3fddb820d44a88bd3aebf0.tar.xz |
Import 80d60e7 from yoctoproject.org meta-arm
To support ARMv8 SoCs.
meta-arm has several patch files. Since they are maintained by the
upstream meta-arm community, add meta-arm to the ignore list in
run-repotest.
Change-Id: Ia87a2e947bbabd347d256eccc47a343e1c885479
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-arm/meta-atp/recipes-devtools')
8 files changed, 108 insertions, 0 deletions
diff --git a/meta-arm/meta-atp/recipes-devtools/atp/atp-native_3.1.bb b/meta-arm/meta-atp/recipes-devtools/atp/atp-native_3.1.bb new file mode 100644 index 0000000000..31b58bf947 --- /dev/null +++ b/meta-arm/meta-atp/recipes-devtools/atp/atp-native_3.1.bb @@ -0,0 +1,18 @@ +require atp-source_3.1.inc +inherit pkgconfig native + +SUMMARY = "AMBA ATP Engine: synthetic traffic interface modelling framework" + +S = "${WORKDIR}/git" +SRC_URI = "${ATP_SRC} \ + file://no-werror.patch" + +EXTRA_OEMAKE += "EXTRA_CXX_FLAGS='${CXXFLAGS}' EXTRA_LD_FLAGS='${LDFLAGS}'" + +do_install() { + oe_runmake install +} + +DEPENDS = "protobuf-native cppunit-native" + +addtask addto_recipe_sysroot before do_build diff --git a/meta-arm/meta-atp/recipes-devtools/atp/atp-source_3.1.inc b/meta-arm/meta-atp/recipes-devtools/atp/atp-source_3.1.inc new file mode 100644 index 0000000000..de24ef8361 --- /dev/null +++ b/meta-arm/meta-atp/recipes-devtools/atp/atp-source_3.1.inc @@ -0,0 +1,9 @@ +ATP_SRC = "git://github.com/ARM-software/ATP-Engine.git;protocol=https;branch=master" +ATP_REV = "be1066029d6256626b37be004e2a663fbc29f37e" +ATP_LIC = "BSD-3-Clause-Clear" +ATP_LIC_MD5 = "e836b5992257064f488715d9a59752c3" + +HOMEPAGE ?= "https://github.com/ARM-software/ATP-Engine" +SRCREV ?= "${ATP_REV}" +LICENSE ?= "${ATP_LIC}" +LIC_FILES_CHKSUM ?= "file://LICENSE;md5=${ATP_LIC_MD5}" diff --git a/meta-arm/meta-atp/recipes-devtools/atp/files/no-werror.patch b/meta-arm/meta-atp/recipes-devtools/atp/files/no-werror.patch new file mode 100644 index 0000000000..4be143afa7 --- /dev/null +++ b/meta-arm/meta-atp/recipes-devtools/atp/files/no-werror.patch @@ -0,0 +1,18 @@ +Don't pass -Werror, as new compilers introduce new warnings. + +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/Makefile b/Makefile +index c01b120..1d3c30a 100644 +--- a/Makefile ++++ b/Makefile +@@ -18,7 +18,7 @@ PROTOBUF_C_FLAGS:= $(shell pkg-config --cflags protobuf) + CPPUNIT_C_FLAGS := $(shell pkg-config --cflags cppunit) + PROTOBUF_L_FLAGS:= $(shell pkg-config --libs protobuf) + CPPUNIT_L_FLAGS := $(shell pkg-config --libs cppunit) +-CXX_FLAGS := $(PROTOBUF_C_FLAGS) -std=c++11 -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-variable $(CPPUNIT_C_FLAGS) -fPIC $(EXTRA_CXX_FLAGS) ++CXX_FLAGS := $(PROTOBUF_C_FLAGS) -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable $(CPPUNIT_C_FLAGS) -fPIC $(EXTRA_CXX_FLAGS) + LD_FLAGS := $(PROTOBUF_L_FLAGS) $(CPPUNIT_L_FLAGS) $(EXTRA_LD_FLAGS) + PROTO_SRC_DIR := ./proto/ + PROTO_SRC := $(wildcard $(PROTO_SRC_DIR)tp*.proto) diff --git a/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-dtb.bbappend b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-dtb.bbappend new file mode 100644 index 0000000000..2b55b8928a --- /dev/null +++ b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-dtb.bbappend @@ -0,0 +1,3 @@ +# Export datadir paths for baremetal_atp.py script +export GEM5_DATADIR = "${STAGING_DATADIR_NATIVE}/gem5" +export ATP_DATADIR = "${STAGING_DATADIR_NATIVE}/gem5" diff --git a/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-native/start-gem5-atp.sh b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-native/start-gem5-atp.sh new file mode 100755 index 0000000000..16dac47714 --- /dev/null +++ b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-native/start-gem5-atp.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +source <(bitbake -e gem5-aarch64-native | grep \ + -e "^STAGING_DATADIR_NATIVE=" -e "^DEPLOY_DIR_TOOLS=") + +# Used by baremetal_atp.py +export GEM5_DATADIR=${STAGING_DATADIR_NATIVE}/gem5 +export ATP_DATADIR=${STAGING_DATADIR_NATIVE}/gem5 + +# Fast-forward Linux boot and restore into timing simulation +${DEPLOY_DIR_TOOLS}/start-gem5.sh --checkpoint $@ +${DEPLOY_DIR_TOOLS}/start-gem5.sh --restore-with-cpu TimingSimpleCPU \ + --checkpoint-restore 1 $@ diff --git a/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend new file mode 100644 index 0000000000..6607f0f8b7 --- /dev/null +++ b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend @@ -0,0 +1,24 @@ +require recipes-devtools/atp/atp-source_3.1.inc + +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +SRC_URI += "${ATP_SRC};destsuffix=git/atp;name=atp \ + file://start-gem5-atp.sh" +SRCREV_FORMAT = "gem5_atp" +SRCREV_atp = "${ATP_REV}" +LICENSE += "& ${ATP_LIC}" +LIC_FILES_CHKSUM += "file://atp/LICENSE;md5=${ATP_LIC_MD5}" + +EXTRA_OESCONS += "EXTRAS=${S}/atp" + +do_install:append() { + # baremetal_atp.py machine configuration and sample stream.atp file + install -m 644 ${B}/atp/gem5/baremetal_atp.py \ + ${B}/atp/configs/stream.atp \ + ${D}${datadir}/gem5/configs +} + +do_deploy:append() { + # start-gem5-atp.sh launch script + install -m 755 ${WORKDIR}/start-gem5-atp.sh ${DEPLOYDIR} +} diff --git a/meta-arm/meta-atp/recipes-devtools/gem5/gem5-m5ops/m5-readfile.sh b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-m5ops/m5-readfile.sh new file mode 100755 index 0000000000..44477e9640 --- /dev/null +++ b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-m5ops/m5-readfile.sh @@ -0,0 +1,9 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: m5-readfile +# Required-Start: $all +# Default-Start: 5 +# Description: Enables reading any script at simulation launch time. +### END INIT INFO + +m5 readfile | sh diff --git a/meta-arm/meta-atp/recipes-devtools/gem5/gem5-m5ops_20.bbappend b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-m5ops_20.bbappend new file mode 100644 index 0000000000..3ba0c3cacd --- /dev/null +++ b/meta-arm/meta-atp/recipes-devtools/gem5/gem5-m5ops_20.bbappend @@ -0,0 +1,14 @@ +inherit update-rc.d + +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +# Add startup script calling m5 readfile for automatic checkpoint and restore +SRC_URI += "file://m5-readfile.sh" + +INITSCRIPT_NAME = "m5-readfile.sh" +INITSCRIPT_PARAMS = "defaults 99" + +do_install:append() { + install -d ${D}/${INIT_D_DIR} + install -m 755 ${WORKDIR}/m5-readfile.sh ${D}/${INIT_D_DIR} +} |