packaging: Add packaging support for ppc64le

Fixes:  #74

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
This commit is contained in:
Nitesh Konkar 2018-07-31 19:58:21 +05:30
parent 90fa9305e0
commit dae14ddefd
5 changed files with 23 additions and 15 deletions

View File

@ -203,7 +203,7 @@ build_kernel() {
arch_target=$(arch_to_kernel "${arch_target}") arch_target=$(arch_to_kernel "${arch_target}")
pushd "${kernel_path}" >>/dev/null pushd "${kernel_path}" >>/dev/null
make -j $(nproc) ARCH="${arch_target}" 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" ] [ -e "vmlinux" ]
popd >>/dev/null popd >>/dev/null
} }
@ -223,11 +223,16 @@ install_kata() {
bzImage="arch/${arch_target}/boot/bzImage" bzImage="arch/${arch_target}/boot/bzImage"
elif [ -e "arch/${arch_target}/boot/Image.gz" ]; then elif [ -e "arch/${arch_target}/boot/Image.gz" ]; then
bzImage="arch/${arch_target}/boot/Image.gz" bzImage="arch/${arch_target}/boot/Image.gz"
else elif [ "${arch_target}" != "powerpc" ]; then
die "failed to find bzImage" 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 fi
install --mode 0644 -D "${bzImage}" "${install_path}/${vmlinuz}"
install --mode 0644 -D "vmlinux" "${install_path}/${vmlinux}" install --mode 0644 -D "vmlinux" "${install_path}/${vmlinux}"
install --mode 0644 -D ./.config "${install_path}/config-${kernel_version}" install --mode 0644 -D ./.config "${install_path}/config-${kernel_version}"
ln -sf "${vmlinuz}" "${install_path}/vmlinuz.container" ln -sf "${vmlinuz}" "${install_path}/vmlinuz.container"

View File

@ -58,7 +58,7 @@ build_kernel() {
echo "Build default kernel" echo "Build default kernel"
out=$(${build_kernel_sh} build 2>&1) 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" [ -e "${kernel_dir}/vmlinux" ] || FAIL "vmlinux not found"
OK OK

View File

@ -1,6 +1,6 @@
# #
# Automatically generated file; DO NOT EDIT. # Automatically generated file; DO NOT EDIT.
# Linux/powerpc 4.14.48 Kernel Configuration # Linux/powerpc 4.14.49 Kernel Configuration
# #
CONFIG_PPC64=y CONFIG_PPC64=y
@ -2779,7 +2779,7 @@ CONFIG_FRAME_WARN=2048
# CONFIG_PAGE_OWNER is not set # CONFIG_PAGE_OWNER is not set
CONFIG_DEBUG_FS=y CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set # 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_SECTION_MISMATCH_WARN_ONLY=y
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ=y

View File

@ -1 +1 @@
4 5

View File

@ -254,7 +254,7 @@ generate_qemu_options()
case "$arch" in case "$arch" in
aarch64) ;; aarch64) ;;
x86_64) qemu_options+=(size:--disable-tcg);; x86_64) qemu_options+=(size:--disable-tcg);;
ppc64le) qemu_options+=(size:--disable-tcg);; ppc64le) ;;
esac esac
# SECURITY: Don't build a static binary (lowers security) # SECURITY: Don't build a static binary (lowers security)
@ -267,13 +267,12 @@ generate_qemu_options()
qemu_options+=(misc:--static) qemu_options+=(misc:--static)
fi fi
# Not required as "-uuid ..." is always passed to the qemu binary # Disable debug and "-uuid ..." is always passed to the qemu binary so not required.
qemu_options+=(size:--disable-uuid)
# Disable debug
case "$arch" in case "$arch" in
aarch64) ;; aarch64) qemu_options+=(size:--disable-uuid)
;;
x86_64) x86_64)
qemu_options+=(size:--disable-uuid)
qemu_options+=(size:--disable-debug-tcg) qemu_options+=(size:--disable-debug-tcg)
qemu_options+=(size:--disable-tcg-interpreter) qemu_options+=(size:--disable-tcg-interpreter)
;; ;;
@ -338,7 +337,11 @@ generate_qemu_options()
# Other options # Other options
# 64-bit only # 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="" _qemu_cflags=""