ipq40xx: Enable the Engenius EAP1300
[openwrt/openwrt.git] / package / boot / uboot-tegra / Makefile
1 #
2 # Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505@gmail.com>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_VERSION := 2020.04
10 PKG_RELEASE:=3
11
12 PKG_HASH := fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
13
14 PKG_MAINTAINER := Tomasz Maciej Nowak <tmn505@gmail.com>
15
16 include $(INCLUDE_DIR)/u-boot.mk
17 include $(INCLUDE_DIR)/package.mk
18
19 define U-Boot/Default
20 BUILD_TARGET := tegra
21 BUILD_SUBTARGET := generic
22 HIDDEN := y
23 endef
24
25 define U-Boot/trimslice
26 NAME := CompuLab TrimSlice
27 BUILD_DEVICES := compulab_trimslice
28 UBOOT_IMAGE := trimslice-mmc.img trimslice-spi.img
29 SOC := tegra20
30 VENDOR := compulab
31 endef
32
33 UBOOT_TARGETS := trimslice
34
35 define Build/bct-image
36 $(CP) $(PKG_BUILD_DIR)/u-boot-dtb-tegra.bin $(PKG_BUILD_DIR)/u-boot.bin
37 $(foreach bct,$(basename $(UBOOT_IMAGE)), \
38 cd $(PKG_BUILD_DIR); \
39 cbootimage -s $(SOC) -gbct \
40 $(STAGING_DIR_HOST)/share/cbootimage-configs/$(SOC)/$(VENDOR)/$(VARIANT)/$(bct).bct.cfg \
41 $(bct).bct; \
42 cbootimage -s $(SOC) \
43 $(STAGING_DIR_HOST)/share/cbootimage-configs/$(SOC)/$(VENDOR)/$(VARIANT)/$(bct).img.cfg \
44 $(PKG_BUILD_DIR)/$(bct).img; \
45 rm -f $(bct).bct; \
46 )
47 endef
48
49 define Build/Configure
50 sed '/select BINMAN/d' -i $(PKG_BUILD_DIR)/arch/arm/mach-tegra/Kconfig
51 $(call Build/Configure/U-Boot)
52 endef
53
54 define Build/Compile
55 $(call Build/Compile/U-Boot)
56 $(call Build/bct-image)
57 endef
58
59 define Build/InstallDev
60 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
61 $(foreach img,$(UBOOT_IMAGE), \
62 $(CP) $(PKG_BUILD_DIR)/$(img) $(STAGING_DIR_IMAGE)/;)
63 endef
64
65 $(eval $(call BuildPackage/U-Boot))