From 821e8be3b45fd31e67060a0ebacc98f7fa1d280b Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 29 Nov 2023 18:54:19 +0400 Subject: [PATCH 1/3] allow independent generation arm64/multiarch images --- roles/netbootxyz/tasks/generate_disks.yml | 5 +---- roles/netbootxyz/tasks/generate_disks_hybrid.yml | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/roles/netbootxyz/tasks/generate_disks.yml b/roles/netbootxyz/tasks/generate_disks.yml index 39275a9099..7cc62803a6 100644 --- a/roles/netbootxyz/tasks/generate_disks.yml +++ b/roles/netbootxyz/tasks/generate_disks.yml @@ -33,7 +33,4 @@ ansible.builtin.include_tasks: generate_disks_hybrid.yml when: - generate_disks_hybrid | default(false) | bool - - generate_disks_legacy | default(true) | bool - - generate_disks_efi | default(true) | bool - - generate_disks_arm | default(false) | bool - - bootloader_filename == "netboot.xyz" + - bootloader_filename == "netboot.xyz" \ No newline at end of file diff --git a/roles/netbootxyz/tasks/generate_disks_hybrid.yml b/roles/netbootxyz/tasks/generate_disks_hybrid.yml index 8c52b0e2ca..7936941bde 100644 --- a/roles/netbootxyz/tasks/generate_disks_hybrid.yml +++ b/roles/netbootxyz/tasks/generate_disks_hybrid.yml @@ -8,6 +8,10 @@ {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.lkrn args: chdir: "{{ ipxe_source_dir }}/src" + when: + - generate_disks_hybrid | default(false) | bool + - generate_disks_legacy | default(true) | bool + - name: Generate hybrid ISO multiarch image ansible.builtin.shell: | @@ -18,6 +22,10 @@ {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-arm64.efi args: chdir: "{{ ipxe_source_dir }}/src" + when: + - generate_disks_hybrid | default(false) | bool + - generate_disks_legacy | default(true) | bool + - generate_disks_arm | default(false) | bool - name: Generate hybrid USB x86_64 image ansible.builtin.shell: | @@ -27,6 +35,9 @@ {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.lkrn args: chdir: "{{ ipxe_source_dir }}/src" + when: + - generate_disks_hybrid | default(false) | bool + - generate_disks_legacy | default(true) | bool - name: Generate hybrid USB multiarch image ansible.builtin.shell: | @@ -37,3 +48,7 @@ {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-arm64.efi args: chdir: "{{ ipxe_source_dir }}/src" + when: + - generate_disks_hybrid | default(false) | bool + - generate_disks_legacy | default(true) | bool + - generate_disks_arm | default(false) | bool From 208847a3f7f1bbf8df29cdfc361547fd5e5c95fa Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 29 Nov 2023 19:07:50 +0400 Subject: [PATCH 2/3] add arm64 image build --- .../tasks/generate_disks_hybrid.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/roles/netbootxyz/tasks/generate_disks_hybrid.yml b/roles/netbootxyz/tasks/generate_disks_hybrid.yml index 7936941bde..e0c85a716a 100644 --- a/roles/netbootxyz/tasks/generate_disks_hybrid.yml +++ b/roles/netbootxyz/tasks/generate_disks_hybrid.yml @@ -27,6 +27,17 @@ - generate_disks_legacy | default(true) | bool - generate_disks_arm | default(false) | bool +- name: Generate hybrid ISO arm64 image + ansible.builtin.shell: | + ./util/genfsimg -o {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-arm64.iso \ + -s {{ bootloader_filename }} \ + {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-arm64.efi + args: + chdir: "{{ ipxe_source_dir }}/src" + when: + - generate_disks_hybrid | default(false) | bool + - generate_disks_arm | default(false) | bool + - name: Generate hybrid USB x86_64 image ansible.builtin.shell: | ./util/genfsimg -o {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}.img \ @@ -52,3 +63,14 @@ - generate_disks_hybrid | default(false) | bool - generate_disks_legacy | default(true) | bool - generate_disks_arm | default(false) | bool + +- name: Generate hybrid USB arm64 image + ansible.builtin.shell: | + ./util/genfsimg -o {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-arm64.img \ + -s {{ bootloader_filename }} \ + {{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-arm64.efi + args: + chdir: "{{ ipxe_source_dir }}/src" + when: + - generate_disks_hybrid | default(false) | bool + - generate_disks_arm | default(false) | bool \ No newline at end of file From 1b16f727b324db348e289c970ccb47914641ca3f Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 29 Nov 2023 19:34:04 +0400 Subject: [PATCH 3/3] add efi dependency --- roles/netbootxyz/tasks/generate_disks_hybrid.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/netbootxyz/tasks/generate_disks_hybrid.yml b/roles/netbootxyz/tasks/generate_disks_hybrid.yml index e0c85a716a..74d51c5433 100644 --- a/roles/netbootxyz/tasks/generate_disks_hybrid.yml +++ b/roles/netbootxyz/tasks/generate_disks_hybrid.yml @@ -11,6 +11,7 @@ when: - generate_disks_hybrid | default(false) | bool - generate_disks_legacy | default(true) | bool + - generate_disks_efi | default(true) | bool - name: Generate hybrid ISO multiarch image @@ -26,6 +27,7 @@ - generate_disks_hybrid | default(false) | bool - generate_disks_legacy | default(true) | bool - generate_disks_arm | default(false) | bool + - generate_disks_efi | default(true) | bool - name: Generate hybrid ISO arm64 image ansible.builtin.shell: | @@ -49,6 +51,7 @@ when: - generate_disks_hybrid | default(false) | bool - generate_disks_legacy | default(true) | bool + - generate_disks_efi | default(true) | bool - name: Generate hybrid USB multiarch image ansible.builtin.shell: | @@ -63,6 +66,7 @@ - generate_disks_hybrid | default(false) | bool - generate_disks_legacy | default(true) | bool - generate_disks_arm | default(false) | bool + - generate_disks_efi | default(true) | bool - name: Generate hybrid USB arm64 image ansible.builtin.shell: |