Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jan 2015 02:11:33 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r376036 - in head/sysutils/u-boot-wandboard: . files
Message-ID:  <201501020211.t022BX2l099583@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian (src committer)
Date: Fri Jan  2 02:11:32 2015
New Revision: 376036
URL: https://svnweb.freebsd.org/changeset/ports/376036
QAT: https://qat.redports.org/buildarchive/r376036/

Log:
  Leave caches enabled when launching loader(8), it speeds up loader and the
  kernel can tolerate being entered with caches enabled as of r276445.
  
  Also change the default environment to be basically the same as beaglebone.

Modified:
  head/sysutils/u-boot-wandboard/Makefile
  head/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c
  head/sysutils/u-boot-wandboard/files/patch-common_cmd__elf.c
  head/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h

Modified: head/sysutils/u-boot-wandboard/Makefile
==============================================================================
--- head/sysutils/u-boot-wandboard/Makefile	Fri Jan  2 02:09:29 2015	(r376035)
+++ head/sysutils/u-boot-wandboard/Makefile	Fri Jan  2 02:11:32 2015	(r376036)
@@ -2,6 +2,7 @@
 
 PORTNAME=	u-boot
 PORTVERSION=	2013.10
+PORTREVISION=	1
 CATEGORIES=	sysutils
 PKGNAMESUFFIX=	-wandboard
 DISTNAME=	u-boot-${PORTVERSION}-technexion-edm
@@ -30,7 +31,7 @@ PLIST_FILES=	${U_BOOT_DIR}/u-boot.imx \
 
 MAKE_ARGS+=	ARCH=arm \
 		CROSS_COMPILE=arm-none-eabi- \
-		HOSTCC=clang
+		HOSTCC=cc
 
 do-configure:
 	cd ${WRKSRC}; ${GMAKE} ${MAKE_ARGS} edm_cf_imx6_config

Modified: head/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c
==============================================================================
--- head/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c	Fri Jan  2 02:09:29 2015	(r376035)
+++ head/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c	Fri Jan  2 02:11:32 2015	(r376036)
@@ -1,4 +1,4 @@
---- board/technexion/edm_cf_imx6/edm_cf_imx6.c.orig	2014-08-14 14:51:10 UTC
+--- board/technexion/edm_cf_imx6/edm_cf_imx6.c.orig	2014-06-12 07:50:48 UTC
 +++ board/technexion/edm_cf_imx6/edm_cf_imx6.c
 @@ -63,10 +63,16 @@ enum boot_device get_boot_device(void);
  
@@ -43,7 +43,7 @@
 +		imxname = "imx6dl";	
 +		break;	
 +	}
-+	setenv("imxname", imxname);
++	setenv("soc", imxname);
 +
  #ifdef CONFIG_CMD_BMODE
  	add_board_boot_modes(board_boot_modes);

Modified: head/sysutils/u-boot-wandboard/files/patch-common_cmd__elf.c
==============================================================================
--- head/sysutils/u-boot-wandboard/files/patch-common_cmd__elf.c	Fri Jan  2 02:09:29 2015	(r376035)
+++ head/sysutils/u-boot-wandboard/files/patch-common_cmd__elf.c	Fri Jan  2 02:11:32 2015	(r376036)
@@ -1,10 +1,29 @@
---- common/cmd_elf.c.orig	2014-08-14 14:51:10 UTC
+--- common/cmd_elf.c.orig	2014-06-12 07:50:48 UTC
 +++ common/cmd_elf.c
-@@ -46,6 +46,7 @@ unsigned long do_bootelf_exec(ulong (*en
- 	 * pass address parameter as argv[0] (aka command name),
- 	 * and all remaining args
+@@ -35,22 +35,12 @@ unsigned long do_bootelf_exec(ulong (*en
+ 	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 launch the program directly.
  	 */
-+	cleanup_before_linux();
  	ret = entry(argc, argv);
+-
+-	if (dcache)
+-		dcache_enable();
+-
+ 	return ret;
+ }
  
- 	if (dcache)

Modified: head/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h
==============================================================================
--- head/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h	Fri Jan  2 02:09:29 2015	(r376035)
+++ head/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h	Fri Jan  2 02:11:32 2015	(r376036)
@@ -1,6 +1,6 @@
---- include/configs/edm_cf_imx6.h.orig	2014-08-14 14:51:10 UTC
+--- include/configs/edm_cf_imx6.h.orig	2014-06-12 07:50:48 UTC
 +++ include/configs/edm_cf_imx6.h
-@@ -338,4 +338,54 @@
+@@ -338,4 +338,64 @@
  #define CONFIG_CMD_CACHE
  #endif
  
@@ -26,32 +26,42 @@
 +/* Create a small(ish) boot environment for FreeBSD. */
 +#undef  CONFIG_EXTRA_ENV_SETTINGS
 +#define CONFIG_EXTRA_ENV_SETTINGS \
-+	"boardname=wandboard\0" \
-+	"bootfile=ubldr\0" \
-+	"fatdev=mmc 0:1\0" \
-+	"loaderdev=disk\0" \
-+	"uenv_file=uEnv.txt\0" \
++	"board=wandboard\0" \
++	"loadaddr=0x11000000\0" \
 +	\
-+	"fatboot=" \
-+	  "env exists user_fatboot && run user_fatboot; " \
++	"Fatboot=" \
++	  "env exists loaderdev || env set loaderdev ${fatdev}; " \
++	  "env exists UserFatboot && run UserFatboot; " \
++	  "echo Booting from: ${fatdev} ${bootfile}; " \
 +	  "fatload ${fatdev} ${loadaddr} ${bootfile} && bootelf; " \
 +	"\0" \
-+	"netboot=" \
-+	  "env exists user_netboot && run user_netboot; " \
++	"Netboot=" \
++	  "env exists loaderdev || env set loaderdev net; " \
++	  "env exists UserNetboot && run UserNetboot; " \
 +	  "dhcp ${loadaddr} ${bootfile} && bootelf; " \
 +	"\0" \
-+	"preboot=" \
-+	  "env exists setfdt && run setfdt; " \
-+	  "env exists uenv_import && run uenv_import; " \
-+	  "env exists user_preboot && run user_preboot; " \
++	"Preboot=" \
++	  "env exists bootfile || bootfile=ubldr; " \
++	  "env exists uenv_file || uenv_file=uEnv.txt; " \
++	  "env exists SetupFdtfile && run SetupFdtfile; " \
++	  "env exists SetupFatdev && run SetupFatdev; " \
++	  "env exists SetupUenv && run SetupUenv; " \
++	  "env exists UserPreboot && run UserPreboot; " \
 +	"\0" \
-+	"setfdt=env set fdt_file ${imxname}-${boardname}.dtb\0" \
-+	"uenv_import=" \
++	"SetupFdtfile=" \
++	  "env set fdt_file ${soc}-${board}.dtb" \
++	"\0" \
++	"SetupFatdev=" \
++	  "env exists fatdev || fatdev='mmc 0'; " \
++	"\0" \
++	"SetupUenv=" \
 +	  "fatload ${fatdev} ${loadaddr} ${uenv_file} && " \
 +	    "env import -t ${loadaddr} ${filesize}; " \
 +	"\0"
 +
 +#undef  CONFIG_BOOTCOMMAND
-+#define CONFIG_BOOTCOMMAND "run fatboot"
++#define CONFIG_BOOTCOMMAND	"run Fatboot"
++#undef  CONFIG_PREBOOT
++#define CONFIG_PREBOOT		"run Preboot"
 +
  #endif			       /* __CONFIG_H * */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501020211.t022BX2l099583>