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>
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 0000000..2b55b89
--- /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 0000000..16dac47
--- /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 0000000..6607f0f
--- /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 0000000..44477e9
--- /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 0000000..3ba0c3c
--- /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}
+}