aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-02-27 20:17:32 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-02-27 20:17:32 +0000
commit7bfc2bcf63784a02666ed14e4415b2d0ab340533 (patch)
tree91315282899fcdeabfda741fa8fbdcf001e5c83a /sysutils
parentea446456fe9533b308339701c0acecbb5c0bb007 (diff)
downloadports-7bfc2bcf63784a02666ed14e4415b2d0ab340533.tar.gz
ports-7bfc2bcf63784a02666ed14e4415b2d0ab340533.zip
New port: sysutils/u-boot-utilite: Utilite & Utilite Pro u-boot
- U-Boot version 2015.07 with patches from manufacturer (CompuLab) PR: 207543 Submitted by: Martin Waschbuesch <martin@waschbuesch.de>
Notes
Notes: svn path=/head/; revision=409686
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/u-boot-utilite/Makefile49
-rw-r--r--sysutils/u-boot-utilite/distinfo4
-rw-r--r--sysutils/u-boot-utilite/files/patch-include_configs_cm__fx6.h12
-rw-r--r--sysutils/u-boot-utilite/pkg-descr23
-rw-r--r--sysutils/u-boot-utilite/pkg-plist2
6 files changed, 91 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 011d8c1335dc..ca674f348728 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1058,6 +1058,7 @@
SUBDIR += u-boot-pandaboard
SUBDIR += u-boot-rpi
SUBDIR += u-boot-rpi2
+ SUBDIR += u-boot-utilite
SUBDIR += u-boot-wandboard
SUBDIR += ua
SUBDIR += ucspi-ipc
diff --git a/sysutils/u-boot-utilite/Makefile b/sysutils/u-boot-utilite/Makefile
new file mode 100644
index 000000000000..ed48a96c182d
--- /dev/null
+++ b/sysutils/u-boot-utilite/Makefile
@@ -0,0 +1,49 @@
+# $FreeBSD$
+
+PORTNAME= u-boot
+PORTVERSION= 2015.07
+CATEGORIES= sysutils
+MASTER_SITES= ftp://ftp.denx.de/pub/u-boot/:source1 \
+ http://www.compulab.co.il/wp-content/uploads/2015/10/:source2
+PKGNAMESUFFIX= -utilite
+DISTFILES= u-boot-2015.07.tar.bz2:source1 \
+ cm-fx6_u-boot_2015-10-18.zip:source2
+
+MAINTAINER= martin@waschbuesch.de
+COMMENT= Cross-build U-Boot loader for Utilite (and Utilite Pro)
+
+LICENSE= GPLv2
+
+BUILD_DEPENDS= ${CROSS_GCC}:${PORTSDIR}/devel/arm-none-eabi-gcc
+
+CROSS_GCC= arm-none-eabi-gcc
+
+EXTRA_PATCHES= ${WRKDIR}/cm-fx6-u-boot/u-boot/u-boot-2015.07-cm-fx6-3.patch:-p1
+
+NO_ARCH= yes
+
+USES= gmake
+SSP_UNSAFE= yes # cross-build static linking dies with -fstack-protector
+
+U_BOOT_DIR= share/u-boot/${PORTNAME}${PKGNAMESUFFIX}
+
+MAKE_ARGS+= ARCH=arm \
+ CC=${CROSS_GCC} \
+ CROSS_COMPILE=arm-none-eabi- \
+ HOSTCC=cc
+
+do-configure:
+ cd ${WRKSRC}; ${GMAKE} ${MAKE_ARGS} cm_fx6_config
+
+# The build results in two output files: SPL, and u-boot.img.
+# Combine them into a single u-boot.imx so that there is only one file to be
+# copied onto the boot media starting at a 1K offset on the disk.
+CM_FX6_FIRMWARE= ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/cm-fx6-firmware
+do-install:
+ cd ${WRKSRC}; ./tools/mkimage -n arch/arm/imx-common/spl_sd.cfg.cfgtmp -T imximage -e 0x00908000 -d spl/u-boot-spl.bin spl.img
+ ${MKDIR} ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}
+ dd if=/dev/zero count=500 bs=1K | ${TR} '\000' '\377' > ${CM_FX6_FIRMWARE}
+ dd if=${WRKSRC}/spl.img of=${CM_FX6_FIRMWARE} bs=1K seek=1 conv=notrunc && dd if=${WRKSRC}/u-boot.img of=${CM_FX6_FIRMWARE} bs=1K seek=64 conv=notrunc
+ ${CP} ${.CURDIR}/pkg-descr ${STAGEDIR}/${PREFIX}/${U_BOOT_DIR}/README
+
+.include <bsd.port.mk>
diff --git a/sysutils/u-boot-utilite/distinfo b/sysutils/u-boot-utilite/distinfo
new file mode 100644
index 000000000000..f74391505526
--- /dev/null
+++ b/sysutils/u-boot-utilite/distinfo
@@ -0,0 +1,4 @@
+SHA256 (u-boot-2015.07.tar.bz2) = 0b48c9bd717f2c322ef791f8282e14c88be942dc7d1226df7e31a812a3af94d9
+SIZE (u-boot-2015.07.tar.bz2) = 9919961
+SHA256 (cm-fx6_u-boot_2015-10-18.zip) = b71971e2faa44f73959dd571d7b97160c7d4ac16bfcd24df405bbfb6fe2917b8
+SIZE (cm-fx6_u-boot_2015-10-18.zip) = 740642
diff --git a/sysutils/u-boot-utilite/files/patch-include_configs_cm__fx6.h b/sysutils/u-boot-utilite/files/patch-include_configs_cm__fx6.h
new file mode 100644
index 000000000000..553253d8e3f0
--- /dev/null
+++ b/sysutils/u-boot-utilite/files/patch-include_configs_cm__fx6.h
@@ -0,0 +1,12 @@
+--- include/configs/cm_fx6.h.orig 2016-02-27 13:29:39 UTC
++++ include/configs/cm_fx6.h
+@@ -174,6 +174,9 @@
+
+ /* NAND */
+ #ifndef CONFIG_SPL_BUILD
++#define CONFIG_CMD_ELF
++#define CONFIG_SYS_MMC_MAX_DEVICE 4
++#define CONFIG_API
+ #define CONFIG_CMD_NAND
+ #define CONFIG_SYS_NAND_BASE 0x40000000
+ #define CONFIG_SYS_NAND_MAX_CHIPS 1
diff --git a/sysutils/u-boot-utilite/pkg-descr b/sysutils/u-boot-utilite/pkg-descr
new file mode 100644
index 000000000000..554a7fac7f77
--- /dev/null
+++ b/sysutils/u-boot-utilite/pkg-descr
@@ -0,0 +1,23 @@
+U-Boot loader for Utilite and Utilite Pro
+
+Install the cm-fx6-firmware file onto the boot disk using:
+
+ dd if=cm-fx6-firmware of=/dev/whatever bs=1k skip=1 seek=1 oflag=dsync
+
+The U-Boot built by this port expects the first 1MB of the boot media to
+be reserved for the U-Boot executable and saved environment. The firmware
+file begins at an offset of 1K from the start of the boot disk. The U-Boot
+environment area begins at an offset of 512K.
+
+This version is patched so that:
+ * ELF and API features are enabled to support ubldr.
+ * A single U-Boot image supports Utilite and Utilite Pro.
+ * When the selected board has multiple SD or MMC devices available, the
+ mmc0 device in U-Boot (and thus the disk0 device in loader(8)) will be
+ whichever device U-Boot was loaded from by the ROM bootloader routines.
+
+The sources for this port are based on stock U-Boot 2015.07 with patches
+provided by CompuLab at:
+http://www.compulab.co.il/wp-content/uploads/2015/10/u-boot-2015.07.tar.bz2
+
+For general information about U-Boot see WWW: http://www.denx.de/wiki/U-Boot
diff --git a/sysutils/u-boot-utilite/pkg-plist b/sysutils/u-boot-utilite/pkg-plist
new file mode 100644
index 000000000000..494dfd625190
--- /dev/null
+++ b/sysutils/u-boot-utilite/pkg-plist
@@ -0,0 +1,2 @@
+%%DATADIR%%/u-boot-utilite/README
+%%DATADIR%%/u-boot-utilite/cm-fx6-firmware