diff --git a/kernel/build-kernel.sh b/kernel/build-kernel.sh index ae56215909..42df75eda4 100755 --- a/kernel/build-kernel.sh +++ b/kernel/build-kernel.sh @@ -203,7 +203,7 @@ build_kernel() { arch_target=$(arch_to_kernel "${arch_target}") pushd "${kernel_path}" >>/dev/null make -j $(nproc) ARCH="${arch_target}" - [ -e "arch/${arch_target}/boot/bzImage" ] || [ -e "arch/${arch_target}/boot/Image.gz" ] + [ "$arch_target" != "powerpc" ] && ([ -e "arch/${arch_target}/boot/bzImage" ] || [ -e "arch/${arch_target}/boot/Image.gz" ]) [ -e "vmlinux" ] popd >>/dev/null } @@ -223,11 +223,16 @@ install_kata() { bzImage="arch/${arch_target}/boot/bzImage" elif [ -e "arch/${arch_target}/boot/Image.gz" ]; then bzImage="arch/${arch_target}/boot/Image.gz" - else - die "failed to find bzImage" + elif [ "${arch_target}" != "powerpc" ]; then + die "failed to find image" + fi + + if [ "${arch_target}" = "powerpc" ]; then + install --mode 0644 -D "vmlinux" "${install_path}/${vmlinuz}" + else + install --mode 0644 -D "${bzImage}" "${install_path}/${vmlinuz}" fi - install --mode 0644 -D "${bzImage}" "${install_path}/${vmlinuz}" install --mode 0644 -D "vmlinux" "${install_path}/${vmlinux}" install --mode 0644 -D ./.config "${install_path}/config-${kernel_version}" ln -sf "${vmlinuz}" "${install_path}/vmlinuz.container" diff --git a/kernel/build-kernel_test.sh b/kernel/build-kernel_test.sh index 41903afdf5..1ff0bae65c 100755 --- a/kernel/build-kernel_test.sh +++ b/kernel/build-kernel_test.sh @@ -58,7 +58,7 @@ build_kernel() { echo "Build default kernel" out=$(${build_kernel_sh} build 2>&1) - [ -e "${kernel_dir}/arch/$(uname -m)/boot/bzImage" ] || FAIL "bzImage not found" + [ $("${kata_arch_sh}" -d) != "ppc64le" ] && ([ -e "${kernel_dir}/arch/$(uname -m)/boot/bzImage" ] || FAIL "bzImage not found") [ -e "${kernel_dir}/vmlinux" ] || FAIL "vmlinux not found" OK diff --git a/kernel/configs/ppc64le_kata_kvm_4.14.x b/kernel/configs/ppc64le_kata_kvm_4.14.x index 44d7c41b31..914bad53ad 100644 --- a/kernel/configs/ppc64le_kata_kvm_4.14.x +++ b/kernel/configs/ppc64le_kata_kvm_4.14.x @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/powerpc 4.14.48 Kernel Configuration +# Linux/powerpc 4.14.49 Kernel Configuration # CONFIG_PPC64=y @@ -2779,7 +2779,7 @@ CONFIG_FRAME_WARN=2048 # CONFIG_PAGE_OWNER is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_SECTION_MISMATCH=y CONFIG_SECTION_MISMATCH_WARN_ONLY=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y diff --git a/kernel/kata_config_version b/kernel/kata_config_version index b8626c4cff..7ed6ff82de 100644 --- a/kernel/kata_config_version +++ b/kernel/kata_config_version @@ -1 +1 @@ -4 +5 diff --git a/scripts/configure-hypervisor.sh b/scripts/configure-hypervisor.sh index 22f78d6738..1eb8da0653 100755 --- a/scripts/configure-hypervisor.sh +++ b/scripts/configure-hypervisor.sh @@ -254,7 +254,7 @@ generate_qemu_options() case "$arch" in aarch64) ;; x86_64) qemu_options+=(size:--disable-tcg);; - ppc64le) qemu_options+=(size:--disable-tcg);; + ppc64le) ;; esac # SECURITY: Don't build a static binary (lowers security) @@ -267,13 +267,12 @@ generate_qemu_options() qemu_options+=(misc:--static) fi - # Not required as "-uuid ..." is always passed to the qemu binary - qemu_options+=(size:--disable-uuid) - - # Disable debug + # Disable debug and "-uuid ..." is always passed to the qemu binary so not required. case "$arch" in - aarch64) ;; + aarch64) qemu_options+=(size:--disable-uuid) + ;; x86_64) + qemu_options+=(size:--disable-uuid) qemu_options+=(size:--disable-debug-tcg) qemu_options+=(size:--disable-tcg-interpreter) ;; @@ -338,7 +337,11 @@ generate_qemu_options() # Other options # 64-bit only - qemu_options+=(arch:"--target-list=${arch}-softmmu") + if [ "${arch}" = "ppc64le" ]; then + qemu_options+=(arch:"--target-list=ppc64-softmmu") + else + qemu_options+=(arch:"--target-list=${arch}-softmmu") + fi _qemu_cflags=""