2 include $(TOP)/config/make.cfg
4 #MM- arch-common-grub2-host : grub2-host-quick grub2-efi-host-quick
5 #MM grub2-iso-setup : grub2-host-quick grub2-efi-host-quick grub2-aros-quick
6 #MM- bootloader-grub2 : arch-common-grub2
7 #MM- bootloader-grub2-isosetup : arch-common-grub2 grub2-iso-setup
9 BOOT_GRUB := $(AROSDIR)/boot/grub
10 BOOT_EFI := $(AROSDIR)/EFI/BOOT/grub
22 bootloader-grub2gfx-common: $(BOOT_GRUB)/splash.png $(BOOT_GRUB)/_unicode.pf2 $(BOOT_EFI)/splash.png $(BOOT_EFI)/_unicode.pf2
24 $(BOOT_GRUB)/splash.png: splash.png $(BOOT_GRUB)
27 $(BOOT_GRUB)/_unicode.pf2: unicode.pf2 $(BOOT_GRUB)
28 $(CP) $< $(BOOT_GRUB)/_unicode.pf2
30 $(BOOT_EFI)/splash.png: splash.png $(BOOT_EFI)
33 $(BOOT_EFI)/_unicode.pf2: unicode.pf2 $(BOOT_EFI)
34 $(CP) $< $(BOOT_EFI)/_unicode.pf2
37 bootloader-grub2gfx-common-livecd: $(BOOT_GRUB)/unicode.pf2 $(BOOT_EFI)/unicode.pf2
39 $(BOOT_GRUB)/unicode.pf2: unicode.pf2 $(BOOT_GRUB)
42 $(BOOT_EFI)/unicode.pf2: unicode.pf2 $(BOOT_EFI)
45 # avoid the make.tmpl s_flag in order to disable stripping of binaries
47 # remove all flags, just in case
49 export KERNEL_CFLAGS :=
50 export CONFIG_LDFLAGS :=
52 DESTDIR := $(HOSTGENDIR)/$(CURDIR)/host_binaries
53 CONFIG_OPTS := --build=$(AROS_HOST_CPU)-$(AROS_HOST_ARCH) \
54 --host=$(AROS_HOST_CPU)-$(AROS_HOST_ARCH) \
55 --target=$(AROS_TARGET_CPU) \
56 --datarootdir=$(DESTDIR)/share \
57 --sysconfdir=$(DESTDIR)/etc \
58 --disable-grub-mkfont \
62 %build_with_configure mmake=grub2-host compiler=host nix=yes \
63 prefix="$(DESTDIR)" srcdir=$(SRCDIR)/$(CURDIR)/../grub2-aros \
64 package=pc extraoptions="$(CONFIG_OPTS) --with-platform=pc" \
67 %build_with_configure mmake=grub2-efi-host compiler=host nix=yes \
68 prefix="$(DESTDIR)" srcdir=$(SRCDIR)/$(CURDIR)/../grub2-aros \
69 package=efi extraoptions="$(CONFIG_OPTS) --with-platform=efi" \
74 GRUB2_MODS := fshelp part_msdos part_amiga part_gpt \
75 fat ntfs ntfscomp affs sfs ext2 hfsplus iso9660 \
77 LST_FILES := command fs moddep
78 MKIMG_OPTS := -O i386-pc -p /boot/grub
79 MKIMG_EFI := -O $(AROS_TARGET_CPU)-efi -p /EFI/BOOT/grub
82 EFI_GRUB_IMG := BOOTX64.EFI
84 EFI_GRUB_IMG := BOOTIA32.EFI
88 grub2-iso-setup: grub2-pc-iso-setup grub2-efi-iso-setup
91 grub2-pc-iso-setup: $(BOOT_GRUB)/i386-pc
92 @$(ECHO) Creating $(BOOT_GRUB)...
93 @cd $(HOSTGENDIR)/$(CURDIR)/pc/grub-core && \
94 ../grub-mkimage $(MKIMG_OPTS) -d . -o core.img $(PC_MODS) $(GRUB2_MODS) && \
95 $(CP) *.img $(BOOT_GRUB)/i386-pc && \
96 $(CP) *.mod $(BOOT_GRUB)/i386-pc && \
97 $(CP) $(addsuffix .lst,$(LST_FILES)) $(BOOT_GRUB)/i386-pc && \
98 $(CAT) cdboot.img core.img > $(BOOT_GRUB)/i386-pc/grub2_eltorito
101 grub2-efi-iso-setup: $(BOOT_EFI)
102 @$(ECHO) Creating $(BOOT_EFI)...
103 @cd $(HOSTGENDIR)/$(CURDIR)/efi/grub-core && \
104 ../grub-mkimage $(MKIMG_EFI) -d . -o grub.efi $(EFI_MODS) $(GRUB2_MODS) && \
105 $(CP) grub.efi $(AROSDIR)/EFI/BOOT/$(EFI_GRUB_IMG) && \
106 $(CP) *.mod $(BOOT_EFI) && \
107 $(CP) $(addsuffix .lst,$(LST_FILES)) $(BOOT_EFI)