1 TAG-
$(CONFIG_GRUB2_MASTER
)=origin/HEAD
2 TAG-
$(CONFIG_GRUB2_REVISION
)=$(CONFIG_GRUB2_REVISION_ID
)
3 TAG-
$(CONFIG_GRUB2_STABLE
)=grub-2.06
4 NAME-
$(CONFIG_GRUB2_MASTER
)=HEAD
5 NAME-
$(CONFIG_GRUB2_REVISION
)=$(CONFIG_GRUB2_REVISION_ID
)
6 NAME-
$(CONFIG_GRUB2_STABLE
)=2.06
8 project_git_repo
=https
://git.savannah.gnu.org
/git
/grub.git
/
11 unexport HOSTCC CC LD OBJCOPY STRIP
17 echo
" GIT GRUB2 $(NAME-y)"
18 test -d
$(project_dir
) || git clone
$(project_git_repo
) $(project_dir
)
19 git
-C
$(project_dir
) fetch
20 ifeq ($(shell test -d
$(project_dir
) && \
21 (git
-C
$(project_dir
) status
--ignored
=no
--untracked-files
=no
--porcelain
)),)
22 git
-C
$(project_dir
) checkout
-f
$(TAG-y
)
24 echo
"WARNING: index/tree not clean, skipping update / force checkout."
25 echo
" Checkout manually with "\
26 "\`git -C payloads/external/GRUB2/$(project_dir) checkout -f\`."
29 grub2
/build
/config.h
: $(CONFIG_DEP
) | checkout
30 echo
" CONFIG GRUB2 $(NAME-y)"
33 cd grub2
&& .
/bootstrap
; .
/autogen.sh
34 cd grub2
/build
&& ..
/configure CC
="$(HOSTCC)" LD
="$(LD)" \
35 FREETYPE
="pkg-config freetype2" BUILD_FREETYPE
="pkg-config freetype2" \
36 TARGET_CC
="$(CC)" TARGET_OBJCOPY
="$(OBJCOPY)" TARGET_STRIP
="$(STRIP)" \
37 CFLAGS
=-O2 TARGET_CFLAGS
="-Os -fno-reorder-functions" \
38 --with-platform
=coreboot
--enable-boot-time
--disable-werror
40 config
: grub2
/build
/config.h checkout
43 echo
" MAKE GRUB2 $(NAME-y)"
44 $(MAKE
) -C grub2
/build
45 $(MAKE
) -C grub2
/build default_payload.elf \
46 EXTRA_PAYLOAD_MODULES
="$(CONFIG_GRUB2_EXTRA_MODULES)"
49 test -f grub2
/build
/Makefile
&& $(MAKE
) -C grub2
/build
clean || exit
0
55 echo
"$(project_git_repo) $(project_dir)"
57 .PHONY
: checkout config grub2
clean distclean print-repo-info