<div dir="ltr">In-line;<br><div class="gmail_extra"><br><div class="gmail_quote">On 3 December 2015 at 20:50, Ben Whitten <span dir="ltr"><<a href="mailto:benwhitten@gmail.com" target="_blank">benwhitten@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">This patch adds a uboot package for at91 and honours COPTS.<br>
If the SPL binary is generated for the specified board it moves that too.<br>
<br>
Signed-off-by: Ben Whitten <<a href="mailto:benwhitten@gmail.com">benwhitten@gmail.com</a>><br>
---<br>
</span> package/boot/uboot-at91/Makefile | 111 +++++++++++++++++++++++++++++++++++++++<br>
 1 file changed, 111 insertions(+)<br>
<span class=""> create mode 100644 package/boot/uboot-at91/Makefile<br>
<br>
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile<br>
new file mode 100644<br>
</span>index 0000000..6b87d67<br>
--- /dev/null<br>
+++ b/package/boot/uboot-at91/Makefile<br>
@@ -0,0 +1,111 @@<br>
<span class="">+#<br>
+# Copyright (C) 2013-2015 OpenWrt.org<br>
+#<br>
+# This is free software, licensed under the GNU General Public License v2.<br>
+# See /LICENSE for more information.<br>
+#<br>
+<br>
+include $(TOPDIR)/<a href="http://rules.mk" rel="noreferrer" target="_blank">rules.mk</a><br>
+<br>
+PKG_NAME:=u-boot<br>
+PKG_VERSION:=2015.10<br>
+PKG_RELEASE:=1<br>
+<br>
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)<br>
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2<br>
+PKG_SOURCE_URL:= \<br>
+       <a href="http://mirror2.openwrt.org/sources" rel="noreferrer" target="_blank">http://mirror2.openwrt.org/sources</a> \<br>
+       <a href="ftp://ftp.denx.de/pub/u-boot" rel="noreferrer" target="_blank">ftp://ftp.denx.de/pub/u-boot</a><br>
+PKG_MD5SUM:=7c203b0fc3390a122d8e8b75f147eac5<br>
+<br>
+PKG_BUILD_PARALLEL:=1<br>
+<br>
+include $(INCLUDE_DIR)/<a href="http://package.mk" rel="noreferrer" target="_blank">package.mk</a><br>
+<br>
</span><div><div class="h5">+define uboot/at91sam9263ek_nandflash<br>
+  TITLE:=U-Boot for the AT91SAM9263-EK board (NandFlash)<br>
+endef<br>
+<br>
+define uboot/at91sam9g20ek_nandflash<br>
+  TITLE:=U-Boot for the AT91SAM9G20-EK board (NandFlash)<br>
+endef<br>
+<br>
+define uboot/at91sam9g20ek_2mmc_nandflash<br>
+  TITLE:=U-Boot for the AT91SAM9G20-EK 2MMC board (NandFlash)<br>
+endef<br>
+<br>
+define uboot/at91sam9xeek_nandflash<br>
+  TITLE:=U-Boot for the AT91SAM9XE-EK board (NandFlash)<br>
+endef<br>
+<br>
+define uboot/at91sam9x5ek_nandflash<br>
+  TITLE:=U-Boot for the AT91SAM9X5-EK board (NandFlash)<br>
+endef<br>
+<br>
+UBOOTS := \<br>
+       at91sam9263ek_nandflash \<br>
+       at91sam9g20ek_nandflash \<br>
+       at91sam9g20ek_2mmc_nandflash \<br>
+       at91sam9xeek_nandflash \<br>
+       at91sam9x5ek_nandflash<br>
+<br>
+define Package/uboot/template<br>
+define Package/uboot-at91-$(1)<br>
+  SECTION:=boot<br>
+  CATEGORY:=Boot Loaders<br>
+  DEPENDS:=@TARGET_at91<br>
+  TITLE:=$(2)<br>
+  URL:=<a href="http://www.denx.de/wiki/U-Boot" rel="noreferrer" target="_blank">http://www.denx.de/wiki/U-Boot</a><br>
+  VARIANT:=$(1)<br>
+endef<br>
+endef<br>
+<br>
+define BuildUBootPackage<br>
+       $(eval $(uboot/Default))<br>
+       $(eval $(uboot/$(1)))<br>
+       $(call Package/uboot/template,$(1),$(TITLE))<br>
+endef<br></div></div></blockquote><div><br></div><div>Forgot to remove uboot/Default, even though the fact it doesn't exist doesn't seem to cause a problem.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
+<br>
+ifdef BUILD_VARIANT<br>
+$(eval $(call uboot/$(BUILD_VARIANT)))<br>
+UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))<br>
+UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)<br>
+endif<br>
+<br>
+define Build/Configure<br>
+       +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \<br>
+               $(UBOOT_CONFIG)_config<br>
+endef<br>
+<br>
+define Build/Compile<br>
+       +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \<br>
+               CROSS_COMPILE=$(TARGET_CROSS) \<br>
+               KCFLAGS="$(filter-out -fstack-protector, $(TARGET_CFLAGS))"<br>
+endef<br>
+<br>
+define Package/uboot/install/default<br>
+       $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)<br>
+       $(CP) \<br>
+               $(PKG_BUILD_DIR)/u-boot.bin \<br>
+               $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin<br>
+       if [ -e $(PKG_BUILD_DIR)/boot.bin ]; then \<br>
+               $(CP) \<br>
+                       $(PKG_BUILD_DIR)/boot.bin \<br>
+                       $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.bin; \<br>
+       fi<br>
+endef<br>
+<br>
+define Package/uboot/install/template<br>
+define Package/uboot-at91-$(1)/install<br>
+       $(call Package/uboot/install/default,$(2))<br>
+endef<br>
+endef<br>
+<br>
+$(foreach u,$(UBOOTS), \<br>
+       $(eval $(call Package/uboot/install/template,$(u),$(u))) \<br>
+)<br>
+<br>
+$(foreach u,$(UBOOTS), \<br>
+       $(eval $(call BuildUBootPackage,$(u))) \<br>
+       $(eval $(call BuildPackage,uboot-at91-$(u))) \<br>
+)<br>
</div></div>--<br>
1.9.1<br>
<br>
</blockquote></div><br></div></div>