blob: f90542c9fd54d87af588b3212b585d536f3d60e2 [file] [log] [blame]
Hannes Schmelzer27bf4412016-02-19 12:09:45 +01001/*
2 * bur_cfg_common.h
3 *
4 * common parts used over all B&R boards
5 *
6 * Copyright (C) 2016 Hannes Schmelzer <oe5hpm@oevsv.at> -
7 * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 */
11
12#ifndef __BUR_CFG_COMMON_H__
13#define __BUR_CFG_COMMON_H__
14/* ------------------------------------------------------------------------- */
15#define BUR_COMMON_ENV \
16"usbscript=usb start && fatload usb 0 ${scradr} usbscript.img &&" \
17" source ${scradr}\0" \
18"brdefaultip=if test -r ${ipaddr}; then; else" \
19" setenv ipaddr 192.168.60.1; setenv serverip 192.168.60.254;" \
20" setenv gatewayip 192.168.60.254; setenv netmask 255.255.255.0; fi;\0" \
21"netconsole=echo switching to network console ...; " \
22"if dhcp; then; else run brdefaultip; fi; setenv ncip ${serverip}; " \
23"setcurs 1 9; lcdputs myip; setcurs 10 9; lcdputs ${ipaddr};" \
24"setcurs 1 10;lcdputs serverip; setcurs 10 10; lcdputs ${serverip};" \
25"setenv stdout nc;setenv stdin nc;setenv stderr nc\0"
26
27#define CONFIG_PREBOOT "run cfgscr; run brdefaultip"
28
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010029/* Network defines */
30#define CONFIG_BOOTP_DNS /* Configurable parts of CMD_DHCP */
31#define CONFIG_BOOTP_SEND_HOSTNAME
32#define CONFIG_BOOTP_GATEWAY
33#define CONFIG_BOOTP_SUBNETMASK
Hannes Schmelzer04823232016-08-25 09:18:56 +020034#define CONFIG_NET_RETRY_COUNT 10
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010035
36/* Network console */
37#define CONFIG_NETCONSOLE 1
38#define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */
39
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010040#define CONFIG_ENV_OVERWRITE /* Overwrite ethaddr / serial# */
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010041
42/* As stated above, the following choices are optional. */
43#define CONFIG_SYS_LONGHELP
44#define CONFIG_AUTO_COMPLETE
45#define CONFIG_CMDLINE_EDITING
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010046
47/* We set the max number of command args high to avoid HUSH bugs. */
48#define CONFIG_SYS_MAXARGS 64
49
50/* Console I/O Buffer Size */
51#define CONFIG_SYS_CBSIZE 512
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010052
53#endif /* __BUR_CFG_COMMON_H__ */