aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorZoltan Herpai <wigyori@uid0.hu>2016-07-15 16:55:19 +0200
committerGitHub <noreply@github.com>2016-07-15 16:55:19 +0200
commite365798d804207f172e78249a58b8e8881835030 (patch)
tree8f306065588647b71fb2e650fbda23baf29b9fdd /package
parent00e666a59443521409144fa14cc6ecd8a645d1d4 (diff)
parent138f0748e9ccb7a71dd4fbd4941f5d8ff6509366 (diff)
downloadmaster-187ad058-e365798d804207f172e78249a58b8e8881835030.tar.gz
master-187ad058-e365798d804207f172e78249a58b8e8881835030.tar.bz2
master-187ad058-e365798d804207f172e78249a58b8e8881835030.zip
Merge pull request #31 from qinfengling/zedboard
zynq: add sdcard image generation support
Diffstat (limited to 'package')
-rw-r--r--package/boot/uboot-zynq/Makefile19
-rw-r--r--package/boot/uboot-zynq/patches/001-use-dtc-in-kernel.patch13
-rw-r--r--package/boot/uboot-zynq/uEnv-default.txt4
3 files changed, 33 insertions, 3 deletions
diff --git a/package/boot/uboot-zynq/Makefile b/package/boot/uboot-zynq/Makefile
index 412415bfc6..48d2d6bd7d 100644
--- a/package/boot/uboot-zynq/Makefile
+++ b/package/boot/uboot-zynq/Makefile
@@ -6,15 +6,16 @@
#
include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=u-boot
-PKG_VERSION:=2016.03
+PKG_VERSION:=2016.07
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:=973c1d896be751321cc3aafa564f64b2
+PKG_MD5SUM:=425a3fa610a7d972e5092a0e92276c70
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
@@ -74,6 +75,8 @@ UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
endif
+UENV:=default
+
define Build/Configure
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
$(BOARD)_$(UBOOT_CONFIG)_config
@@ -81,7 +84,8 @@ endef
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
- CROSS_COMPILE=$(TARGET_CROSS)
+ CROSS_COMPILE=$(TARGET_CROSS) \
+ DTCDIR=$(LINUX_DIR)/scripts/dtc/
endef
define Package/uboot/install/default
@@ -99,12 +103,21 @@ define Package/uboot/install/default
$(CP) $(PKG_BUILD_DIR)/u-boot-dtb.img \
$(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.img
+ $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.img \
+ $(KERNEL_BUILD_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/boot.bin \
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin
+
$(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl \
$(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl
+ $(CP) uEnv-$(UENV).txt \
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt
+
$(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl-dtb.bin \
$(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl-dtb.bin
endef
diff --git a/package/boot/uboot-zynq/patches/001-use-dtc-in-kernel.patch b/package/boot/uboot-zynq/patches/001-use-dtc-in-kernel.patch
new file mode 100644
index 0000000000..553c99e02b
--- /dev/null
+++ b/package/boot/uboot-zynq/patches/001-use-dtc-in-kernel.patch
@@ -0,0 +1,13 @@
+Index: u-boot-2016.07/Makefile
+===================================================================
+--- u-boot-2016.07.orig/Makefile
++++ u-boot-2016.07/Makefile
+@@ -348,7 +348,7 @@ OBJDUMP = $(CROSS_COMPILE)objdump
+ AWK = awk
+ PERL = perl
+ PYTHON = python
+-DTC = dtc
++DTC = $(DTCDIR)dtc
+ CHECK = sparse
+
+ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
diff --git a/package/boot/uboot-zynq/uEnv-default.txt b/package/boot/uboot-zynq/uEnv-default.txt
new file mode 100644
index 0000000000..b352b4c7ae
--- /dev/null
+++ b/package/boot/uboot-zynq/uEnv-default.txt
@@ -0,0 +1,4 @@
+loadkernel=fatload mmc 0 0x2080000 uImage
+loaddtb=fatload mmc 0 0x2000000 devicetree.dtb
+bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rootwait
+uenvcmd=run loadkernel \&\& run loaddtb \&\& bootm 0x2080000 - 0x2000000