Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # for coreboot integration only
  2. # normally you'll need src/Makefile and that's it.
  3. ifeq ($(CONFIG_COREBOOT_BUILD),)
  4. include ../../../.config
  5. endif
  6. libpayload_dir=../../libpayload
  7. unexport KCONFIG_AUTOHEADER
  8. unexport KCONFIG_AUTOCONFIG
  9. unexport KCONFIG_DEPENDENCIES
  10. unexport KCONFIG_SPLITCONFIG
  11. unexport KCONFIG_TRISTATE
  12. unexport KCONFIG_NEGATIVES
  13. all: simpleboot
  14. payloads/external/simpleboot/src/loader_cb.elf: simpleboot
  15. simpleboot: $(libpayload_dir)/build/libpayload.a
  16. @echo " MAKE src/loader_cb.elf"
  17. @$(MAKE) -C src LIBPAYLOAD_PATH=../$(libpayload_dir) loader_cb.elf
  18. $(libpayload_dir)/build/libpayload.a:
  19. @$(MAKE) -C $(libpayload_dir) defconfig
  20. @sed -i "s|.*CONFIG_LP_BASE_ADDRESS=.*|CONFIG_LP_BASE_ADDRESS=0x03000000|" $(libpayload_dir)/.config
  21. @sed -i "s|.*CONFIG_LP_MULTIBOOT=y.*|# CONFIG_LP_MULTIBOOT is not set|" $(libpayload_dir)/.config
  22. @sed -i "s|.*CONFIG_LP_CURSES=y.*|# CONFIG_LP_CURSES is not set|" $(libpayload_dir)/.config
  23. @sed -i "s|.*CONFIG_LP_TINYCURSES=y.*|# CONFIG_LP_TINYCURSES is not set|" $(libpayload_dir)/.config
  24. @sed -i "s|.*CONFIG_LP_PDCURSES=y.*|# CONFIG_LP_PDCURSES is not set|" $(libpayload_dir)/.config
  25. @sed -i "s|.*# CONFIG_LP_CBFS is not set.*|CONFIG_LP_CBFS=y|" $(libpayload_dir)/.config
  26. @sed -i "s|.*CONFIG_LP_DEBUG_CBFS=y.*|# CONFIG_LP_DEBUG_CBFS is not set|" $(libpayload_dir)/.config
  27. @sed -i "s|.*CONFIG_LP_ENABLE_CBFS_FALLBACK=y.*|# CONFIG_LP_ENABLE_CBFS_FALLBACK is not set|" $(libpayload_dir)/.config
  28. @sed -i "s|.*CONFIG_LP_LZMA=y.*|# CONFIG_LP_LZMA is not set|" $(libpayload_dir)/.config
  29. @sed -i "s|.*CONFIG_LP_LZ4=y.*|# CONFIG_LP_LZ4 is not set|" $(libpayload_dir)/.config
  30. @sed -i "s|.*CONFIG_LP_VBOOT_LIB=y.*|# CONFIG_LP_VBOOT_LIB is not set|" $(libpayload_dir)/.config
  31. @sed -i "s|.*CONFIG_LP_CBMEM_CONSOLE=y.*|# CONFIG_LP_CBMEM_CONSOLE is not set|" $(libpayload_dir)/.config
  32. @sed -i "s|.*# CONFIG_LP_SERIAL_CONSOLE is not set.*|CONFIG_LP_SERIAL_CONSOLE=y|" $(libpayload_dir)/.config
  33. @sed -i "s|.*# CONFIG_LP_VIDEO_CONSOLE is not set.*|CONFIG_LP_VIDEO_CONSOLE=y|" $(libpayload_dir)/.config
  34. @sed -i "s|.*CONFIG_LP_VGA_VIDEO_CONSOLE=y.*|# CONFIG_LP_VGA_VIDEO_CONSOLE is not set|" $(libpayload_dir)/.config
  35. @sed -i "s|.*# CONFIG_LP_COREBOOT_VIDEO_CONSOLE is not set.*|CONFIG_LP_COREBOOT_VIDEO_CONSOLE=y|" $(libpayload_dir)/.config
  36. @sed -i "s|.*CONFIG_LP_MOUSE_CURSOR=y.*|# CONFIG_LP_MOUSE_CURSOR is not set|" $(libpayload_dir)/.config
  37. @sed -i "s|.*# CONFIG_LP_STORAGE is not set.*|CONFIG_LP_STORAGE=y|" $(libpayload_dir)/.config
  38. @sed -i "s|.*# CONFIG_LP_IGNORE_UNKNOWN_INTERRUPTS is not set.*|CONFIG_LP_IGNORE_UNKNOWN_INTERRUPTS=y|" $(libpayload_dir)/.config
  39. @sed -i "s|.*CONFIG_LP_DIE_ON_UNKNOWN_INTERRUPT=y.*|# CONFIG_LP_DIE_ON_UNKNOWN_INTERRUPT is not set|" $(libpayload_dir)/.config
  40. @# patch that extremely annoying cbfs (we can't use an empty macro either...)
  41. @sed -i "s|.*LOG.*;|{}|" $(libpayload_dir)/libcbfs/cbfs.c
  42. $(MAKE) -C $(libpayload_dir)
  43. clean:
  44. $(MAKE) -C src clean
  45. distclean: clean
  46. $(MAKE) -C $(libpayload_dir) clean
  47. print-repo-info:
  48. echo "https://gitlab.com/bztsrc/simpleboot.git Simpleboot"
  49. .PHONY: simpleboot libpayload clean distclean print-repo-info