2
0

Makefile 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #
  2. # Copyright (C) 2013-2016 OpenWrt.org
  3. # Copyright (C) 2017 Yousong Zhou
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. include $(INCLUDE_DIR)/kernel.mk
  10. PKG_NAME:=u-boot
  11. PKG_VERSION:=2016.03
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
  14. PKG_HASH:=e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb
  15. PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
  16. PKG_LICENSE:=GPL-2.0 GPL-2.0+
  17. PKG_LICENSE_FILES:=Licenses/README
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/uboot/template
  22. define Package/uboot-sunxi-$(1)
  23. SECTION:=boot
  24. CATEGORY:=Boot Loaders
  25. DEPENDS:=@TARGET_sunxi
  26. TITLE:=U-Boot for $(2)
  27. URL:=http://www.denx.de/wiki/U-Boot
  28. VARIANT:=$(1)
  29. endef
  30. define Package/uboot-sunxi-$(1)/install
  31. $(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
  32. $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
  33. mkimage -C none -A arm -T script -d uEnv-$(if $(3),$(3),default).txt \
  34. $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
  35. endef
  36. UBOOT_SUNXI_PACKAGES += uboot-sunxi-$(1)
  37. endef
  38. $(eval $(call Package/uboot/template,A10-OLinuXino-Lime,the A10 OLinuXino LIME))
  39. $(eval $(call Package/uboot/template,A13-OLinuXino,the A13 OlinuXino))
  40. $(eval $(call Package/uboot/template,A20-OLinuXino-Lime,the A20 OLinuXino LIME))
  41. $(eval $(call Package/uboot/template,A20-OLinuXino_MICRO,A20 OLinuXino MICRO))
  42. $(eval $(call Package/uboot/template,Bananapi,Bananapi))
  43. $(eval $(call Package/uboot/template,Bananapro,Bananapro))
  44. $(eval $(call Package/uboot/template,Cubieboard,Cubieboard))
  45. $(eval $(call Package/uboot/template,Cubieboard2,Cubieboard2))
  46. $(eval $(call Package/uboot/template,Cubietruck,Cubietruck))
  47. $(eval $(call Package/uboot/template,Hummingbird_A31,the Hummingbird A31 board))
  48. $(eval $(call Package/uboot/template,Mele_M9,the Mele M9 (A31)))
  49. $(eval $(call Package/uboot/template,OLIMEX_A13_SOM,the Olimex A13 SOM))
  50. $(eval $(call Package/uboot/template,Linksprite_pcDuino,Linksprite pcDuino))
  51. $(eval $(call Package/uboot/template,Linksprite_pcDuino3,Linksprite pcDuino3))
  52. $(eval $(call Package/uboot/template,Lamobo_R1,Lamobo R1))
  53. $(eval $(call Package/uboot/template,orangepi_plus,Orange Pi Plus (H3)))
  54. $(eval $(call Package/uboot/template,pangolin,Theobroma A31-yQ7 devboard,pangolin))
  55. define Package/uboot-sunxi-all
  56. SECTION:=boot
  57. CATEGORY:=Boot Loaders
  58. DEPENDS:=@TARGET_sunxi
  59. TITLE:=Meta package for selecting all variants of uboot-sunxi
  60. URL:=http://www.denx.de/wiki/U-Boot
  61. DEPENDS:=$(patsubst %,+%,$(UBOOT_SUNXI_PACKAGES))
  62. endef
  63. ifdef BUILD_VARIANT
  64. define Build/Configure
  65. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  66. USE_PRIVATE_LIBGCC=yes $(BUILD_VARIANT)_defconfig
  67. endef
  68. define Build/Compile
  69. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  70. CROSS_COMPILE=$(TARGET_CROSS) \
  71. DTCDIR=$(LINUX_DIR)/scripts/dtc/
  72. endef
  73. else # BUILD_VARIANT
  74. define Build/Prepare
  75. endef
  76. define Build/Configure
  77. endef
  78. define Build/Compile
  79. endef
  80. endif # BUILD_VARIANT
  81. $(foreach pkg,$(UBOOT_SUNXI_PACKAGES), \
  82. $(eval $(call BuildPackage,$(pkg))) \
  83. )
  84. $(eval $(call BuildPackage,uboot-sunxi-all))