Files
linux-kernel-module-cheat/gem5/external.mk
Ciro Santilli af210a7671 Move arm to virt armv7, unify arm QEMU and gem5 builds
gem5 requires armv7, and we learnt that the versatiledb we were using
was pre-v7.

We could have moved to -M vexpress-*, but in the end decided to go for
-M virt due to its simpliciy, and uniformity with aarch64.

platform_device: does not work anymore and was removed, since it was tied
to versatilepb.

We left a mention on the README and removed all in tree source. The QEMU
patch is still left as it was.

As a consequence, the linux tree had no other patches, and we now use
vanilla linux by default, which is a great thing for reproducibility.

Another consequence is the /poweroff.out works for arm -M virt,
and we removed all mentions of the problem.
2018-04-19 23:38:17 +01:00

30 lines
912 B
Makefile

################################################################################
#
# GEM5
#
################################################################################
GEM5_VERSION = 1.0
GEM5_SITE = $(BR2_EXTERNAL_GEM5_PATH)
GEM5_SITE_METHOD = local
ifeq ($(ARCH),x86_64)
ARCH_MAKE = x86
else
ARCH_MAKE = $(ARCH)
endif
define GEM5_BUILD_CMDS
# Cannot pass "-c '$(TARGET_CROSS)'" here because the ARM build uses aarch64 for the bootloader...
cd '$(@D)' && ./build -a '$(ARCH)' -j '$(BR2_JLEVEL)'
# TODO cannot use TARGET_CONFIGURE_OPTS here because it overrides the CFLAGS on m5,
# which have an include. We should patch gem5 to add a += instead of = there.
cd '$(@D)/gem5/util/m5' && $(MAKE) -f 'Makefile.$(ARCH_MAKE)' CC='$(TARGET_CC)' LD='$(TARGET_LD)'
endef
define GEM5_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 '$(@D)/gem5/util/m5/m5' '$(TARGET_DIR)/usr/bin'
endef
$(eval $(generic-package))