Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #
  2. # Copyright (C) 2017-2019 Tomasz Maciej Nowak <[email protected]>
  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. PKG_VERSION := 2019.04
  9. PKG_RELEASE := 1
  10. PKG_HASH := 76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef
  11. PKG_MAINTAINER := Tomasz Maciej Nowak <[email protected]>
  12. include $(INCLUDE_DIR)/u-boot.mk
  13. include $(INCLUDE_DIR)/package.mk
  14. define U-Boot/Default
  15. BUILD_TARGET := tegra
  16. HIDDEN := y
  17. endef
  18. define U-Boot/trimslice
  19. NAME := CompuLab TrimSlice
  20. BUILD_DEVICES := compulab_trimslice
  21. UBOOT_IMAGE := trimslice-mmc.img trimslice-spi.img
  22. SOC := tegra20
  23. VENDOR := compulab
  24. endef
  25. UBOOT_TARGETS := trimslice
  26. define Build/bct-image
  27. $(CP) $(PKG_BUILD_DIR)/u-boot-dtb-tegra.bin $(PKG_BUILD_DIR)/u-boot.bin
  28. $(foreach bct,$(basename $(UBOOT_IMAGE)), \
  29. cd $(PKG_BUILD_DIR); \
  30. cbootimage -s $(SOC) -gbct \
  31. $(STAGING_DIR_HOST)/share/cbootimage-configs/$(SOC)/$(VENDOR)/$(VARIANT)/$(bct).bct.cfg \
  32. $(bct).bct; \
  33. cbootimage -s $(SOC) \
  34. $(STAGING_DIR_HOST)/share/cbootimage-configs/$(SOC)/$(VENDOR)/$(VARIANT)/$(bct).img.cfg \
  35. $(PKG_BUILD_DIR)/$(bct).img; \
  36. rm -f $(bct).bct; \
  37. )
  38. endef
  39. define Build/Configure
  40. sed '/select BINMAN/d' -i $(PKG_BUILD_DIR)/arch/arm/mach-tegra/Kconfig
  41. $(call Build/Configure/U-Boot)
  42. endef
  43. define Build/Compile
  44. $(call Build/Compile/U-Boot)
  45. $(call Build/bct-image)
  46. endef
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
  49. $(foreach img,$(UBOOT_IMAGE), \
  50. $(CP) $(PKG_BUILD_DIR)/$(img) $(STAGING_DIR_IMAGE)/;)
  51. endef
  52. $(eval $(call BuildPackage/U-Boot))