[U-Boot] [PATCH 12/21] board/BuR/common: Introduce Network Console and common environment for it
Hannes Petermaier
oe5hpm at oevsv.at
Fri Jan 30 14:25:15 CET 2015
It is often necessary to "break in" into boards bootloader commandline if
something fails or even for development purposes some parameters have to be
changed.
So we enable u-boot's CONFIG_NETCONSOLE feature.
We also modify Networksettings to apply with this new use-case.
Signed-off-by: Hannes Petermaier <oe5hpm at oevsv.at>
---
include/configs/bur_am335x_common.h | 23 +++++++++++++++++++++--
include/configs/tseries.h | 33 ++++-----------------------------
2 files changed, 25 insertions(+), 31 deletions(-)
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h
index e9d5d01..d7ea1c9 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -12,6 +12,23 @@
#ifndef __BUR_AM335X_COMMON_H__
#define __BUR_AM335X_COMMON_H__
/* ------------------------------------------------------------------------- */
+#define BUR_COMMON_ENV \
+"defaultip=192.168.60.253\0" \
+"defaultsip=192.168.60.254\0" \
+"netconsole=echo switching to network console ...; " \
+"if dhcp; then " \
+"setenv ncip ${serverip}; else " \
+"setenv ncip 192.168.60.254; " \
+"setenv serverip 192.168.60.254; " \
+"setenv gatewayip 192.168.60.254; " \
+"setenv ipaddr 192.168.60.1; " \
+"fi;" \
+"setenv netdisplay0 '" \
+"setcurs 1 9; puts myip; setcurs 10 9; puts ${ipaddr};" \
+"setcurs 1 10;puts serverip; setcurs 10 10; puts ${serverip}\;'" \
+"run netdisplay0; " \
+"setenv stdout nc;setenv stdin nc;setenv stderr nc\0"
+
#define CONFIG_SYS_GENERIC_BOARD
#define CONFIG_AM33XX
@@ -47,7 +64,7 @@
#define CONFIG_BOOTP_SEND_HOSTNAME
#define CONFIG_BOOTP_GATEWAY
#define CONFIG_BOOTP_SUBNETMASK
-#define CONFIG_NET_RETRY_COUNT 4
+#define CONFIG_NET_RETRY_COUNT 2
#define CONFIG_CMD_PING
#define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */
#define CONFIG_MII /* Required in net/eth.c */
@@ -57,7 +74,9 @@
#define CONFIG_SPL_NET_SUPPORT
#define CONFIG_SPL_ENV_SUPPORT /* used for a fetching MAC-Address */
#define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL"
-
+/* Network console */
+#define CONFIG_NETCONSOLE 1
+#define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */
/*
* SPL related defines. The Public RAM memory map the ROM defines the
* area between 0x402F0400 and 0x4030B800 as a download area and
diff --git a/include/configs/tseries.h b/include/configs/tseries.h
index 986db3f..8e073e0 100644
--- a/include/configs/tseries.h
+++ b/include/configs/tseries.h
@@ -125,35 +125,10 @@
#ifndef CONFIG_SPL_BUILD
#define CONFIG_EXTRA_ENV_SETTINGS \
- "autoload=0\0" \
- "loadaddr=0x80200000\0" \
- "bootfile=zImage\0" \
- "console=ttyO0,115200n8\0" \
- "optargs=\0" \
- "rootpath=/tftpboot/tseries/rootfs-small\0" \
- "nfsopts=nolock\0" \
- "netargs=setenv bootargs console=${console} " \
- "${optargs} " \
- "root=/dev/nfs " \
- "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
- "ip=dhcp\0" \
- "netboot=echo Booting from network ...; " \
- "setenv autoload no; " \
- "dhcp; " \
- "tftp ${loadaddr} ${bootfile}; " \
- "run netargs; " \
- "bootm ${loadaddr}\0" \
- "usbupdate=echo Updating UBOOT from USB-Stick ...; " \
- "usb start; " \
- "fatload usb 0 0x80000000 updateubootusb.img; " \
- "source;\0" \
- "netupdate=echo Updating UBOOT from Network (TFTP) ...; " \
- "setenv autoload 0; " \
- "dhcp;" \
- "tftp 0x80000000 updateUBOOT.img;" \
- "source;\0" \
- NANDARGS \
- MMCARGS
+BUR_COMMON_ENV \
+"autoload=0\0" \
+NANDARGS \
+MMCARGS
#endif /* !CONFIG_SPL_BUILD*/
#define CONFIG_BOOTCOMMAND \
--
1.7.9.5
More information about the U-Boot
mailing list