mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
upcall: add upcall into kernel build script
In order to let upcall being used by Kata Container, we need to add those patches into kernel build script. Currently, only when experimental (-e) and hypervisor type dragonball (-t dragonball) are both enabled, that the upcall patches will be applied to build a 5.10 guest kernel. example commands: sh ./build-kernel.sh -e -t dragonball -d setup fixes: #5642 Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
This commit is contained in:
parent
f5c34ed088
commit
a81ced0e3f
@ -538,6 +538,16 @@ main() {
|
||||
|
||||
[ -z "${subcmd}" ] && usage 1
|
||||
|
||||
if [[ ${build_type} == "experimental" ]] && [[ ${hypervisor_target} == "dragonball" ]]; then
|
||||
build_type="dragonball-experimental"
|
||||
if [ -n "$kernel_version" ]; then
|
||||
kernel_major_version=$(get_major_kernel_version "${kernel_version}")
|
||||
if [[ ${kernel_major_version} != "5.10" ]]; then
|
||||
info "dragonball-experimental kernel patches are only tested on 5.10.x kernel now, other kernel version may cause confliction"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# If not kernel version take it from versions.yaml
|
||||
if [ -z "$kernel_version" ]; then
|
||||
if [[ ${build_type} == "experimental" ]]; then
|
||||
@ -553,6 +563,8 @@ main() {
|
||||
kernel_version=$(get_from_kata_deps "assets.kernel-experimental.tag")
|
||||
;;
|
||||
esac
|
||||
elif [[ ${build_type} == "dragonball-experimental" ]]; then
|
||||
kernel_version=$(get_from_kata_deps "assets.dragonball-kernel-experimental.version")
|
||||
elif [[ "${conf_guest}" != "" ]]; then
|
||||
#If specifying a tag for kernel_version, must be formatted version-like to avoid unintended parsing issues
|
||||
kernel_version=$(get_from_kata_deps "assets.kernel.${conf_guest}.version" 2>/dev/null || true)
|
||||
|
@ -0,0 +1,6 @@
|
||||
# Add support for upcall and device manager service
|
||||
CONFIG_DRAGONBALL_DRIVERS=y
|
||||
CONFIG_DRAGONBALL_UPCALL_SRV=y
|
||||
CONFIG_DRAGONBALL_DEVICE_MANAGER=y
|
||||
CONFIG_DRAGONBALL_HOTPLUG_VIRTIO_MMIO=y
|
||||
CONFIG_DRAGONBALL_HOTPLUG_CPU=y
|
@ -182,6 +182,11 @@ assets:
|
||||
url: "https://cdn.kernel.org/pub/linux/kernel/v5.x/"
|
||||
version: "v5.15.7"
|
||||
|
||||
dragonball-kernel-experimental:
|
||||
description: "Linux kernel with Dragonball VMM optimizations like upcall"
|
||||
url: "https://cdn.kernel.org/pub/linux/kernel/v5.x/"
|
||||
version: "v5.10.25"
|
||||
|
||||
externals:
|
||||
description: "Third-party projects used by the system"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user