Commit 297e17a3 authored by William Johansson's avatar William Johansson Committed by Natanael Copa

scripts/mkimg: boot Xen via multiboot with Grub

If Xen is present and Grub is used, like on UEFI systems, use multiboot2
to load Xen and the dom0 linux kernel.

Enable grub modules:
 * part_gpt: to read files from GPT partitions
 * multiboot2: to load multiboot2 kernels, like Xen
 * gzio: to load Xen which is gzip compressed
parent 435bca71
......@@ -120,13 +120,24 @@ grub_gen_config() {
local _f _kf
echo "set timeout=2"
for _f in $kernel_flavors; do
cat <<- EOF
if [ -z "${xen_params+set}" ]; then
cat <<- EOF
menuentry "Linux $_f" {
linux /boot/vmlinuz-$_f $initfs_cmdline $kernel_cmdline
initrd /boot/initramfs-$_f
}
EOF
else
cat <<- EOF
menuentry "Linux $_f" {
linux /boot/vmlinuz-$_f $initfs_cmdline $kernel_cmdline
initrd /boot/initramfs-$_f
}
EOF
menuentry "Xen/Linux $_f" {
multiboot2 /boot/xen.gz ${xen_params}
module2 /boot/vmlinuz-$_f $initfs_cmdline $kernel_cmdline
module2 /boot/initramfs-$_f
}
EOF
fi
done
}
......@@ -270,7 +281,7 @@ profile_base() {
kernel_flavors="vanilla"
initfs_cmdline="modules=loop,squashfs,sd-mod,usb-storage quiet"
initfs_features="ata base bootchart cdrom squashfs ext2 ext3 ext4 mmc raid scsi usb virtio"
grub_mod="disk part_msdos linux normal configfile search search_label efi_uga efi_gop fat iso9660 cat echo ls test true help"
grub_mod="disk part_gpt part_msdos linux multiboot2 normal configfile search search_label efi_uga efi_gop fat iso9660 cat echo ls test true help gzio"
apks="alpine-base alpine-mirrors busybox kbd-bkeymaps chrony e2fsprogs network-extras libressl openssh tzdata"
apkovl=
hostname="alpine"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment