slimbootloader.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #define CONFIG_STD_DEVICES_SETTINGS \
  9. "stdin=serial,i8042-kbd,usbkbd\0" \
  10. "stdout=serial\0" \
  11. "stderr=serial\0"
  12. /*
  13. * Override CONFIG_EXTRA_ENV_SETTINGS in x86-common.h
  14. */
  15. #undef CONFIG_EXTRA_ENV_SETTINGS
  16. #define CONFIG_EXTRA_ENV_SETTINGS \
  17. CONFIG_STD_DEVICES_SETTINGS \
  18. "netdev=eth0\0" \
  19. "consoledev=ttyS0\0" \
  20. "ramdiskaddr=0x4000000\0" \
  21. "ramdiskfile=initrd\0" \
  22. "bootdev=usb\0" \
  23. "bootdevnum=0\0" \
  24. "bootdevpart=0\0" \
  25. "bootfsload=fatload\0" \
  26. "bootusb=setenv bootdev usb; boot\0" \
  27. "bootscsi=setenv bootdev scsi; boot\0" \
  28. "bootmmc=setenv bootdev mmc; boot\0" \
  29. "bootargs=console=ttyS0,115200 console=tty0\0"
  30. /*
  31. * Override CONFIG_BOOTCOMMAND in x86-common.h
  32. */
  33. #undef CONFIG_BOOTCOMMAND
  34. #define CONFIG_BOOTCOMMAND \
  35. "if test ${bootdev} = \"usb\"; then ${bootdev} start; fi; " \
  36. "if test ${bootdev} = \"scsi\"; then ${bootdev} scan; fi; " \
  37. "${bootdev} info; " \
  38. "${bootfsload} ${bootdev} ${bootdevnum}:${bootdevpart} " \
  39. "${loadaddr} ${bootfile}; " \
  40. "${bootfsload} ${bootdev} ${bootdevnum}:${bootdevpart} " \
  41. "${ramdiskaddr} ${ramdiskfile}; " \
  42. "zboot ${loadaddr} 0 ${ramdiskaddr} ${filesize}"
  43. #endif /* __SLIMBOOTLOADER_CONFIG_H__ */