aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-02-22 05:47:34 +0800
committerian <ian@FreeBSD.org>2015-02-22 05:47:34 +0800
commit247f23cc016c25571e967475163a5166185bf238 (patch)
tree43fde40a7e55c7a78108efaa06c0871a76f13909
parent21b830d1a4aa130b56ec47835fa45b5d661e9e82 (diff)
downloadfreebsd-ports-gnome-247f23cc016c25571e967475163a5166185bf238.tar.gz
freebsd-ports-gnome-247f23cc016c25571e967475163a5166185bf238.tar.zst
freebsd-ports-gnome-247f23cc016c25571e967475163a5166185bf238.zip
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
-rw-r--r--sysutils/u-boot-wandboard/Makefile2
-rw-r--r--sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c32
-rw-r--r--sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h7
3 files changed, 19 insertions, 22 deletions
diff --git a/sysutils/u-boot-wandboard/Makefile b/sysutils/u-boot-wandboard/Makefile
index e34b7157da05..216b8d81f783 100644
--- a/sysutils/u-boot-wandboard/Makefile
+++ b/sysutils/u-boot-wandboard/Makefile
@@ -2,7 +2,7 @@
PORTNAME= u-boot
PORTVERSION= 2013.10
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
PKGNAMESUFFIX= -wandboard
DISTNAME= u-boot-${PORTVERSION}-technexion-edm
diff --git a/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c b/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c
index 7c813a1a9661..a4169e81f517 100644
--- a/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c
+++ b/sysutils/u-boot-wandboard/files/patch-board_technexion_edm__cf__imx6_edm__cf__imx6.c
@@ -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);
diff --git a/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h b/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h
index 2434fc8ccdc0..eee2b42a550c 100644
--- a/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h
+++ b/sysutils/u-boot-wandboard/files/patch-include_configs_edm__cf__imx6.h
@@ -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'; " \