utils-efi.ipxe.j2 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!ipxe
  2. menu Utilities
  3. item --gap Utilities:
  4. {% for key, value in utilitiesefi.items() | sort(attribute='1.name') %}
  5. {% if value.enabled %}
  6. item {{ key }} ${space} {{ value.name }}
  7. {% endif %}
  8. {% endfor %}
  9. item --gap netboot.xyz tools:
  10. item nbxyz-custom ${space} Set Github username [user: ${github_user}]
  11. item testpr ${space} Test forked netboot.xyz branch or hash
  12. item nbxyz ${space} netboot.xyz endpoints
  13. choose --default ${menu} menu || goto utils_exit
  14. echo ${cls}
  15. goto ${menu} ||
  16. chain ${menu}.ipxe || goto utils_exit
  17. goto utils_exit
  18. {% for key, value in utilitiesefi.items() | sort %}
  19. {% if value.enabled | bool and value.type == "direct" %}
  20. :{{ key }}
  21. imgfree
  22. kernel {{ value.kernel }}
  23. initrd {{ value.initrd }}
  24. boot
  25. goto utils_exit
  26. {% endif %}
  27. {% endfor %}
  28. :nbxyz-custom
  29. echo EXPERIMENTAL
  30. echo
  31. echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom.
  32. echo You can then customize your fork as needed and set up your own custom options.
  33. echo Once your username is set, a custom option will appear on the main menu.
  34. echo
  35. echo -n Please enter your Github username: ${} && read github_user
  36. goto utils_exit
  37. :testpr
  38. clear github_user
  39. clear github_branch_or_hash
  40. echo This will chainload into a testing branch of netboot.xyz. You'll need to enter
  41. echo your Github username and the first part of the commit hash of the commit you want
  42. echo to test or the branch name. This assumes you are testing from a forked netboot.xyz
  43. echo repo.
  44. echo
  45. echo -n Specify Github username: ${} && read github_user
  46. echo -n Specify Github branch name or commit hash ( i.e. my_feature or 30b7ca ): ${} && read github_branch_or_hash
  47. echo
  48. echo Attempting to chainload branch or hash:
  49. chain --autofree https://raw.githubusercontent.com/${github_user}/netboot.xyz/${github_branch_or_hash}/src/menu.ipxe || echo Unable to find Github branch or hash... && sleep 5 && goto utils_exit
  50. goto utils_exit
  51. :utils_exit
  52. clear menu
  53. exit 0