mirror of https://github.com/deadw00d/AROS.git
127 lines
4.4 KiB
Plaintext
127 lines
4.4 KiB
Plaintext
|
|
include $(SRCDIR)/config/aros.cfg
|
|
|
|
#MM- arch-common-grub2-host : grub2-host-quick grub2-efi-host-quick
|
|
#MM grub2-iso-setup : grub2-host-quick grub2-efi-host-quick grub2-aros-quick
|
|
#MM- bootloader-grub2 : arch-common-grub2
|
|
#MM- bootloader-grub2-isosetup : arch-common-grub2 grub2-iso-setup
|
|
#MM grub2-host : grub2-aros-fetch
|
|
#MM- grub2-host-quick : grub2-aros-fetch
|
|
#MM grub2-efi-host : grub2-aros-fetch
|
|
#MM- grub2-efi-host-quick : grub2-aros-fetch
|
|
|
|
BOOT_GRUB := $(AROSARCHDIR)/grub
|
|
BOOT_EFI := $(AROSDIR)/EFI/BOOT/grub
|
|
GRUBSRCDIR := $(PORTSDIR)/grub/grub-$(GRUB2_VERSION)
|
|
|
|
$(BOOT_GRUB):
|
|
%mkdirs_q $@
|
|
|
|
$(BOOT_GRUB)/fonts:
|
|
%mkdirs_q $@
|
|
|
|
$(BOOT_GRUB)/i386-pc:
|
|
%mkdirs_q $@
|
|
|
|
$(BOOT_EFI):
|
|
%mkdirs_q $@
|
|
|
|
$(BOOT_EFI)/fonts:
|
|
%mkdirs_q $@
|
|
|
|
$(BOOT_EFI)/$(AROS_TARGET_CPU)-efi:
|
|
%mkdirs_q $@
|
|
|
|
#MM
|
|
bootloader-grub2gfx-common: $(BOOT_GRUB)/splash.png $(BOOT_GRUB)/fonts/_unicode.pf2 $(BOOT_EFI)/splash.png $(BOOT_EFI)/fonts/_unicode.pf2
|
|
|
|
$(BOOT_GRUB)/splash.png: splash.png $(BOOT_GRUB)
|
|
$(CP) $< $(BOOT_GRUB)
|
|
|
|
$(BOOT_GRUB)/fonts/_unicode.pf2: unicode.pf2 $(BOOT_GRUB)/fonts
|
|
$(CP) $< $(BOOT_GRUB)/fonts/_unicode.pf2
|
|
|
|
$(BOOT_EFI)/splash.png: splash.png $(BOOT_EFI)
|
|
$(CP) $< $(BOOT_EFI)
|
|
|
|
$(BOOT_EFI)/fonts/_unicode.pf2: unicode.pf2 $(BOOT_EFI)/fonts
|
|
$(CP) $< $(BOOT_EFI)/fonts/_unicode.pf2
|
|
|
|
#MM
|
|
bootloader-grub2gfx-common-livecd: $(BOOT_GRUB)/fonts/unicode.pf2 $(BOOT_EFI)/fonts/unicode.pf2
|
|
|
|
$(BOOT_GRUB)/fonts/unicode.pf2: unicode.pf2 $(BOOT_GRUB)/fonts
|
|
$(CP) $< $(BOOT_GRUB)
|
|
|
|
$(BOOT_EFI)/fonts/unicode.pf2: unicode.pf2 $(BOOT_EFI)/fonts
|
|
$(CP) $< $(BOOT_EFI)
|
|
|
|
# avoid the make.tmpl s_flag in order to disable stripping of binaries
|
|
export DEBUG := yes
|
|
# remove all flags, just in case
|
|
export HOST_CFLAGS :=
|
|
export KERNEL_CFLAGS :=
|
|
export CONFIG_LDFLAGS :=
|
|
|
|
DESTDIR := $(HOSTGENDIR)/$(CURDIR)/host_binaries
|
|
CONFIG_OPTS := --build=$(AROS_HOST_CPU)-$(AROS_HOST_ARCH) \
|
|
--host=$(AROS_HOST_CPU)-$(AROS_HOST_ARCH) \
|
|
--target=$(AROS_TARGET_CPU) \
|
|
--datarootdir=$(DESTDIR)/share \
|
|
--sysconfdir=$(DESTDIR)/etc \
|
|
--disable-grub-mkfont \
|
|
--disable-werror \
|
|
--program-prefix=
|
|
|
|
grub2-host-touchfileflag := $(GENDIR)/arch/all-pc/boot/.grub2-files-touched
|
|
grub2-efi-host-touchfileflag := $(GENDIR)/arch/all-pc/boot/.grub2-files-touched
|
|
|
|
%build_with_configure mmake=grub2-host compiler=host nix=yes \
|
|
prefix="$(DESTDIR)" srcdir=$(GRUBSRCDIR) \
|
|
package=pc extraoptions="$(CONFIG_OPTS) --with-platform=pc" \
|
|
install_target= kernelisaflags= targetisaflags=
|
|
|
|
%build_with_configure mmake=grub2-efi-host compiler=host nix=yes \
|
|
prefix="$(DESTDIR)" srcdir=$(GRUBSRCDIR) \
|
|
package=efi extraoptions="$(CONFIG_OPTS) --with-platform=efi" \
|
|
install_target= kernelisaflags= targetisaflags=
|
|
|
|
PC_MODS := biosdisk
|
|
EFI_MODS :=
|
|
GRUB2_MODS := fshelp part_msdos part_amiga part_gpt \
|
|
fat ntfs ntfscomp affs sfs ext2 hfsplus iso9660 \
|
|
minicmd
|
|
LST_FILES := command fs moddep
|
|
MKIMG_OPTS := -O i386-pc -p /$(AROS_DIR_ARCH)/grub
|
|
MKIMG_EFI := -O $(AROS_TARGET_CPU)-efi -p /EFI/BOOT/grub
|
|
|
|
ifeq ($(CPU),x86_64)
|
|
EFI_GRUB_IMG := BOOTX64.EFI
|
|
else
|
|
EFI_GRUB_IMG := BOOTIA32.EFI
|
|
endif
|
|
|
|
#MM
|
|
grub2-iso-setup: grub2-pc-iso-setup grub2-efi-iso-setup
|
|
|
|
#MM
|
|
grub2-pc-iso-setup: $(BOOT_GRUB)/i386-pc
|
|
@$(ECHO) Creating $(BOOT_GRUB)...
|
|
@cd $(HOSTGENDIR)/$(CURDIR)/pc/grub-core && \
|
|
../grub-mkimage $(MKIMG_OPTS) -d . -o core.img $(PC_MODS) $(GRUB2_MODS) && \
|
|
$(CP) *.img $(BOOT_GRUB)/i386-pc && \
|
|
$(CP) *.mod $(BOOT_GRUB)/i386-pc && \
|
|
$(CP) $(addsuffix .lst,$(LST_FILES)) $(BOOT_GRUB)/i386-pc && \
|
|
$(CAT) cdboot.img core.img > $(BOOT_GRUB)/i386-pc/grub2_eltorito
|
|
|
|
#MM
|
|
grub2-efi-iso-setup: $(BOOT_EFI)/$(AROS_TARGET_CPU)-efi
|
|
@$(ECHO) Creating $(BOOT_EFI)...
|
|
@cd $(HOSTGENDIR)/$(CURDIR)/efi/grub-core && \
|
|
../grub-mkimage $(MKIMG_EFI) -d . -o grub.efi $(EFI_MODS) $(GRUB2_MODS) && \
|
|
$(CP) grub.efi $(AROSDIR)/EFI/BOOT/$(EFI_GRUB_IMG) && \
|
|
$(CP) *.mod $(BOOT_EFI)/$(AROS_TARGET_CPU)-efi && \
|
|
$(CP) $(addsuffix .lst,$(LST_FILES)) $(BOOT_EFI)/$(AROS_TARGET_CPU)-efi
|
|
|
|
%common
|