1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-16 03:47:19 +00:00
Files
Ross Burton 6147e82375 meta-gem5: extract the gem5 recipe and machine into a dedicate meta-gem5 layer
meta-arm-bsp no longer has to depend on meta-oe, and in the future
meta-gem5 could be moved out of meta-arm.

Change-Id: I49fa8f793b60af8c0cdb7e04b27fb53fc094cdad
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2020-06-29 08:46:17 -04:00

56 lines
1.5 KiB
PHP

# gem5 platform independent build information
SUMMARY = "A modular platform for computer-system architecture research"
HOMEPAGE = "http://gem5.org"
LICENSE = "BSD & MIT & LGPLv2.1"
# Gem5 build and run parameter
# What gem5 binary are we building
GEM5_BUILD_CONFIGS ?= "build/X86/gem5.opt"
# Scons build arguments
GEM5_SCONS_ARGS ?= "-j ${BB_NUMBER_THREADS} CC=${BUILD_CC} CXX=${BUILD_CXX} \
AS=${BUILD_AS} AR=${BUILD_AR} ${GEM5_BUILD_CONFIGS} \
PYTHON_CONFIG=python3-config"
# Default profile to run
GEM5_RUN_PROFILE ?= "configs/example/fs.py"
# We are building a native package and we need to use scons
inherit native scons
# the build is using several tools:
# python3: scons and six
# google protobuf
# pkgconfig
# hdf5
DEPENDS += "python3-six-native protobuf-native hdf5-native pkgconfig-native \
boost-native libpng-native"
EXTRA_OESCONS = "${GEM5_SCONS_ARGS}"
do_install() {
install -d ${D}${datadir}/gem5
cp -a --no-preserve=ownership -rf configs ${D}${datadir}/gem5/.
for f in ${GEM5_BUILD_CONFIGS}; do
destname=$(basename $f)
install -d ${D}${bindir}
install -m 755 $f ${D}${bindir}/$destname.real
cat <<EOF > ${D}${bindir}/$destname
#!/bin/bash
basedir=\$(cd \$(dirname \$0)/../../; pwd)
export LD_LIBRARY_PATH="\$basedir/lib:\$basedir/usr/lib"
\$basedir/usr/bin/$destname.real "\$@"
EOF
chmod a+x ${D}${bindir}/$destname
done
}
FILES_${PN} = "${datadir}/gem5/* ${bindir}/*"
INSANE_SKIP_${PN} += "already-stripped"
RDEPENDS_${PN} += "python3-native hdf5-native protobuf-native libpng-native"