1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-05 14:30:10 +00:00

arm-bsp: Update gem5 and switch to python3

This patch includes several fixes for gem5-aarch64
- Switch to a new version of gem5 supporting python3 and use python3 to
 build it.
 We use a version in develop branch of gem5 for now and we will have to
 switch to release 20 once it is released mid of may.
- Remove scons python2 recipes which were used before by gem5 as a
 workaround until gem5 was updated to support python3
- make gem5-aarch64-bootloader only compatible with gem5-aarch64
- remove unnecessary FILESEXTRAPATHS_prepend in gem5-aarch64-bootloader

Change-Id: Iad9af4f2e6073ef63a51c2c33a05ed3855dd8f08
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Bertrand Marquis
2020-05-07 17:48:18 +01:00
committed by Jon Mason
parent 0ff012ecb2
commit 56c245133b
8 changed files with 20 additions and 57 deletions
@@ -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"
@@ -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"
@@ -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
@@ -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"
@@ -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"
@@ -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.
@@ -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'
}
@@ -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<pver>\d+(\.\d+)+)\.tar"
inherit pypi setuptools
RDEPENDS_${PN} = "\
python-fcntl \
python-io \
python-json \
python-subprocess \
python-shell \
python-pprint \
"