Index: head/sysutils/u-boot-master/Makefile =================================================================== --- head/sysutils/u-boot-master/Makefile (revision 465467) +++ head/sysutils/u-boot-master/Makefile (revision 465468) @@ -1,142 +1,156 @@ # $FreeBSD$ # # Common infrastructure for u-boot ports # PORTNAME= u-boot PORTVERSION= ${UBOOT_VERSION} -PORTREVISION= 2 -DISTVERSIONPREFIX= ports-v CATEGORIES= sysutils PKGNAMESUFFIX?= -${MODEL} +MASTER_SITES= ftp://ftp.denx.de/pub/u-boot/ -MAINTAINER= imp@FreeBSD.org +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 + dtc>=1.4.1:sysutils/dtc \ + mkimage:sysutils/u-boot-tools BUILD_DEPENDS+= ${COMPILER}:devel/${COMPILER} -USES= gmake python:2.7,build shebangfix -BINARY_ALIAS= swig=swig3.0 sed=gsed +USES= tar:bz2 gmake python:2.7,build shebangfix +BINARY_ALIAS= swig=swig3.0 sed=gsed dtc=${LOCALBASE}/bin/dtc -USE_GITHUB= yes -GH_ACCOUNT= freebsd -GH_PROJECT= u-boot - -SHEBANG_FILES= lib/libfdt/pylibfdt/setup.py +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} NO_ARCH= yes # 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 # Overrides for ALLWINNER family UBOOT_PLIST_ALLWINNER=u-boot.img u-boot-sunxi-with-spl.bin # Overrides for ALLWINNER64 family UBOOT_PLIST_ALLWINNER64=u-boot-sunxi-with-spl.bin UBOOT_ARCH_ALLWINNER64=aarch64 # 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 variables .if !defined(UBOOT_VERSION) && defined(UBOOT_VERSION_${FAMILY:tu}) UBOOT_VERSION=${UBOOT_VERSION_${FAMILY:tu}} .endif -UBOOT_VERSION?= 2017.09.00 +UBOOT_VERSION?= 2018.03 .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 +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 ${UBOOT_ARCH} == arm +# For armv6/v7 we want CONFIG_API +# Use a KConfig fragment for that do-configure: + (cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} scripts/kconfig/merge_config.sh configs/${BOARD_CONFIG} configs/FreeBSD_Fragment) +.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 465467) +++ head/sysutils/u-boot-master/distinfo (revision 465468) @@ -1,3 +1,3 @@ -TIMESTAMP = 1508182195 -SHA256 (freebsd-u-boot-ports-v2017.09.00_GH0.tar.gz) = 5e408dee8be45e11293771a7d8a91250dad20711088195f5d6da99d42f5d4f7e -SIZE (freebsd-u-boot-ports-v2017.09.00_GH0.tar.gz) = 14429809 +TIMESTAMP = 1521912727 +SHA256 (u-boot-2018.03.tar.bz2) = 7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd +SIZE (u-boot-2018.03.tar.bz2) = 12304292 Index: head/sysutils/u-boot-master/files/FreeBSD_Fragment =================================================================== --- head/sysutils/u-boot-master/files/FreeBSD_Fragment (nonexistent) +++ head/sysutils/u-boot-master/files/FreeBSD_Fragment (revision 465468) @@ -0,0 +1 @@ +CONFIG_API=y Property changes on: head/sysutils/u-boot-master/files/FreeBSD_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-master/files/boot.cmd =================================================================== --- head/sysutils/u-boot-master/files/boot.cmd (nonexistent) +++ head/sysutils/u-boot-master/files/boot.cmd (revision 465468) @@ -0,0 +1,2 @@ +fatload ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ubldr.bin && go ${kernel_addr_r} +echo "Cannot load ubldr.bin" Property changes on: head/sysutils/u-boot-master/files/boot.cmd ___________________________________________________________________ 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-master/files/patch-api_api.c =================================================================== --- head/sysutils/u-boot-master/files/patch-api_api.c (nonexistent) +++ head/sysutils/u-boot-master/files/patch-api_api.c (revision 465468) @@ -0,0 +1,14 @@ +--- api/api.c.orig 2018-01-09 01:25:29 UTC ++++ api/api.c +@@ -290,6 +290,11 @@ static int API_dev_close(va_list ap) + if (!err) + di->state = DEV_STA_CLOSED; + ++ if (dcache_status()) ++ flush_dcache_all(); ++ if (icache_status()) ++ invalidate_icache_all(); ++ + return err; + } + Property changes on: head/sysutils/u-boot-master/files/patch-api_api.c ___________________________________________________________________ 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-master/files/patch-cmd_boot.c =================================================================== --- head/sysutils/u-boot-master/files/patch-cmd_boot.c (nonexistent) +++ head/sysutils/u-boot-master/files/patch-cmd_boot.c (revision 465468) @@ -0,0 +1,13 @@ +--- cmd/boot.c.orig 2018-01-09 01:25:29 UTC ++++ cmd/boot.c +@@ -19,6 +19,10 @@ __attribute__((weak)) + unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc, + char * const argv[]) + { ++ if (dcache_status()) ++ flush_dcache_all(); ++ if (icache_status()) ++ invalidate_icache_all(); + return entry (argc, argv); + } + Property changes on: head/sysutils/u-boot-master/files/patch-cmd_boot.c ___________________________________________________________________ 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-master/files/patch-cmd_elf.c =================================================================== --- head/sysutils/u-boot-master/files/patch-cmd_elf.c (nonexistent) +++ head/sysutils/u-boot-master/files/patch-cmd_elf.c (revision 465468) @@ -0,0 +1,14 @@ +--- cmd/elf.c.orig 2018-01-09 01:25:29 UTC ++++ cmd/elf.c +@@ -109,6 +109,11 @@ static unsigned long do_bootelf_exec(ulong (*entry)(in + { + unsigned long ret; + ++ if (dcache_status()) ++ flush_dcache_all(); ++ if (icache_status()) ++ invalidate_icache_all(); ++ + /* + * pass address parameter as argv[0] (aka command name), + * and all remaining args Property changes on: head/sysutils/u-boot-master/files/patch-cmd_elf.c ___________________________________________________________________ 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