mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-20 10:20:39 +00:00
scripts: enable libpmem only for x86_64
Not all architectures have support for libpmem. Enable libpmem only for x86_64 fixes #965 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
6671386dd0
commit
83a69de4a2
@ -387,16 +387,16 @@ generate_qemu_options() {
|
|||||||
# for that architecture
|
# for that architecture
|
||||||
if [ "$arch" == x86_64 ]; then
|
if [ "$arch" == x86_64 ]; then
|
||||||
qemu_options+=(speed:--enable-avx2)
|
qemu_options+=(speed:--enable-avx2)
|
||||||
|
# According to QEMU's nvdimm documentation: When 'pmem' is 'on' and QEMU is
|
||||||
|
# built with libpmem support, QEMU will take necessary operations to guarantee
|
||||||
|
# the persistence of its own writes to the vNVDIMM backend.
|
||||||
|
qemu_options+=(functionality:--enable-libpmem)
|
||||||
else
|
else
|
||||||
qemu_options+=(speed:--disable-avx2)
|
qemu_options+=(speed:--disable-avx2)
|
||||||
|
qemu_options+=(functionality:--disable-libpmem)
|
||||||
fi
|
fi
|
||||||
# Enable libc malloc_trim() for memory optimization.
|
# Enable libc malloc_trim() for memory optimization.
|
||||||
qemu_options+=(speed:--enable-malloc-trim)
|
qemu_options+=(speed:--enable-malloc-trim)
|
||||||
|
|
||||||
# According to QEMU's nvdimm documentation: When 'pmem' is 'on' and QEMU is
|
|
||||||
# built with libpmem support, QEMU will take necessary operations to guarantee
|
|
||||||
# the persistence of its own writes to the vNVDIMM backend.
|
|
||||||
qemu_options+=(functionality:--enable-libpmem)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
|
@ -338,7 +338,6 @@ parts:
|
|||||||
- curl
|
- curl
|
||||||
- libcapstone-dev
|
- libcapstone-dev
|
||||||
- bc
|
- bc
|
||||||
- libpmem-dev
|
|
||||||
override-build: |
|
override-build: |
|
||||||
kata_version=$(cat ${SNAPCRAFT_STAGE}/kata_version)
|
kata_version=$(cat ${SNAPCRAFT_STAGE}/kata_version)
|
||||||
yq=$(realpath ../../yq/build/yq)
|
yq=$(realpath ../../yq/build/yq)
|
||||||
@ -382,6 +381,9 @@ parts:
|
|||||||
--input "$patch"
|
--input "$patch"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Only x86_64 supports libpmem
|
||||||
|
[ "$(uname -m)" = "x86_64" ] && sudo apt-get install -y libpmem-dev
|
||||||
|
|
||||||
chmod +x ${SNAPCRAFT_STAGE}/scripts/configure-hypervisor.sh
|
chmod +x ${SNAPCRAFT_STAGE}/scripts/configure-hypervisor.sh
|
||||||
# static build
|
# static build
|
||||||
echo "$(${SNAPCRAFT_STAGE}/scripts/configure-hypervisor.sh -s qemu) \
|
echo "$(${SNAPCRAFT_STAGE}/scripts/configure-hypervisor.sh -s qemu) \
|
||||||
|
Loading…
Reference in New Issue
Block a user