Skip to content
Snippets Groups Projects
Commit 39aa2586 authored by Christopher Spinrath's avatar Christopher Spinrath
Browse files

grub: move early config to a (built-in) memdisk

This allows us to execute the early config in normal mode and thus,
we can use things like "if" etc.
parent 857d38d3
No related branches found
No related tags found
No related merge requests found
......@@ -435,11 +435,21 @@ $(IMAGE_PART_FILE):
@echo
@echo "Image partition skeleton is ready: $@"
image_grub_memdisk: $(GRUB_ASSEMBLE_DIR)/memdisk.tar
$(GRUB_ASSEMBLE_DIR)/memdisk.tar:
mkdir -p "$(GRUB_ASSEMBLE_DIR)"
tar cvf "$@" -C "$(CURDIR)/contrib/image/" "grub_early.cfg"
image_grub_mkimage_efi: $(GRUB_ASSEMBLE_DIR)/grub.x86_64-efi
$(GRUB_ASSEMBLE_DIR)/grub.x86_64-efi $(GRUB_ASSEMBLE_DIR)/grub.i386-efi : $(GRUB_ASSEMBLE_DIR)/grub.%-efi : | $(WORKSPACE)
$(GRUB_ASSEMBLE_DIR)/grub.x86_64-efi $(GRUB_ASSEMBLE_DIR)/grub.i386-efi : $(GRUB_ASSEMBLE_DIR)/grub.%-efi : $(GRUB_ASSEMBLE_DIR)/memdisk.tar | $(WORKSPACE)
mkdir -p "$(GRUB_ASSEMBLE_DIR)"
grub-mkimage --config "$(CURDIR)/contrib/image/grub_early.cfg" \
echo "normal (memdisk)/grub_early.cfg" \
> "$(GRUB_ASSEMBLE_DIR)/grub_pre_normal.cfg"
grub-mkimage \
--memdisk "$(GRUB_ASSEMBLE_DIR)/memdisk.tar" \
--output "$@" --format "$*-efi" \
--config "$(GRUB_ASSEMBLE_DIR)/grub_pre_normal.cfg" \
--prefix "/grub" \
$(IMAGE_GRUB_EFI_MODULES)
image_grub_mkimage_mbr: $(GRUB_ASSEMBLE_DIR)/grub.i386-pc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment