[U-Boot] [PATCH V2 1/4] tegra: remove some cruft from CONFIG_EXTRA_ENV_SETTINGS

From: Stephen Warren swarren@nvidia.com
console isn't used by anything, and the kernel should be set appropriately by whatever script is booting the kernel, not imposed by the bootloader.
mem might be useful, but the current value is pretty bogus, since it includes nvmem options that make no sense for an upstream kernel, and equally should not be required for any downstream kernel. Either way, this is also best left to the kernel boot script.
smpflag isn't used by anything, and again was probably intended to be a kernel command-line option better set by the kernel boot script.
Signed-off-by: Stephen Warren swarren@nvidia.com --- v2: Remove TEGRA2_SYSMEM define from all board configs --- include/configs/harmony.h | 1 - include/configs/medcom.h | 1 - include/configs/paz00.h | 1 - include/configs/plutux.h | 1 - include/configs/seaboard.h | 1 - include/configs/tegra2-common.h | 3 --- include/configs/ventana.h | 1 - include/configs/whistler.h | 1 - 8 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/include/configs/harmony.h b/include/configs/harmony.h index ce0ae9f..3706a40 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -28,7 +28,6 @@ #include "tegra2-common.h"
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M mem=512M@512M" #define V_PROMPT "Tegra2 (Harmony) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Harmony"
diff --git a/include/configs/medcom.h b/include/configs/medcom.h index 2dc3507..725abc3 100644 --- a/include/configs/medcom.h +++ b/include/configs/medcom.h @@ -29,7 +29,6 @@ #include "tegra2-common.h"
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M" #define V_PROMPT "Tegra2 (Medcom) # " #define CONFIG_TEGRA2_BOARD_STRING "Avionic Design Medcom" #define CONFIG_SYS_BOARD_ODMDATA 0x2b0d8011 diff --git a/include/configs/paz00.h b/include/configs/paz00.h index f53f20e..ae3a2de 100644 --- a/include/configs/paz00.h +++ b/include/configs/paz00.h @@ -21,7 +21,6 @@ #include "tegra2-common.h"
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=512M@0M" #define V_PROMPT "Tegra2 (Paz00) MOD # " #define CONFIG_TEGRA2_BOARD_STRING "Compal Paz00"
diff --git a/include/configs/plutux.h b/include/configs/plutux.h index f869191..475be6c 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -29,7 +29,6 @@ #include "tegra2-common.h"
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M" #define V_PROMPT "Tegra2 (Plutux) # " #define CONFIG_TEGRA2_BOARD_STRING "Avionic Design Plutux" #define CONFIG_SYS_BOARD_ODMDATA 0x2b2d8011 diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 46d4228..0af37db 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -41,7 +41,6 @@ #define CONFIG_OF_SEPARATE
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M mem=512M@512M" #define V_PROMPT "Tegra2 (SeaBoard) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Seaboard"
diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index 068ce88..cdd3093 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -140,9 +140,6 @@ "stderr=serial\0"
#define CONFIG_EXTRA_ENV_SETTINGS \ - "console=ttyS0,115200n8\0" \ - "mem=" TEGRA2_SYSMEM "\0" \ - "smpflag=smp\0" \ TEGRA2_DEVICE_SETTINGS
#define CONFIG_LOADADDR 0x408000 /* def. location for kernel */ diff --git a/include/configs/ventana.h b/include/configs/ventana.h index 3e55fe5..a7338f1 100644 --- a/include/configs/ventana.h +++ b/include/configs/ventana.h @@ -33,7 +33,6 @@ #define CONFIG_OF_SEPARATE
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M mem=512M@512M" #define V_PROMPT "Tegra2 (Ventana) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Ventana"
diff --git a/include/configs/whistler.h b/include/configs/whistler.h index 6b9ef98..5efa60c 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -33,7 +33,6 @@ #define CONFIG_OF_SEPARATE
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=512M@0M" #define V_PROMPT "Tegra2 (Whistler) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Whistler"

From: Stephen Warren swarren@nvidia.com
This implements a useful bootcmd for Tegra. The boot order is:
* If USB enabled, USB storage * Internal MMC (SD card or eMMC) * If networking is enabled, BOOTP/TFTP
When booting from USB or MMC, the boot script is assumed to be in partition 1 (although this may be overridden via the rootpart variable), both ext2 and FAT filesystems are supported, the boot script may exist in either / or /boot, and the boot script may be named boot.scr.uimg or boot.scr.
When booting over the network, it is assumed that boot.scr.uimg exists on the TFTP server. There is less flexibility here since those setting up network booting are expected to need less hand-holding.
In all cases, it is expected that the initial file loaded is a U-Boot image containing a script that will load the kernel, load any required initrd, load any required DTB, and finally bootm the kernel.
Signed-off-by: Stephen Warren swarren@nvidia.com --- include/configs/harmony.h | 3 + include/configs/medcom.h | 2 + include/configs/paz00.h | 3 + include/configs/plutux.h | 2 + include/configs/seaboard.h | 3 + include/configs/tegra2-common-post.h | 117 ++++++++++++++++++++++++++++++++++ include/configs/tegra2-common.h | 3 - include/configs/ventana.h | 3 + include/configs/whistler.h | 2 + 9 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 include/configs/tegra2-common-post.h
diff --git a/include/configs/harmony.h b/include/configs/harmony.h index 3706a40..25d6ec7 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -60,4 +60,7 @@
/* Environment not stored */ #define CONFIG_ENV_IS_NOWHERE + +#include "tegra2-common-post.h" + #endif /* __CONFIG_H */ diff --git a/include/configs/medcom.h b/include/configs/medcom.h index 725abc3..eecfa50 100644 --- a/include/configs/medcom.h +++ b/include/configs/medcom.h @@ -60,4 +60,6 @@ "ext2load mmc 0 0x17000000 /boot/uImage;" \ "bootm"
+#include "tegra2-common-post.h" + #endif /* __CONFIG_H */ diff --git a/include/configs/paz00.h b/include/configs/paz00.h index ae3a2de..ced185e 100644 --- a/include/configs/paz00.h +++ b/include/configs/paz00.h @@ -47,4 +47,7 @@
/* Environment not stored */ #define CONFIG_ENV_IS_NOWHERE + +#include "tegra2-common-post.h" + #endif /* __CONFIG_H */ diff --git a/include/configs/plutux.h b/include/configs/plutux.h index 475be6c..1888276 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -60,4 +60,6 @@ "ext2load mmc 0 0x17000000 /boot/uImage;" \ "bootm"
+#include "tegra2-common-post.h" + #endif /* __CONFIG_H */ diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 0af37db..5e91675 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -107,4 +107,7 @@ #define TEGRA2_DEVICE_SETTINGS "stdin=serial,tegra-kbc\0" \ "stdout=serial\0" \ "stderr=serial\0" + +#include "tegra2-common-post.h" + #endif /* __CONFIG_H */ diff --git a/include/configs/tegra2-common-post.h b/include/configs/tegra2-common-post.h new file mode 100644 index 0000000..0484a52 --- /dev/null +++ b/include/configs/tegra2-common-post.h @@ -0,0 +1,117 @@ +/* + * (C) Copyright 2010-2012 + * NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __TEGRA2_COMMON_POST_H +#define __TEGRA2_COMMON_POST_H + +#ifdef CONFIG_BOOTCOMMAND + +#define BOOTCMDS_COMMON "" + +#else + +#ifdef CONFIG_CMD_EXT2 +#define BOOTCMD_FS_EXT2 "ext2 " +#else +#define BOOTCMD_FS_EXT2 "" +#endif + +#ifdef CONFIG_CMD_FAT +#define BOOTCMD_FS_FAT "fat" +#else +#define BOOTCMD_FS_FAT "" +#endif + +#ifdef CONFIG_CMD_MMC +#define BOOTCMDS_MMC \ + "mmc_boot=" \ + "setenv devtype mmc; " \ + "if mmc dev ${devnum}; then " \ + "run script_boot; " \ + "fi\0" \ + "mmc0_boot=setenv devnum 0; run mmc_boot;\0" \ + "mmc1_boot=setenv devnum 1; run mmc_boot;\0" \ + "bootcmd_mmc=run mmc1_boot; run mmc0_boot\0" +#define BOOTCMD_MMC "run bootcmd_mmc; " +#else +#define BOOTCMDS_MMC "" +#define BOOTCMD_MMC "" +#endif + +#ifdef CONFIG_CMD_USB +#define BOOTCMDS_USB \ + "usb_boot=" \ + "setenv devtype usb; " \ + "if usb dev ${devnum}; then " \ + "run script_boot; " \ + "fi\0" \ + "usb0_boot=setenv devnum 0; run usb_boot;\0" \ + "bootcmd_usb=run usb0_boot\0" +#define BOOTCMD_USB "run bootcmd_usb; " +#define BOOTCMD_INIT_USB "usb start 0; " +#else +#define BOOTCMDS_USB "" +#define BOOTCMD_USB "" +#define BOOTCMD_INIT_USB "" +#endif + +#ifdef CONFIG_CMD_DHCP +#define BOOTCMDS_DHCP \ + "bootcmd_dhcp=" \ + "if dhcp ${scriptaddr} boot.scr.uimg; then "\ + "source ${scriptaddr}; " \ + "fi\0" +#define BOOTCMD_DHCP "run bootcmd_dhcp; " +#else +#define BOOTCMDS_DHCP "" +#define BOOTCMD_DHCP "" +#endif + +#define BOOTCMDS_COMMON \ + "scriptaddr=0x400000\0" \ + "rootpart=1\0" \ + "script_boot=" \ + "for fs in " BOOTCMD_FS_EXT2 BOOTCMD_FS_FAT "; do " \ + "for prefix in / /boot/; do " \ + "for script in boot.scr.uimg boot.scr; do " \ + "echo Scanning ${devtype} ${devnum}:${rootpart} ${fs} ${prefix}${script} ...; " \ + "if ${fs}load ${devtype} ${devnum}:${rootpart} ${scriptaddr} ${prefix}${script}; then " \ + "echo ${script} found! Executing ...;" \ + "source ${scriptaddr};" \ + "fi; " \ + "done; " \ + "done; " \ + "done;\0" \ + BOOTCMDS_MMC \ + BOOTCMDS_USB \ + BOOTCMDS_DHCP + +#define CONFIG_BOOTCOMMAND BOOTCMD_INIT_USB BOOTCMD_USB BOOTCMD_MMC BOOTCMD_DHCP + +#endif + +#define CONFIG_EXTRA_ENV_SETTINGS \ + TEGRA2_DEVICE_SETTINGS \ + BOOTCMDS_COMMON + +#endif /* __TEGRA2_COMMON_POST_H */ diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index cdd3093..1931179 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -139,9 +139,6 @@ "stdout=serial\0" \ "stderr=serial\0"
-#define CONFIG_EXTRA_ENV_SETTINGS \ - TEGRA2_DEVICE_SETTINGS - #define CONFIG_LOADADDR 0x408000 /* def. location for kernel */ #define CONFIG_BOOTDELAY 2 /* -1 to disable auto boot */
diff --git a/include/configs/ventana.h b/include/configs/ventana.h index a7338f1..8e95db1 100644 --- a/include/configs/ventana.h +++ b/include/configs/ventana.h @@ -59,4 +59,7 @@
/* Environment not stored */ #define CONFIG_ENV_IS_NOWHERE + +#include "tegra2-common-post.h" + #endif /* __CONFIG_H */ diff --git a/include/configs/whistler.h b/include/configs/whistler.h index 5efa60c..2f2a512 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -86,4 +86,6 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP
+#include "tegra2-common-post.h" + #endif /* __CONFIG_H */

Stephen,
-----Original Message----- From: Stephen Warren [mailto:swarren@wwwdotorg.org] Sent: Wednesday, May 16, 2012 9:21 AM To: Tom Warren Cc: Simon Glass; u-boot@lists.denx.de; Stephen Warren Subject: [PATCH V2 2/4] tegra: flesh out bootcmd
From: Stephen Warren swarren@nvidia.com
This implements a useful bootcmd for Tegra. The boot order is:
- If USB enabled, USB storage
- Internal MMC (SD card or eMMC)
- If networking is enabled, BOOTP/TFTP
When booting from USB or MMC, the boot script is assumed to be in partition 1 (although this may be overridden via the rootpart variable), both ext2 and FAT filesystems are supported, the boot script may exist in either / or /boot, and the boot script may be named boot.scr.uimg or boot.scr.
When booting over the network, it is assumed that boot.scr.uimg exists on the TFTP server. There is less flexibility here since those setting up network booting are expected to need less hand-holding.
In all cases, it is expected that the initial file loaded is a U-Boot image containing a script that will load the kernel, load any required initrd, load any required DTB, and finally bootm the kernel.
Signed-off-by: Stephen Warren swarren@nvidia.com
include/configs/harmony.h | 3 + include/configs/medcom.h | 2 + include/configs/paz00.h | 3 + include/configs/plutux.h | 2 + include/configs/seaboard.h | 3 + include/configs/tegra2-common-post.h | 117 ++++++++++++++++++++++++++++++++++
I'm getting checkpatch errors (over 80 chars) for tegra2-common-post.h:
WARNING: line over 80 characters #414: FILE: include/configs/tegra2-common-post.h:93: + "script_boot=" \
WARNING: line over 80 characters #415: FILE: include/configs/tegra2-common-post.h:94: + "for fs in " BOOTCMD_FS_EXT2 BOOTCMD_FS_FAT "; do " \
WARNING: line over 80 characters #416: FILE: include/configs/tegra2-common-post.h:95: + "for prefix in / /boot/; do " \
WARNING: line over 80 characters #417: FILE: include/configs/tegra2-common-post.h:96: + "for script in boot.scr.uimg boot.scr; do " \
WARNING: line over 80 characters #418: FILE: include/configs/tegra2-common-post.h:97: + "echo Scanning ${devtype} ${devnum}:${rootpart} ${fs} ${prefix}${script} ...; " \
WARNING: line over 80 characters #419: FILE: include/configs/tegra2-common-post.h:98: + "if ${fs}load ${devtype} ${devnum}:${rootpart} ${scriptaddr} ${prefix}${script}; then " \
WARNING: line over 80 characters #420: FILE: include/configs/tegra2-common-post.h:99: + "echo ${script} found! Executing ...;" \
WARNING: line over 80 characters #421: FILE: include/configs/tegra2-common-post.h:100: + "source ${scriptaddr};" \
WARNING: line over 80 characters #422: FILE: include/configs/tegra2-common-post.h:101: + "fi; " \
WARNING: line over 80 characters #423: FILE: include/configs/tegra2-common-post.h:102: + "done; " \
WARNING: line over 80 characters #424: FILE: include/configs/tegra2-common-post.h:103: + "done; " \
WARNING: line over 80 characters #425: FILE: include/configs/tegra2-common-post.h:104: + "done;\0" \
ERROR: Macros with complex values should be enclosed in parenthesis #928: FILE: include/configs/whistler.h:31: +#define CONFIG_DEFAULT_DEVICE_TREE tegra2-whistler
total: 1 errors, 12 warnings, 882 lines checked
Tom
include/configs/tegra2-common.h | 3 - include/configs/ventana.h | 3 + include/configs/whistler.h | 2 + 9 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 include/configs/tegra2-common-post.h
diff --git a/include/configs/harmony.h b/include/configs/harmony.h index 3706a40..25d6ec7 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -60,4 +60,7 @@
/* Environment not stored */ #define CONFIG_ENV_IS_NOWHERE
+#include "tegra2-common-post.h"
#endif /* __CONFIG_H */ diff --git a/include/configs/medcom.h b/include/configs/medcom.h index 725abc3..eecfa50 100644 --- a/include/configs/medcom.h +++ b/include/configs/medcom.h @@ -60,4 +60,6 @@ "ext2load mmc 0 0x17000000 /boot/uImage;" \ "bootm"
+#include "tegra2-common-post.h"
#endif /* __CONFIG_H */ diff --git a/include/configs/paz00.h b/include/configs/paz00.h index ae3a2de..ced185e 100644 --- a/include/configs/paz00.h +++ b/include/configs/paz00.h @@ -47,4 +47,7 @@
/* Environment not stored */ #define CONFIG_ENV_IS_NOWHERE
+#include "tegra2-common-post.h"
#endif /* __CONFIG_H */ diff --git a/include/configs/plutux.h b/include/configs/plutux.h index 475be6c..1888276 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -60,4 +60,6 @@ "ext2load mmc 0 0x17000000 /boot/uImage;" \ "bootm"
+#include "tegra2-common-post.h"
#endif /* __CONFIG_H */ diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 0af37db..5e91675 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -107,4 +107,7 @@ #define TEGRA2_DEVICE_SETTINGS "stdin=serial,tegra-kbc\0" \ "stdout=serial\0" \ "stderr=serial\0"
+#include "tegra2-common-post.h"
#endif /* __CONFIG_H */ diff --git a/include/configs/tegra2-common-post.h b/include/configs/tegra2- common-post.h new file mode 100644 index 0000000..0484a52 --- /dev/null +++ b/include/configs/tegra2-common-post.h @@ -0,0 +1,117 @@ +/*
- (C) Copyright 2010-2012
- NVIDIA Corporation <www.nvidia.com>
- See file CREDITS for list of people who contributed to this
- project.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- MA 02111-1307 USA
- */
+#ifndef __TEGRA2_COMMON_POST_H +#define __TEGRA2_COMMON_POST_H
+#ifdef CONFIG_BOOTCOMMAND
+#define BOOTCMDS_COMMON ""
+#else
+#ifdef CONFIG_CMD_EXT2 +#define BOOTCMD_FS_EXT2 "ext2 " +#else +#define BOOTCMD_FS_EXT2 "" +#endif
+#ifdef CONFIG_CMD_FAT +#define BOOTCMD_FS_FAT "fat" +#else +#define BOOTCMD_FS_FAT "" +#endif
+#ifdef CONFIG_CMD_MMC +#define BOOTCMDS_MMC \
- "mmc_boot=" \
"setenv devtype mmc; " \
"if mmc dev ${devnum}; then " \
"run script_boot; " \
"fi\0" \
- "mmc0_boot=setenv devnum 0; run mmc_boot;\0" \
- "mmc1_boot=setenv devnum 1; run mmc_boot;\0" \
- "bootcmd_mmc=run mmc1_boot; run mmc0_boot\0"
+#define BOOTCMD_MMC "run bootcmd_mmc; " +#else +#define BOOTCMDS_MMC "" +#define BOOTCMD_MMC "" +#endif
+#ifdef CONFIG_CMD_USB +#define BOOTCMDS_USB \
- "usb_boot=" \
"setenv devtype usb; " \
"if usb dev ${devnum}; then " \
"run script_boot; " \
"fi\0" \
- "usb0_boot=setenv devnum 0; run usb_boot;\0" \
- "bootcmd_usb=run usb0_boot\0"
+#define BOOTCMD_USB "run bootcmd_usb; " +#define BOOTCMD_INIT_USB "usb start 0; " +#else +#define BOOTCMDS_USB "" +#define BOOTCMD_USB "" +#define BOOTCMD_INIT_USB "" +#endif
+#ifdef CONFIG_CMD_DHCP +#define BOOTCMDS_DHCP \
- "bootcmd_dhcp=" \
"if dhcp ${scriptaddr} boot.scr.uimg; then "\
"source ${scriptaddr}; " \
"fi\0"
+#define BOOTCMD_DHCP "run bootcmd_dhcp; " +#else +#define BOOTCMDS_DHCP "" +#define BOOTCMD_DHCP "" +#endif
+#define BOOTCMDS_COMMON \
- "scriptaddr=0x400000\0" \
- "rootpart=1\0" \
- "script_boot=" \
"for fs in " BOOTCMD_FS_EXT2 BOOTCMD_FS_FAT "; do " \
"for prefix in / /boot/; do " \
"for script in boot.scr.uimg boot.scr; do " \
"echo Scanning ${devtype} ${devnum}:${rootpart}
${fs} ${prefix}${script} ...; " \
"if ${fs}load ${devtype} ${devnum}:${rootpart}
${scriptaddr} ${prefix}${script}; then " \
"echo ${script} found! Executing ...;" \
"source ${scriptaddr};" \
"fi; " \
"done; " \
"done; " \
"done;\0" \
- BOOTCMDS_MMC \
- BOOTCMDS_USB \
- BOOTCMDS_DHCP
+#define CONFIG_BOOTCOMMAND BOOTCMD_INIT_USB BOOTCMD_USB BOOTCMD_MMC +BOOTCMD_DHCP
+#endif
+#define CONFIG_EXTRA_ENV_SETTINGS \
- TEGRA2_DEVICE_SETTINGS \
- BOOTCMDS_COMMON
+#endif /* __TEGRA2_COMMON_POST_H */ diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2- common.h index cdd3093..1931179 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -139,9 +139,6 @@ "stdout=serial\0" \ "stderr=serial\0"
-#define CONFIG_EXTRA_ENV_SETTINGS \
- TEGRA2_DEVICE_SETTINGS
#define CONFIG_LOADADDR 0x408000 /* def. location for kernel */ #define CONFIG_BOOTDELAY 2 /* -1 to disable auto boot */
diff --git a/include/configs/ventana.h b/include/configs/ventana.h index a7338f1..8e95db1 100644 --- a/include/configs/ventana.h +++ b/include/configs/ventana.h @@ -59,4 +59,7 @@
/* Environment not stored */ #define CONFIG_ENV_IS_NOWHERE
+#include "tegra2-common-post.h"
#endif /* __CONFIG_H */ diff --git a/include/configs/whistler.h b/include/configs/whistler.h index 5efa60c..2f2a512 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -86,4 +86,6 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP
+#include "tegra2-common-post.h"
#endif /* __CONFIG_H */
1.7.0.4

On 05/16/2012 03:27 PM, Tom Warren wrote:
Stephen, Stephen Warren wrote at Wednesday, May 16, 2012 9:21 AM:
This implements a useful bootcmd for Tegra. The boot order is:
...
I'm getting checkpatch errors (over 80 chars) for tegra2-common-post.h:
WARNING: line over 80 characters #414: FILE: include/configs/tegra2-common-post.h:93:
- "script_boot=" \
...
True.
In this case, I would assert these should simply be ignored; checkpatch is a tool to help you get readable source, and in this case I think it's much more readable by not forcing artificial wrapping.

Hi,
On Wed, May 16, 2012 at 2:31 PM, Stephen Warren swarren@wwwdotorg.orgwrote:
On 05/16/2012 03:27 PM, Tom Warren wrote:
Stephen, Stephen Warren wrote at Wednesday, May 16, 2012 9:21 AM:
This implements a useful bootcmd for Tegra. The boot order is:
...
I'm getting checkpatch errors (over 80 chars) for tegra2-common-post.h:
WARNING: line over 80 characters #414: FILE: include/configs/tegra2-common-post.h:93:
"script_boot="
\
...
True.
In this case, I would assert these should simply be ignored; checkpatch is a tool to help you get readable source, and in this case I think it's much more readable by not forcing artificial wrapping.
Acked-by: Simon Glass sjg@chromium.org
Although I would prefer that things stick to 80cols. In this particular code it doesn't seem hard to fix this. Everything who comes along later to change this code will hit it.
Regards, Simon

From: Stephen Warren swarren@nvidia.com
CONFIG_CMD_PING/NFS aren't required for Whistler to boot.
Add some comments.
Signed-off-by: Stephen Warren swarren@nvidia.com --- v2: Fix typo in comment --- include/configs/whistler.h | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/configs/whistler.h b/include/configs/whistler.h index 2f2a512..62c4e8a 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -74,6 +74,8 @@ #define CONFIG_USB_EHCI_TEGRA #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB + +/* USB networking support */ #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_SMSC95XX #define CONFIG_USB_ETHER_ASIX @@ -81,9 +83,8 @@ #define CONFIG_USB_ETHER_SMSC95XX #define CONFIG_USB_ETHER_ASIX
-#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ -#define CONFIG_CMD_NFS /* NFS support */ -#define CONFIG_CMD_PING +/* General networking support */ +#define CONFIG_CMD_NET #define CONFIG_CMD_DHCP
#include "tegra2-common-post.h"

From: Stephen Warren swarren@nvidia.com
Signed-off-by: Stephen Warren swarren@nvidia.com --- include/configs/seaboard.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 5e91675..0857c1a 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -99,6 +99,18 @@ #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB
+/* USB networking support */ +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_ETHER_ASIX +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_ETHER_ASIX + +/* General networking support */ +#define CONFIG_CMD_NET +#define CONFIG_CMD_DHCP + /* Enable keyboard */ #define CONFIG_TEGRA2_KEYBOARD #define CONFIG_KEYBOARD

Hi Stephen,
Am Mittwoch, den 16.05.2012, 10:21 -0600 schrieb Stephen Warren:
From: Stephen Warren swarren@nvidia.com
Signed-off-by: Stephen Warren swarren@nvidia.com
include/configs/seaboard.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 5e91675..0857c1a 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -99,6 +99,18 @@ #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB
+/* USB networking support */ +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_ETHER_ASIX
The duplication here seems bogus.
+#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_ETHER_ASIX
+/* General networking support */ +#define CONFIG_CMD_NET +#define CONFIG_CMD_DHCP
/* Enable keyboard */ #define CONFIG_TEGRA2_KEYBOARD #define CONFIG_KEYBOARD

On Wed, May 16, 2012 at 9:20 AM, Stephen Warren swarren@wwwdotorg.orgwrote:
From: Stephen Warren swarren@nvidia.com
Acked-by: Simon Glass sjg@chromium.org
console isn't used by anything, and the kernel should be set appropriately by whatever script is booting the kernel, not imposed by the bootloader.
mem might be useful, but the current value is pretty bogus, since it includes nvmem options that make no sense for an upstream kernel, and equally should not be required for any downstream kernel. Either way, this is also best left to the kernel boot script.
smpflag isn't used by anything, and again was probably intended to be a kernel command-line option better set by the kernel boot script.
Signed-off-by: Stephen Warren swarren@nvidia.com
v2: Remove TEGRA2_SYSMEM define from all board configs
include/configs/harmony.h | 1 - include/configs/medcom.h | 1 - include/configs/paz00.h | 1 - include/configs/plutux.h | 1 - include/configs/seaboard.h | 1 - include/configs/tegra2-common.h | 3 --- include/configs/ventana.h | 1 - include/configs/whistler.h | 1 - 8 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/include/configs/harmony.h b/include/configs/harmony.h index ce0ae9f..3706a40 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -28,7 +28,6 @@ #include "tegra2-common.h"
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M mem=512M@512M " #define V_PROMPT "Tegra2 (Harmony) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Harmony"
diff --git a/include/configs/medcom.h b/include/configs/medcom.h index 2dc3507..725abc3 100644 --- a/include/configs/medcom.h +++ b/include/configs/medcom.h @@ -29,7 +29,6 @@ #include "tegra2-common.h"
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M" #define V_PROMPT "Tegra2 (Medcom) # " #define CONFIG_TEGRA2_BOARD_STRING "Avionic Design Medcom" #define CONFIG_SYS_BOARD_ODMDATA 0x2b0d8011 diff --git a/include/configs/paz00.h b/include/configs/paz00.h index f53f20e..ae3a2de 100644 --- a/include/configs/paz00.h +++ b/include/configs/paz00.h @@ -21,7 +21,6 @@ #include "tegra2-common.h"
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=512M@0M" #define V_PROMPT "Tegra2 (Paz00) MOD # " #define CONFIG_TEGRA2_BOARD_STRING "Compal Paz00"
diff --git a/include/configs/plutux.h b/include/configs/plutux.h index f869191..475be6c 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -29,7 +29,6 @@ #include "tegra2-common.h"
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M" #define V_PROMPT "Tegra2 (Plutux) # " #define CONFIG_TEGRA2_BOARD_STRING "Avionic Design Plutux" #define CONFIG_SYS_BOARD_ODMDATA 0x2b2d8011 diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 46d4228..0af37db 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -41,7 +41,6 @@ #define CONFIG_OF_SEPARATE
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M mem=512M@512M " #define V_PROMPT "Tegra2 (SeaBoard) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Seaboard"
diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index 068ce88..cdd3093 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -140,9 +140,6 @@ "stderr=serial\0"
#define CONFIG_EXTRA_ENV_SETTINGS \
"console=ttyS0,115200n8\0" \
"mem=" TEGRA2_SYSMEM "\0" \
"smpflag=smp\0" \ TEGRA2_DEVICE_SETTINGS
#define CONFIG_LOADADDR 0x408000 /* def. location for kernel */ diff --git a/include/configs/ventana.h b/include/configs/ventana.h index 3e55fe5..a7338f1 100644 --- a/include/configs/ventana.h +++ b/include/configs/ventana.h @@ -33,7 +33,6 @@ #define CONFIG_OF_SEPARATE
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M mem=512M@512M " #define V_PROMPT "Tegra2 (Ventana) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Ventana"
diff --git a/include/configs/whistler.h b/include/configs/whistler.h index 6b9ef98..5efa60c 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -33,7 +33,6 @@ #define CONFIG_OF_SEPARATE
/* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=512M@0M" #define V_PROMPT "Tegra2 (Whistler) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Whistler"
-- 1.7.0.4
participants (4)
-
Lucas Stach
-
Simon Glass
-
Stephen Warren
-
Tom Warren