summaryrefslogtreecommitdiff
path: root/package/boot
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2016-02-12 08:29:24 +0000
committerJohn Crispin <john@openwrt.org>2016-02-12 08:29:24 +0000
commit2d45ad07fc64b04a2e723a77491d450a1664cdec (patch)
treedcb49bd7f86d031de8783ad5f915996d37eb38df /package/boot
parent69517e88bea6ac19626dbff16cdc5e4a9f55cc25 (diff)
downloadmtk-20170518-2d45ad07fc64b04a2e723a77491d450a1664cdec.zip
mtk-20170518-2d45ad07fc64b04a2e723a77491d450a1664cdec.tar.gz
mtk-20170518-2d45ad07fc64b04a2e723a77491d450a1664cdec.tar.bz2
zynq: add new target
Add support for Xilinx ZC702 Dev board Zynq target is using 4.4 kernel and mainline 2016.1 u-boot. Patch is tested with Xilinx ZC702 Dev board with SD boot mode. known issues: - no QSPI driver in 4.4 kernel: no QSPI flash support - USB is not working in 4.4 kernel Signed-off-by: Jason Wu <jason.wu.misc@gmail.com> create mode 100644 package/boot/uboot-zynq/Makefile create mode 100644 target/linux/zynq/Makefile create mode 100644 target/linux/zynq/base-files.mk create mode 100755 target/linux/zynq/base-files/etc/board.d/02_network create mode 100644 target/linux/zynq/base-files/etc/config/network create mode 100644 target/linux/zynq/base-files/etc/inittab create mode 100644 target/linux/zynq/config-4.4 create mode 100644 target/linux/zynq/image/Makefile create mode 100755 target/linux/zynq/image/mkits.sh create mode 100644 target/linux/zynq/patches-4.4/0001-arm-dts-zynq-zc702.dts-Set-default-rdinit-to-sbin-in.patch create mode 100644 target/linux/zynq/profiles/zc702.mk SVN-Revision: 48697
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/uboot-zynq/Makefile115
1 files changed, 115 insertions, 0 deletions
diff --git a/package/boot/uboot-zynq/Makefile b/package/boot/uboot-zynq/Makefile
new file mode 100644
index 0000000..7e502b6
--- /dev/null
+++ b/package/boot/uboot-zynq/Makefile
@@ -0,0 +1,115 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=u-boot
+PKG_VERSION:=2016.01
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:= \
+ http://mirror2.openwrt.org/sources \
+ ftp://ftp.denx.de/pub/u-boot
+
+PKG_MD5SUM:=7d4f65fd43d4d706f5c5650e020d899d
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_LICENSE:=GPL-2.0 GPL-2.0+
+PKG_LICENSE_FILES:=Licenses/README
+
+include $(INCLUDE_DIR)/package.mk
+
+define uboot/Default
+ TITLE:=
+ CONFIG:=
+ IMAGE:=
+endef
+
+define uboot/zc702
+ TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC702 Dev Board
+endef
+
+define uboot/zc706
+ TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC706 Dev Board
+endef
+
+UBOOTS := \
+ zc702 \
+
+define Package/uboot/template
+define Package/uboot-zynq-$(1)
+ SECTION:=boot
+ CATEGORY:=Boot Loaders
+ DEPENDS:=@TARGET_zynq
+ TITLE:=$(2)
+ URL:=http://www.denx.de/wiki/U-Boot
+ VARIANT:=$(1)
+ MAINTAINER:=Jason Wu <jason.wu.misc@gmail.com>
+endef
+endef
+
+define BuildUBootPackage
+ $(eval $(uboot/Default))
+ $(eval $(uboot/$(1)))
+ $(call Package/uboot/template,$(1),$(TITLE))
+endef
+
+ifdef BUILD_VARIANT
+$(eval $(call uboot/$(BUILD_VARIANT)))
+UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
+UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
+endif
+
+define Build/Configure
+ +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+ $(BOARD)_$(UBOOT_CONFIG)_config
+endef
+
+define Build/Compile
+ +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+ CROSS_COMPILE=$(TARGET_CROSS)
+endef
+
+define Package/uboot/install/default
+ $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
+
+ $(CP) $(PKG_BUILD_DIR)/u-boot \
+ $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.elf
+
+ $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.bin \
+ $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.bin
+
+ $(CP) $(PKG_BUILD_DIR)/u-boot.dtb \
+ $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.dtb
+
+ $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.img \
+ $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.img
+
+ $(CP) $(PKG_BUILD_DIR)/spl/boot.bin \
+ $(BIN_DIR)/uboot-$(BOARD)-$(1)/boot.bin
+
+ $(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl \
+ $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl
+
+ $(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl-dtb.bin \
+ $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl-dtb.bin
+endef
+
+define Package/uboot/install/template
+define Package/uboot-zynq-$(1)/install
+ $(call Package/uboot/install/default,$(2))
+endef
+endef
+
+$(foreach u,$(UBOOTS), \
+ $(eval $(call Package/uboot/install/template,$(u),$(u))) \
+)
+
+$(foreach u,$(UBOOTS), \
+ $(eval $(call BuildUBootPackage,$(u))) \
+ $(eval $(call BuildPackage,uboot-zynq-$(u))) \
+)