Date: Fri, 23 Oct 2015 19:12:27 +0000 (UTC) From: Brad Davis <brd@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r400051 - in head/sysutils/u-boot-rpi: . files Message-ID: <201510231912.t9NJCRM3083349@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brd Date: Fri Oct 23 19:12:27 2015 New Revision: 400051 URL: https://svnweb.freebsd.org/changeset/ports/400051 Log: Update sysutils/u-boot-rpi to 2015.10 Submitted by: ian Approved by: bdrewery (mentor) Added: head/sysutils/u-boot-rpi/files/patch-arch_arm_cpu_arm11_cpu.c (contents, props changed) head/sysutils/u-boot-rpi/files/patch-common_cmd__boot.c (contents, props changed) head/sysutils/u-boot-rpi/files/patch-common_cmd__elf.c (contents, props changed) head/sysutils/u-boot-rpi/files/patch-include_configs_rpi-common.h (contents, props changed) Deleted: head/sysutils/u-boot-rpi/files/patch-common_cmd__nvedit.c head/sysutils/u-boot-rpi/files/patch-config.mk head/sysutils/u-boot-rpi/files/patch-include_configs_rpi__b.h Modified: head/sysutils/u-boot-rpi/Makefile head/sysutils/u-boot-rpi/distinfo head/sysutils/u-boot-rpi/files/patch-api_api.c head/sysutils/u-boot-rpi/files/patch-common_cmd__test.c Modified: head/sysutils/u-boot-rpi/Makefile ============================================================================== --- head/sysutils/u-boot-rpi/Makefile Fri Oct 23 19:04:50 2015 (r400050) +++ head/sysutils/u-boot-rpi/Makefile Fri Oct 23 19:12:27 2015 (r400051) @@ -1,10 +1,10 @@ # $FreeBSD$ PORTNAME= u-boot -PORTVERSION= 2013.01 -PORTREVISION= 2 +PORTVERSION= 2015.10 CATEGORIES= sysutils -MASTER_SITES= LOCAL/ian/:bootfiles +MASTER_SITES= ftp://ftp.denx.de/pub/u-boot/ \ + LOCAL/ian/:bootfiles PKGNAMESUFFIX= -rpi DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ rpi-boot-files-2014.10_2.tar.bz2:bootfiles @@ -14,20 +14,12 @@ COMMENT= Cross-build U-Boot loader for R LICENSE= GPLv2 -BUILD_DEPENDS= ${CROSS_GCC}:${PORTSDIR}/devel/arm-none-eabi-gcc492 \ - gsed:${PORTSDIR}/textproc/gsed - -CROSS_GCC= arm-none-eabi-gcc-4.9.2 - -USE_GITHUB= yes -GH_ACCOUNT= gonzoua -GH_PROJECT= u-boot-pi -GH_TAGNAME= 6709570 +BUILD_DEPENDS= arm-none-eabi-gcc:${PORTSDIR}/devel/arm-none-eabi-gcc NO_ARCH= yes -USES= gmake -SSP_UNSAFE= yes # cross-build static linking dies with -fstack-protector +USES= gmake tar:bzip2 +SSP_UNSAFE= yes # cross-LD does not support -fstack-protector WRK_BOOTFILES= ${WRKDIR}/rpi-boot-files @@ -43,13 +35,10 @@ PLIST_FILES= ${U_BOOT_DIR}/u-boot.img \ ${U_BOOT_DIR}/start_cd.elf MAKE_ARGS+= ARCH=arm \ - CROSS_COMPILE=arm-none-eabi- \ - HOSTCC=cc \ - CC=${CROSS_GCC} \ - SED=gsed + CROSS_COMPILE=arm-none-eabi- do-configure: - (cd ${WRKSRC}; ${GMAKE} ${MAKE_ARGS} rpi_b_config) + (cd ${WRKSRC}; ${GMAKE} rpi_defconfig) # The output of the u-boot build process is u-boot.bin. We have to put a # standard (for the RPi) image header on the front of it, and the resulting Modified: head/sysutils/u-boot-rpi/distinfo ============================================================================== --- head/sysutils/u-boot-rpi/distinfo Fri Oct 23 19:04:50 2015 (r400050) +++ head/sysutils/u-boot-rpi/distinfo Fri Oct 23 19:12:27 2015 (r400051) @@ -1,4 +1,4 @@ -SHA256 (gonzoua-u-boot-pi-2013.01-6709570_GH0.tar.gz) = e6c196eda2de36dce313c876f41ffa0f8353273e89c2e33382f303019fd73383 -SIZE (gonzoua-u-boot-pi-2013.01-6709570_GH0.tar.gz) = 13850358 +SHA256 (u-boot-2015.10.tar.bz2) = bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955 +SIZE (u-boot-2015.10.tar.bz2) = 10416503 SHA256 (rpi-boot-files-2014.10_2.tar.bz2) = bcaa493d3585151fde755245bee44b7d30d0e9c7ec9cc7f4dccdad57caf18cdc SIZE (rpi-boot-files-2014.10_2.tar.bz2) = 1893216 Modified: head/sysutils/u-boot-rpi/files/patch-api_api.c ============================================================================== --- head/sysutils/u-boot-rpi/files/patch-api_api.c Fri Oct 23 19:04:50 2015 (r400050) +++ head/sysutils/u-boot-rpi/files/patch-api_api.c Fri Oct 23 19:12:27 2015 (r400051) @@ -1,6 +1,6 @@ ---- api/api.c.orig 2012-11-28 01:28:06 UTC +--- api/api.c.orig 2015-10-19 23:59:38 UTC +++ api/api.c -@@ -512,45 +512,47 @@ static int API_env_set(va_list ap) +@@ -495,45 +495,47 @@ static int API_env_set(va_list ap) */ static int API_env_enum(va_list ap) { @@ -56,7 +56,7 @@ + if ((s = strchr(buf, '=')) != NULL) + *s = 0; + search.key = buf; -+ if ((i = hsearch_r(search, FIND, &match, &env_htab)) == 0) { ++ if ((i = hsearch_r(search, FIND, &match, &env_htab, 0)) == 0) { + i = API_EINVAL; + goto done; } Added: head/sysutils/u-boot-rpi/files/patch-arch_arm_cpu_arm11_cpu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-rpi/files/patch-arch_arm_cpu_arm11_cpu.c Fri Oct 23 19:12:27 2015 (r400051) @@ -0,0 +1,17 @@ +--- arch/arm/cpu/arm11/cpu.c.orig 2015-10-19 23:59:38 UTC ++++ arch/arm/cpu/arm11/cpu.c +@@ -52,6 +52,14 @@ static void cache_flush(void) + asm volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (i)); + } + ++void invalidate_icache_all(void) ++{ ++ /* invalidate entire icache and btb */ ++ asm volatile("mcr p15, 0, %0, c7, c5, 0" : : "r" (0)); ++ /* mem barrier to sync things */ ++ asm volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (0)); ++} ++ + #ifndef CONFIG_SYS_DCACHE_OFF + + #ifndef CONFIG_SYS_CACHELINE_SIZE Added: head/sysutils/u-boot-rpi/files/patch-common_cmd__boot.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-rpi/files/patch-common_cmd__boot.c Fri Oct 23 19:12:27 2015 (r400051) @@ -0,0 +1,18 @@ +--- common/cmd_boot.c.orig 2015-10-19 23:59:38 UTC ++++ common/cmd_boot.c +@@ -19,6 +19,15 @@ __attribute__((weak)) + unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc, + char * const argv[]) + { ++ /* ++ * FreeBSD wants the caches enabled while ubldr runs, and as of r276397 ++ * the kernel can tolerate being entered with internal (but not external ++ * PL310) caches enabled on armv6/7 systems. So don't disable caches ++ * here, just invalidate the icache (because we DMA'd new data into that ++ * memory recently) and launch the program directly. ++ */ ++ flush_dcache_all(); ++ invalidate_icache_all(); + return entry (argc, argv); + } + Added: head/sysutils/u-boot-rpi/files/patch-common_cmd__elf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-rpi/files/patch-common_cmd__elf.c Fri Oct 23 19:12:27 2015 (r400051) @@ -0,0 +1,32 @@ +--- common/cmd_elf.c.orig 2015-10-19 23:59:38 UTC ++++ common/cmd_elf.c +@@ -35,22 +35,15 @@ static unsigned long do_bootelf_exec(ulo + unsigned long ret; + + /* +- * QNX images require the data cache is disabled. +- * Data cache is already flushed, so just turn it off. +- */ +- int dcache = dcache_status(); +- if (dcache) +- dcache_disable(); +- +- /* +- * pass address parameter as argv[0] (aka command name), +- * and all remaining args ++ * FreeBSD wants the caches enabled while ubldr runs, and as of r276397 ++ * the kernel can tolerate being entered with internal (but not external ++ * PL310) caches enabled on armv6/7 systems. So don't disable caches ++ * here, just invalidate the icache (because we DMA'd new data into that ++ * memory recently) and launch the program directly. + */ ++ flush_dcache_all(); ++ invalidate_icache_all(); + ret = entry(argc, argv); +- +- if (dcache) +- dcache_enable(); +- + return ret; + } + Modified: head/sysutils/u-boot-rpi/files/patch-common_cmd__test.c ============================================================================== --- head/sysutils/u-boot-rpi/files/patch-common_cmd__test.c Fri Oct 23 19:04:50 2015 (r400050) +++ head/sysutils/u-boot-rpi/files/patch-common_cmd__test.c Fri Oct 23 19:12:27 2015 (r400051) @@ -1,8 +1,8 @@ ---- common/cmd_test.c.orig 2012-11-28 01:28:06 UTC +--- common/cmd_test.c.orig 2015-10-19 23:59:38 UTC +++ common/cmd_test.c -@@ -29,9 +29,14 @@ static int do_test(cmd_tbl_t *cmdtp, int +@@ -56,9 +56,14 @@ static int do_test(cmd_tbl_t *cmdtp, int char * const *ap; - int left, adv, expr, last_expr, neg, last_cmp; + int i, op, left, adv, expr, last_expr, last_unop, last_binop; - /* args? */ - if (argc < 3) Added: head/sysutils/u-boot-rpi/files/patch-include_configs_rpi-common.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/u-boot-rpi/files/patch-include_configs_rpi-common.h Fri Oct 23 19:12:27 2015 (r400051) @@ -0,0 +1,59 @@ +--- include/configs/rpi-common.h.orig 2015-10-19 23:59:38 UTC ++++ include/configs/rpi-common.h +@@ -183,4 +183,56 @@ + + #define CONFIG_BOOTDELAY 2 + ++/***************************************************************************** ++ * FreeBSD customizations from here down. ++ ****************************************************************************/ ++ ++#define CONFIG_API ++#define CONFIG_CMD_ELF ++#define CONFIG_EFI_PARTITION ++#define CONFIG_PREBOOT ++ ++#define CONFIG_SYS_MMC_MAX_DEVICE 1 ++ ++/* Create a small(ish) boot environment for FreeBSD. */ ++#undef CONFIG_EXTRA_ENV_SETTINGS ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ ENV_MEM_LAYOUT_SETTINGS \ ++ "stdin=serial,lcd\0" \ ++ "stderr=serial,lcd\0" \ ++ "stdout=serial,lcd\0" \ ++ \ ++ "Fatboot=" \ ++ "env exists bootfile || bootfile=ubldr.bin; " \ ++ "env exists loaderdev || env set loaderdev ${fatdev}; " \ ++ "test ${loaderdev} = net && env exists SetupNetconfig && run SetupNetconfig; " \ ++ "echo Booting from: ${fatdev} ${bootfile}; " \ ++ "fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf || go ${loadaddr}; " \ ++ "\0" \ ++ "Preboot=" \ ++ "fdt addr 0x100; " \ ++ "env exists uenv_file || uenv_file=uEnv.txt; " \ ++ "env exists SetupFatdev && run SetupFatdev; " \ ++ "env exists SetupUenv && run SetupUenv; " \ ++ "env exists UserPreboot && run UserPreboot; " \ ++ "\0" \ ++ "SetupFatdev=" \ ++ "env exists fatdev || fatdev='mmc 0'; " \ ++ "\0" \ ++ "SetupNetconfig=" \ ++ "env exists ethact || usb start; " \ ++ "env exists UserNetconfig && run UserNetconfig; " \ ++ "\0" \ ++ "SetupUenv=" \ ++ "fatload ${fatdev} ${loadaddr} ${uenv_file} && " \ ++ "env import -t ${loadaddr} ${filesize}; " \ ++ "\0" ++ ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run Fatboot" ++#undef CONFIG_PREBOOT ++#define CONFIG_PREBOOT "run Preboot" ++ ++#define CONFIG_CMD_CACHE ++ + #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510231912.t9NJCRM3083349>