generate_disks_arm.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ---
  2. - name: Copy netboot.xyz local EFI iPXE configs
  3. copy:
  4. src: "ipxe/local/{{ item }}"
  5. dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}"
  6. with_items:
  7. - colour.h
  8. - console.h
  9. - crypto.h
  10. - name: Copy netboot.xyz general.h.efi iPXE config
  11. copy:
  12. src: "ipxe/local/general.h.efi"
  13. dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
  14. - name: Set trust file to ipxe ca
  15. set_fact:
  16. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
  17. when: not generate_signatures
  18. - name: Combine trust files if set
  19. set_fact:
  20. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
  21. when: generate_signatures | bool
  22. # iPXE workaround
  23. # http://lists.ipxe.org/pipermail/ipxe-devel/2018-August/006254.html
  24. # apply patch to fix arm64 builds on amd64 builds
  25. - name: iPXE Workaround for arm
  26. shell: sed -i '/WORKAROUND_CFLAGS/d' arch/arm64/Makefile
  27. args:
  28. chdir: "{{ ipxe_source_dir }}/src"
  29. tags:
  30. - skip_ansible_lint
  31. - name: Compile iPXE bootloader for EFI arm64
  32. shell: |
  33. make clean
  34. make CROSS_COMPILE=aarch64-linux-gnu- \
  35. ARCH=arm64 \
  36. EMBED={{ bootloader_filename }} \
  37. TRUST={{ trust_files }} \
  38. bin-arm64-efi/snp.efi
  39. args:
  40. chdir: "{{ ipxe_source_dir }}/src"
  41. tags:
  42. - skip_ansible_lint
  43. when: ipxe_debug_enabled | bool == false
  44. - name: Compile iPXE bootloader for EFI arm64 with debug flags
  45. shell: |
  46. make clean
  47. make CROSS_COMPILE=aarch64-linux-gnu- \
  48. ARCH=arm64 \
  49. DEBUG={{ ipxe_debug_options }} \
  50. EMBED={{ bootloader_filename }} \
  51. TRUST={{ trust_files }} \
  52. bin-arm64-efi/snp.efi
  53. args:
  54. chdir: "{{ ipxe_source_dir }}/src"
  55. tags:
  56. - skip_ansible_lint
  57. when: ipxe_debug_enabled | bool
  58. - name: Copy iPXE arm64 EFI builds to http directory
  59. copy:
  60. src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
  61. dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
  62. remote_src: True
  63. with_items:
  64. - { src: "bin-arm64-efi/snp.efi", dest: "{{ bootloader_filename }}-arm64.efi" }