build.ck 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*++
  2. Copyright (c) 2014 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. PandaBoard UEFI Runtime
  5. Abstract:
  6. This module implements the PandaBoard runtime firmware, which continues
  7. to be loaded and provide services to the OS kernel even after the boot
  8. environment has been destroyed. It is never unloaded.
  9. Author:
  10. Evan Green 19-Mar-2014
  11. Environment:
  12. Firmware
  13. --*/
  14. function build() {
  15. sources = [
  16. "i2c.c",
  17. "pmic.c",
  18. "reboot.c",
  19. "rtc.c",
  20. "runtime.c"
  21. ];
  22. libs = [
  23. "//uefi/core/rtlib:rtlib",
  24. "//uefi/archlib:uefiarch"
  25. ];
  26. includes = [
  27. "$//uefi/include"
  28. ];
  29. sources_config = {
  30. "CFLAGS": ["-fshort-wchar"],
  31. };
  32. link_ldflags = [
  33. "-pie",
  34. "-nostdlib",
  35. "-Wl,--no-wchar-size-warning",
  36. "-static"
  37. ];
  38. link_config = {
  39. "LDFLAGS": link_ldflags
  40. };
  41. elf = {
  42. "label": "pandart.elf",
  43. "inputs": sources + libs,
  44. "sources_config": sources_config,
  45. "includes": includes,
  46. "entry": "EfiRuntimeCoreEntry",
  47. "linker_script": "$//uefi/include/link_arm.x",
  48. "config": link_config
  49. };
  50. entries = executable(elf);
  51. entries += uefi_runtime_ffs("pandart");
  52. return entries;
  53. }
  54. return build();