generate_disks_arm.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. - crypto.h
  9. - name: Copy netboot.xyz general.h.efi iPXE config
  10. copy:
  11. src: "ipxe/local/general.h.efi"
  12. dest: "{{ ipxe_source_dir }}/src/config/local/general.h"
  13. - name: Set trust file to ipxe ca
  14. set_fact:
  15. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }}"
  16. when: not generate_signatures
  17. - name: Combine trust files if set
  18. set_fact:
  19. trust_files: "{{ cert_dir }}/{{ ipxe_ca_filename }},{{ cert_dir }}/{{ cert_file_filename }}"
  20. when: generate_signatures | bool
  21. # iPXE workaround
  22. # http://lists.ipxe.org/pipermail/ipxe-devel/2018-August/006254.html
  23. # apply patch to fix arm64 builds on amd64 builds
  24. - name: iPXE Workaround for arm
  25. shell: sed -i '/WORKAROUND_CFLAGS/d' arch/arm64/Makefile
  26. args:
  27. chdir: "{{ ipxe_source_dir }}/src"
  28. tags:
  29. - skip_ansible_lint
  30. - name: Compile iPXE bootloader for EFI arm64
  31. shell: |
  32. make clean
  33. make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 \
  34. EMBED={{ bootloader_filename }} \
  35. TRUST={{ trust_files }} \
  36. bin-arm64-efi/snp.efi
  37. args:
  38. chdir: "{{ ipxe_source_dir }}/src"
  39. tags:
  40. - skip_ansible_lint
  41. - name: Copy iPXE arm64 EFI builds to http directory
  42. copy:
  43. src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
  44. dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}"
  45. remote_src: True
  46. with_items:
  47. - { src: "bin-arm64-efi/snp.efi", dest: "{{ bootloader_filename }}-arm64.efi" }