Browse Source

Splits Linux and Utility menus for arm64

Detects if arm architecure and loads arch specific menu
for linux and utility that reflect options that have potential to work
with arm.
Antony Messerli 5 năm trước cách đây
mục cha
commit
00ad3ed9e6
4 tập tin đã thay đổi với 85 bổ sung0 xóa
  1. 6 0
      src/boot.cfg
  2. 37 0
      src/linux-arm.ipxe
  3. 2 0
      src/menu.ipxe
  4. 40 0
      src/utils-arm.ipxe

+ 6 - 0
src/boot.cfg

@@ -85,11 +85,14 @@ goto architectures_end
 :x86_64
 goto architectures_end
 :arm64
+set menu_linux 0
+set menu_linux_arm 1
 set menu_freedos 0
 set menu_live 0
 set menu_security 0
 set menu_windows 0
 set menu_utils 0
+set menu_utils_arm 1
 goto architectures_end
 :architectures_end
 goto clouds
@@ -123,12 +126,15 @@ goto clouds_end
 :packet_arm64
 set console console=ttyAMA0,115200
 set ipxe_disk netboot.xyz-packet-arm64.efi
+set menu_linux 0
+set menu_linux_arm 1
 set menu_bsd 0
 set menu_freedos 0
 set menu_live 0
 set menu_security 0
 set menu_windows 0
 set menu_utils 0
+set menu_utils_arm 1
 goto clouds_end
 
 :clouds_end

+ 37 - 0
src/linux-arm.ipxe

@@ -0,0 +1,37 @@
+#!ipxe
+
+goto ${menu} ||
+
+:linux_menu
+menu Linux Installers - ARM ARCH **EXPERIMENTAL** Current Arch [ ${arch} ]
+iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
+item --gap Popular Linux Operating Systems:
+item centos ${space} CentOS
+item debian ${space} Debian
+item fedora ${space} Fedora
+item opensuse ${space} openSUSE
+item ubuntu ${space} Ubuntu
+item --gap All Others:
+#item alpinelinux ${space} Alpine Linux
+#item devuan ${space} Devuan
+#item coreos ${space} Fedora CoreOS (Preview)
+#item flatcar ${space} Flatcar
+#item nixos ${space} NixOS
+item rhel ${space} Red Hat Enterprise Linux
+#item tinycore ${space} Tiny Core Linux
+choose menu || goto linux_exit
+echo ${cls}
+goto ${menu} ||
+iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu
+
+:verify_sigs
+imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error
+goto change_menu
+
+:change_menu
+chain ${menu}.ipxe || goto error
+goto linux_menu
+
+:linux_exit
+clear menu
+exit 0

+ 2 - 0
src/menu.ipxe

@@ -41,6 +41,7 @@ item --gap Default:
 item local ${space} Boot from local hdd
 item --gap Distributions:
 iseq ${menu_linux} 1 && item linux ${space} Linux Installs ||
+iseq ${menu_linux_arm} 1 && item linux-arm ${space} Linux Installs ||
 iseq ${menu_bsd} 1 && item bsd ${space} BSD Installs ||
 iseq ${menu_freedos} 1 && item freedos ${space} FreeDOS || 
 iseq ${menu_live} 1 && item live ${space} Live Boot ||
@@ -48,6 +49,7 @@ iseq ${menu_security} 1 && item security ${space} Security Related ||
 iseq ${menu_windows} 1 && item windows ${space} Windows ||
 item --gap Tools:
 iseq ${menu_utils} 1 && item utils ${space} Utilities ||
+iseq ${menu_utils_arm} 1 && item utils-arm ${space} Utilities ||
 iseq ${arch} x86_64 && set bits 64 || set bits 32
 item changebits ${space} Architecture: ${arch} (${bits}bit)
 item shell ${space} iPXE shell

+ 40 - 0
src/utils-arm.ipxe

@@ -0,0 +1,40 @@
+#!ipxe
+
+menu Utilities - Image Sig Checks: [${img_sigs_enabled}]
+item --gap Utilities:
+item nbxyz-custom ${space} Set Github username [user: ${github_user}]
+item testpr ${space} Test forked netboot.xyz branch or hash
+choose --default ${menu} menu || goto utils_exit
+echo ${cls}
+goto ${menu} ||
+chain ${menu}.ipxe || goto utils_exit
+goto utils_exit
+
+:nbxyz-custom
+echo EXPERIMENTAL
+echo
+echo Make sure you have a fork of https://github.com/antonym/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
+
+:testpr
+clear github_user
+clear github_branch_or_hash
+echo This will chainload into a testing branch of netboot.xyz. You'll need to enter
+echo your Github username and the first part of the commit hash of the commit you want
+echo to test or the branch name. This assumes you are testing from a forked netboot.xyz
+echo repo.
+echo
+echo -n Specify Github username: ${} && read github_user
+echo -n Specify Github branch name or commit hash ( i.e. my_feature or 30b7ca ): ${} && read github_branch_or_hash
+echo
+echo Attempting to chainload branch or hash:
+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
+goto utils_exit
+
+:utils_exit
+clear menu
+exit 0