diff --git a/share/templates.d/99-generic/arm.tmpl b/share/templates.d/99-generic/arm.tmpl index 31c2acb8..afbc83b2 100644 --- a/share/templates.d/99-generic/arm.tmpl +++ b/share/templates.d/99-generic/arm.tmpl @@ -43,7 +43,7 @@ treeinfo ${basearch} platforms ${platforms} <% images=["product", "updates"] %> %for img in images: %if exists("%s/%s/" % (LORAXDIR, img)): - installimg ${LORAXDIR}/${img}/ images/${img}.img + installimg --xz -9 --memlimit-compress=3700MiB ${LORAXDIR}/${img}/ images/${img}.img %endif %endfor diff --git a/share/templates.d/99-generic/live/arm.tmpl b/share/templates.d/99-generic/live/arm.tmpl index 2a0b126b..7e9ed946 100644 --- a/share/templates.d/99-generic/live/arm.tmpl +++ b/share/templates.d/99-generic/live/arm.tmpl @@ -36,7 +36,7 @@ mkdir ${KERNELDIR} <% images=["product", "updates"] %> %for img in images: %if exists("%s/%s/" % (LORAXDIR, img)): - installimg ${LORAXDIR}/${img}/ images/${img}.img + installimg --xz -9 --memlimit-compress=3700MiB ${LORAXDIR}/${img}/ images/${img}.img %endif %endfor diff --git a/share/templates.d/99-generic/live/x86.tmpl b/share/templates.d/99-generic/live/x86.tmpl index 364b3c10..9d1bdc5d 100644 --- a/share/templates.d/99-generic/live/x86.tmpl +++ b/share/templates.d/99-generic/live/x86.tmpl @@ -85,10 +85,14 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR} %endif # Create optional product.img and updates.img -<% imggraft=""; images=["product", "updates"] %> +<% imggraft=""; images=["product", "updates"]; compressargs=None; %> +%if basearch == 'i386': + # Limit the amount of memory xz uses on i386 + <% compressargs="--xz -9 --memlimit-compress=3700MiB" %> +%endif %for img in images: %if exists("%s/%s/" % (LORAXDIR, img)): - installimg ${LORAXDIR}/${img}/ images/${img}.img + installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img <% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %> %endif %endfor diff --git a/share/templates.d/99-generic/x86.tmpl b/share/templates.d/99-generic/x86.tmpl index bf25d5d6..a49b5dc2 100644 --- a/share/templates.d/99-generic/x86.tmpl +++ b/share/templates.d/99-generic/x86.tmpl @@ -87,10 +87,14 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR} %endif # Create optional product.img and updates.img -<% imggraft=""; images=["product", "updates"] %> +<% imggraft=""; images=["product", "updates"]; compressargs=None; %> +%if basearch == 'i386': + # Limit the amount of memory xz uses on i386 + <% compressargs="--xz -9 --memlimit-compress=3700MiB" %> +%endif %for img in images: %if exists("%s/%s/" % (LORAXDIR, img)): - installimg ${LORAXDIR}/${img}/ images/${img}.img + installimg ${compressargs} ${LORAXDIR}/${img}/ images/${img}.img <% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %> %endif %endfor