uboot.mk 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. ################################################################################
  2. #
  3. # uboot
  4. #
  5. ################################################################################
  6. UBOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
  7. UBOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
  8. UBOOT_LICENSE = GPL-2.0+
  9. UBOOT_LICENSE_FILES = Licenses/gpl-2.0.txt
  10. UBOOT_INSTALL_IMAGES = YES
  11. ifeq ($(UBOOT_VERSION),custom)
  12. # Handle custom U-Boot tarballs as specified by the configuration
  13. UBOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
  14. UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
  15. UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL))
  16. else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y)
  17. UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
  18. UBOOT_SITE_METHOD = git
  19. else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_HG),y)
  20. UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
  21. UBOOT_SITE_METHOD = hg
  22. else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_SVN),y)
  23. UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
  24. UBOOT_SITE_METHOD = svn
  25. else
  26. # Handle stable official U-Boot versions
  27. UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot
  28. UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2
  29. endif
  30. ifeq ($(BR2_TARGET_UBOOT)$(BR2_TARGET_UBOOT_LATEST_VERSION),y)
  31. BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE)
  32. endif
  33. ifeq ($(BR2_TARGET_UBOOT_FORMAT_BIN),y)
  34. UBOOT_BINS += u-boot.bin
  35. endif
  36. ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
  37. UBOOT_BINS += u-boot
  38. # To make elf usable for debuging on ARC use special target
  39. ifeq ($(BR2_arc),y)
  40. UBOOT_MAKE_TARGET += mdbtrick
  41. endif
  42. endif
  43. # Call 'make all' unconditionally
  44. UBOOT_MAKE_TARGET += all
  45. ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
  46. UBOOT_BINS += u-boot.kwb
  47. UBOOT_MAKE_TARGET += u-boot.kwb
  48. endif
  49. ifeq ($(BR2_TARGET_UBOOT_FORMAT_AIS),y)
  50. UBOOT_BINS += u-boot.ais
  51. UBOOT_MAKE_TARGET += u-boot.ais
  52. endif
  53. ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y)
  54. UBOOT_BINS += u-boot-nand.bin
  55. endif
  56. ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMG),y)
  57. UBOOT_BINS += u-boot-dtb.img
  58. UBOOT_MAKE_TARGET += u-boot-dtb.img
  59. endif
  60. ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_BIN),y)
  61. UBOOT_BINS += u-boot-dtb.bin
  62. UBOOT_MAKE_TARGET += u-boot-dtb.bin
  63. endif
  64. ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y)
  65. UBOOT_BINS += u-boot.img
  66. UBOOT_MAKE_TARGET += u-boot.img
  67. endif
  68. ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y)
  69. UBOOT_BINS += u-boot.imx
  70. UBOOT_MAKE_TARGET += u-boot.imx
  71. endif
  72. ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y)
  73. UBOOT_BINS += u-boot.sb
  74. UBOOT_MAKE_TARGET += u-boot.sb
  75. # mxsimage needs OpenSSL
  76. UBOOT_DEPENDENCIES += host-elftosb host-openssl
  77. endif
  78. ifeq ($(BR2_TARGET_UBOOT_FORMAT_SD),y)
  79. # BootStream (.sb) is generated by U-Boot, we convert it to SD format
  80. UBOOT_BINS += u-boot.sd
  81. UBOOT_MAKE_TARGET += u-boot.sb
  82. UBOOT_DEPENDENCIES += host-elftosb host-openssl
  83. endif
  84. ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND),y)
  85. UBOOT_BINS += u-boot.nand
  86. UBOOT_MAKE_TARGET += u-boot.sb
  87. UBOOT_DEPENDENCIES += host-elftosb host-openssl
  88. endif
  89. ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
  90. UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
  91. endif
  92. ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y)
  93. UBOOT_BINS += u-boot.bin
  94. UBOOT_BIN_IFT = u-boot.bin.ift
  95. endif
  96. # The kernel calls AArch64 'arm64', but U-Boot calls it just 'arm', so
  97. # we have to special case it. Similar for i386/x86_64 -> x86
  98. ifeq ($(KERNEL_ARCH),arm64)
  99. UBOOT_ARCH = arm
  100. else ifneq ($(filter $(KERNEL_ARCH),i386 x86_64),)
  101. UBOOT_ARCH = x86
  102. else
  103. UBOOT_ARCH = $(KERNEL_ARCH)
  104. endif
  105. UBOOT_MAKE_OPTS += \
  106. CROSS_COMPILE="$(TARGET_CROSS)" \
  107. ARCH=$(UBOOT_ARCH) \
  108. HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
  109. HOSTLDFLAGS="$(HOST_LDFLAGS)"
  110. ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y)
  111. UBOOT_DEPENDENCIES += arm-trusted-firmware
  112. UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin
  113. endif
  114. ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
  115. UBOOT_DEPENDENCIES += host-dtc
  116. endif
  117. ifeq ($(BR2_TARGET_UBOOT_NEEDS_PYLIBFDT),y)
  118. UBOOT_DEPENDENCIES += host-python host-swig
  119. endif
  120. ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSSL),y)
  121. UBOOT_DEPENDENCIES += host-openssl
  122. endif
  123. # prior to u-boot 2013.10 the license info was in COPYING. Copy it so
  124. # legal-info finds it
  125. define UBOOT_COPY_OLD_LICENSE_FILE
  126. if [ -f $(@D)/COPYING ]; then \
  127. $(INSTALL) -m 0644 -D $(@D)/COPYING $(@D)/Licenses/gpl-2.0.txt; \
  128. fi
  129. endef
  130. UBOOT_POST_EXTRACT_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE
  131. UBOOT_POST_RSYNC_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE
  132. ifneq ($(ARCH_XTENSA_OVERLAY_FILE),)
  133. define UBOOT_XTENSA_OVERLAY_EXTRACT
  134. $(call arch-xtensa-overlay-extract,$(@D),u-boot)
  135. endef
  136. UBOOT_POST_EXTRACT_HOOKS += UBOOT_XTENSA_OVERLAY_EXTRACT
  137. UBOOT_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
  138. endif
  139. # Analogous code exists in linux/linux.mk. Basically, the generic
  140. # package infrastructure handles downloading and applying remote
  141. # patches. Local patches are handled depending on whether they are
  142. # directories or files.
  143. UBOOT_PATCHES = $(call qstrip,$(BR2_TARGET_UBOOT_PATCH))
  144. UBOOT_PATCH = $(filter ftp://% http://% https://%,$(UBOOT_PATCHES))
  145. define UBOOT_APPLY_LOCAL_PATCHES
  146. for p in $(filter-out ftp://% http://% https://%,$(UBOOT_PATCHES)) ; do \
  147. if test -d $$p ; then \
  148. $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
  149. else \
  150. $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
  151. fi \
  152. done
  153. endef
  154. UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES
  155. # This is equivalent to upstream commit
  156. # http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a. It
  157. # fixes a build failure when libfdt-devel is installed system-wide.
  158. # This only works when scripts/dtc/libfdt exists (E.G. versions containing
  159. # http://git.denx.de/?p=u-boot.git;a=commitdiff;h=c0e032e0090d6541549b19cc47e06ccd1f302893)
  160. define UBOOT_FIXUP_LIBFDT_INCLUDE
  161. if [ -d $(@D)/scripts/dtc/libfdt ]; then \
  162. $(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile; \
  163. fi
  164. endef
  165. UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE
  166. ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
  167. define UBOOT_CONFIGURE_CMDS
  168. $(TARGET_CONFIGURE_OPTS) \
  169. $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
  170. $(UBOOT_BOARD_NAME)_config
  171. endef
  172. else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y)
  173. ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y)
  174. UBOOT_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG))_defconfig
  175. else ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y)
  176. UBOOT_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE))
  177. endif # BR2_TARGET_UBOOT_USE_DEFCONFIG
  178. UBOOT_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES))
  179. UBOOT_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
  180. UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS)
  181. define UBOOT_HELP_CMDS
  182. @echo ' uboot-menuconfig - Run U-Boot menuconfig'
  183. @echo ' uboot-savedefconfig - Run U-Boot savedefconfig'
  184. @echo ' uboot-update-defconfig - Save the U-Boot configuration to the path specified'
  185. @echo ' by BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE'
  186. endef
  187. endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
  188. UBOOT_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_DTS_PATH))
  189. define UBOOT_BUILD_CMDS
  190. $(if $(UBOOT_CUSTOM_DTS_PATH),
  191. cp -f $(UBOOT_CUSTOM_DTS_PATH) $(@D)/arch/$(UBOOT_ARCH)/dts/
  192. )
  193. $(TARGET_CONFIGURE_OPTS) \
  194. $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
  195. $(UBOOT_MAKE_TARGET)
  196. $(if $(BR2_TARGET_UBOOT_FORMAT_SD),
  197. $(@D)/tools/mxsboot sd $(@D)/u-boot.sb $(@D)/u-boot.sd)
  198. $(if $(BR2_TARGET_UBOOT_FORMAT_NAND),
  199. $(@D)/tools/mxsboot \
  200. -w $(BR2_TARGET_UBOOT_FORMAT_NAND_PAGE_SIZE) \
  201. -o $(BR2_TARGET_UBOOT_FORMAT_NAND_OOB_SIZE) \
  202. -e $(BR2_TARGET_UBOOT_FORMAT_NAND_ERASE_SIZE) \
  203. nand $(@D)/u-boot.sb $(@D)/u-boot.nand)
  204. endef
  205. define UBOOT_BUILD_OMAP_IFT
  206. $(HOST_DIR)/bin/gpsign -f $(@D)/u-boot.bin \
  207. -c $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))
  208. endef
  209. ifneq ($(BR2_TARGET_UBOOT_ENVIMAGE),)
  210. define UBOOT_GENERATE_ENV_IMAGE
  211. cat $(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) \
  212. >$(@D)/buildroot-env.txt
  213. $(HOST_DIR)/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
  214. $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \
  215. $(if $(filter BIG,$(BR2_ENDIAN)),-b) \
  216. -o $(BINARIES_DIR)/uboot-env.bin \
  217. $(@D)/buildroot-env.txt
  218. endef
  219. endif
  220. define UBOOT_INSTALL_IMAGES_CMDS
  221. $(foreach f,$(UBOOT_BINS), \
  222. cp -dpf $(@D)/$(f) $(BINARIES_DIR)/
  223. )
  224. $(if $(BR2_TARGET_UBOOT_FORMAT_NAND),
  225. cp -dpf $(@D)/u-boot.sb $(BINARIES_DIR))
  226. $(if $(BR2_TARGET_UBOOT_SPL),
  227. $(foreach f,$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)), \
  228. cp -dpf $(@D)/$(f) $(BINARIES_DIR)/
  229. )
  230. )
  231. $(UBOOT_GENERATE_ENV_IMAGE)
  232. $(if $(BR2_TARGET_UBOOT_BOOT_SCRIPT),
  233. $(HOST_DIR)/bin/mkimage -C none -A $(MKIMAGE_ARCH) -T script \
  234. -d $(call qstrip,$(BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE)) \
  235. $(BINARIES_DIR)/boot.scr)
  236. endef
  237. define UBOOT_INSTALL_OMAP_IFT_IMAGE
  238. cp -dpf $(@D)/$(UBOOT_BIN_IFT) $(BINARIES_DIR)/
  239. endef
  240. ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y)
  241. ifeq ($(BR_BUILDING),y)
  242. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)),)
  243. $(error No gpsign config file. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting)
  244. endif
  245. ifeq ($(wildcard $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))),)
  246. $(error gpsign config file $(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG) not found. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting)
  247. endif
  248. endif
  249. UBOOT_DEPENDENCIES += host-omap-u-boot-utils
  250. UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT
  251. UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE
  252. endif
  253. ifeq ($(BR2_TARGET_UBOOT_ZYNQ_IMAGE),y)
  254. define UBOOT_GENERATE_ZYNQ_IMAGE
  255. $(HOST_DIR)/bin/python2 \
  256. $(HOST_DIR)/bin/zynq-boot-bin.py \
  257. -u $(@D)/$(firstword $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))) \
  258. -o $(BINARIES_DIR)/BOOT.BIN
  259. endef
  260. UBOOT_DEPENDENCIES += host-zynq-boot-bin
  261. UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_GENERATE_ZYNQ_IMAGE
  262. endif
  263. ifeq ($(BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC),y)
  264. ifeq ($(BR2_TARGET_UBOOT_SPL),y)
  265. UBOOT_CRC_ALTERA_SOCFPGA_INPUT_IMAGES = $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))
  266. UBOOT_CRC_ALTERA_SOCFPGA_HEADER_VERSION = 0
  267. else
  268. UBOOT_CRC_ALTERA_SOCFPGA_INPUT_IMAGES = u-boot-dtb.bin
  269. UBOOT_CRC_ALTERA_SOCFPGA_HEADER_VERSION = 1
  270. endif
  271. define UBOOT_CRC_ALTERA_SOCFPGA_IMAGE
  272. $(foreach f,$(UBOOT_CRC_ALTERA_SOCFPGA_INPUT_IMAGES), \
  273. $(HOST_DIR)/bin/mkpimage \
  274. -v $(UBOOT_CRC_ALTERA_SOCFPGA_HEADER_VERSION) \
  275. -o $(BINARIES_DIR)/$(notdir $(call qstrip,$(f))).crc \
  276. $(@D)/$(call qstrip,$(f))
  277. )
  278. endef
  279. UBOOT_DEPENDENCIES += host-mkpimage
  280. UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_CRC_ALTERA_SOCFPGA_IMAGE
  281. endif
  282. ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y)
  283. ifeq ($(BR_BUILDING),y)
  284. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),)
  285. $(error Please define a source file for Uboot environment (BR2_TARGET_UBOOT_ENVIMAGE_SOURCE setting))
  286. endif
  287. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SIZE)),)
  288. $(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting))
  289. endif
  290. endif
  291. UBOOT_DEPENDENCIES += host-uboot-tools
  292. endif
  293. ifeq ($(BR2_TARGET_UBOOT_BOOT_SCRIPT),y)
  294. ifeq ($(BR_BUILDING),y)
  295. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE)),)
  296. $(error Please define a source file for Uboot boot script (BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE setting))
  297. endif
  298. endif
  299. UBOOT_DEPENDENCIES += host-uboot-tools
  300. endif
  301. ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy)
  302. #
  303. # Check U-Boot board name (for legacy) or the defconfig/custom config
  304. # file options (for kconfig)
  305. #
  306. ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
  307. ifeq ($(UBOOT_BOARD_NAME),)
  308. $(error No U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting)
  309. endif # UBOOT_BOARD_NAME
  310. else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y)
  311. ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y)
  312. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG)),)
  313. $(error No board defconfig name specified, check your BR2_TARGET_UBOOT_BOARD_DEFCONFIG setting)
  314. endif # qstrip BR2_TARGET_UBOOT_BOARD_DEFCONFIG
  315. endif # BR2_TARGET_UBOOT_USE_DEFCONFIG
  316. ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y)
  317. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)),)
  318. $(error No board configuration file specified, check your BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE setting)
  319. endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE
  320. endif # BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG
  321. endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
  322. #
  323. # Check custom version option
  324. #
  325. ifeq ($(BR2_TARGET_UBOOT_CUSTOM_VERSION),y)
  326. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE)),)
  327. $(error No custom U-Boot version specified. Check your BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE setting)
  328. endif # qstrip BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE
  329. endif # BR2_TARGET_UBOOT_CUSTOM_VERSION
  330. #
  331. # Check custom tarball option
  332. #
  333. ifeq ($(BR2_TARGET_UBOOT_CUSTOM_TARBALL),y)
  334. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)),)
  335. $(error No custom U-Boot tarball specified. Check your BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION setting)
  336. endif # qstrip BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION
  337. endif # BR2_TARGET_UBOOT_CUSTOM_TARBALL
  338. #
  339. # Check Git/Mercurial repo options
  340. #
  341. ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT)$(BR2_TARGET_UBOOT_CUSTOM_HG),y)
  342. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)),)
  343. $(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_URL setting)
  344. endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_URL
  345. ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION)),)
  346. $(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION setting)
  347. endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_VERSION
  348. endif # BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG
  349. endif # BR2_TARGET_UBOOT && BR_BUILDING
  350. ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
  351. $(eval $(generic-package))
  352. else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y)
  353. $(eval $(kconfig-package))
  354. endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY