1################################################################################
2#
3# boot-wrapper-aarch64
4#
5################################################################################
6
7BOOT_WRAPPER_AARCH64_VERSION = 9f26a1c1f27bd6b5b66c265114848007fc22e4aa
8BOOT_WRAPPER_AARCH64_SITE = https://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git
9BOOT_WRAPPER_AARCH64_SITE_METHOD = git
10BOOT_WRAPPER_AARCH64_LICENSE = BSD-3-Clause
11BOOT_WRAPPER_AARCH64_LICENSE_FILES = LICENSE.txt
12BOOT_WRAPPER_AARCH64_DEPENDENCIES = linux
13BOOT_WRAPPER_AARCH64_INSTALL_IMAGES = YES
14
15# The Git repository does not have the generated configure script and
16# Makefile.
17BOOT_WRAPPER_AARCH64_AUTORECONF = YES
18
19BOOT_WRAPPER_AARCH64_DTB = $(LINUX_DIR)/arch/arm64/boot/dts/$(basename $(call qstrip,$(BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS))).dtb
20
21BOOT_WRAPPER_AARCH64_CONF_OPTS = \
22	--with-kernel-dir=$(LINUX_DIR) \
23	--with-dtb=$(BOOT_WRAPPER_AARCH64_DTB) \
24	--with-cmdline=$(BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS)
25
26ifeq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_PSCI),y)
27BOOT_WRAPPER_AARCH64_CONF_OPTS += --enable-psci
28else
29BOOT_WRAPPER_AARCH64_CONF_OPTS += --disable-psci
30endif
31
32ifeq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_GICV3),y)
33BOOT_WRAPPER_AARCH64_CONF_OPTS += --enable-gicv3
34endif
35
36# We need to convince the configure script that the Linux kernel tree
37# exists, as well as the DTB and the kernel Image. Even though those
38# are available on the build machine, the configure script uses
39# AC_CHECK_FILE tests, which are always disabled in cross-compilation
40# situations.
41BOOT_WRAPPER_AARCH64_CONF_ENV = \
42	$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR))=yes \
43	$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR)$(BOOT_WRAPPER_AARCH64_DTB))=yes \
44	$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR)/arch/arm64/boot/Image)=yes
45
46define BOOT_WRAPPER_AARCH64_INSTALL_IMAGES_CMDS
47	cp $(@D)/linux-system.axf $(BINARIES_DIR)
48endef
49
50$(eval $(autotools-package))
51