Upgraded GRUB2 to 2.00 release.
[AROS.git] / arch / all-pc / boot / grub2-host / mmakefile.src
blobd6354235077654e54f36e18be525137e3524358d
1 # $Id$
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
12 $(BOOT_GRUB):
13         %mkdirs_q $@
15 $(BOOT_GRUB)/i386-pc:
16         %mkdirs_q $@
18 $(BOOT_EFI):
19         %mkdirs_q $@
21 #MM
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)
25                 $(CP) $< $(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)
31                 $(CP) $< $(BOOT_EFI)
33 $(BOOT_EFI)/_unicode.pf2: unicode.pf2 $(BOOT_EFI)
34                 $(CP) $< $(BOOT_EFI)/_unicode.pf2
36 #MM
37 bootloader-grub2gfx-common-livecd: $(BOOT_GRUB)/unicode.pf2 $(BOOT_EFI)/unicode.pf2
39 $(BOOT_GRUB)/unicode.pf2: unicode.pf2 $(BOOT_GRUB)
40                 $(CP) $< $(BOOT_GRUB)
42 $(BOOT_EFI)/unicode.pf2: unicode.pf2 $(BOOT_EFI)
43                 $(CP) $< $(BOOT_EFI)
45 # avoid the make.tmpl s_flag in order to disable stripping of binaries
46 export DEBUG            := yes
47 # remove all flags, just in case
48 export HOST_CFLAGS      := 
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                           \
59                 --disable-werror                                \
60                 --program-prefix=
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"     \
65         install_target=
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"   \
70         install_target=
72 PC_MODS     := biosdisk
73 EFI_MODS    :=
74 GRUB2_MODS  :=  fshelp part_msdos part_amiga part_gpt \
75                 fat ntfs ntfscomp affs sfs ext2 hfsplus iso9660 \
76                 minicmd
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
81 ifeq ($(CPU),x86_64)
82     EFI_GRUB_IMG := BOOTX64.EFI
83 else
84     EFI_GRUB_IMG := BOOTIA32.EFI
85 endif
87 #MM
88 grub2-iso-setup: grub2-pc-iso-setup grub2-efi-iso-setup
90 #MM
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)
109 %common