Index: head/sysutils/u-boot-master/Makefile =================================================================== --- head/sysutils/u-boot-master/Makefile +++ head/sysutils/u-boot-master/Makefile @@ -20,7 +20,7 @@ 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 @@ 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 @@ # 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 @@ # 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 @@ .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 Index: head/sysutils/u-boot-master/distinfo =================================================================== --- head/sysutils/u-boot-master/distinfo +++ head/sysutils/u-boot-master/distinfo @@ -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 +++ head/sysutils/u-boot-master/files/FreeBSD_Fragment @@ -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 +++ head/sysutils/u-boot-rpi/Makefile @@ -9,4 +9,10 @@ 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 +++ head/sysutils/u-boot-rpi/files/rpi_fragment @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_API=y Index: head/sysutils/u-boot-rpi2/Makefile =================================================================== --- head/sysutils/u-boot-rpi2/Makefile +++ head/sysutils/u-boot-rpi2/Makefile @@ -9,4 +9,10 @@ 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 +++ head/sysutils/u-boot-rpi2/files/rpi2_fragment @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_API=y Index: head/sysutils/u-boot-rpi3/Makefile =================================================================== --- head/sysutils/u-boot-rpi3/Makefile +++ head/sysutils/u-boot-rpi3/Makefile @@ -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 @@ 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-board_raspberrypi_rpi_rpi.c =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c +++ head/sysutils/u-boot-rpi3/files/patch-board_raspberrypi_rpi_rpi.c @@ -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); - } - - /* Index: head/sysutils/u-boot-rpi3/files/patch-configs_rpi__3__defconfig =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-configs_rpi__3__defconfig +++ head/sysutils/u-boot-rpi3/files/patch-configs_rpi__3__defconfig @@ -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 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 +++ head/sysutils/u-boot-rpi3/files/patch-drivers_usb_host_dwc2.c @@ -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" }, - { } - }; Index: head/sysutils/u-boot-rpi3/files/patch-drivers_video_bcm2835.c =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-drivers_video_bcm2835.c +++ head/sysutils/u-boot-rpi3/files/patch-drivers_video_bcm2835.c @@ -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" }, - { } - }; - Index: head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h =================================================================== --- head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h +++ head/sysutils/u-boot-rpi3/files/patch-include_configs_rpi.h @@ -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) Index: head/sysutils/u-boot-rpi3/files/rpi3_fragment =================================================================== --- head/sysutils/u-boot-rpi3/files/rpi3_fragment +++ head/sysutils/u-boot-rpi3/files/rpi3_fragment @@ -0,0 +1,3 @@ +CONFIG_OF_EMBED=n +CONFIG_OF_BOARD=y +CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"