build.ck 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. Raspberry Pi 2 UEFI Runtime
  5. Abstract:
  6. This module implements the Raspberry Pi 2 runtime firmware, which
  7. continues running even after boot services have been torn down. It is
  8. never unloaded.
  9. Author:
  10. Chris Stevens 17-Mar-2015
  11. Environment:
  12. Firmware
  13. --*/
  14. function build() {
  15. sources = [
  16. "runtime.c"
  17. ];
  18. libs = [
  19. "//uefi/core/rtlib:rtlib",
  20. "//uefi/archlib:uefiarch"
  21. ];
  22. includes = [
  23. "$//uefi/include"
  24. ];
  25. sources_config = {
  26. "CFLAGS": ["-fshort-wchar"],
  27. };
  28. link_ldflags = [
  29. "-pie",
  30. "-nostdlib",
  31. "-Wl,--no-wchar-size-warning",
  32. "-static"
  33. ];
  34. link_config = {
  35. "LDFLAGS": link_ldflags
  36. };
  37. elf = {
  38. "label": "rpirt.elf",
  39. "inputs": sources + libs,
  40. "sources_config": sources_config,
  41. "includes": includes,
  42. "entry": "EfiRuntimeCoreEntry",
  43. "linker_script": "$//uefi/include/link_arm.x",
  44. "config": link_config
  45. };
  46. entries = executable(elf);
  47. entries += uefi_runtime_ffs("rpirt");
  48. return entries;
  49. }
  50. return build();