bur_cfg_common.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  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. #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. #define CONFIG_PREBOOT "run cfgscr; run brdefaultip"
  26. #define CONFIG_BOARD_LATE_INIT
  27. /* Network defines */
  28. #define CONFIG_BOOTP_DNS /* Configurable parts of CMD_DHCP */
  29. #define CONFIG_BOOTP_SEND_HOSTNAME
  30. #define CONFIG_BOOTP_GATEWAY
  31. #define CONFIG_BOOTP_SUBNETMASK
  32. #define CONFIG_NET_RETRY_COUNT 10
  33. /* Network console */
  34. #define CONFIG_NETCONSOLE 1
  35. #define CONFIG_BOOTP_MAY_FAIL /* if we don't have DHCP environment */
  36. #define CONFIG_ENV_OVERWRITE /* Overwrite ethaddr / serial# */
  37. /* As stated above, the following choices are optional. */
  38. #define CONFIG_SYS_LONGHELP
  39. #define CONFIG_AUTO_COMPLETE
  40. #define CONFIG_CMDLINE_EDITING
  41. /* We set the max number of command args high to avoid HUSH bugs. */
  42. #define CONFIG_SYS_MAXARGS 64
  43. /* Console I/O Buffer Size */
  44. #define CONFIG_SYS_CBSIZE 512
  45. /* Print Buffer Size */
  46. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE +\
  47. sizeof(CONFIG_SYS_PROMPT) + 16)
  48. /* Boot Argument Buffer Size */
  49. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  50. #endif /* __BUR_CFG_COMMON_H__ */