Park, Aiden | d8f6db4 | 2019-08-03 08:31:11 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2019 Intel Corporation <www.intel.com> |
| 4 | */ |
| 5 | |
| 6 | #ifndef __SLIMBOOTLOADER_CONFIG_H__ |
| 7 | #define __SLIMBOOTLOADER_CONFIG_H__ |
| 8 | |
| 9 | #include <configs/x86-common.h> |
| 10 | |
| 11 | /* |
| 12 | * By default, CONFIG_SYS_NS16550_PORT_MAPPED is enabled for port io serial. |
| 13 | * To use mmio base serial, enable CONFIG_SYS_NS16550_MEM32 and disable |
| 14 | * CONFIG_SYS_NS16550_PORT_MAPPED until ns16550 driver supports serial port |
| 15 | * configuration in run-time. |
| 16 | * |
| 17 | * #define CONFIG_SYS_NS16550_MEM32 |
| 18 | * #undef CONFIG_SYS_NS16550_PORT_MAPPED |
| 19 | */ |
| 20 | #ifdef CONFIG_SYS_NS16550_MEM32 |
| 21 | #undef CONFIG_SYS_NS16550_PORT_MAPPED |
| 22 | #endif |
| 23 | |
| 24 | #define CONFIG_STD_DEVICES_SETTINGS \ |
| 25 | "stdin=serial,i8042-kbd,usbkbd\0" \ |
| 26 | "stdout=serial\0" \ |
| 27 | "stderr=serial\0" |
| 28 | |
| 29 | /* |
| 30 | * Override CONFIG_EXTRA_ENV_SETTINGS in x86-common.h |
| 31 | */ |
| 32 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 33 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 34 | CONFIG_STD_DEVICES_SETTINGS \ |
| 35 | "netdev=eth0\0" \ |
| 36 | "consoledev=ttyS0\0" \ |
| 37 | "ramdiskaddr=0x4000000\0" \ |
| 38 | "ramdiskfile=initrd\0" \ |
| 39 | "bootdev=usb\0" \ |
| 40 | "bootdevnum=0\0" \ |
| 41 | "bootdevpart=0\0" \ |
| 42 | "bootfsload=fatload\0" \ |
| 43 | "bootusb=setenv bootdev usb; boot\0" \ |
| 44 | "bootscsi=setenv bootdev scsi; boot\0" \ |
| 45 | "bootmmc=setenv bootdev mmc; boot\0" \ |
| 46 | "bootargs=console=ttyS0,115200 console=tty0\0" |
| 47 | |
| 48 | /* |
| 49 | * Override CONFIG_BOOTCOMMAND in x86-common.h |
| 50 | */ |
| 51 | #undef CONFIG_BOOTCOMMAND |
| 52 | #define CONFIG_BOOTCOMMAND \ |
| 53 | "if test ${bootdev} = \"usb\"; then ${bootdev} start; fi; " \ |
| 54 | "if test ${bootdev} = \"scsi\"; then ${bootdev} scan; fi; " \ |
| 55 | "${bootdev} info; " \ |
| 56 | "${bootfsload} ${bootdev} ${bootdevnum}:${bootdevpart} " \ |
| 57 | "${loadaddr} ${bootfile}; " \ |
| 58 | "${bootfsload} ${bootdev} ${bootdevnum}:${bootdevpart} " \ |
| 59 | "${ramdiskaddr} ${ramdiskfile}; " \ |
| 60 | "zboot ${loadaddr} 0 ${ramdiskaddr} ${filesize}" |
| 61 | |
| 62 | #endif /* __SLIMBOOTLOADER_CONFIG_H__ */ |