Skip to content

Commit

Permalink
Add ipxe builds for linux userspace
Browse files Browse the repository at this point in the history
  • Loading branch information
antonym committed Oct 13, 2021
1 parent 0a5fb50 commit 807cd83
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 2 deletions.
1 change: 1 addition & 0 deletions roles/netbootxyz/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ generate_checksums: true
generate_disks: true
generate_disks_arm: false
generate_disks_efi: true
generate_disks_linux: false
generate_disks_hybrid: false
generate_disks_legacy: true
generate_disks_rpi: false
Expand Down
4 changes: 4 additions & 0 deletions roles/netbootxyz/tasks/generate_disks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
when:
- generate_disks_legacy | default(true) | bool

- include: generate_disks_linux.yml
when:
- generate_disks_linux | default(false) | bool

- include: generate_disks_efi.yml
when:
- generate_disks_efi | default(true) | bool
Expand Down
3 changes: 1 addition & 2 deletions roles/netbootxyz/tasks/generate_disks_legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
bin/ipxe.dsk \
bin/ipxe.lkrn \
bin/ipxe.kpxe \
bin/undionly.kpxe \
bin-x86_64-linux/slirp.linux
bin/undionly.kpxe
args:
chdir: "{{ ipxe_source_dir }}/src"
tags:
Expand Down
53 changes: 53 additions & 0 deletions roles/netbootxyz/tasks/generate_disks_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---

- name: Copy netboot.xyz local legacy iPXE configs
copy:
src: "ipxe/local/{{ item }}"
dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
with_items:
- colour.h
- console.h
- crypto.h
- general.h

- name: Set trust file to ipxe ca
set_fact:
trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
when: not generate_signatures

- name: Combine trust args if set
set_fact:
trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
when: generate_signatures | bool

- name: Compile iPXE Linux bootloader for Legacy BIOS
shell: |
make clean
make EMBED={{ bootloader_filename }} \
TRUST={{ trust_files }} \
bin-x86_64-linux/slirp.linux
args:
chdir: "{{ ipxe_source_dir }}/src"
tags:
- skip_ansible_lint
when: ipxe_debug_enabled | bool == false

- name: Compile iPXE Linux bootloader for Legacy BIOS with debug flags
shell: |
make clean
make EMBED={{ bootloader_filename }} \
DEBUG={{ ipxe_debug_options }} \
TRUST={{ trust_files }} \
bin-x86_64-linux/slirp.linux
args:
chdir: "{{ ipxe_source_dir }}/src"
tags:
- skip_ansible_lint
when: ipxe_debug_enabled | bool

- name: Copy iPXE linux binary for Legacy BIOS to http directory
copy:
src: "{{ ipxe_source_dir }}/src/bin-x86_64-linux/slirp.linux"
dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-linux.bin"
remote_src: True
when: bootloader_filename != "netboot.xyz-packet"
1 change: 1 addition & 0 deletions script/netbootxyz-overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ sigs_menu: true
sigs_enabled: true
generate_disks_arm: true
generate_disks_hybrid: true
generate_disks_linux: true
generate_disks_rpi: true
generate_version_file: true
generate_local_vars: false
Expand Down

0 comments on commit 807cd83

Please sign in to comment.