Parcourir la source

Support make -j switch.

* Introduce new variable "make_num_jobs" to user_overrides.yml (default
  value is 1).
* Use new variable in each task that uses "make".
Markus Reil il y a 1 an
Parent
commit
d30223014f

+ 4 - 2
roles/netbootxyz/tasks/generate_disks_arm.yml

@@ -35,7 +35,8 @@
 - name: Compile iPXE bootloaders for EFI arm64
   ansible.builtin.shell: |
     make clean
-    make CROSS_COMPILE=aarch64-linux-gnu- \
+    make -j{{ make_num_jobs }} \
+         CROSS_COMPILE=aarch64-linux-gnu- \
          ARCH=arm64 \
          EMBED={{ bootloader_filename }} \
          TRUST={{ trust_files }} \
@@ -49,7 +50,8 @@
 - name: Compile iPXE bootloader for EFI arm64 with debug flags
   ansible.builtin.shell: |
     make clean
-    make CROSS_COMPILE=aarch64-linux-gnu- \
+    make -j{{ make_num_jobs }} \
+         CROSS_COMPILE=aarch64-linux-gnu- \
          ARCH=arm64 \
          DEBUG={{ ipxe_debug_options }} \
          EMBED={{ bootloader_filename }} \

+ 4 - 2
roles/netbootxyz/tasks/generate_disks_efi.yml

@@ -27,7 +27,8 @@
 - name: Compile iPXE bootloader for EFI
   ansible.builtin.shell: |
     make clean
-    make EMBED={{ bootloader_filename }} \
+    make -j{{ make_num_jobs }} \
+         EMBED={{ bootloader_filename }} \
          TRUST={{ trust_files }} \
          bin-x86_64-efi/ipxe.efi \
          bin-x86_64-efi/snp.efi \
@@ -39,7 +40,8 @@
 - name: Compile iPXE bootloader for EFI with debug flags
   ansible.builtin.shell: |
     make clean
-    make EMBED={{ bootloader_filename }} \
+    make -j{{ make_num_jobs }} \
+         EMBED={{ bootloader_filename }} \
          DEBUG={{ ipxe_debug_options }} \
          TRUST={{ trust_files }} \
          bin-x86_64-efi/ipxe.efi \

+ 4 - 2
roles/netbootxyz/tasks/generate_disks_legacy.yml

@@ -23,7 +23,8 @@
 - name: Compile iPXE bootloader for Legacy BIOS
   ansible.builtin.shell: |
     make clean
-    make EMBED={{ bootloader_filename }} \
+    make -j{{ make_num_jobs }} \
+         EMBED={{ bootloader_filename }} \
          TRUST={{ trust_files }} \
          bin/ipxe.dsk \
          bin/ipxe.pdsk \
@@ -37,7 +38,8 @@
 - name: Compile iPXE bootloader for Legacy BIOS with debug flags
   ansible.builtin.shell: |
     make clean
-    make EMBED={{ bootloader_filename }} \
+    make -j{{ make_num_jobs }} \
+         EMBED={{ bootloader_filename }} \
          DEBUG={{ ipxe_debug_options }} \
          TRUST={{ trust_files }} \
          bin/ipxe.dsk \

+ 4 - 2
roles/netbootxyz/tasks/generate_disks_linux.yml

@@ -27,7 +27,8 @@
 - name: Compile iPXE Linux bootloader for Legacy BIOS
   ansible.builtin.shell: |
     make clean
-    make EMBED={{ bootloader_filename }} \
+    make -j{{ make_num_jobs }} \
+         EMBED={{ bootloader_filename }} \
          TRUST={{ trust_files }} \
          bin-x86_64-linux/slirp.linux
   args:
@@ -37,7 +38,8 @@
 - name: Compile iPXE Linux bootloader for Legacy BIOS with debug flags
   ansible.builtin.shell: |
     make clean
-    make EMBED={{ bootloader_filename }} \
+    make -j{{ make_num_jobs }} \
+         EMBED={{ bootloader_filename }} \
          DEBUG={{ ipxe_debug_options }} \
          TRUST={{ trust_files }} \
          bin-x86_64-linux/slirp.linux

+ 1 - 1
roles/netbootxyz/tasks/generate_disks_rpi.yml

@@ -50,7 +50,7 @@
 
 - name: Compile iPXE bootloader for RPI build
   ansible.builtin.shell: |
-    make
+    make -j{{ make_num_jobs }}
   args:
     chdir: "{{ pipxe_source_dir }}"
 

+ 1 - 0
user_overrides.yml

@@ -5,6 +5,7 @@ generate_menus: true
 generate_disks: true
 generate_checksums: true
 generate_local_vars: true
+make_num_jobs: 1
 
 # set desired site name
 # site_name: mysitename.com