uboot-at91: fetch uboot src from u-boot-at91 github
[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:=linux4sam_5.8
11 PKG_RELEASE:=1
12
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL:=https://github.com/linux4sam/u-boot-at91.git
15 PKG_SOURCE_VERSION:=59f202622154f82e708a6ca2bf86350a5c1b2d33
16
17 include $(INCLUDE_DIR)/u-boot.mk
18 include $(INCLUDE_DIR)/package.mk
19
20 define U-Boot/Default
21 BUILD_TARGET:=at91
22 HIDDEN:=1
23 UBOOT_IMAGE:=u-boot.bin boot.bin
24 endef
25
26 define U-Boot/at91sam9m10g45ek_nandflash
27 NAME:=AT91SAM9M10G45-EK board (NandFlash)
28 BUILD_SUBTARGET:=legacy
29 BUILD_DEVICES:=at91sam9m10g45ek
30 endef
31
32 define U-Boot/at91sam9x5ek_nandflash
33 NAME:=AT91SAM9X5-EK board (NandFlash)
34 BUILD_SUBTARGET:=legacy
35 BUILD_DEVICES:=at91sam9g15ek at91sam9g25ek \
36 at91sam9g35ek at91sam9x25ek \
37 at91sam9x35ek
38 endef
39
40 define U-Boot/sama5d3_xplained_nandflash
41 NAME:=SAMA5D3 Xplained board (NandFlash)
42 BUILD_SUBTARGET:=sama5
43 BUILD_DEVICES:=at91-sama5d3_xplained
44 endef
45
46 define U-Boot/sama5d3_xplained_mmc
47 NAME:=SAMA5D3 Xplained board (SDcard)
48 BUILD_SUBTARGET:=sama5
49 BUILD_DEVICES:=at91-sama5d3_xplained
50 endef
51
52 define U-Boot/sama5d2_xplained_spiflash
53 NAME:=SAMA5D2 Xplained board (SPI Flash)
54 BUILD_SUBTARGET:=sama5
55 BUILD_DEVICES:=at91-sama5d2_xplained
56 endef
57
58 define U-Boot/sama5d2_xplained_mmc
59 NAME:=SAMA5D2 Xplained board (SDcard/EMMC)
60 BUILD_SUBTARGET:=sama5
61 BUILD_DEVICES:=at91-sama5d2_xplained
62 endef
63
64 define U-Boot/sama5d4_xplained_spiflash
65 NAME:=SAMA5D4 Xplained board (SPI Flash)
66 BUILD_SUBTARGET:=sama5
67 BUILD_DEVICES:=at91-sama5d4_xplained
68 endef
69
70 define U-Boot/sama5d4_xplained_mmc
71 NAME:=SAMA5D4 Xplained board (SDcard)
72 BUILD_SUBTARGET:=sama5
73 BUILD_DEVICES:=at91-sama5d4_xplained
74 endef
75
76 define U-Boot/sama5d4_xplained_nandflash
77 NAME:=SAMA5D4 Xplained board (NandFlash)
78 BUILD_SUBTARGET:=sama5
79 BUILD_DEVICES:=at91-sama5d4_xplained
80 endef
81
82 UBOOT_TARGETS := \
83 at91sam9m10g45ek_nandflash \
84 at91sam9x5ek_nandflash \
85 sama5d3_xplained_nandflash \
86 sama5d3_xplained_mmc \
87 sama5d2_xplained_mmc \
88 sama5d2_xplained_spiflash \
89 sama5d4_xplained_mmc \
90 sama5d4_xplained_spiflash \
91 sama5d4_xplained_nandflash
92
93 define Build/Compile
94 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
95 CROSS_COMPILE=$(TARGET_CROSS) \
96 KCFLAGS="$(filter-out -fstack-protector \
97 -mfloat-abi=hard, $(TARGET_CFLAGS)) -mfloat-abi=soft"
98 endef
99
100 $(eval $(call BuildPackage/U-Boot))