slimbootloader.h 1.8 KB

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