diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc index 72069ad6..4c479f5d 100644 --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc @@ -7,8 +7,7 @@ inherit deploy PROVIDES = "virtual/gem5-bootloader" -COMPATIBLE_MACHINE ?= "" -COMPATIBLE_MACHINE_gem5_arm64 = "gem5-arm64" +COMPATIBLE_MACHINE = "gem5-arm64" # no configure step do_configure[noexec] = "1" diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb index ffbc2da4..68f36483 100644 --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb @@ -1,16 +1,17 @@ # gem5 custom bootloader -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https" - LIC_FILES_CHKSUM = "file://COPYING;md5=2d9514d69d8abf88b6e9125e759bf0ab \ file://LICENSE;md5=a585e2893cee63d16a1d8bc16c6297ec" +# The recipe is currently using a version in the development branch of gem5 +# until version 20 with python3 support is released +SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;branch=develop" + PV = "git${SRCPV}" S = "${WORKDIR}/git" -SRCREV = "bcf041f257623e5c9e77d35b7531bae59edc0423" +SRCREV = "3eab6ea51e4c2b97e7a68835dddacb989d7559c4" BPN = "gem5-aarch64-bootloader" diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb index 362a8e0f..b97a1b28 100644 --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb @@ -9,14 +9,9 @@ DEPENDS = "gem5-aarch64-native" do_configure[noexec] = "1" do_compile() { - # Gem5 is requiring a non zero size disk even though it is not required to - # generate the dtb. Use /proc/version as disk file. - # generate a dtb using gem5 gem5.opt \ ${STAGING_DATADIR_NATIVE}/gem5/configs/example/arm/baremetal.py \ - --disk-image /proc/version \ - --kernel "" \ --dtb-gen if [ ! -f m5out/system.dtb ]; then diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb index 9c77121f..c42c82ff 100644 --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb @@ -3,13 +3,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2d9514d69d8abf88b6e9125e759bf0ab \ file://LICENSE;md5=a585e2893cee63d16a1d8bc16c6297ec" -SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https" +# The recipe is currently using a version in the development branch of gem5 +# until version 20 with python3 support is released +SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;branch=develop" PV = "git${SRCPV}" S = "${WORKDIR}/git" -SRCREV = "bcf041f257623e5c9e77d35b7531bae59edc0423" +SRCREV = "3eab6ea51e4c2b97e7a68835dddacb989d7559c4" BPN = "gem5-aarch64-native" diff --git a/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc b/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc index 4b02d13e..429e18ce 100644 --- a/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc +++ b/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc @@ -11,30 +11,29 @@ 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}" + 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 python -inherit native pythonnative +# We are building a native package and we need to use scons +inherit native scons # the build is using several tools: -# python: scons and six +# python3: scons and six # google protobuf # pkgconfig # hdf5 -DEPENDS += "python-native python-scons-native python-six-native \ - protobuf-native hdf5-native pkgconfig-native boost-native libpng-native" +DEPENDS += "python3-six-native protobuf-native hdf5-native pkgconfig-native \ + boost-native libpng-native" -do_configure[noexec] = "1" +EXTRA_OESCONS = "${GEM5_SCONS_ARGS}" -do_compile() { +do_compile_prepend() { # We need to use the proper native libraries when executing # compiled applications export LD_LIBRARY_PATH="${STAGING_LIBDIR_NATIVE}" - - scons ${GEM5_SCONS_ARGS} } do_install() { @@ -58,5 +57,5 @@ EOF FILES_${PN} = "${datadir}/gem5/* ${bindir}/*" INSANE_SKIP_${PN} += "already-stripped" -RDEPENDS_${PN} += "python-native hdf5-native protobuf-native libpng-native" +RDEPENDS_${PN} += "python3-native hdf5-native protobuf-native libpng-native" diff --git a/meta-arm-bsp/recipes-devtools/python/README b/meta-arm-bsp/recipes-devtools/python/README deleted file mode 100644 index b80c757c..00000000 --- a/meta-arm-bsp/recipes-devtools/python/README +++ /dev/null @@ -1,4 +0,0 @@ -This is added for Gem5 compilation with Zeus as it has been removed from -OpenEmbedded (and Gem5 needs scons to be compiled). - -This should be removed once Gem5 supports properly python3. diff --git a/meta-arm-bsp/recipes-devtools/python/python-scons-native_3.0.1.bb b/meta-arm-bsp/recipes-devtools/python/python-scons-native_3.0.1.bb deleted file mode 100644 index 68b63c93..00000000 --- a/meta-arm-bsp/recipes-devtools/python/python-scons-native_3.0.1.bb +++ /dev/null @@ -1,8 +0,0 @@ -require python-scons_${PV}.bb -inherit native pythonnative -DEPENDS = "python-native" -RDEPENDS_${PN} = "" - -do_install_append() { - create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' PYTHONNOUSERSITE='1' -} diff --git a/meta-arm-bsp/recipes-devtools/python/python-scons_3.0.1.bb b/meta-arm-bsp/recipes-devtools/python/python-scons_3.0.1.bb deleted file mode 100644 index d5084b2d..00000000 --- a/meta-arm-bsp/recipes-devtools/python/python-scons_3.0.1.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Software Construction tool (make/autotools replacement)" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=46ddf66004e5be5566367cb525a66fc6" - -SRC_URI[md5sum] = "b6a292e251b34b82c203b56cfa3968b3" -SRC_URI[sha256sum] = "24475e38d39c19683bc88054524df018fe6949d70fbd4c69e298d39a0269f173" - -UPSTREAM_CHECK_URI = "http://scons.org/pages/download.html" -UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)\.tar" - -inherit pypi setuptools - -RDEPENDS_${PN} = "\ - python-fcntl \ - python-io \ - python-json \ - python-subprocess \ - python-shell \ - python-pprint \ - "