aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2017-08-04 09:00:00 +0800
committerimp <imp@FreeBSD.org>2017-08-04 09:00:00 +0800
commit7a959dab524b48d036a09f1a6d904704618d84d1 (patch)
treea183416d2be6be4f6a7c0b21f9117405d13845bc /sysutils
parent0b878c279a1937240f82a2a6c47cdebc46812285 (diff)
downloadfreebsd-ports-gnome-7a959dab524b48d036a09f1a6d904704618d84d1.tar.gz
freebsd-ports-gnome-7a959dab524b48d036a09f1a6d904704618d84d1.tar.zst
freebsd-ports-gnome-7a959dab524b48d036a09f1a6d904704618d84d1.zip
Add support for Xilinx Zynq-based Zedboard and more generally all
Zynq-based boards. Submitted by: Thomas Skibo
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/u-boot-master/Makefile15
-rw-r--r--sysutils/u-boot-zedboard/files/uEnv.txt4
-rw-r--r--sysutils/u-boot-zedboard/pkg-descr12
3 files changed, 31 insertions, 0 deletions
diff --git a/sysutils/u-boot-master/Makefile b/sysutils/u-boot-master/Makefile
index c99c8b48e692..1588375eb462 100644
--- a/sysutils/u-boot-master/Makefile
+++ b/sysutils/u-boot-master/Makefile
@@ -56,6 +56,10 @@ UBOOT_PLIST_ALLWINNER=u-boot.img u-boot-sunxi-with-spl.bin
UBOOT_PLIST_ALLWINNER64=u-boot-sunxi-with-spl.bin
UBOOT_ARCH_ALLWINNER64=aarch64
+# Overrides for Zynq 7000 family
+UBOOT_PLIST_ZYNQ_7000=u-boot.img boot.bin uEnv.txt
+UBOOT_MOVE_ZYNQ_7000=${WRKSRC}/spl/boot.bin ${.CURDIR}/files/uEnv.txt
+
# Uboot variables
.if !defined(UBOOT_VERSION) && defined(UBOOT_VERSION_${FAMILY:tu})
UBOOT_VERSION=${UBOOT_VERSION_${FAMILY:tu}}
@@ -85,6 +89,10 @@ ARCHFLAGS=ARCH=${UBOOT_ARCH}
.endif
COMPILER?=${CROSS_COMPILE}gcc
+.if !defined(UBOOT_MOVE) && defined(UBOOT_MOVE_${FAMILY:tu})
+UBOOT_MOVE=${UBOOT_MOVE_${FAMILY:tu}}
+.endif
+
# Each u-boot family has different files to include, bring them in.
.for i in ${UBOOT_PLIST}
PLIST_FILES+= ${UBOOT_DIR}/${i}
@@ -94,6 +102,13 @@ PLIST_FILES+= ${UBOOT_DIR}/README
do-configure:
(cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${MAKE_CMD} ${BOARD_CONFIG})
+# If we need to put anything into WRKSRC, do so now so we can build the PLIST
+# in do-install
+.if defined(UBOOT_MOVE)
+pre-install:
+ ${CP} ${UBOOT_MOVE} ${WRKSRC}
+.endif
+
do-install:
${MKDIR} ${STAGEDIR}/${INST}
.for i in ${UBOOT_PLIST}
diff --git a/sysutils/u-boot-zedboard/files/uEnv.txt b/sysutils/u-boot-zedboard/files/uEnv.txt
new file mode 100644
index 000000000000..61fce5038782
--- /dev/null
+++ b/sysutils/u-boot-zedboard/files/uEnv.txt
@@ -0,0 +1,4 @@
+bootfile=ubldr
+loadaddr=0x02000000
+fdt_file=board.dtb
+uenvcmd=echo Booting FreeBSD from SD Card: ; fatload mmc 0 ${loadaddr} ${bootfile} && bootelf ${loadaddr}
diff --git a/sysutils/u-boot-zedboard/pkg-descr b/sysutils/u-boot-zedboard/pkg-descr
new file mode 100644
index 000000000000..203612864694
--- /dev/null
+++ b/sysutils/u-boot-zedboard/pkg-descr
@@ -0,0 +1,12 @@
+U-Boot loader for the Xilinx Zynq-based Zedboard.
+
+To install this bootloader, copy the files in the share/u-boot/u-boot-zedboard
+directory to the first partition, formatted as FAT16 or FAT32, on an SD card.
+
+This version is patched as follows:
+ * ELF and API features are enabled.
+
+For information about running FreeBSD on Xilinx Zynq SoCs, see
+WWW: http://wiki.freebsd.org/FreeBSD/arm/Zedboard
+
+For general information about U-Boot see WWW: http://www.denx.de/wiki/U-Boot