svn commit: r447111 - head/sysutils/u-boot-master

Warner Losh imp at FreeBSD.org
Wed Aug 2 15:20:58 UTC 2017


Author: imp
Date: Wed Aug  2 15:20:57 2017
New Revision: 447111
URL: https://svnweb.freebsd.org/changeset/ports/447111

Log:
  Changes to prepare for aarch64 support
  
  o Generalize support for different architectures.
  o Add specific support for aarch64
  o Add ALLWINNER64 as a new family using aarch64, but no ports use it yet.
  o CROSS_COMPILE is the string to pass to u-boot
  o COMPILER is the FreeBSD port (we assume gcc since that works better
    typically than clang).
  
  Submitted by: Emmanuel Vadot (the aarch64 bits, hacked by me to be generic)

Modified:
  head/sysutils/u-boot-master/Makefile   (contents, props changed)

Modified: head/sysutils/u-boot-master/Makefile
==============================================================================
--- head/sysutils/u-boot-master/Makefile	Wed Aug  2 15:20:52 2017	(r447110)
+++ head/sysutils/u-boot-master/Makefile	Wed Aug  2 15:20:57 2017	(r447111)
@@ -14,10 +14,10 @@ COMMENT=	Cross-build das u-boot for ${MODEL}
 
 LICENSE=	GPLv2
 
-BUILD_DEPENDS=	arm-none-eabi-gcc:devel/arm-none-eabi-gcc \
-		gsed:textproc/gsed \
+BUILD_DEPENDS+=	gsed:textproc/gsed \
 		swig:devel/swig13 \
 		dtc>=1.4.1:sysutils/dtc
+BUILD_DEPENDS+=	${COMPILER}:devel/${COMPILER}
 
 USES=		gmake python:build shebangfix
 
@@ -31,8 +31,7 @@ UBOOT_DIR=	share/u-boot/${PORTNAME}${PKGNAMESUFFIX}
 INST=		${PREFIX}/${UBOOT_DIR}
 DESCR?=		${.CURDIR}/pkg-descr
 
-MAKE_ARGS+=	V=1 ARCH=${UBOOT_ARCH} CROSS_COMPILE=${UBOOT_ARCH}-none-eabi- \
-		DTC=${LOCALBASE}/bin/dtc
+MAKE_ARGS+=	V=1 CROSS_COMPILE=${CROSS_COMPILE} DTC=${LOCALBASE}/bin/dtc ${ARCHFLAGS}
 
 NO_ARCH=	yes
 
@@ -53,6 +52,10 @@ UBOOT_PLIST_OMAP=u-boot.img MLO
 # Overrides for ALLWINNER family
 UBOOT_PLIST_ALLWINNER=u-boot.img u-boot-sunxi-with-spl.bin
 
+# Overrides for ALLWINNER family
+UBOOT_PLIST_ALLWINNER64=u-boot-sunxi-with-spl.bin
+UBOOT_ARCH_ALLWINNER64=aarch64
+
 # Uboot variables
 .if !defined(UBOOT_VERSION) && defined(UBOOT_VERSION_${FAMILY:tu})
 UBOOT_VERSION=${UBOOT_VERSION_${FAMILY:tu}}
@@ -68,6 +71,19 @@ UBOOT_PLIST?=u-boot.img
 UBOOT_ARCH=${UBOOT_ARCH_${FAMILY:tu}}
 .endif
 UBOOT_ARCH?=	arm
+
+.if ${UBOOT_ARCH} == arm
+CROSS_COMPILE=arm-none-eabi-
+ARCHFLAGS=ARCH=${UBOOT_ARCH}
+.elif ${UBOOT_ARCH} == aarch64
+CROSS_COMPILE=aarch64-none-elf-
+ARCHFLAGS=ARCH=arm
+.else
+# Best guess for other architectures
+CROSS_COMPILE=${UBOOT_ARCH}-none-elf-
+ARCHFLAGS=ARCH=${UBOOT_ARCH}
+.endif
+COMPILER?=${CROSS_COMPILE}gcc
 
 # Each u-boot family has different files to include, bring them in.
 .for i in ${UBOOT_PLIST}


More information about the svn-ports-head mailing list