2 # Copyright (C) 2016 Ben Whitten <ben.whitten@gmail.com>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 http
://mirror2.openwrt.org
/sources \
18 ftp
://ftp.denx.de
/pub
/u-boot
19 PKG_MD5SUM
:=3a8613d753dfa707c937991a35404510
21 PKG_LICENSE
:=GPL-2.0 GPL-2.0
+
22 PKG_LICENSE_FILES
:=Licenses
/README
26 include $(INCLUDE_DIR
)/package.mk
32 define uboot
/at91sam9m10g45ek_nandflash
33 TITLE
:=U-Boot for the AT91SAM9M10G45-EK board
(NandFlash
)
36 define uboot
/at91sam9x5ek_nandflash
37 TITLE
:=U-Boot for the AT91SAM9X5-EK board
(NandFlash
)
41 at91sam9m10g45ek_nandflash \
42 at91sam9x5ek_nandflash
44 define Package
/uboot
/template
45 define Package
/uboot-at91-
$(1)
47 CATEGORY
:=Boot Loaders
50 URL
:=http
://www.denx.de
/wiki
/U-Boot
52 MAINTAINER
:=Ben Whitten
<ben.whitten@gmail.com
>
56 define BuildUBootPackage
57 $(eval
$(uboot
/Default
))
59 $(call Package
/uboot
/template
,$(1),$(TITLE
))
63 $(eval
$(call uboot
/$(BUILD_VARIANT
)))
64 UBOOT_CONFIG
:=$(if
$(CONFIG
),$(CONFIG
),$(BUILD_VARIANT
))
65 UBOOT_IMAGE
:=$(if
$(IMAGE
),$(IMAGE
),lede-
$(BOARD
)-$(BUILD_VARIANT
)-u-boot.bin
)
68 define Build
/Configure
69 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
70 $(UBOOT_CONFIG
)_config
74 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
75 CROSS_COMPILE
=$(TARGET_CROSS
) \
76 KCFLAGS
="$(filter-out -fstack-protector, $(TARGET_CFLAGS))"
79 define Package
/uboot
/install/default
80 $(INSTALL_DIR
) $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)
82 $(CP
) $(PKG_BUILD_DIR
)/u-boot.bin \
83 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/u-boot.bin
85 $(CP
) $(PKG_BUILD_DIR
)/boot.bin \
86 $(BIN_DIR
)/uboot-
$(BOARD
)-$(1)/boot.bin
89 define Package
/uboot
/install/template
90 define Package
/uboot-at91-
$(1)/install
91 $(call Package
/uboot
/install/default
,$(2))
95 $(foreach u
,$(UBOOTS
), \
96 $(eval
$(call Package
/uboot
/install/template
,$(u
),$(u
))) \
99 $(foreach u
,$(UBOOTS
), \
100 $(eval
$(call BuildUBootPackage
,$(u
))) \
101 $(eval
$(call BuildPackage
,uboot-at91-
$(u
))) \