aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mkimg.base.sh
diff options
context:
space:
mode:
authorWilliam Johansson <radar@radhuset.org>2018-04-17 20:46:33 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2018-05-16 19:48:46 +0200
commit297e17a37e692dfea5a9d46c23d30da17fe90e71 (patch)
tree6c0d153e75c114433f655b34c2a12e3bf245b3db /scripts/mkimg.base.sh
parent435bca7121fbd08b32423c42781c538790786247 (diff)
downloadaports-297e17a37e692dfea5a9d46c23d30da17fe90e71.tar.gz
aports-297e17a37e692dfea5a9d46c23d30da17fe90e71.tar.bz2
aports-297e17a37e692dfea5a9d46c23d30da17fe90e71.tar.xz
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
Diffstat (limited to 'scripts/mkimg.base.sh')
-rwxr-xr-xscripts/mkimg.base.sh25
1 files changed, 18 insertions, 7 deletions
diff --git a/scripts/mkimg.base.sh b/scripts/mkimg.base.sh
index cb7fd7bc08..04897eaa19 100755
--- a/scripts/mkimg.base.sh
+++ b/scripts/mkimg.base.sh
@@ -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"