boot.cfg.j2 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #!ipxe
  2. :global_vars
  3. # set site name
  4. set site_name {{ site_name }}
  5. # set boot domain
  6. set boot_domain {{ boot_domain }}
  7. # set location of memdisk
  8. set memdisk {{ memdisk_location }}
  9. # signature check enabled?
  10. set sigs_enabled {{ sigs_enabled | default(false) | bool }}
  11. # image signatures check enabled?
  12. set img_sigs_enabled {{ img_sigs_enabled | default(false) | bool }}
  13. # set location of signatures for sources
  14. set sigs {{ sigs_location }}
  15. # set location of latest iPXE
  16. set ipxe_disk netboot.xyz-undionly.kpxe
  17. # set location of custom netboot.xyz live assets
  18. set live_endpoint {{ live_endpoint }}
  19. ##################
  20. # official mirrors
  21. ##################
  22. :mirrors
  23. {% for key, value in releases.items() | sort(attribute='1.name') %}
  24. {% if value.mirror is defined and value.base_dir is defined %}
  25. ### {{ value.name }}
  26. set {{ key }}_mirror {{ value.mirror }}
  27. set {{ key }}_base_dir {{ value.base_dir }}
  28. {% endif %}
  29. {% endfor %}
  30. #################################################
  31. # determine architectures and enable menu options
  32. #################################################
  33. :architectures
  34. set menu_linux 1
  35. set menu_bsd 1
  36. set menu_freedos 1
  37. set menu_live 1
  38. set menu_security 1
  39. set menu_windows 1
  40. set menu_utils 1
  41. iseq ${buildarch} i386 && goto x86_64 ||
  42. iseq ${buildarch} x86_64 && goto x86_64 ||
  43. iseq ${buildarch} arm64 && goto arm64 ||
  44. goto architectures_end
  45. :x86_64
  46. goto architectures_end
  47. :arm64
  48. set menu_freedos 0
  49. set menu_live 0
  50. set menu_security 0
  51. set menu_windows 0
  52. set menu_utils 0
  53. goto architectures_end
  54. :architectures_end
  55. goto clouds
  56. ###################################
  57. # set iPXE cloud provider specifics
  58. ###################################
  59. :clouds
  60. iseq ${ipxe_cloud_config} gce && goto gce ||
  61. iseq ${ipxe_cloud_config} packet && goto packet ||
  62. goto clouds_end
  63. :gce
  64. set console console=ttyS0,115200n8
  65. goto clouds_end
  66. :packet
  67. iseq ${buildarch} i386 && goto packet_x86_64 ||
  68. iseq ${buildarch} x86_64 && goto packet_x86_64 ||
  69. iseq ${buildarch} arm64 && goto packet_arm64 ||
  70. goto clouds_end
  71. :packet_x86_64
  72. set console console=ttyS1,115200n8
  73. iseq ${platform} efi && set ipxe_disk netboot.xyz-packet.efi || set ipxe_disk netboot.xyz-packet.kpxe
  74. set menu_freedos 0
  75. set menu_windows 0
  76. set menu_utils 0
  77. goto clouds_end
  78. :packet_arm64
  79. set console console=ttyAMA0,115200
  80. set ipxe_disk netboot.xyz-packet-arm64.efi
  81. set menu_bsd 0
  82. set menu_freedos 0
  83. set menu_live 0
  84. set menu_security 0
  85. set menu_windows 0
  86. set menu_utils 0
  87. goto clouds_end
  88. :clouds_end
  89. goto end
  90. :end
  91. exit