mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
28 lines
748 B
Makefile
28 lines
748 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)'
|
|
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))
|