add back the patches

This commit is contained in:
Dennis Gilmore 2014-11-25 23:17:04 -06:00
parent af73c706e0
commit 425d5f04f7
13 changed files with 885 additions and 0 deletions

View File

@ -0,0 +1,27 @@
From 28767d1753be5582e9e16fd5e253f7b9c8114221 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Tue, 14 Oct 2014 00:38:28 -0500
Subject: [PATCH 01/13] make sure that the filesystem is a type of fat
parted marks the partition table as being fat32 though we may pyt a fat16
filesystem on it.
---
fs/fat/fat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 04a51db..aa2c78d 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -74,7 +74,7 @@ int fat_set_blk_dev(block_dev_desc_t *dev_desc, disk_partition_t *info)
/* Check for FAT12/FAT16/FAT32 filesystem */
if (!memcmp(buffer + DOS_FS_TYPE_OFFSET, "FAT", 3))
return 0;
- if (!memcmp(buffer + DOS_FS32_TYPE_OFFSET, "FAT32", 5))
+ if (!memcmp(buffer + DOS_FS32_TYPE_OFFSET, "FAT", 3))
return 0;
cur_dev = NULL;
--
2.1.0

View File

@ -0,0 +1,44 @@
From 65fd2f0d6bcec9fa83df22ba8f468cc166985256 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 13:20:53 -0700
Subject: [PATCH 02/13] Allow checking in multiple partitions for
scan_dev_for_boot.
---
include/config_distro_bootcmd.h | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index be616e8..5e5e5e3 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -163,7 +163,7 @@
"boot_prefixes=/ /boot/\0" \
"boot_scripts=boot.scr.uimg boot.scr\0" \
BOOTENV_BOOT_TARGETS \
- "bootpart=1\0" \
+ "boot_partitions=1\0" \
\
"boot_extlinux=" \
"sysboot ${devtype} ${devnum}:${bootpart} any " \
@@ -194,10 +194,13 @@
"done\0" \
\
"scan_dev_for_boot=" \
- "echo Scanning ${devtype} ${devnum}...; " \
- "for prefix in ${boot_prefixes}; do " \
- "run scan_dev_for_extlinux; " \
- "run scan_dev_for_scripts; " \
+ "for partition in ${boot_partitions}; do " \
+ "echo Scanning ${devtype} ${devnum}:${partition}...; " \
+ "setenv bootpart ${partition};" \
+ "for prefix in ${boot_prefixes}; do " \
+ "run scan_dev_for_extlinux; " \
+ "run scan_dev_for_scripts; " \
+ "done;" \
"done\0" \
\
BOOT_TARGET_DEVICES(BOOTENV_DEV) \
--
2.1.0

View File

@ -0,0 +1,37 @@
From e9827a7cfb85bf2b628820baf63e07479ce219d3 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 12:55:58 -0700
Subject: [PATCH 03/13] Allow overriding boot_partitions default value by
setting BOOTENV_BOOT_PARTITIONS before including config_distro_bootcmd.
---
include/config_distro_bootcmd.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 5e5e5e3..a93354a 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -152,6 +152,10 @@
#define BOOTENV_BOOT_TARGETS \
"boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0"
+#ifndef BOOTENV_BOOT_PARTITIONS
+#define BOOTENV_BOOT_PARTITIONS "1"
+#endif
+
#define BOOTENV_DEV(devtypeu, devtypel, instance) \
BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)
#define BOOTENV \
@@ -163,7 +167,7 @@
"boot_prefixes=/ /boot/\0" \
"boot_scripts=boot.scr.uimg boot.scr\0" \
BOOTENV_BOOT_TARGETS \
- "boot_partitions=1\0" \
+ "boot_partitions="BOOTENV_BOOT_PARTITIONS"\0" \
\
"boot_extlinux=" \
"sysboot ${devtype} ${devnum}:${bootpart} any " \
--
2.1.0

View File

@ -0,0 +1,39 @@
From 774eb6a50e9c38f2942b9d3d63e40a3512159f93 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 30 Sep 2014 20:02:26 -0700
Subject: [PATCH 04/13] Add BOOTENV_INIT_COMMAND for commands that may be
needed to run before bootcmd, such as setting the fdt file variables for
platfroms that detect on boot.
---
include/config_distro_bootcmd.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index a93354a..515a2f9 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -156,6 +156,10 @@
#define BOOTENV_BOOT_PARTITIONS "1"
#endif
+#ifndef BOOTENV_INIT_COMMAND
+#define BOOTENV_INIT_COMMAND
+#endif
+
#define BOOTENV_DEV(devtypeu, devtypel, instance) \
BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)
#define BOOTENV \
@@ -209,7 +213,8 @@
\
BOOT_TARGET_DEVICES(BOOTENV_DEV) \
\
- "bootcmd=" BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \
+ "bootcmd=" BOOTENV_INIT_COMMAND \
+ BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \
"for target in ${boot_targets}; do " \
"run bootcmd_${target}; " \
"done\0"
--
2.1.0

View File

@ -0,0 +1,38 @@
From b3b47482c9ebf2b9dd5a37f66b6a391c83d05d16 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 14:04:01 -0700
Subject: [PATCH 05/13] Add BOOTENV_POST_COMMAND, which is appended to the end
of bootcmd.
---
include/config_distro_bootcmd.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 515a2f9..2503431 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -160,6 +160,10 @@
#define BOOTENV_INIT_COMMAND
#endif
+#ifndef BOOTENV_POST_COMMAND
+#define BOOTENV_POST_COMMAND
+#endif
+
#define BOOTENV_DEV(devtypeu, devtypel, instance) \
BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)
#define BOOTENV \
@@ -217,6 +221,8 @@
BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \
"for target in ${boot_targets}; do " \
"run bootcmd_${target}; " \
- "done\0"
+ "done;" \
+ BOOTENV_POST_COMMAND \
+ "\0"
#endif /* _CONFIG_CMD_DISTRO_BOOTCMD_H */
--
2.1.0

View File

@ -0,0 +1,26 @@
From 1926334c8e35b650931aa1a758e3d2a8ad9f5761 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 30 Sep 2014 20:34:19 -0700
Subject: [PATCH 06/13] Only set CONFIG_BOOTDELAY if not already set.
---
include/config_distro_defaults.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
index 1ecc0bb..b23eb04 100644
--- a/include/config_distro_defaults.h
+++ b/include/config_distro_defaults.h
@@ -45,7 +45,9 @@
#define CONFIG_CMDLINE_EDITING
#define CONFIG_AUTO_COMPLETE
+#ifndef CONFIG_BOOTDELAY
#define CONFIG_BOOTDELAY 2
+#endif
#define CONFIG_SYS_LONGHELP
#define CONFIG_MENU
#define CONFIG_DOS_PARTITION
--
2.1.0

View File

@ -0,0 +1,59 @@
From c33de75d88ff0e7e7da9e28576b8457ea125da42 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 10:29:36 -0700
Subject: [PATCH 07/13] Add support for loading environment from uEnv.txt in
config_distro_bootcmd.
---
include/config_distro_bootcmd.h | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 2503431..aaa010e 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -174,6 +174,7 @@
BOOTENV_SHARED_IDE \
"boot_prefixes=/ /boot/\0" \
"boot_scripts=boot.scr.uimg boot.scr\0" \
+ "boot_uenv_files=uEnv.txt\0" \
BOOTENV_BOOT_TARGETS \
"boot_partitions="BOOTENV_BOOT_PARTITIONS"\0" \
\
@@ -205,6 +206,25 @@
"fi; " \
"done\0" \
\
+ "import_uenv_file=" \
+ "load ${devtype} ${devnum}:${bootpart} " \
+ "${scriptaddr} ${prefix}${uenv_file}; " \
+ "env import -t -r ${scriptaddr} ${filesize}\0; " \
+ "if test -n $uenvcmd; then " \
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;\0" \
+ \
+ "scan_dev_for_uenv_files=" \
+ "for uenv_file in ${boot_uenv_files}; do " \
+ "if test -e ${devtype} ${devnum}:${bootpart} " \
+ "${prefix}${uenv_file}; then " \
+ "echo Found U-boot env file" \
+ "${prefix}${uenv_file}; " \
+ "run import_uenv_file; " \
+ "fi; " \
+ "done\0" \
+ \
"scan_dev_for_boot=" \
"for partition in ${boot_partitions}; do " \
"echo Scanning ${devtype} ${devnum}:${partition}...; " \
@@ -212,6 +232,7 @@
"for prefix in ${boot_prefixes}; do " \
"run scan_dev_for_extlinux; " \
"run scan_dev_for_scripts; " \
+ "run scan_dev_for_uenv_files; " \
"done;" \
"done\0" \
\
--
2.1.0

View File

@ -0,0 +1,73 @@
From 7c1db0713f15ecc37bc520783f61afc785443289 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 13:28:18 -0700
Subject: [PATCH 08/13] Switch am335x_evm.h to use config_distro_defaults and
config_distro_bootcmd. Add scriptaddr to DEFAULT_LINUX_BOOT_ENV, as
scriptaddr is used for boot scripts in config_distro_defaults.
---
include/configs/am335x_evm.h | 26 +++++++++++++++++---------
include/configs/ti_armv7_common.h | 1 +
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 560e3bf..cfc6ec5 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -18,6 +18,21 @@
#include <configs/ti_am335x_common.h>
+#include <config_distro_defaults.h>
+
+#define BOOTENV_BOOT_PARTITIONS "1 2"
+
+#define BOOTENV_INIT_COMMAND "run findfdt ;"
+#ifdef CONFIG_NAND
+#define BOOTENV_POST_COMMAND "run nandboot ;"
+#endif
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(MMC, mmc, 1)
+
+#include <config_distro_bootcmd.h>
+
#ifndef CONFIG_SPL_BUILD
# define CONFIG_FIT
# define CONFIG_TIMESTAMP
@@ -185,17 +200,10 @@
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
NANDARGS \
- DFUARGS
+ DFUARGS \
+ BOOTENV
#endif
-#define CONFIG_BOOTCOMMAND \
- "run findfdt; " \
- "run mmcboot;" \
- "setenv mmcdev 1; " \
- "setenv bootpart 1:2; " \
- "run mmcboot;" \
- "run nandboot;"
-
/* NS16550 Configuration */
#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index a8790c2..dae582f 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -54,6 +54,7 @@
#define DEFAULT_LINUX_BOOT_ENV \
"loadaddr=0x82000000\0" \
"kernel_addr_r=0x82000000\0" \
+ "scriptaddr=0x82000000\0" \
"fdtaddr=0x88000000\0" \
"fdt_addr_r=0x88000000\0" \
"rdaddr=0x88080000\0" \
--
2.1.0

View File

@ -0,0 +1,102 @@
From 276eaf9e665a1694eb59a0cd497748d0ba5e0213 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Mon, 13 Oct 2014 23:17:32 -0500
Subject: [PATCH 09/13] port the riotboard to distro generic configs, patch by
pbrobinson
---
include/configs/embestmx6boards.h | 39 ++++++++++++++++++++++++---------------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/include/configs/embestmx6boards.h b/include/configs/embestmx6boards.h
index 185edbe..e75ee89 100644
--- a/include/configs/embestmx6boards.h
+++ b/include/configs/embestmx6boards.h
@@ -22,7 +22,7 @@
#define CONFIG_SYS_GENERIC_BOARD
#define CONFIG_MXC_UART_BASE UART2_BASE
-#define CONFIG_CONSOLE_DEV "ttymxc1"
+#define CONFIG_CONSOLE_DEV "ttymxc1,115200"
#define CONFIG_MMCROOT "/dev/mmcblk1p2"
#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
@@ -78,14 +78,7 @@
#define CONFIG_CMD_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_BOUNCE_BUFFER
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_DOS_PARTITION
-
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NET
+
#define CONFIG_FEC_MXC
#define CONFIG_MII
#define IMX_FEC_BASE ENET_BASE_ADDR
@@ -120,8 +113,6 @@
#define CONFIG_CMD_SETEXPR
#undef CONFIG_CMD_IMLS
-#define CONFIG_BOOTDELAY 1
-
#define CONFIG_LOADADDR 0x12000000
#define CONFIG_SYS_TEXT_BASE 0x17800000
@@ -163,16 +154,29 @@
#define SF_ENV ""
#endif
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+
+
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"image=zImage\0" \
- "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
- "fdt_addr=0x18000000\0" \
+ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
+ "fdt_addr_r=0x18000000\0" \
"boot_fdt=try\0" \
+ "pxefile_addr_r=0x17f00000\0" \
+ "scriptaddr=0x17e00000\0" \
+ "kernel_addr_r=0x11000000\0" \
+ "ramdisk_addr_r=0x18100000\0" \
+ "bootm_size=0x20000000\0" \
"ip_dyn=yes\0" \
"console=" CONFIG_CONSOLE_DEV "\0" \
- "fdt_high=0xffffffff\0" \
- "initrd_high=0xffffffff\0" \
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
"mmcpart=1\0" \
"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
@@ -252,6 +256,10 @@
"fi; " \
"else run netboot; fi"
+#else
+#define BOOT_TARGET_DEVICES
+#endif
+
#define CONFIG_ARP_TIMEOUT 200UL
/* Miscellaneous configurable options */
@@ -335,4 +343,5 @@
#define CONFIG_IMX_HDMI
#define CONFIG_IMX_VIDEO_SKIP
+
#endif /* __RIOTBOARD_CONFIG_H */
--
2.1.0

View File

@ -0,0 +1,149 @@
From 84db7d63f8e7e562ad353e00b309875277c5689e Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Mon, 13 Oct 2014 23:58:13 -0500
Subject: [PATCH 10/13] port utilite to distro generic boot commands
---
include/configs/cm_fx6.h | 112 +++++++++++------------------------------------
1 file changed, 26 insertions(+), 86 deletions(-)
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index f7277eb..4a586c2 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -12,7 +12,6 @@
#define __CONFIG_CM_FX6_H
#include <asm/arch/imx-regs.h>
-#include <config_distro_defaults.h>
#include "mx6_common.h"
/* Machine config */
@@ -102,98 +101,39 @@
#define CONFIG_ENV_SIZE (8 * 1024)
#define CONFIG_ENV_OFFSET (768 * 1024)
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+
+#ifdef CONFIG_AHCI
+#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
+#else
+#define BOOT_TARGET_DEVICES_SCSI(func)
+#endif
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 2) \
+ BOOT_TARGET_DEVICES_SCSI(func) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+
#define CONFIG_EXTRA_ENV_SETTINGS \
- "kernel=uImage-cm-fx6\0" \
- "autoload=no\0" \
"loadaddr=0x10800000\0" \
"fdtaddr=0x11000000\0" \
+ "fdt_addr_r=0x18000000\0" \
+ "pxefile_addr_r=0x17f00000\0" \
+ "scriptaddr=0x17e00000\0" \
+ "kernel_addr_r=0x11000000\0" \
+ "ramdisk_addr_r=0x18100000\0" \
+ "bootm_size=0x20000000\0" \
"console=ttymxc3,115200\0" \
"ethprime=FEC0\0" \
- "bootscr=boot.scr\0" \
- "bootm_low=18000000\0" \
- "video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32@50,if=RGB32\0" \
- "video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \
"fdtfile=cm-fx6.dtb\0" \
- "doboot=bootm ${loadaddr}\0" \
- "loadfdt=false\0" \
- "setboottypez=setenv kernel zImage-cm-fx6;" \
- "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \
- "setenv loadfdt true;\0" \
- "setboottypem=setenv kernel uImage-cm-fx6;" \
- "setenv doboot bootm ${loadaddr};" \
- "setenv loadfdt false;\0"\
- "run_eboot=echo Starting EBOOT ...; "\
- "mmc dev ${mmcdev} && " \
- "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \
- "mmcdev=2\0" \
- "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
- "loadmmcbootscript=load mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \
- "mmcbootscript=echo Running bootscript from mmc ...; "\
- "source ${loadaddr}\0" \
- "mmcargs=setenv bootargs console=${console} " \
- "root=${mmcroot} " \
- "${video}\0" \
- "mmcloadkernel=load mmc ${mmcdev} ${loadaddr} ${kernel}\0" \
- "mmcloadfdt=load mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
- "mmcboot=echo Booting from mmc ...; " \
- "run mmcargs; " \
- "run doboot\0" \
- "satadev=0\0" \
- "sataroot=/dev/sda2 rw rootwait\0" \
- "sataargs=setenv bootargs console=${console} " \
- "root=${sataroot} " \
- "${video}\0" \
- "loadsatabootscript=load sata ${satadev} ${loadaddr} ${bootscr}\0" \
- "satabootscript=echo Running bootscript from sata ...; " \
- "source ${loadaddr}\0" \
- "sataloadkernel=load sata ${satadev} ${loadaddr} ${kernel}\0" \
- "sataloadfdt=load sata ${satadev} ${fdtaddr} ${fdtfile}\0" \
- "sataboot=echo Booting from sata ...; "\
- "run sataargs; " \
- "run doboot\0" \
- "nandroot=/dev/mtdblock4 rw\0" \
- "nandrootfstype=ubifs\0" \
- "nandargs=setenv bootargs console=${console} " \
- "root=${nandroot} " \
- "rootfstype=${nandrootfstype} " \
- "${video}\0" \
- "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \
- "nandboot=echo Booting from nand ...; " \
- "run nandargs; " \
- "nand read ${loadaddr} 0 780000; " \
- "if ${loadfdt}; then " \
- "run nandloadfdt;" \
- "fi; " \
- "run doboot\0" \
- "boot=mmc dev ${mmcdev}; " \
- "if mmc rescan; then " \
- "if run loadmmcbootscript; then " \
- "run mmcbootscript;" \
- "else " \
- "if run mmcloadkernel; then " \
- "if ${loadfdt}; then " \
- "run mmcloadfdt;" \
- "fi;" \
- "run mmcboot;" \
- "fi;" \
- "fi;" \
- "fi;" \
- "if sata init; then " \
- "if run loadsatabootscript; then " \
- "run satabootscript;" \
- "else "\
- "if run sataloadkernel; then " \
- "if ${loadfdt}; then " \
- "run sataloadfdt; " \
- "fi;" \
- "run sataboot;" \
- "fi;" \
- "fi;" \
- "fi;" \
- "run nandboot\0"
+ BOOTENV
-#define CONFIG_BOOTCOMMAND \
- "run setboottypem; run boot"
+#else /* ifndef CONFIG_SPL_BUILD */
+#define CONFIG_EXTRA_ENV_SETTINGS
+#endif
/* SPI */
#define CONFIG_SPI
--
2.1.0

View File

@ -0,0 +1,57 @@
From 6376d21b8a647613789d5e5eac42d84d524c3c3d Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Mon, 27 Oct 2014 21:38:32 -0500
Subject: [PATCH 11/13] add back adding console= to the bootargs if not
present.
better soloution is needed
not upstreamable
---
common/cmd_pxe.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 7e32c95..4f3c15d 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -673,18 +673,34 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
if ((label->ipappend & 0x3) || label->append) {
char bootargs[CONFIG_SYS_CBSIZE] = "";
char finalbootargs[CONFIG_SYS_CBSIZE];
+ char console[30] = "";
+ /* check for a console line in the boot args passed in from the
+ * config file. If there is no console line and the enviornment
+ * has a console variable add it to the bootargs
+ */
+ if ( !strstr(label->append, "console=") ) {
+ printf("no console= \n");
+ if (getenv("console")) {
+ sprintf(console, " console=%s",
+ getenv("console"));
+ }
+ }
if (strlen(label->append ?: "") +
- strlen(ip_str) + strlen(mac_str) + 1 > sizeof(bootargs)) {
- printf("bootarg overflow %zd+%zd+%zd+1 > %zd\n",
+ strlen(ip_str) + strlen(mac_str) + strlen(console) +
+ 1 > sizeof(bootargs)) {
+ printf("bootarg overflow %zd+%zd+%zd+%zd+1 > %zd\n",
strlen(label->append ?: ""),
strlen(ip_str), strlen(mac_str),
+ strlen(console),
sizeof(bootargs));
return 1;
}
if (label->append)
strcpy(bootargs, label->append);
+ if (strlen(console) > 0)
+ strcat(bootargs, console);
strcat(bootargs, ip_str);
strcat(bootargs, mac_str);
--
2.1.0

View File

@ -0,0 +1,144 @@
From aa5e3817bf1030b310d4686cd1ab51e2865601cb Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Tue, 25 Nov 2014 23:08:38 -0600
Subject: [PATCH 12/13] wandboard: port to generic distro booting
set the variables and functions needed for generic distro booting.
---
include/configs/wandboard.h | 48 ++++++++++++++++++++++++---------------------
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 809017c..4950ed7 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -51,8 +51,6 @@
#define CONFIG_CMD_BMODE
#define CONFIG_CMD_SETEXPR
-#define CONFIG_BOOTDELAY 5
-
#define CONFIG_SYS_MEMTEST_START 0x10000000
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
#define CONFIG_LOADADDR 0x12000000
@@ -74,9 +72,6 @@
#define CONFIG_CMD_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_BOUNCE_BUFFER
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_DOS_PARTITION
/* USB Configs */
#define CONFIG_CMD_USB
@@ -88,10 +83,6 @@
#define CONFIG_MXC_USB_FLAGS 0
/* Ethernet Configuration */
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NET
#define CONFIG_FEC_MXC
#define CONFIG_MII
#define IMX_FEC_BASE ENET_BASE_ADDR
@@ -124,6 +115,16 @@
#define CONFIG_MXC_OCOTP
#endif
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+
+
#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
#define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb"
#elif defined(CONFIG_MX6Q)
@@ -133,13 +134,16 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"image=zImage\0" \
- "console=ttymxc0\0" \
+ "console=ttymxc0,115200\0" \
"splashpos=m,m\0" \
- "fdt_high=0xffffffff\0" \
- "initrd_high=0xffffffff\0" \
- "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
- "fdt_addr=0x18000000\0" \
+ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
+ "fdt_addr_r=0x18000000\0" \
"boot_fdt=try\0" \
+ "pxefile_addr_r=0x17f00000\0" \
+ "scriptaddr=0x17e00000\0" \
+ "kernel_addr_r=0x11000000\0" \
+ "ramdisk_addr_r=0x18100000\0" \
+ "bootm_size=0x20000000\0" \
"ip_dyn=yes\0" \
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
"mmcpart=1\0" \
@@ -158,7 +162,7 @@
"mmc write ${loadaddr} 0x2 ${fw_sz}; " \
"fi; " \
"fi\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
+ "mmcargs=setenv bootargs console=${console} " \
"root=${mmcroot}; run videoargs\0" \
"videoargs=" \
"setenv nextcon 0; " \
@@ -207,7 +211,7 @@
"else " \
"bootz; " \
"fi;\0" \
- "netargs=setenv bootargs console=${console},${baudrate} " \
+ "netargs=setenv bootargs console=${console} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"netboot=echo Booting from net ...; " \
@@ -230,7 +234,8 @@
"fi; " \
"else " \
"bootz; " \
- "fi;\0"
+ "fi;\0" \
+ BOOTENV
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev}; if mmc rescan; then " \
@@ -244,6 +249,10 @@
"fi; " \
"else run netboot; fi"
+#else
+#define BOOT_TARGET_DEVICES
+#endif
+
/* Miscellaneous configurable options */
#define CONFIG_SYS_LONGHELP
#define CONFIG_SYS_HUSH_PARSER
@@ -257,8 +266,6 @@
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
-#define CONFIG_CMDLINE_EDITING
-
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
@@ -281,9 +288,6 @@
#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
#define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_OF_LIBFDT
-#define CONFIG_CMD_BOOTZ
-
#ifndef CONFIG_SYS_DCACHE_OFF
#define CONFIG_CMD_CACHE
#endif
--
2.1.0

View File

@ -0,0 +1,90 @@
From aa26cb59a0bf02e45b81efefae404c7578261abd Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Tue, 25 Nov 2014 23:09:49 -0600
Subject: [PATCH 13/13] Switch omap4 boards to use config_distro_defaults and
config_distro_bootcmd.
Add pxefile_addr_r to DEFAULT_LINUX_BOOT_ENV, as pxefile_addr_r is used
to store the pxe boot configuation file in config_distro_defaults.
adjust adress of scriptaddr to be unique
---
include/configs/ti_armv7_common.h | 3 ++-
include/configs/ti_omap4_common.h | 40 +++++++++++++++++----------------------
2 files changed, 19 insertions(+), 24 deletions(-)
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index dae582f..d1c2eb1 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -54,7 +54,8 @@
#define DEFAULT_LINUX_BOOT_ENV \
"loadaddr=0x82000000\0" \
"kernel_addr_r=0x82000000\0" \
- "scriptaddr=0x82000000\0" \
+ "pxefile_addr_r=0x87F00000\0" \
+ "scriptaddr=0x87E00000\0" \
"fdtaddr=0x88000000\0" \
"fdt_addr_r=0x88000000\0" \
"rdaddr=0x88080000\0" \
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 1c93aab..b3a328c 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -82,6 +82,19 @@
#undef CONFIG_CMD_NET
#undef CONFIG_CMD_NFS
+
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+
+#define BOOTENV_INIT_COMMAND "run findfdt ;"
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(USB, usb, 0) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+
/*
* Environment setup
*/
@@ -129,30 +142,11 @@
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+ BOOTENV
-#define CONFIG_BOOTCOMMAND \
- "run findfdt; " \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "echo SD/MMC found on device ${mmcdev};" \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadbootenv; then " \
- "run importbootenv; " \
- "fi;" \
- "if test -n ${uenvcmd}; then " \
- "echo Running uenvcmd ...;" \
- "run uenvcmd;" \
- "fi;" \
- "fi;" \
- "if run loadimage; then " \
- "run loadfdt;" \
- "run mmcboot; " \
- "fi; " \
- "if run loaduimage; then " \
- "run uimageboot;" \
- "fi; " \
- "fi"
+#else
+#define BOOT_TARGET_DEVICES
+#endif
/*
* Defines for SPL
--
2.1.0