From da85fa0801e4f693b5e56495f8943fe9c3afe1fd Mon Sep 17 00:00:00 2001 From: Ash Hines Date: Sat, 23 Nov 2024 18:05:12 +0200 Subject: [PATCH 1/3] Add Windows arm64 Support --- roles/netbootxyz/defaults/main.yml | 2 ++ roles/netbootxyz/tasks/generate_disks_base.yml | 6 +++++- roles/netbootxyz/templates/menu/boot.cfg.j2 | 2 +- roles/netbootxyz/templates/menu/windows.ipxe.j2 | 8 ++++---- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/roles/netbootxyz/defaults/main.yml b/roles/netbootxyz/defaults/main.yml index b02a6e45ea..979de5ccca 100644 --- a/roles/netbootxyz/defaults/main.yml +++ b/roles/netbootxyz/defaults/main.yml @@ -856,4 +856,6 @@ utilitiespcbios64: util_path: https://mirror.sysadminguide.net/ubcd/ubcd539.iso version: '539' wimboot_location: http://${boot_domain}/wimboot +wimboot_arm_location: http://${boot_domain}/wimboot.arm64 wimboot_upstream_url: https://github.com/ipxe/wimboot/releases/latest/download/wimboot +wimboot_arm64_upstream_url: https://github.com/ipxe/wimboot/releases/latest/download/wimboot diff --git a/roles/netbootxyz/tasks/generate_disks_base.yml b/roles/netbootxyz/tasks/generate_disks_base.yml index 946b45e5d5..678db18f3c 100644 --- a/roles/netbootxyz/tasks/generate_disks_base.yml +++ b/roles/netbootxyz/tasks/generate_disks_base.yml @@ -1,5 +1,4 @@ --- - - name: Gathering facts ansible.builtin.setup: @@ -36,6 +35,11 @@ url: "{{ wimboot_upstream_url }}" dest: "{{ netbootxyz_root }}/wimboot" +- name: Retrieve latest wimboot.arm64 + ansible.builtin.get_url: + url: "{{ wimboot_arm64_upstream_url }}" + dest: "{{ netbootxyz_root }}/wimboot.arm64" + - name: Copy helper apps ansible.builtin.copy: src: "{{ item }}" diff --git a/roles/netbootxyz/templates/menu/boot.cfg.j2 b/roles/netbootxyz/templates/menu/boot.cfg.j2 index 4d88388324..a35cfc3b14 100644 --- a/roles/netbootxyz/templates/menu/boot.cfg.j2 +++ b/roles/netbootxyz/templates/menu/boot.cfg.j2 @@ -75,7 +75,7 @@ set menu_unix 0 set menu_freedos 0 set menu_live 0 set menu_live_arm 1 -set menu_windows 0 +set menu_windows 1 set menu_utils 0 set menu_utils_arm 1 set menu_pci 0 diff --git a/roles/netbootxyz/templates/menu/windows.ipxe.j2 b/roles/netbootxyz/templates/menu/windows.ipxe.j2 index 18becd3218..8b86b9f419 100644 --- a/roles/netbootxyz/templates/menu/windows.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/windows.ipxe.j2 @@ -9,7 +9,7 @@ goto ${menu} || :windows set os Microsoft Windows clear win_version -menu ${os} +menu ${os} item --gap Installers item win_install ${space} Load ${os} Installer... item --gap Options: @@ -19,7 +19,7 @@ choose win_version || goto windows_exit goto ${win_version} :arch_set -iseq ${win_arch} x64 && set win_arch x86 || set win_arch x64 +iseq ${win_arch} x64 && set win_arch x86 && set win_arch arm64 || set win_arch x64 goto windows :url_set @@ -43,9 +43,9 @@ isset ${win_base_url} && goto boot || echo URL not set... && goto url_set :boot imgfree -kernel {{ wimboot_location }} +iseq ${win_arch} arm64 kernel {{ wimboot_arm_location }} || kernel {{ wimboot_location }} initrd -n bootmgr ${win_base_url}/${win_arch}/bootmgr bootmgr || -initrd -n bootmgr.efi ${win_base_url}/${win_arch}/bootmgr.efi bootmgr.efi || +initrd -n bootmgr.efi ${win_base_url}/${win_arch}/bootmgr.efi bootmgr.efi || initrd -n bcd ${win_base_url}/${win_arch}/boot/bcd bcd || initrd -n bcd ${win_base_url}/${win_arch}/Boot/BCD bcd || initrd -n boot.sdi ${win_base_url}/${win_arch}/boot/boot.sdi boot.sdi || From 249439d3980017ab94799e740b671d14ff2e5f76 Mon Sep 17 00:00:00 2001 From: Ash Hines Date: Sat, 23 Nov 2024 18:07:45 +0200 Subject: [PATCH 2/3] fix wimboot_arm64_upstream_url missing .arm64 --- roles/netbootxyz/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/netbootxyz/defaults/main.yml b/roles/netbootxyz/defaults/main.yml index 979de5ccca..ca951cef2f 100644 --- a/roles/netbootxyz/defaults/main.yml +++ b/roles/netbootxyz/defaults/main.yml @@ -858,4 +858,4 @@ utilitiespcbios64: wimboot_location: http://${boot_domain}/wimboot wimboot_arm_location: http://${boot_domain}/wimboot.arm64 wimboot_upstream_url: https://github.com/ipxe/wimboot/releases/latest/download/wimboot -wimboot_arm64_upstream_url: https://github.com/ipxe/wimboot/releases/latest/download/wimboot +wimboot_arm64_upstream_url: https://github.com/ipxe/wimboot/releases/latest/download/wimboot.arm64 From e698c4bce5881f4b78e3cb6ae19bc6237409341a Mon Sep 17 00:00:00 2001 From: Ash Hines Date: Sat, 23 Nov 2024 18:50:22 +0200 Subject: [PATCH 3/3] fix isseq in wimboot kernel select --- roles/netbootxyz/templates/menu/windows.ipxe.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/netbootxyz/templates/menu/windows.ipxe.j2 b/roles/netbootxyz/templates/menu/windows.ipxe.j2 index 8b86b9f419..72a0846298 100644 --- a/roles/netbootxyz/templates/menu/windows.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/windows.ipxe.j2 @@ -43,7 +43,7 @@ isset ${win_base_url} && goto boot || echo URL not set... && goto url_set :boot imgfree -iseq ${win_arch} arm64 kernel {{ wimboot_arm_location }} || kernel {{ wimboot_location }} +iseq ${win_arch} arm64 && kernel {{ wimboot_arm_location }} || kernel {{ wimboot_location }} initrd -n bootmgr ${win_base_url}/${win_arch}/bootmgr bootmgr || initrd -n bootmgr.efi ${win_base_url}/${win_arch}/bootmgr.efi bootmgr.efi || initrd -n bcd ${win_base_url}/${win_arch}/boot/bcd bcd ||