mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-06-05 02:20:30 +00:00
atp: separate recipe for gem5 models
Previously, meta-atp extended the original gem5 recipe to add the ATP Engine models; the .bbappend was complex, because it pulled from two sources, and it was not possible to make machine-based overrides, as it is a native recipe. To solve this, we use the recent EXTRAS feature to add the gem5 models from a different recipe. Signed-off-by: Adrián Herrera Arcila <adrian.herrera@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
committed by
Jon Mason
parent
29fa253f00
commit
8023f902ac
@@ -9,3 +9,7 @@ EXTRA_IMAGEDEPENDS += "gem5-m5term-native"
|
||||
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-atp atp-uapi gem5-m5readfile"
|
||||
# Optionally provide ATP kernel tests
|
||||
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "atp-test"
|
||||
|
||||
# Use ATP Engine gem5 models in gem5 build
|
||||
DEPENDS:append:pn-gem5-aarch64-native = " atp-gem5-native"
|
||||
GEM5_EXTRAS:pn-gem5-aarch64-native = "${STAGING_DATADIR_NATIVE}/atp"
|
||||
|
||||
@@ -13,7 +13,7 @@ The resulting gem5 native executable contains the AMBA ATP Engine. The resulting
|
||||
Users should run the environment as follows:
|
||||
|
||||
```bash
|
||||
./tmp/deploy/tools/start-gem5-atp.sh
|
||||
oe-run-native atp-gem5-native start-gem5-atp.sh
|
||||
```
|
||||
|
||||
This script launches a fast simulation to fast-forward Linux boot. Once Linux boot is completed, the fast simulation switches into a detailed simulation for the final usable environment. Users can connect and interact with the environment as follows:
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
require atp-source_3.1.inc
|
||||
inherit native
|
||||
|
||||
SUMMARY = "AMBA ATP Engine gem5 models"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
SRC_URI = "${ATP_SRC} file://start-gem5-atp.sh"
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
do_compile[noexec] = "1"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${datadir}/gem5/configs ${D}${datadir}/atp ${D}${bindir}
|
||||
|
||||
# baremetal_atp.py machine configuration and sample stream.atp file
|
||||
install ${S}/gem5/baremetal_atp.py ${S}/configs/stream.atp ${D}${datadir}/gem5/configs
|
||||
# ATP Engine sources for gem5 to use
|
||||
install ${S}/SConscript ${S}/*.hh ${S}/*.cc ${D}${datadir}/atp
|
||||
cp -RL ${S}/gem5 ${S}/proto ${D}${datadir}/atp
|
||||
|
||||
install ${WORKDIR}/start-gem5-atp.sh ${D}${bindir}
|
||||
}
|
||||
|
||||
addtask addto_recipe_sysroot after do_populate_sysroot before do_build
|
||||
@@ -1,24 +0,0 @@
|
||||
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}
|
||||
}
|
||||
Reference in New Issue
Block a user