boot-wrapper-aarch64.mk 2.0 KB

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