Index: head/sysutils/u-boot-master/Makefile =================================================================== --- head/sysutils/u-boot-master/Makefile (revision 475102) +++ head/sysutils/u-boot-master/Makefile (revision 475103) @@ -1,156 +1,193 @@ # $FreeBSD$ # # Common infrastructure for u-boot ports # PORTNAME= u-boot PORTVERSION= ${UBOOT_VERSION} CATEGORIES= sysutils PKGNAMESUFFIX?= -${MODEL} MASTER_SITES= ftp://ftp.denx.de/pub/u-boot/ MAINTAINER?= uboot@FreeBSD.org COMMENT= Cross-build das u-boot for model ${MODEL} LICENSE= GPLv2 BUILD_DEPENDS+= gsed:textproc/gsed \ swig3.0:devel/swig30 \ dtc>=1.4.1:sysutils/dtc \ 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 SSP_UNSAFE= yes 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 IGNORE= is a metaport; there is nothing to build .else .if !defined(MODEL) IGNORE+= MODEL is not defined .endif .if !defined(BOARD_CONFIG) IGNORE+= BOARD_CONFIG is not defined .endif .if !defined(FAMILY) IGNORE+= FAMILY is not defined .endif .endif # 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 UBOOT_MOVE_ZYNQ_7000=${WRKSRC}/spl/boot.bin ${.CURDIR}/files/uEnv.txt # 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}} .endif UBOOT_PLIST?=u-boot.img .if !defined(UBOOT_ARCH) && defined(UBOOT_ARCH_${FAMILY:tu}) UBOOT_ARCH=${UBOOT_ARCH_${FAMILY:tu}} .endif UBOOT_ARCH?= arm .if ${UBOOT_ARCH} == arm CROSS_COMPILE=arm-none-eabi- ARCHFLAGS=ARCH=${UBOOT_ARCH} UBOOT_PLIST+= boot.scr .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 .if !defined(UBOOT_MOVE) && defined(UBOOT_MOVE_${FAMILY:tu}) UBOOT_MOVE=${UBOOT_MOVE_${FAMILY:tu}} .endif # Per family dependancies .if defined(FAMILY) && ${FAMILY} == allwinner64 BUILD_DEPENDS+= ${LOCALBASE}/share/atf-allwinner/bl31.bin:sysutils/atf-allwinner MAKE_ENV+= BL31=${LOCALBASE}/share/atf-allwinner/bl31.bin .endif # Each u-boot family has different files to include, bring them in. .for i in ${UBOOT_PLIST} 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 post-build: mkimage -C none -A arm -T script -d ${FILESDIR}/boot.cmd ${WRKSRC}/boot.scr .endif # 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} ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}/${INST} .endfor ${INSTALL_DATA} ${DESCR} ${STAGEDIR}/${INST}/README .include Index: head/sysutils/u-boot-master/distinfo =================================================================== --- head/sysutils/u-boot-master/distinfo (revision 475102) +++ head/sysutils/u-boot-master/distinfo (revision 475103) @@ -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 Index: head/sysutils/u-boot-master/files/FreeBSD_Fragment =================================================================== --- head/sysutils/u-boot-master/files/FreeBSD_Fragment (revision 475102) +++ head/sysutils/u-boot-master/files/FreeBSD_Fragment (revision 475103) @@ -1 +1,3 @@ CONFIG_API=y +CONFIG_ARMV7_NONSEC=n +CONFIG_CMD_CACHE=y Index: head/sysutils/u-boot-rpi/Makefile =================================================================== --- head/sysutils/u-boot-rpi/Makefile (revision 475102) +++ head/sysutils/u-boot-rpi/Makefile (revision 475103) @@ -1,12 +1,18 @@ # $FreeBSD$ MAINTAINER= manu@FreeBSD.org MASTERDIR= ${.CURDIR}/../u-boot-master MODEL= rpi BOARD_CONFIG= rpi_defconfig 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" Index: head/sysutils/u-boot-rpi/files/rpi_fragment =================================================================== --- head/sysutils/u-boot-rpi/files/rpi_fragment (nonexistent) +++ head/sysutils/u-boot-rpi/files/rpi_fragment (revision 475103) @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_API=y Property changes on: head/sysutils/u-boot-rpi/files/rpi_fragment ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/u-boot-rpi2/Makefile =================================================================== --- head/sysutils/u-boot-rpi2/Makefile (revision 475102) +++ head/sysutils/u-boot-rpi2/Makefile (revision 475103) @@ -1,12 +1,18 @@ # $FreeBSD$ MAINTAINER= manu@FreeBSD.org MASTERDIR= ${.CURDIR}/../u-boot-master MODEL= rpi2 BOARD_CONFIG= rpi_2_defconfig 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" Index: head/sysutils/u-boot-rpi2/files/rpi2_fragment =================================================================== --- head/sysutils/u-boot-rpi2/files/rpi2_fragment (nonexistent) +++ head/sysutils/u-boot-rpi2/files/rpi2_fragment (revision 475103) @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_API=y Property changes on: head/sysutils/u-boot-rpi2/files/rpi2_fragment ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/u-boot-rpi3/Makefile =================================================================== --- head/sysutils/u-boot-rpi3/Makefile (revision 475102) +++ head/sysutils/u-boot-rpi3/Makefile (revision 475103) @@ -1,16 +1,20 @@ # $FreeBSD$ MAINTAINER= uboot@FreeBSD.org MASTERDIR= ${.CURDIR}/../u-boot-master -PORTREVISION= 1 MODEL= rpi3 BOARD_CONFIG= rpi_3_defconfig FAMILY= rpi 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" Index: head/sysutils/u-boot-rpi3/files/patch-drivers_video_bcm2835.c =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-drivers_video_bcm2835.c (revision 475102) +++ head/sysutils/u-boot-rpi3/files/patch-drivers_video_bcm2835.c (nonexistent) @@ -1,10 +0,0 @@ ---- drivers/video/bcm2835.c.orig 2018-03-13 12:02:19 UTC -+++ drivers/video/bcm2835.c -@@ -49,6 +49,7 @@ static int bcm2835_video_probe(struct udevice *dev) - - static const struct udevice_id bcm2835_video_ids[] = { - { .compatible = "brcm,bcm2835-hdmi" }, -+ { .compatible = "brcm,bcm2708-fb" }, - { } - }; - Property changes on: head/sysutils/u-boot-rpi3/files/patch-drivers_video_bcm2835.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h (revision 475102) +++ head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h (nonexistent) @@ -1,10 +0,0 @@ ---- include/configs/rpi.h.orig 2018-03-13 12:02:19 UTC -+++ include/configs/rpi.h -@@ -133,6 +133,7 @@ - - #define BOOT_TARGET_DEVICES(func) \ - func(MMC, mmc, 0) \ -+ func(MMC, mmc, 1) \ - func(USB, usb, 0) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) Property changes on: head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/u-boot-rpi3/files/patch-drivers_usb_host_dwc2.c =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-drivers_usb_host_dwc2.c (revision 475102) +++ head/sysutils/u-boot-rpi3/files/patch-drivers_usb_host_dwc2.c (nonexistent) @@ -1,10 +0,0 @@ ---- drivers/usb/host/dwc2.c.orig 2018-03-13 12:02:19 UTC -+++ drivers/usb/host/dwc2.c -@@ -1283,6 +1283,7 @@ struct dm_usb_ops dwc2_usb_ops = { - - static const struct udevice_id dwc2_usb_ids[] = { - { .compatible = "brcm,bcm2835-usb" }, -+ { .compatible = "brcm,bcm2708-usb" }, - { .compatible = "snps,dwc2" }, - { } - }; Property changes on: head/sysutils/u-boot-rpi3/files/patch-drivers_usb_host_dwc2.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c (revision 475102) +++ head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c (nonexistent) @@ -1,13 +0,0 @@ ---- board/raspberrypi/rpi/rpi.c.orig 2018-03-13 12:02:19 UTC -+++ board/raspberrypi/rpi/rpi.c -@@ -273,6 +273,10 @@ static void set_fdt_addr(void) - return; - - env_set_hex("fdt_addr", fw_dtb_pointer); -+ /* -+ * Set fdtcontroladdr too so it can be picked up by boot script -+ */ -+ env_set_hex("fdtcontroladdr", fw_dtb_pointer); - } - - /* Property changes on: head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/u-boot-rpi3/files/patch-configs_rpi__3__defconfig =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-configs_rpi__3__defconfig (revision 475102) +++ head/sysutils/u-boot-rpi3/files/patch-configs_rpi__3__defconfig (nonexistent) @@ -1,14 +0,0 @@ ---- configs/rpi_3_defconfig.orig 2018-03-13 12:02:19 UTC -+++ configs/rpi_3_defconfig -@@ -13,9 +13,9 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_ENV_FAT_INTERFACE="mmc" --CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" -+CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" - CONFIG_DM_KEYBOARD=y - CONFIG_DM_MMC=y - CONFIG_MMC_SDHCI=y Property changes on: head/sysutils/u-boot-rpi3/files/patch-configs_rpi__3__defconfig ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/u-boot-rpi3/files/rpi3_fragment =================================================================== --- head/sysutils/u-boot-rpi3/files/rpi3_fragment (nonexistent) +++ head/sysutils/u-boot-rpi3/files/rpi3_fragment (revision 475103) @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" Property changes on: head/sysutils/u-boot-rpi3/files/rpi3_fragment ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property