Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | # gem5 platform independent build information |
| 2 | |
| 3 | SUMMARY = "A modular platform for computer-system architecture research" |
| 4 | HOMEPAGE = "http://gem5.org" |
| 5 | LICENSE = "BSD-3-Clause & MIT & LGPL-2.1-only" |
| 6 | |
| 7 | # Gem5 build and run parameter |
| 8 | |
| 9 | # See http://www.gem5.org/documentation/general_docs/building for the list of variants |
| 10 | GEM5_BUILD_VARIANT ?= "opt" |
| 11 | |
| 12 | # What gem5 binary are we building |
| 13 | GEM5_BUILD_CONFIGS ?= "build/X86/gem5.{GEM5_BUILD_VARIANT}" |
| 14 | |
| 15 | # Scons build arguments |
| 16 | GEM5_SCONS_ARGS ?= "CC=${BUILD_CC} CXX=${BUILD_CXX} \ |
| 17 | AS=${BUILD_AS} AR=${BUILD_AR} ${GEM5_BUILD_CONFIGS} \ |
| 18 | PYTHON_CONFIG=python3-config" |
| 19 | |
| 20 | # Default profile to run |
| 21 | GEM5_RUN_PROFILE ?= "configs/example/fs.py" |
| 22 | |
| 23 | # We are building a native package and we need to use scons |
| 24 | inherit scons native |
| 25 | |
| 26 | # the build is using several tools: |
| 27 | # python3: scons and six |
| 28 | # google protobuf |
| 29 | # pkgconfig |
| 30 | # hdf5 |
| 31 | DEPENDS += "m4-native python3-six-native protobuf-native hdf5-native pkgconfig-native \ |
| 32 | boost-native libpng-native" |
| 33 | |
| 34 | EXTRA_OESCONS = "${GEM5_SCONS_ARGS}" |
| 35 | |
| 36 | do_install() { |
| 37 | |
| 38 | install -d ${D}${datadir}/gem5 |
| 39 | cp -a --no-preserve=ownership -rf configs ${D}${datadir}/gem5/. |
| 40 | |
| 41 | for f in ${GEM5_BUILD_CONFIGS}; do |
| 42 | destname=$(basename $f) |
| 43 | install -d ${D}${bindir} |
| 44 | install -m 755 $f ${D}${bindir}/$destname |
| 45 | done |
| 46 | } |
| 47 | |
| 48 | FILES:${PN} = "${datadir}/gem5/* ${bindir}/*" |
| 49 | INSANE_SKIP:${PN} += "already-stripped" |
| 50 | RDEPENDS:${PN} += "python3-native hdf5-native protobuf-native libpng-native" |
| 51 | |
| 52 | addtask addto_recipe_sysroot before do_build |