Browse Source

Add tweaks for arm64 support

Antony Messerli 4 years ago
parent
commit
d40feed06f

+ 5 - 0
roles/netbootxyz/defaults/main.yml

@@ -516,6 +516,11 @@ sigs_location: http://${boot_domain}/sigs/
 sigs_menu: false
 site_name: netboot.xyz
 time_server: 0.pool.ntp.org
+utilitiesarm:
+  placeholder:
+    enabled: false
+    name: placeholder
+    type: direct
 utilitiesefi:
   4mlinux:
     enabled: true

+ 1 - 0
roles/netbootxyz/templates/menu/boot.cfg.j2

@@ -68,6 +68,7 @@ set menu_live 0
 set menu_security 0
 set menu_windows 0
 set menu_utils 0
+set menu_utils_arm 1
 iseq ${platform} efi && goto efi ||
 goto architectures_end
 :efi

+ 2 - 0
roles/netbootxyz/templates/menu/menu.ipxe.j2

@@ -53,7 +53,9 @@ iseq ${menu_freedos} 1 && item freedos ${space} FreeDOS ||
 iseq ${menu_windows} 1 && item windows ${space} Windows ||
 item --gap Tools:
 iseq ${menu_utils} 1 && item utils-${platform} ${space} Utilities ||
+iseq ${menu_utils_arm} 1 && item utils-arm ${space} Utilities ||
 iseq ${arch} x86_64 && set bits 64 || set bits 32
+iseq ${arch} arm64 && set bits 64 ||
 item changebits ${space} Architecture: ${arch} (${bits}bit)
 item shell ${space} iPXE shell
 item netinfo ${space} Network card info

+ 42 - 0
roles/netbootxyz/templates/menu/utils-arm.ipxe.j2

@@ -0,0 +1,42 @@
+#!ipxe
+
+menu Utilities
+item --gap Utilities:
+{% for key, value in utilitiesarm.items() | sort(attribute='1.name') %}
+{% if value.enabled %}
+item {{ key }} ${space} {{ value.name }}
+{% endif %}
+{% endfor %}
+item --gap netboot.xyz tools:
+item nbxyz-custom ${space} Set Github username [user: ${github_user}]
+item nbxyz ${space} netboot.xyz endpoints
+choose --default ${menu} menu || goto utils_exit
+echo ${cls}
+goto ${menu} ||
+chain ${menu}.ipxe || goto utils_exit
+goto utils_exit
+
+{% for key, value in utilitiesarm.items() | sort %}
+{% if value.enabled | bool and value.type == "direct" %}
+:{{ key }}
+imgfree
+kernel {{ value.kernel }}
+initrd {{ value.initrd }}
+boot
+goto utils_exit
+{% endif %}
+{% endfor %}
+
+:nbxyz-custom
+echo EXPERIMENTAL
+echo 
+echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom.
+echo You can then customize your fork as needed and set up your own custom options.
+echo Once your username is set, a custom option will appear on the main menu.
+echo
+echo -n Please enter your Github username: ${} && read github_user
+goto utils_exit
+
+:utils_exit
+clear menu
+exit 0