From owner-svn-ports-head@freebsd.org Sun Jul 22 11:58:26 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32EF31049281; Sun, 22 Jul 2018 11:58:26 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA0F172520; Sun, 22 Jul 2018 11:58:25 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B69015A73; Sun, 22 Jul 2018 11:58:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MBwPJ2002575; Sun, 22 Jul 2018 11:58:25 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MBwNWW002567; Sun, 22 Jul 2018 11:58:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807221158.w6MBwNWW002567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 22 Jul 2018 11:58:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r475103 - in head/sysutils: u-boot-master u-boot-master/files u-boot-rpi u-boot-rpi/files u-boot-rpi2 u-boot-rpi2/files u-boot-rpi3 u-boot-rpi3/files X-SVN-Group: ports-head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sysutils: u-boot-master u-boot-master/files u-boot-rpi u-boot-rpi/files u-boot-rpi2 u-boot-rpi2/files u-boot-rpi3 u-boot-rpi3/files X-SVN-Commit-Revision: 475103 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2018 11:58:26 -0000 Author: manu (src committer) Date: Sun Jul 22 11:58:23 2018 New Revision: 475103 URL: https://svnweb.freebsd.org/changeset/ports/475103 Log: u-boot: Update to v2018.07 This add: - Explicit Depency on bison - Remove the DTC= on MAKE_ARGS as we use the BINARY_ALIAS already - metadata variables - Add cache cmds and disable secure boot - All RPI uses some special fragments to enable OF_BOARD. This makes u-boot using the DTB loaded by the firmware instead of using it's own. - For patches accepted but not in mainline due to timing issue use patchwork directly instead of putting files in the port - All armv7 boards are EFI enabled and boot in secure mode More on metadata file : The goal is to have a u-boot-install package that will read those and auto install u-boot either on a dir (method copy) or on a device (method raw) As all the u-boots are either one file to be dd'ed or one/multiple files to be copied this simple method is good enough. Since the maximum variable is 4 (for the raw method), simply use echo instead of a .in files (ok bapt@) Reviewed by: imp Approved by: imp (implicit) Differential Revision: https://reviews.freebsd.org/D16241 Added: head/sysutils/u-boot-rpi/files/ head/sysutils/u-boot-rpi/files/rpi_fragment (contents, props changed) head/sysutils/u-boot-rpi2/files/ head/sysutils/u-boot-rpi2/files/rpi2_fragment (contents, props changed) head/sysutils/u-boot-rpi3/files/rpi3_fragment (contents, props changed) Deleted: head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c head/sysutils/u-boot-rpi3/files/patch-configs_rpi__3__defconfig head/sysutils/u-boot-rpi3/files/patch-drivers_usb_host_dwc2.c head/sysutils/u-boot-rpi3/files/patch-drivers_video_bcm2835.c head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h Modified: head/sysutils/u-boot-master/Makefile head/sysutils/u-boot-master/distinfo head/sysutils/u-boot-master/files/FreeBSD_Fragment head/sysutils/u-boot-rpi/Makefile head/sysutils/u-boot-rpi2/Makefile head/sysutils/u-boot-rpi3/Makefile Modified: head/sysutils/u-boot-master/Makefile ============================================================================== --- head/sysutils/u-boot-master/Makefile Sun Jul 22 11:24:25 2018 (r475102) +++ head/sysutils/u-boot-master/Makefile Sun Jul 22 11:58:23 2018 (r475103) @@ -20,7 +20,7 @@ BUILD_DEPENDS+= gsed:textproc/gsed \ mkimage:sysutils/u-boot-tools BUILD_DEPENDS+= ${COMPILER}:devel/${COMPILER} -USES= tar:bz2 gmake python:2.7,build shebangfix +USES= tar:bz2 gmake python:2.7,build shebangfix bison BINARY_ALIAS= swig=swig3.0 sed=gsed dtc=${LOCALBASE}/bin/dtc SHEBANG_FILES= tools/binman/binman.py @@ -29,10 +29,14 @@ UBOOT_DIR= share/u-boot/${PORTNAME}${PKGNAMESUFFIX} INST= ${PREFIX}/${UBOOT_DIR} DESCR?= ${.CURDIR}/pkg-descr -MAKE_ARGS+= V=1 CROSS_COMPILE=${CROSS_COMPILE} DTC=${LOCALBASE}/bin/dtc PYTHON=${PYTHON_CMD} ${ARCHFLAGS} +MAKE_ARGS+= V=1 CROSS_COMPILE=${CROSS_COMPILE} PYTHON=${PYTHON_CMD} ${ARCHFLAGS} NO_ARCH= yes +# Use upstreamed patches not yet mainlined +PATCH_DIST_STRIP= -p1 +PATCH_SITES+= http://patchwork.ozlabs.org/patch/ + # Sanity checks .if !defined(MODEL) && !defined(BOARD_CONFIG) && !defined(FAMILY) MODEL= NONE @@ -51,13 +55,23 @@ IGNORE+= FAMILY is not defined # Overrides for OMAP family UBOOT_PLIST_OMAP=u-boot.img MLO +UBOOT_METADATA_OMAP_FILES= ${UBOOT_PLIST_OMAP} +UBOOT_METADATA_OMAP_METHOD= file # Overrides for ALLWINNER family -UBOOT_PLIST_ALLWINNER=u-boot.img u-boot-sunxi-with-spl.bin +UBOOT_PLIST_ALLWINNER=u-boot-sunxi-with-spl.bin +UBOOT_METADATA_ALLWINNER_FILES= ${UBOOT_PLIST_ALLWINNER} +UBOOT_METADATA_ALLWINNER_METHOD= raw +UBOOT_METADATA_ALLWINNER_RAW_OFFSET= 8 +UBOOT_METADATA_ALLWINNER_RAW_BS= 1k # Overrides for ALLWINNER64 family UBOOT_PLIST_ALLWINNER64=u-boot-sunxi-with-spl.bin UBOOT_ARCH_ALLWINNER64=aarch64 +UBOOT_METADATA_ALLWINNER64_FILES= ${UBOOT_PLIST_ALLWINNER} +UBOOT_METADATA_ALLWINNER64_METHOD= raw +UBOOT_METADATA_ALLWINNER64_RAW_OFFSET= 8 +UBOOT_METADATA_ALLWINNER64_RAW_BS= 1k # Overrides for Zynq 7000 family UBOOT_PLIST_ZYNQ_7000=u-boot.img boot.bin uEnv.txt @@ -65,12 +79,14 @@ UBOOT_MOVE_ZYNQ_7000=${WRKSRC}/spl/boot.bin ${.CURDIR} # Overrides for RPI family UBOOT_PLIST_RPI= u-boot.bin +UBOOT_METADATA_RPI_FILES= ${UBOOT_PLIST_RPI} +UBOOT_METADATA_RPI_METHOD= file # Uboot variables .if !defined(UBOOT_VERSION) && defined(UBOOT_VERSION_${FAMILY:tu}) UBOOT_VERSION=${UBOOT_VERSION_${FAMILY:tu}} .endif -UBOOT_VERSION?= 2018.03 +UBOOT_VERSION?= 2018.07 .if !defined(UBOOT_PLIST) && defined(UBOOT_PLIST_${FAMILY:tu}) UBOOT_PLIST=${UBOOT_PLIST_${FAMILY:tu}} @@ -112,26 +128,47 @@ PLIST_FILES+= ${UBOOT_DIR}/${i} .endfor PLIST_FILES+= ${UBOOT_DIR}/README +.if defined(UBOOT_METADATA_${FAMILY:tu}_METHOD) +METADATA_METHOD=${UBOOT_METADATA_${FAMILY:tu}_METHOD} +METADATA_FILES=${UBOOT_METADATA_${FAMILY:tu}_FILES} +PLIST_FILES+= ${UBOOT_DIR}/metadata +UBOOT_PLIST+= metadata +.if ${METADATA_METHOD} == "raw" +METADATA_OFFSET=${UBOOT_METADATA_${FAMILY:tu}_RAW_OFFSET} +METADATA_BS=${UBOOT_METADATA_${FAMILY:tu}_RAW_BS} +.elif ${METADATA_METHOD} == "file" +.else +.error "Unsupported METADATA_METHOD" +.endif +.endif + post-patch: @${REINPLACE_CMD} -e "s|make|${MAKE_CMD}|" ${WRKSRC}/scripts/kconfig/merge_config.sh - ${CP} ${FILESDIR}/FreeBSD_Fragment ${WRKSRC}/configs/ ${CP} ${FILESDIR}/boot.cmd ${WRKSRC}/ +.if defined(METADATA_METHOD) + @echo "METHOD=uboot-${METADATA_METHOD}" > ${WRKSRC}/metadata + @echo "FILES=\"${METADATA_FILES}\"" >> ${WRKSRC}/metadata +.if ${METADATA_METHOD} == "raw" + @echo "OFFSET=${METADATA_OFFSET}" >> ${WRKSRC}/metadata + @echo "BS=${METADATA_BS}" >> ${WRKSRC}/metadata +.elif ${METADATA_METHOD} == "file" +.endif +.endif -.if ${UBOOT_ARCH} == arm +.if ${UBOOT_ARCH} == arm && !defined(CONFIG_FRAGMENT) # For armv6/v7 we want CONFIG_API # Use a KConfig fragment for that +CONFIG_FRAGMENT= ${FILESDIR}/FreeBSD_Fragment +FRAGMENT_NAME= FreeBSD_Fragment +.endif + +.if defined(CONFIG_FRAGMENT) do-configure: - (cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} scripts/kconfig/merge_config.sh configs/${BOARD_CONFIG} configs/FreeBSD_Fragment) + ${CP} ${CONFIG_FRAGMENT} ${WRKSRC}/configs/ + (cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} scripts/kconfig/merge_config.sh configs/${BOARD_CONFIG} configs/${FRAGMENT_NAME}) .else do-configure: (cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${MAKE_CMD} ${BOARD_CONFIG}) -.endif - -# U-Boot for Allwinner 64bits SoCs is splited in two parts -# Generate a single binary to ease deployement on sdcard -.if defined(FAMILY) && ${FAMILY} == allwinner64 -post-build: - ${CAT} ${WRKSRC}/spl/sunxi-spl.bin ${WRKSRC}/u-boot.itb > ${WRKSRC}/u-boot-sunxi-with-spl.bin .endif .if ${UBOOT_ARCH} == arm Modified: head/sysutils/u-boot-master/distinfo ============================================================================== --- head/sysutils/u-boot-master/distinfo Sun Jul 22 11:24:25 2018 (r475102) +++ head/sysutils/u-boot-master/distinfo Sun Jul 22 11:58:23 2018 (r475103) @@ -1,3 +1,7 @@ -TIMESTAMP = 1521912727 -SHA256 (u-boot-2018.03.tar.bz2) = 7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd -SIZE (u-boot-2018.03.tar.bz2) = 12304292 +TIMESTAMP = 1531164493 +SHA256 (u-boot-2018.07.tar.bz2) = 9f10df88bc91b35642e461217f73256bbaeeca9ae2db8db56197ba5e89e1f6d4 +SIZE (u-boot-2018.07.tar.bz2) = 12586212 +SHA256 (937869/mbox/?) = 24fbed0558cc51d22741f72c5676eee1109af59db60c845437db19143322454d +SIZE (937869/mbox/?) = 1238 +SHA256 (939129/mbox/?) = 8db376e5c34d2836fef69a41c9a4e272885c23d641ae6543aad4cdcd8257a4ba +SIZE (939129/mbox/?) = 1076 Modified: head/sysutils/u-boot-master/files/FreeBSD_Fragment ============================================================================== --- head/sysutils/u-boot-master/files/FreeBSD_Fragment Sun Jul 22 11:24:25 2018 (r475102) +++ head/sysutils/u-boot-master/files/FreeBSD_Fragment Sun Jul 22 11:58:23 2018 (r475103) @@ -1 +1,3 @@ CONFIG_API=y +CONFIG_ARMV7_NONSEC=n +CONFIG_CMD_CACHE=y Modified: head/sysutils/u-boot-rpi/Makefile ============================================================================== --- head/sysutils/u-boot-rpi/Makefile Sun Jul 22 11:24:25 2018 (r475102) +++ head/sysutils/u-boot-rpi/Makefile Sun Jul 22 11:58:23 2018 (r475103) @@ -9,4 +9,10 @@ FAMILY= rpi DEPENDS= ${LOCALBASE}/share/rpi-firmware/bootcode.bin:sysutils/rpi-firmware +PATCHFILES+= 937869/mbox/? \ + 939129/mbox/? + +CONFIG_FRAGMENT= ${.CURDIR}/files/rpi_fragment +FRAGMENT_NAME= rpi_fragment + .include "${MASTERDIR}/Makefile" Added: head/sysutils/u-boot-rpi/files/rpi_fragment ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-rpi/files/rpi_fragment Sun Jul 22 11:58:23 2018 (r475103) @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_API=y Modified: head/sysutils/u-boot-rpi2/Makefile ============================================================================== --- head/sysutils/u-boot-rpi2/Makefile Sun Jul 22 11:24:25 2018 (r475102) +++ head/sysutils/u-boot-rpi2/Makefile Sun Jul 22 11:58:23 2018 (r475103) @@ -9,4 +9,10 @@ FAMILY= rpi DEPENDS= ${LOCALBASE}/share/rpi-firmware/bootcode.bin:sysutils/rpi-firmware +PATCHFILES+= 937869/mbox/? \ + 939129/mbox/? + +CONFIG_FRAGMENT= ${.CURDIR}/files/rpi2_fragment +FRAGMENT_NAME= rpi2_fragment + .include "${MASTERDIR}/Makefile" Added: head/sysutils/u-boot-rpi2/files/rpi2_fragment ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-rpi2/files/rpi2_fragment Sun Jul 22 11:58:23 2018 (r475103) @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_API=y Modified: head/sysutils/u-boot-rpi3/Makefile ============================================================================== --- head/sysutils/u-boot-rpi3/Makefile Sun Jul 22 11:24:25 2018 (r475102) +++ head/sysutils/u-boot-rpi3/Makefile Sun Jul 22 11:58:23 2018 (r475103) @@ -2,7 +2,6 @@ MAINTAINER= uboot@FreeBSD.org MASTERDIR= ${.CURDIR}/../u-boot-master -PORTREVISION= 1 MODEL= rpi3 BOARD_CONFIG= rpi_3_defconfig @@ -12,5 +11,10 @@ UBOOT_ARCH= aarch64 DEPENDS= ${LOCALBASE}/share/rpi-firmware/bootcode.bin:sysutils/rpi-firmware EXTRA_PATCHES= ${.CURDIR}/files/ +PATCHFILES+= 937869/mbox/? \ + 939129/mbox/? + +CONFIG_FRAGMENT= ${.CURDIR}/files/rpi3_fragment +FRAGMENT_NAME= rpi3_fragment .include "${MASTERDIR}/Makefile" Added: head/sysutils/u-boot-rpi3/files/rpi3_fragment ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-rpi3/files/rpi3_fragment Sun Jul 22 11:58:23 2018 (r475103) @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"