mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Add test for booting from vmlinux
Download and build a Linux kernel and use the vmlinux produced as the kernel used with a direct boot kernel test. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -24,6 +24,27 @@ if [ ! -f "$OS_IMAGE" ]; then
|
||||
popd
|
||||
fi
|
||||
|
||||
|
||||
VMLINUX_IMAGE="$WORKLOADS_DIR/vmlinux"
|
||||
BZIMAGE_IMAGE="$WORKLOADS_DIR/bzImage"
|
||||
|
||||
if [ ! -f "$VMLINUX_IMAGE" ]; then
|
||||
SRCDIR=$PWD
|
||||
pushd $WORKLOADS_DIR
|
||||
wget --quiet https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.21.tar.xz
|
||||
tar xf linux-5.0.21.tar.xz
|
||||
pushd linux-5.0.21
|
||||
cp $SRCDIR/resources/linux-5.0-config .config
|
||||
make bzImage -j `nproc`
|
||||
cp vmlinux $VMLINUX_IMAGE
|
||||
cp arch/x86/boot/bzImage $BZIMAGE_IMAGE
|
||||
popd
|
||||
rm linux-5.0.21.tar.xz
|
||||
rm -r linux-5.0.21
|
||||
popd
|
||||
fi
|
||||
|
||||
|
||||
rm /tmp/cloudinit.img
|
||||
mkdosfs -n config-2 -C /tmp/cloudinit.img 8192
|
||||
mcopy -oi /tmp/cloudinit.img -s test_data/cloud-init/openstack ::
|
||||
|
||||
Reference in New Issue
Block a user