Blame view

include/configs/theadorable-x86-common.h 5.64 KB
489b51da6   Stefan Roese   x86: theadorable-...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  /*
   * Copyright (C) 2016 Stefan Roese <sr@denx.de>
   *
   * SPDX-License-Identifier:	GPL-2.0+
   */
  
  /*
   * Common options, macros and default environment for all
   * theadorable x86 based boards
   */
  
  #ifndef __THEADORABLE_X86_COMMON_H
  #define __THEADORABLE_X86_COMMON_H
  
  #define CONFIG_SYS_MONITOR_LEN		(1 << 20)
  
  #define CONFIG_PREBOOT
  
  #define CONFIG_STD_DEVICES_SETTINGS     "stdin=serial\0" \
  					"stdout=serial\0" \
  					"stderr=serial\0"
489b51da6   Stefan Roese   x86: theadorable-...
22
23
24
25
26
27
28
29
30
31
32
33
34
  #define VIDEO_IO_OFFSET				0
  #define CONFIG_X86EMU_RAW_IO
  #define CONFIG_CMD_BMP
  #define CONFIG_BMP_16BPP
  
  /* Environment settings */
  #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
  #undef CONFIG_ENV_SIZE
  #define CONFIG_ENV_SIZE			0x2000
  #define CONFIG_ENV_SECT_SIZE		0x1000
  #define CONFIG_ENV_OFFSET		0x006ec000
  #define CONFIG_ENV_OFFSET_REDUND	\
  	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
489b51da6   Stefan Roese   x86: theadorable-...
35
36
37
38
39
40
41
42
43
44
45
46
  #undef CONFIG_BOOTCOMMAND
  #undef CONFIG_EXTRA_ENV_SETTINGS
  
  #define CONFIG_EXTRA_ENV_SETTINGS				\
  	"tftpdir=" DEF_ENV_TFTPDIR "\0"				\
  	"eth_init=" DEF_ENV_ETH_INIT "\0"			\
  	"ubuntu_part=" __stringify(DEF_ENV_UBUNTU_PART) "\0"	\
  	"yocto_part=" __stringify(DEF_ENV_YOCTO_PART) "\0"	\
  	"ubuntu_tty=" __stringify(DEF_ENV_UBUNTU_TTY) "\0"	\
  	"yocto_tty=" __stringify(DEF_ENV_YOCTO_TTY) "\0"	\
  	"start_eth=if test -n \"${eth_init}\";"			\
  		"then run eth_init;else sleep 0;fi\0"		\
70e6c8c65   Stefan Roese   x86: theadorable-...
47
  	"kernel-ver=4.8.0-54-generic\0"				\
489b51da6   Stefan Roese   x86: theadorable-...
48
49
50
51
52
53
54
55
56
57
58
  	"boot=zboot 03000000 0 04000000 ${filesize}\0"		\
  	"mtdparts=mtdparts=intel-spi:4k(descriptor),7084k(me)," \
  		"8k(env1),8k(env2),64k(mrc),640k(u-boot),"	\
  		"64k(vga),-(fsp)\0"				\
  	"addtty_ubuntu=setenv bootargs ${bootargs} "		\
  		"console=ttyS${ubuntu_tty},${baudrate}\0"	\
  	"addtty_yocto=setenv bootargs ${bootargs} "		\
  		"console=ttyS${yocto_tty},${baudrate}\0"	\
  	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"	\
  	"addmisc=setenv bootargs ${bootargs} "			\
  		"intel-spi.writeable=1 vmalloc=300M "		\
43c984104   Stefan Roese   x86: theadorable-...
59
60
  		"pci=realloc=on,hpmemsize=0x12000000,"		\
  		"hpmemprefsize=0,hpiosize=0\0"	    		\
489b51da6   Stefan Roese   x86: theadorable-...
61
62
63
64
65
66
67
68
69
  	"bootcmd=if env exists recovery_status;"		\
  		"then run swupdate;"				\
  		"else run yocto_boot;run swupdate;"		\
  		"fi\0"						\
  	"ubuntu_args=setenv bootargs "				\
  		"root=/dev/sda${ubuntu_part} ro\0"		\
  	"ubuntu_args_quiet=setenv bootargs "			\
  		"root=/dev/sda${ubuntu_part} ro quiet\0"	\
  	"ubuntu_load=load scsi 0:${ubuntu_part} 03000000 "	\
70e6c8c65   Stefan Roese   x86: theadorable-...
70
  		"/boot/vmlinuz-${kernel-ver};"			\
489b51da6   Stefan Roese   x86: theadorable-...
71
  		"load scsi 0:${ubuntu_part} 04000000 "		\
70e6c8c65   Stefan Roese   x86: theadorable-...
72
  		"/boot/initrd.img-${kernel-ver}\0"		\
489b51da6   Stefan Roese   x86: theadorable-...
73
74
75
76
77
78
79
80
  	"ubuntu_boot=run ubuntu_args_quiet addmtd addmisc "	\
  		"ubuntu_load boot\0"				\
  	"ubuntu_boot_console=run ubuntu_args addtty_ubuntu "	\
  		"addmtd addmisc ubuntu_load boot\0"		\
  	"net_args=setenv bootargs root=/dev/sda${ubuntu_part} ro\0" \
  	"net_boot=run start_eth net_args addtty_yocto addmtd addmisc;" \
  		"tftp 03000000 ${tftpdir}/bzImage;"		\
  		"load scsi 0:${ubuntu_part} 04000000 "		\
70e6c8c65   Stefan Roese   x86: theadorable-...
81
  		"/boot/initrd.img-${kernel-ver};"		\
489b51da6   Stefan Roese   x86: theadorable-...
82
83
  		"run boot\0"					\
  	"yocto_args=setenv bootargs root=/dev/sda${yocto_part} " \
f04034cba   Stefan Roese   x86: theadorable-...
84
  		"panic=1\0"				\
489b51da6   Stefan Roese   x86: theadorable-...
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
  	"yocto_args_fast=setenv bootargs root=/dev/sda${yocto_part} " \
  		"quiet panic=1\0"				\
  	"yocto_boot=run yocto_args addmtd addmisc addtty_yocto;" \
  		"if run yocto_load;then zboot 03000000;fi\0"	\
  	"yocto_boot_fast=run yocto_args_fast addmtd addmisc "	\
  		"addtty_yocto yocto_load;zboot 03000000\0"	\
  	"yocto_boot_tftp=run yocto_args addmtd addmisc addtty_yocto " \
  		"start_eth yocto_load_tftp;zboot 03000000\0"	\
  	"yocto_kernel=bzImage\0"				\
  	"yocto_load=load scsi 0:${yocto_part} 03000000 "	\
  		"/boot/${yocto_kernel}\0"			\
  	"yocto_load_tftp=tftp 03000000 dfi/bzImage\0"		\
  	"swupdate=if env exists swupdate_factory;"		\
  		"then run swupdate_usb;run swupdate_run;"	\
  		"else setenv swupdate_part 2;run swupdate_mmc;" \
  			"run swupdate_run;setenv swupdate_part 1;" \
  			"run swupdate_mmc;run swupdate_usb;"	\
  			"run swupdate_run;"			\
  		"fi\0"						\
  	"swupdate-initrd=/boot/swupdate-image-theadorable.ext4.gz\0" \
  	"swupdate-kernel=/boot/bzImage\0"			\
f04034cba   Stefan Roese   x86: theadorable-...
106
  	"swupdate_args=setenv bootargs root=/dev/ram rw panic=1\0" \
489b51da6   Stefan Roese   x86: theadorable-...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
  	"swupdate_dev=0\0"					\
  	"swupdate_factory=0\0"					\
  	"swupdate_interface=usb\0"				\
  	"swupdate_kernel=vmlinuz-4.4.0-28-generic\0"		\
  	"swupdate_load=load ${swupdate_interface} ${swupdate_dev}:" \
  		"${swupdate_part} 03000000 ${swupdate-kernel}"	\
  		" && load ${swupdate_interface} ${swupdate_dev}:" \
  		"${swupdate_part} 04000000 ${swupdate-initrd}\0" \
  	"swupdate_mmc=setenv swupdate_interface mmc;"		\
  		"setenv swupdate_dev ${swupdate_mmcdev};"	\
  		"setenv swupdate_part 1;"			\
  		"mmc dev ${swupdate_dev};mmc rescan\0"		\
  	"swupdate_mmcdev=0\0"					\
  	"swupdate_part=1\0"					\
  	"swupdate_run=run swupdate_args addtty_yocto addmtd addmisc;" \
  		"if run swupdate_load;then run boot;"		\
  		"else echo SWUpdate cannot be started from "	\
  		"${swupdate_interface};"			\
  		"fi\0"						\
  	"swupdate_usb=setenv swupdate_interface usb;"		\
  		"setenv swupdate_dev 0;setenv swupdate_part 1;"	\
  		"usb start\0"					\
  	"logo_tftp=tftp ${loadaddr} ${tftpdir}/logo.bmp;"	\
  		"bmp display ${loadaddr}\0"			\
  	"preboot=scsi scan;load scsi 0:${ubuntu_part} ${loadaddr} " \
  		"/boot/logo/logo.bmp;bmp display ${loadaddr}\0" \
  	"rootpath=/tftpboot/theadorable-x86-conga/work/"	\
  		"rootfs-yocto-swupdate-2017-03-29\0"		\
  	"addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:" \
  		"${gatewayip}:${netmask}:${hostname}:eth0:off\0" \
  	"set_bootargs_nfs=setenv bootargs root=/dev/nfs rw "	\
  		"nfsroot=${serverip}:${rootpath},tcp,nfsvers=3\0" \
  	"net_nfs=run start_eth set_bootargs_nfs addtty_yocto addip " \
  		"addmtd addmisc;tftp 03000000 ${tftpdir}/bzImage;" \
  		"zboot 03000000\0"				\
  	"load_uboot=tftp ${loadaddr} ${tftpdir}/u-boot.rom\0"	\
  	"update_uboot=sf probe;"				\
  		"sf update ${loadaddr} 0 800000;saveenv\0"	\
  	"upd_uboot=run start_eth load_uboot update_uboot\0"
  
  #endif /* __THEADORABLE_X86_COMMON_H */