2 # Copyright (C) 2017-2019 Tomasz Maciej Nowak <tomek_n@o2.pl>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
12 PKG_HASH := 50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22
14 PKG_MAINTAINER := Tomasz Maciej Nowak <tomek_n@o2.pl>
16 include $(INCLUDE_DIR)/u-boot.mk
17 include $(INCLUDE_DIR)/package.mk
24 define U-Boot/trimslice
25 NAME := CompuLab TrimSlice
26 BUILD_DEVICES := trimslice
27 UBOOT_IMAGE := trimslice-mmc.img trimslice-spi.img
32 UBOOT_TARGETS := trimslice
34 define Build/bct-image
35 $(CP) $(PKG_BUILD_DIR)/u-boot-dtb-tegra.bin $(PKG_BUILD_DIR)/u-boot.bin
36 $(foreach bct,$(basename $(UBOOT_IMAGE)), \
37 cd $(PKG_BUILD_DIR); \
38 cbootimage -s $(SOC) -gbct \
39 $(STAGING_DIR_HOST)/share/cbootimage-configs/$(SOC)/$(VENDOR)/$(VARIANT)/$(bct).bct.cfg \
41 cbootimage -s $(SOC) \
42 $(STAGING_DIR_HOST)/share/cbootimage-configs/$(SOC)/$(VENDOR)/$(VARIANT)/$(bct).img.cfg \
43 $(PKG_BUILD_DIR)/$(bct).img; \
48 define Build/Configure
49 sed '/select BINMAN/d' -i $(PKG_BUILD_DIR)/arch/arm/mach-tegra/Kconfig
50 $(call Build/Configure/U-Boot)
54 $(call Build/Compile/U-Boot)
55 $(call Build/bct-image)
58 define Build/InstallDev
59 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
60 $(foreach img,$(UBOOT_IMAGE), \
61 $(CP) $(PKG_BUILD_DIR)/$(img) $(STAGING_DIR_IMAGE)/;)
64 $(eval $(call BuildPackage/U-Boot))