e2d3ed032259c2d1dece8df5563f874fb759f9b8
[openwrt/openwrt.git] / package / boot / uboot-at91 / Makefile
1 #
2 # Copyright (C) 2016 Ben Whitten <ben.whitten@gmail.com>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_VERSION:=2016.05
11 PKG_RELEASE:=1
12
13 PKG_HASH:=87d02275615aaf0cd007b54cbe9fbadceef2bee7c79e6c323ea1ae8956dcb171
14
15 include $(INCLUDE_DIR)/u-boot.mk
16 include $(INCLUDE_DIR)/package.mk
17
18 define U-Boot/Default
19 BUILD_TARGET:=at91
20 UBOOT_IMAGE:=u-boot.bin boot.bin
21 endef
22
23 define U-Boot/at91sam9m10g45ek_nandflash
24 NAME:=AT91SAM9M10G45-EK board (NandFlash)
25 BUILD_SUBTARGET:=legacy
26 endef
27
28 define U-Boot/at91sam9x5ek_nandflash
29 NAME:=AT91SAM9X5-EK board (NandFlash)
30 BUILD_SUBTARGET:=legacy
31 endef
32
33 define uboot/sama5d3_xplained_nandflash
34 TITLE:=U-Boot for the SAMA5D3 Xplained board (NandFlash)
35 BUILD_SUBTARGET:=sama5
36 BUILD_DEVICES:=at91-sama5d3_xplained
37 endef
38
39 define uboot/sama5d3_xplained_mmc
40 TITLE:=U-Boot for the SAMA5D3 Xplained board (SDcard)
41 BUILD_SUBTARGET:=sama5
42 BUILD_DEVICES:=at91-sama5d3_xplained
43 endef
44
45 define uboot/sama5d2_xplained_spiflash
46 TITLE:=U-Boot for the SAMA5D2 Xplained board (SPI Flash)
47 BUILD_SUBTARGET:=sama5
48 BUILD_DEVICES:=at91-sama5d2_xplained
49 endef
50
51 define uboot/sama5d2_xplained_mmc
52 TITLE:=U-Boot for the SAMA5D2 Xplained board (SDcard/EMMC)
53 BUILD_SUBTARGET:=sama5
54 BUILD_DEVICES:=at91-sama5d2_xplained
55 endef
56
57 UBOOT_TARGETS := \
58 at91sam9m10g45ek_nandflash \
59 at91sam9x5ek_nandflash \
60 sama5d3_xplained_nandflash \
61 sama5d3_xplained_mmc \
62 sama5d2_xplained_mmc \
63 sama5d2_xplained_spiflash
64
65
66 define Build/Compile
67 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
68 CROSS_COMPILE=$(TARGET_CROSS) \
69 KCFLAGS="$(filter-out -fstack-protector, $(TARGET_CFLAGS))"
70 endef
71
72 $(eval $(call BuildPackage/U-Boot))