Makefile 1.5 KB

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