a90008bbd1d301817e27c5bb9f2aae4610c4aa7c
[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 := 2024.04
10 PKG_RELEASE:=1
11
12 PKG_HASH := 18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a
13
14 PKG_MAINTAINER := Tomasz Maciej Nowak <tmn505@gmail.com>
15
16 UBOOT_USE_INTREE_DTC:=1
17
18 include $(INCLUDE_DIR)/u-boot.mk
19 include $(INCLUDE_DIR)/package.mk
20
21 define U-Boot/Default
22 BUILD_TARGET := tegra
23 BUILD_SUBTARGET := generic
24 HIDDEN := y
25 endef
26
27 define U-Boot/trimslice
28 NAME := CompuLab TrimSlice
29 BUILD_DEVICES := compulab_trimslice
30 UBOOT_IMAGE := trimslice-mmc.img trimslice-spi.img
31 SOC := tegra20
32 VENDOR := compulab
33 endef
34
35 UBOOT_TARGETS := trimslice
36
37 define Build/bct-image
38 $(CP) $(PKG_BUILD_DIR)/u-boot-dtb-tegra.bin $(PKG_BUILD_DIR)/u-boot.bin
39 $(foreach bct,$(basename $(UBOOT_IMAGE)), \
40 cd $(PKG_BUILD_DIR); \
41 cbootimage -s $(SOC) -gbct \
42 $(STAGING_DIR_HOST)/share/cbootimage-configs/$(SOC)/$(VENDOR)/$(VARIANT)/$(bct).bct.cfg \
43 $(bct).bct; \
44 cbootimage -s $(SOC) \
45 $(STAGING_DIR_HOST)/share/cbootimage-configs/$(SOC)/$(VENDOR)/$(VARIANT)/$(bct).img.cfg \
46 $(PKG_BUILD_DIR)/$(bct).img; \
47 rm -f $(bct).bct; \
48 )
49 endef
50
51 define Build/Compile
52 $(call Build/Compile/U-Boot)
53 $(call Build/bct-image)
54 endef
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
58 $(foreach img,$(UBOOT_IMAGE), \
59 $(CP) $(PKG_BUILD_DIR)/$(img) $(STAGING_DIR_IMAGE)/;)
60 endef
61
62 $(eval $(call BuildPackage/U-Boot))