blob: fb9a8c5032faeec71206adb1f5f927b645a153f3 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Michael Wallef214a202012-06-05 11:33:17 +00002/*
3 * Copyright (c) 2012 Michael Walle
4 * Michael Walle <michael@walle.cc>
Michael Wallef214a202012-06-05 11:33:17 +00005 */
6
7#ifndef _CONFIG_LSXL_H
8#define _CONFIG_LSXL_H
9
10/*
Michael Wallef214a202012-06-05 11:33:17 +000011 * General configuration options
12 */
Michael Wallef214a202012-06-05 11:33:17 +000013
Michael Wallef214a202012-06-05 11:33:17 +000014#include "mv-common.h"
15
Michael Walle4fe49d72015-02-08 20:06:07 +010016/* loading initramfs images without uimage header */
Michael Walle4fe49d72015-02-08 20:06:07 +010017
Michael Wallef214a202012-06-05 11:33:17 +000018/*
19 * Environment variables configurations
20 */
Michael Wallef214a202012-06-05 11:33:17 +000021
Michael Wallef214a202012-06-05 11:33:17 +000022/*
23 * Default environment variables
24 */
Michael Wallef214a202012-06-05 11:33:17 +000025#define CONFIG_EXTRA_ENV_SETTINGS \
Michael Walle848fe232014-04-01 20:09:14 +020026 "bootsource=legacy\0" \
Michael Wallef214a202012-06-05 11:33:17 +000027 "hdpart=0:1\0" \
Michael Walle848fe232014-04-01 20:09:14 +020028 "kernel_addr=0x00800000\0" \
29 "ramdisk_addr=0x01000000\0" \
Michael Walle145df6f2015-02-08 20:06:06 +010030 "fdt_addr=0x00ff0000\0" \
Michael Walle111e1e12022-08-17 21:37:59 +020031 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
Michael Wallef94b5222019-04-03 23:28:31 +020032 "bootcmd_legacy=sata init " \
33 "&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\
34 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
Michael Wallebc2ad9f02015-02-08 20:06:05 +010035 "&& bootm ${kernel_addr} ${ramdisk_addr}\0" \
Michael Walle4fe49d72015-02-08 20:06:07 +010036 "bootcmd_net=bootp ${kernel_addr} vmlinuz " \
37 "&& tftpboot ${ramdisk_addr} initrd.img " \
38 "&& setenv ramdisk_len ${filesize} " \
Michael Walle111e1e12022-08-17 21:37:59 +020039 "&& tftpboot ${fdt_addr} ${fdtfile} " \
Michael Walle4fe49d72015-02-08 20:06:07 +010040 "&& bootz ${kernel_addr} " \
41 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Wallef94b5222019-04-03 23:28:31 +020042 "bootcmd_hdd=sata init " \
43 "&& load sata ${hdpart} ${kernel_addr} /vmlinuz " \
44 "&& load sata ${hdpart} ${ramdisk_addr} /initrd.img " \
Michael Walle4fe49d72015-02-08 20:06:07 +010045 "&& setenv ramdisk_len ${filesize} " \
Michael Wallef94b5222019-04-03 23:28:31 +020046 "&& load sata ${hdpart} ${fdt_addr} /dtb " \
Michael Walle4fe49d72015-02-08 20:06:07 +010047 "&& bootz ${kernel_addr} " \
48 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Wallef214a202012-06-05 11:33:17 +000049 "bootcmd_usb=usb start " \
Michael Walle4fe49d72015-02-08 20:06:07 +010050 "&& load usb 0:1 ${kernel_addr} /vmlinuz " \
51 "&& load usb 0:1 ${ramdisk_addr} /initrd.img " \
52 "&& setenv ramdisk_len ${filesize} " \
Michael Walle111e1e12022-08-17 21:37:59 +020053 "&& load usb 0:1 ${fdt_addr} ${fdtfile} " \
Michael Walle4fe49d72015-02-08 20:06:07 +010054 "&& bootz ${kernel_addr} " \
55 "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
Michael Wallef214a202012-06-05 11:33:17 +000056 "bootcmd_rescue=run config_nc_dhcp; run nc\0" \
Michael Wallef214a202012-06-05 11:33:17 +000057 "config_nc_dhcp=setenv autoload_old ${autoload}; " \
58 "setenv autoload no " \
59 "&& bootp " \
Michael Walle23c99462012-10-04 06:54:25 +000060 "&& setenv ncip " \
Michael Wallef214a202012-06-05 11:33:17 +000061 "&& setenv autoload ${autoload_old}; " \
62 "setenv autoload_old\0" \
63 "standard_env=setenv ipaddr; setenv netmask; setenv serverip; " \
64 "setenv ncip; setenv gatewayip; setenv ethact; " \
65 "setenv bootfile; setenv dnsip; " \
Michael Walle45e60c22014-09-28 00:05:23 +020066 "setenv bootsource legacy; run ser\0" \
Michael Wallef214a202012-06-05 11:33:17 +000067 "restore_env=run standard_env; saveenv; reset\0" \
68 "ser=setenv stdin serial; setenv stdout serial; " \
69 "setenv stderr serial\0" \
70 "nc=setenv stdin nc; setenv stdout nc; setenv stderr nc\0" \
71 "stdin=serial\0" \
72 "stdout=serial\0" \
73 "stderr=serial\0"
74
75/*
76 * Ethernet Driver configuration
77 */
78#ifdef CONFIG_CMD_NET
79#define CONFIG_MVGBE_PORTS {0, 1} /* enable port 1 only */
80#define CONFIG_PHY_BASE_ADR 7
Michael Wallef214a202012-06-05 11:33:17 +000081#endif /* CONFIG_CMD_NET */
82
Michael Wallef214a202012-06-05 11:33:17 +000083#endif /* _CONFIG_LSXL_H */