Commit 95d92c1f authored by Samuel Thibault's avatar Samuel Thibault

Add hurd-i386 EFI support

parent 16311bc2
set cd=$root
set default=3
set timeout=-1
insmod multiboot
insmod cpuid
insmod echo
insmod gzio
insmod minicmd
insmod normal
insmod chain
if loadfont $prefix/font.pf2 ; then
set gfxmode=640x480
set gfxpayload=keep
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod gfxterm
terminal_output gfxterm
fi
insmod png
if background_image /boot/grub/splash.png ; then
set color_normal=white/black
set color_highlight=black/white
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
insmod play
play 960 440 1 0 4 440 1
menuentry "Debian GNU/Hurd installer boot menu" {
true
}
menuentry "" {
true
}
function boot_one {
echo "Loading ..."
set root=$cd
multiboot /boot/kernel/gnumach.gz $options
module --nounzip /boot/${gtk}initrd.gz initrd '$(ramdisk-create)'
module /boot/kernel/ext2fs.static ext2fs \
--multiboot-command-line='${kernel-command-line}' \
--host-priv-port='${host-port}' \
--device-master-port='${device-port}' \
--exec-server-task='${exec-task}' -T typed gunzip:device:rd0 \
'$(task-create)' '$(task-resume)'
module /boot/kernel/exec.static exec '$(exec-task=task-create)'
}
menuentry "Text install" {
set options="TERM=mach-gnu-color"
boot_one
}
menuentry "Pseudo-graphical install" {
set options="GTK_NOVESA=1 VGA_OPTIONS=--font-width=9"
boot_one
}
menuentry "Pseudo-graphical install with CJK support" {
set options="GTK_NOVESA=1 VGA_OPTIONS=--font-width=8"
boot_one
}
menuentry "Graphical install" {
set options=""
if test -e /boot/gtk ; then
set gtk="gtk/"
else
set gtk=""
fi
boot_one
}
menuentry "Automated install" {
set options="auto=true priority=critical TERM=mach-gnu-color"
boot_one
}
menuentry "Expert install" {
set options="priority=low TERM=mach-gnu-color"
boot_one
}
menuentry "Rescue mode" {
set options="rescue/enable=true"
boot_one
}
menuentry "" {
true
}
menuentry "Boot from first hard disk" {
set root=hd0
chainloader +1
}
......@@ -14,4 +14,13 @@ KEYRING = /usr/share/keyrings/debian-ports-archive-keyring.gpg
USE_UNRELEASED = 1
GRUB_PLATFORM=i386-pc
# Configuration for generating EFI images
GRUB_EFI=y
GRUB_EFI_PLATFORM=i386-efi
GRUB_EFI_NAME=ia32
# We don't have support for UEFI Secure Boot on this arch
EFI_SIGNED=n
include config/hurd.cfg
......@@ -31,7 +31,6 @@ GRUB_CFG_CDROM=boot/hurd/grub-hurd-cdrom.cfg
GRUB_CFG_PXE=boot/hurd/grub-hurd-pxe.cfg
# GRUB modules
GRUB_PLATFORM=i386-pc
GRUB_MODDIR=/usr/lib/grub/$(GRUB_PLATFORM)
GRUB_MODULES_PXE=pxe tftp multiboot cpuid echo play gfxterm gfxterm_background gzio minicmd normal png vbe
......@@ -47,6 +46,13 @@ ifneq ($(shell id -u),0)
ROOTCMD = fakeroot-tcp
endif
# Extract GRUB EFI files.
.PHONY: x86_grub_efi
x86_grub_efi:
ifeq ($(GRUB_EFI),y)
efi-image $(TEMP_GRUB_EFI) $(GRUB_EFI_PLATFORM) $(GRUB_EFI_NAME) $(NETBOOT_PATH) $(EFI_SIGNED)
endif
# Unsupported targets
arch_tree:
arch_boot:
......@@ -55,8 +61,9 @@ arch_boot_screens:
# genisoimage CD info directory, including grub and configuration files
# Note that the configuration is extensively manipulated by debian-cd to
# support all the available CD/DVD variants.
# Supply GRUB EFI configuration.
.PHONY: arch_cd_info_dir
arch_cd_info_dir:
arch_cd_info_dir: x86_grub_efi
x86-image $(TEMP_CD_INFO_DIR) $(GRUB_PLATFORM)
sed -e "s/@[email protected]/$(ARCH)/g" $(GRUB_CFG_CDROM) \
......@@ -71,6 +78,17 @@ arch_cd_info_dir:
cp $(SPLASH_PNG) $(TEMP_CD_INFO_DIR)/boot/grub/splash.png; \
fi
if [ "$(GRUB_EFI)" = y ]; then \
set -e; \
mkdir -p $(TEMP_CD_INFO_DIR)/grub/$(GRUB_EFI_PLATFORM); \
cp -a $(TEMP_GRUB_EFI)/efi.img $(TEMP_CD_INFO_DIR)/grub/; \
cp boot/hurd/grub-hurd-efi.cfg \
$(TEMP_CD_INFO_DIR)/grub/grub.cfg; \
cp -a $(GRUB_FONT) $(TEMP_CD_INFO_DIR)/grub/font.pf2; \
cp -a $(TEMP_GRUB_EFI)/boot/grub/$(GRUB_EFI_PLATFORM)/* \
$(TEMP_CD_INFO_DIR)/grub/$(GRUB_EFI_PLATFORM)/; \
fi
# Miniature CD image using GRUB, with only an initrd, no udebs or debs.
.PHONY: arch_miniiso
arch_miniiso: $(TEMP_INITRD) $(TEMP_KERNEL) $(TREE)
......
......@@ -9,6 +9,7 @@ debian-installer (20190703) UNRELEASED; urgency=medium
* build/util/grub-gencfg: Set gfxpayload=keep in submenus too, to fix
unreadable fonts on hidpi displays in netboot images booted with EFI.
(See: #935546)
* Add hurd-i386 EFI support.
[ Karsten Merker ]
* riscv64: Include nic-modules and scsi-modules for virtio targets
......
......@@ -53,7 +53,7 @@ Build-Depends:
genromfs [sparc sparc64],
# Used for creating sparc floppies (which are not built by
# default.)
dosfstools [i386 ia64 m68k amd64 armhf arm64],
dosfstools [hurd-i386 i386 ia64 m68k amd64 armhf arm64],
# For creating FAT filesystems with mkfs.msdos.
# Of course i386/amd64 use this for floppies, CDs etc.
# m68k uses it for atari floppies
......@@ -104,7 +104,7 @@ Build-Depends:
grub-efi-arm64-signed [arm64],
# Signed bootloader components for UEFI Secure Boot
grub-efi-arm64-bin [arm64],
grub-efi-ia32-bin [i386],
grub-efi-ia32-bin [hurd-i386 i386],
grub-efi-ia64-bin [ia64],
grub-efi-arm-bin [armhf],
grub-common [amd64 arm64 i386], xorriso,
......
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