Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 2 | /* |
| 3 | * bur_cfg_common.h |
| 4 | * |
| 5 | * common parts used over all B&R boards |
| 6 | * |
| 7 | * Copyright (C) 2016 Hannes Schmelzer <oe5hpm@oevsv.at> - |
| 8 | * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __BUR_CFG_COMMON_H__ |
| 12 | #define __BUR_CFG_COMMON_H__ |
| 13 | /* ------------------------------------------------------------------------- */ |
| 14 | #define BUR_COMMON_ENV \ |
| 15 | "usbscript=usb start && fatload usb 0 ${scradr} usbscript.img &&" \ |
| 16 | " source ${scradr}\0" \ |
| 17 | "brdefaultip=if test -r ${ipaddr}; then; else" \ |
| 18 | " setenv ipaddr 192.168.60.1; setenv serverip 192.168.60.254;" \ |
| 19 | " setenv gatewayip 192.168.60.254; setenv netmask 255.255.255.0; fi;\0" \ |
| 20 | "netconsole=echo switching to network console ...; " \ |
| 21 | "if dhcp; then; else run brdefaultip; fi; setenv ncip ${serverip}; " \ |
| 22 | "setcurs 1 9; lcdputs myip; setcurs 10 9; lcdputs ${ipaddr};" \ |
| 23 | "setcurs 1 10;lcdputs serverip; setcurs 10 10; lcdputs ${serverip};" \ |
| 24 | "setenv stdout nc;setenv stdin nc;setenv stderr nc\0" |
| 25 | |
| 26 | #define CONFIG_PREBOOT "run cfgscr; run brdefaultip" |
| 27 | |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 28 | /* Network defines */ |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 29 | #define CONFIG_BOOTP_SEND_HOSTNAME |
Hannes Schmelzer | 0482323 | 2016-08-25 09:18:56 +0200 | [diff] [blame] | 30 | #define CONFIG_NET_RETRY_COUNT 10 |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 31 | |
| 32 | /* Network console */ |
| 33 | #define CONFIG_NETCONSOLE 1 |
| 34 | #define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */ |
| 35 | |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 36 | #define CONFIG_ENV_OVERWRITE /* Overwrite ethaddr / serial# */ |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 37 | |
| 38 | /* As stated above, the following choices are optional. */ |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 39 | |
| 40 | /* We set the max number of command args high to avoid HUSH bugs. */ |
| 41 | #define CONFIG_SYS_MAXARGS 64 |
| 42 | |
| 43 | /* Console I/O Buffer Size */ |
| 44 | #define CONFIG_SYS_CBSIZE 512 |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 45 | |
| 46 | #endif /* __BUR_CFG_COMMON_H__ */ |