templates: On 32 bit systems limit the amount of memory xz uses

This uses --memlimit-compress=3700MiB on i386 and arm when building the
product and updates images.

(cherry picked from commit 99e575e61b)
This commit is contained in:
Brian C. Lane 2016-03-24 09:33:37 -07:00
parent 0400b8c393
commit ce895bbeb1
4 changed files with 14 additions and 6 deletions

View File

@ -43,7 +43,7 @@ treeinfo ${basearch} platforms ${platforms}
<% images=["product", "updates"] %> <% images=["product", "updates"] %>
%for img in images: %for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)): %if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img installimg --xz -9 --memlimit-compress=3700MiB ${LORAXDIR}/${img}/ images/${img}.img
%endif %endif
%endfor %endfor

View File

@ -36,7 +36,7 @@ mkdir ${KERNELDIR}
<% images=["product", "updates"] %> <% images=["product", "updates"] %>
%for img in images: %for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)): %if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img installimg --xz -9 --memlimit-compress=3700MiB ${LORAXDIR}/${img}/ images/${img}.img
%endif %endif
%endfor %endfor

View File

@ -85,10 +85,14 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endif %endif
# Create optional product.img and updates.img # 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: %for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)): %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) %> <% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif %endif
%endfor %endfor

View File

@ -87,10 +87,14 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%endif %endif
# Create optional product.img and updates.img # 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: %for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)): %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) %> <% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif %endif
%endfor %endfor