Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. #
  2. # Copyright (C) 2016 Jiang Yutang <[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_NAME:=uboot-layerscape
  9. PKG_VERSION:=6.12.20.2.0.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/nxp-qoriq/u-boot
  13. PKG_SOURCE_VERSION:=lf-6.12.20-2.0.0
  14. PKG_MIRROR_HASH:=13594333aa3ee131d5832b4da88f73cf0744d98c28e90ad3e03594788c486e37
  15. include $(INCLUDE_DIR)/u-boot.mk
  16. include $(INCLUDE_DIR)/package.mk
  17. define U-Boot/Default
  18. BUILD_TARGET:=layerscape
  19. BUILD_SUBTARGET:=armv8_64b
  20. BUILD_DEVICES:=$(1)
  21. UBOOT_IMAGE:=u-boot-dtb.bin
  22. ENV_SIZE:=0x2000
  23. endef
  24. define U-Boot/fsl_ls1012a-frdm
  25. NAME:=NXP LS1012AFRDM
  26. UBOOT_CONFIG:=ls1012afrdm_tfa
  27. endef
  28. define U-Boot/fsl_ls1012a-rdb
  29. NAME:=NXP LS1012ARDB
  30. UBOOT_CONFIG:=ls1012ardb_tfa
  31. endef
  32. define U-Boot/fsl_ls1012a-frwy-sdboot
  33. NAME:=NXP LS1012AFRWY
  34. UBOOT_CONFIG:=ls1012afrwy_tfa
  35. endef
  36. define U-Boot/fsl_ls1028a-rdb
  37. NAME:=NXP LS1028ARDB
  38. UBOOT_CONFIG:=ls1028ardb_tfa
  39. endef
  40. define U-Boot/fsl_ls1028a-rdb-sdboot
  41. NAME:=NXP LS1028ARDB SD Card Boot
  42. UBOOT_CONFIG:=ls1028ardb_tfa
  43. endef
  44. define U-Boot/fsl_ls1043a-rdb
  45. NAME:=NXP LS1043ARDB
  46. UBOOT_CONFIG:=ls1043ardb_tfa
  47. endef
  48. define U-Boot/fsl_ls1043a-rdb-sdboot
  49. NAME:=NXP LS1043ARDB SD Card Boot
  50. UBOOT_CONFIG:=ls1043ardb_tfa
  51. endef
  52. define U-Boot/fsl_ls1046a-frwy
  53. NAME:=NXP LS1046AFRWY
  54. UBOOT_CONFIG:=ls1046afrwy_tfa
  55. endef
  56. define U-Boot/fsl_ls1046a-frwy-sdboot
  57. NAME:=NXP LS1046AFRWY SD Card Boot
  58. UBOOT_CONFIG:=ls1046afrwy_tfa
  59. endef
  60. define U-Boot/fsl_ls1046a-rdb
  61. NAME:=NXP LS1046ARDB
  62. UBOOT_CONFIG:=ls1046ardb_tfa
  63. endef
  64. define U-Boot/fsl_ls1046a-rdb-sdboot
  65. NAME:=NXP LS1046ARDB SD Card Boot
  66. UBOOT_CONFIG:=ls1046ardb_tfa
  67. endef
  68. define U-Boot/fsl_ls1088a-rdb
  69. NAME:=NXP LS1088ARDB
  70. UBOOT_CONFIG:=ls1088ardb_tfa
  71. endef
  72. define U-Boot/fsl_ls1088a-rdb-sdboot
  73. NAME:=NXP LS1088ARDB SD Card Boot
  74. UBOOT_CONFIG:=ls1088ardb_tfa
  75. endef
  76. define U-Boot/fsl_ls2088a-rdb
  77. NAME:=NXP LS2088ARDB
  78. UBOOT_CONFIG:=ls2088ardb_tfa
  79. endef
  80. define U-Boot/fsl_lx2160a-rdb
  81. NAME:=NXP LX2160ARDB
  82. UBOOT_CONFIG:=lx2160ardb_tfa
  83. endef
  84. define U-Boot/fsl_lx2160a-rdb-sdboot
  85. NAME:=NXP LX2160ARDB SD Card Boot
  86. UBOOT_CONFIG:=lx2160ardb_tfa
  87. endef
  88. define U-Boot/fsl_ls1021a-twr
  89. NAME:=NXP LS1021ATWR
  90. BUILD_SUBTARGET:=armv7
  91. UBOOT_CONFIG:=ls1021atwr_nor
  92. ENV_SIZE:=0x20000
  93. endef
  94. define U-Boot/fsl_ls1021a-twr-sdboot
  95. NAME:=NXP LS1021ATWR SD Card Boot
  96. BUILD_SUBTARGET:=armv7
  97. UBOOT_CONFIG:=ls1021atwr_sdcard_ifc
  98. UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
  99. ENV_SIZE:=0x20000
  100. endef
  101. define U-Boot/fsl_ls1021a-iot-sdboot
  102. NAME:=NXP LS1021AIOT SD Card Boot
  103. BUILD_SUBTARGET:=armv7
  104. UBOOT_CONFIG:=ls1021aiot_sdcard
  105. UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
  106. ENV_SIZE:=0x2000
  107. endef
  108. UBOOT_TARGETS := \
  109. fsl_ls1012a-frdm \
  110. fsl_ls1012a-rdb \
  111. fsl_ls1012a-frwy-sdboot \
  112. fsl_ls1028a-rdb \
  113. fsl_ls1028a-rdb-sdboot \
  114. fsl_ls1043a-rdb \
  115. fsl_ls1043a-rdb-sdboot \
  116. fsl_ls1046a-frwy \
  117. fsl_ls1046a-frwy-sdboot \
  118. fsl_ls1046a-rdb \
  119. fsl_ls1046a-rdb-sdboot \
  120. fsl_ls1088a-rdb \
  121. fsl_ls1088a-rdb-sdboot \
  122. fsl_ls2088a-rdb \
  123. fsl_lx2160a-rdb \
  124. fsl_lx2160a-rdb-sdboot \
  125. fsl_ls1021a-twr \
  126. fsl_ls1021a-twr-sdboot \
  127. fsl_ls1021a-iot-sdboot
  128. UBOOT_CUSTOMIZE_CONFIG := \
  129. --disable TOOLS_MKEFICAPSULE
  130. define Build/InstallDev
  131. $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
  132. $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) \
  133. $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot.bin
  134. $(PKG_BUILD_DIR)/tools/mkenvimage -s $(ENV_SIZE) \
  135. -o $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-uboot-env.bin \
  136. files/$(BUILD_VARIANT)-uEnv.txt
  137. endef
  138. define Package/u-boot/install/default
  139. endef
  140. $(eval $(call BuildPackage/U-Boot))