Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Feb 2015 21:47:35 +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: r379556 - in head/sysutils/u-boot-wandboard: . files
Message-ID:  <201502212147.t1LLlZsX091185@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian (src committer)
Date: Sat Feb 21 21:47:34 2015
New Revision: 379556
URL: https://svnweb.freebsd.org/changeset/ports/379556
QAT: https://qat.redports.org/buildarchive/r379556/

Log:
  Update the Wandboard U-Boot port to account for the difference between
  the actual SoC on the board (solo/dual/quad) and the soc name as needed
  for generating the fdt_file variable.  The Solo and Dual-lite SoCs are
  considered to be the same part by the fdt data.
  
  Approved by:	bapt

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-include_configs_edm__cf__imx6.h

Modified: head/sysutils/u-boot-wandboard/Makefile
==============================================================================
--- head/sysutils/u-boot-wandboard/Makefile	Sat Feb 21 21:44:36 2015	(r379555)
+++ head/sysutils/u-boot-wandboard/Makefile	Sat Feb 21 21:47:34 2015	(r379556)
@@ -2,7 +2,7 @@
 
 PORTNAME=	u-boot
 PORTVERSION=	2013.10
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 PKGNAMESUFFIX=	-wandboard
 DISTNAME=	u-boot-${PORTVERSION}-technexion-edm

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	Sat Feb 21 21:44:36 2015	(r379555)
+++ head/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c	Sat Feb 21 21:47:34 2015	(r379556)
@@ -25,25 +25,25 @@
  
  int board_late_init(void)
  {
-+	const char *imxname;
-+	uint cpurev, imxtype;
++	const char *fdt_soc;
++	uint cpurev;
 +
 +	cpurev = get_cpu_rev();
-+	imxtype = (cpurev & 0xFF000) >> 12;
 +
-+	switch (imxtype){
-+	case MXC_CPU_MX6SOLO:
-+		imxname = "imx6sx";	
-+		break;
-+	case MXC_CPU_MX6Q:
-+		imxname = "imx6q";	
-+		break;
-+	case MXC_CPU_MX6DL:
-+	default:
-+		imxname = "imx6dl";	
-+		break;	
-+	}
-+	setenv("soc", imxname);
++	/*
++	 * Note that Solo and DualLite are the same SoC with one core fused off
++	 * in the solo case.
++	 */
++	if (((cpurev & 0xFF000) >> 12) == MXC_CPU_MX6Q)
++		fdt_soc = "imx6q";
++	else
++		fdt_soc = "imx6dl";
++
++	if (getenv("fdt_soc") == NULL)
++		setenv("fdt_soc", fdt_soc);
++
++	if (getenv("fdt_board") == NULL)
++		setenv("fdt_board", "wandboard");
 +
  #ifdef CONFIG_CMD_BMODE
  	add_board_boot_modes(board_boot_modes);

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	Sat Feb 21 21:44:36 2015	(r379555)
+++ head/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h	Sat Feb 21 21:47:34 2015	(r379556)
@@ -1,6 +1,6 @@
 --- include/configs/edm_cf_imx6.h.orig	2014-06-12 07:50:48 UTC
 +++ include/configs/edm_cf_imx6.h
-@@ -338,4 +338,64 @@
+@@ -338,4 +338,61 @@
  #define CONFIG_CMD_CACHE
  #endif
  
@@ -11,8 +11,6 @@
 +#define CONFIG_API
 +#define CONFIG_CMD_ELF
 +#define CONFIG_CMD_ENV_EXISTS
-+#define CONFIG_EFI_PARTITION
-+#define CONFIG_PREBOOT
 +
 +#undef  CONFIG_CMD_BMODE
 +#define CONFIG_CMD_BMODE
@@ -26,7 +24,6 @@
 +/* Create a small(ish) boot environment for FreeBSD. */
 +#undef  CONFIG_EXTRA_ENV_SETTINGS
 +#define CONFIG_EXTRA_ENV_SETTINGS \
-+	"board=wandboard\0" \
 +	"loadaddr=0x11000000\0" \
 +	\
 +	"Fatboot=" \
@@ -49,7 +46,7 @@
 +	  "env exists UserPreboot && run UserPreboot; " \
 +	"\0" \
 +	"SetupFdtfile=" \
-+	  "env set fdt_file ${soc}-${board}.dtb" \
++	  "env exists fdt_file || env set fdt_file ${fdt_soc}-${fdt_board}.dtb" \
 +	"\0" \
 +	"SetupFatdev=" \
 +	  "env exists fatdev || fatdev='mmc 0'; " \



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