Makefile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= u-boot
  5. PKG_VERSION:= 2015.01
  6. PKG_RELEASE:= 2
  7. PKG_HASH:= 383051a656ebe11757b17d38a3326387e4a1b0949ca8a9e8ee506bf71dac9fde
  8. PKG_DESCR:= portable bootloader
  9. PKG_SECTION:= base/boot
  10. HOST_BUILDDEP:= openssl-host
  11. PKG_BUILDDEP:= u-boot-host
  12. PKG_URL:= http://www.denx.de/wiki/U-Boot
  13. PKG_SITES:= ftp://ftp.denx.de/pub/u-boot/
  14. PKG_CFLINE_U_BOOT:= select ADK_KERNEL_ATAGS if ADK_TARGET_ARCH_ARM
  15. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
  16. PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 atmel-ngw100
  17. include $(ADK_TOPDIR)/mk/host.mk
  18. include $(ADK_TOPDIR)/mk/package.mk
  19. $(eval $(call HOST_template,U_BOOT,u-boot,$(PKG_VERSION)-$(PKG_RELEASE)))
  20. $(eval $(call PKG_template,U_BOOT,u-boot,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
  21. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  22. CONFIG:= rpi_defconfig
  23. endif
  24. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y)
  25. CONFIG:= rpi_defconfig
  26. endif
  27. ifeq ($(ADK_TARGET_SYSTEM_ATMEL_NGW100),y)
  28. CONFIG:= atngw100_defconfig
  29. endif
  30. HOST_MAKE_FLAGS+= HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)"
  31. HOST_STYLE:= manual
  32. CONFIG_STYLE:= manual
  33. BUILD_STYLE:= manual
  34. INSTALL_STYLE:= manual
  35. host-build:
  36. (cd $(WRKBUILD) && env $(HOST_MAKE_ENV) $(MAKE) -f $(MAKE_FILE) \
  37. $(HOST_MAKE_FLAGS) sandbox_defconfig )
  38. (cd $(WRKBUILD) && env $(HOST_MAKE_ENV) $(MAKE) -f $(MAKE_FILE) \
  39. $(HOST_MAKE_FLAGS) tools $(MAKE_TRACE) )
  40. u-boot-hostinstall:
  41. $(INSTALL_BIN) $(WRKBUILD)/tools/mk{,env}image \
  42. $(STAGING_HOST_DIR)/usr/bin
  43. do-configure:
  44. (cd $(WRKBUILD) && $(MAKE) $(CONFIG))
  45. do-build:
  46. (cd $(WRKBUILD) && env CROSS_COMPILE='$(TARGET_CROSS)' \
  47. GCC_HONOUR_COPTS=s $(MAKE))
  48. (cd $(WRKBUILD) && env CROSS_COMPILE='$(TARGET_CROSS)' \
  49. GCC_HONOUR_COPTS=s $(MAKE) env)
  50. u-boot-install:
  51. $(CP) $(WRKBUILD)/u-boot.bin $(FW_DIR)
  52. $(INSTALL_DIR) $(IDIR_U_BOOT)/etc
  53. $(CP) ./files/fw_env.config $(IDIR_U_BOOT)/etc
  54. $(INSTALL_DIR) $(IDIR_U_BOOT)/usr/bin
  55. $(INSTALL_BIN) $(WRKBUILD)/tools/env/fw_printenv \
  56. $(IDIR_U_BOOT)/usr/bin
  57. (cd $(IDIR_U_BOOT)/usr/bin && ln -sf fw_printenv fw_setenv)
  58. $(INSTALL_BIN) ./files/uboot_print_env $(IDIR_U_BOOT)/usr/bin
  59. $(INSTALL_BIN) ./files/uboot_set_env $(IDIR_U_BOOT)/usr/bin
  60. include $(ADK_TOPDIR)/mk/host-bottom.mk
  61. include $(ADK_TOPDIR)/mk/pkg-bottom.mk