From owner-svn-ports-all@freebsd.org Wed Aug 2 15:20:58 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E4CDD3144; Wed, 2 Aug 2017 15:20:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8845568ED8; Wed, 2 Aug 2017 15:20:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72FKvhZ085220; Wed, 2 Aug 2017 15:20:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72FKvJ3085219; Wed, 2 Aug 2017 15:20:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708021520.v72FKvJ3085219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 2 Aug 2017 15:20:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r447111 - head/sysutils/u-boot-master X-SVN-Group: ports-head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sysutils/u-boot-master X-SVN-Commit-Revision: 447111 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 15:20:58 -0000 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}