Commit 489b51da68115fe4679c5f34dd79df9b87350635

Authored by Stefan Roese
Committed by Bin Meng
1 parent 14a937ffb9

x86: theadorable-x86: Add header file for common defines and env

This patch adds the common header include file theadorable-x86-common.h
for the theadorable-x86 targets to define all common options and the
default environment.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Showing 3 changed files with 179 additions and 46 deletions Inline Diff

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