aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot
diff options
context:
space:
mode:
authorMike Qin <Fengling.Qin@gmail.com>2016-07-15 12:05:27 +0800
committerMike Qin <Fengling.Qin@gmail.com>2016-07-15 15:38:07 +0800
commit2268ee8e1f16e7f888bf03c48011271a3ebae122 (patch)
tree35c68aa3900c4753b38f16c1695f142210719989 /package/boot
parent4d133a7c632cd50db5e18978b82f04069dc5d99d (diff)
downloadmaster-187ad058-2268ee8e1f16e7f888bf03c48011271a3ebae122.tar.gz
master-187ad058-2268ee8e1f16e7f888bf03c48011271a3ebae122.tar.bz2
master-187ad058-2268ee8e1f16e7f888bf03c48011271a3ebae122.zip
zynq: add sdcard image generation support when board profile is selected
Signed-off-by: Mike Qin <Fengling.Qin@gmail.com>
Diffstat (limited to 'package/boot')
-rw-r--r--package/boot/uboot-zynq/Makefile12
-rw-r--r--package/boot/uboot-zynq/uEnv-default.txt4
2 files changed, 16 insertions, 0 deletions
diff --git a/package/boot/uboot-zynq/Makefile b/package/boot/uboot-zynq/Makefile
index 8dcd43112d..366bdc9775 100644
--- a/package/boot/uboot-zynq/Makefile
+++ b/package/boot/uboot-zynq/Makefile
@@ -6,6 +6,7 @@
#
include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=u-boot
PKG_VERSION:=2016.07
@@ -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
@@ -99,12 +102,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/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