From 82563baad3223aa34f6f573d75910098c03a4708 Mon Sep 17 00:00:00 2001 From: deadwood Date: Sat, 22 Oct 2016 07:37:07 +0000 Subject: [PATCH] grub2: bring back build of aros-side grub2 tools The building of grub2 modules for aros-side is disabled. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@53016 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/all-pc/boot/grub2-aros/configure | 16 +++++ arch/all-pc/boot/grub2-aros/configure.ac | 11 ++++ arch/all-pc/boot/grub2-aros/grub-core/Makefile.in | 13 ++-- arch/all-pc/boot/grub2-aros/mmakefile.src | 80 ++++++++--------------- arch/all-pc/boot/grub2-host/mmakefile.src | 2 +- 5 files changed, 64 insertions(+), 58 deletions(-) rewrite arch/all-pc/boot/grub2-aros/mmakefile.src (85%) diff --git a/arch/all-pc/boot/grub2-aros/configure b/arch/all-pc/boot/grub2-aros/configure index 8e5614073e..1be80c0cc2 100755 --- a/arch/all-pc/boot/grub2-aros/configure +++ b/arch/all-pc/boot/grub2-aros/configure @@ -788,6 +788,7 @@ enable_grub_emu_sdl LIBPCIACCESS LIBSDL LIBUSB +skipplatform BOOT_TIME_STATS DISK_CACHE_STATS TARGET_NMFLAGS_DEFINED_ONLY @@ -1609,6 +1610,7 @@ enable_efiemu enable_mm_debug enable_cache_stats enable_boot_time +enable_skip_platform enable_grub_emu_usb enable_grub_emu_sdl enable_grub_emu_pci @@ -2269,6 +2271,7 @@ Optional Features: --enable-mm-debug include memory manager debugging --enable-cache-stats enable disk cache statistics collection --enable-boot-time enable boot time statistics collection + --enable-skip-platform build only host tools --enable-grub-emu-usb build and install the `grub-emu' debugging utility with USB support (default=guessed) --enable-grub-emu-sdl build and install the `grub-emu' debugging utility @@ -26476,6 +26479,19 @@ else fi +# Check whether --enable-skip-platform was given. +if test "${enable_skip_platform+set}" = set; then : + enableval=$enable_skip_platform; +fi + + +if test x$enable_skip_platform = xyes; then + skipplatform=SKIP +else + skipplatform= +fi + + # Check whether --enable-grub-emu-usb was given. if test "${enable_grub_emu_usb+set}" = set; then : enableval=$enable_grub_emu_usb; diff --git a/arch/all-pc/boot/grub2-aros/configure.ac b/arch/all-pc/boot/grub2-aros/configure.ac index 4168fc9374..6061bb7495 100644 --- a/arch/all-pc/boot/grub2-aros/configure.ac +++ b/arch/all-pc/boot/grub2-aros/configure.ac @@ -1173,6 +1173,17 @@ else fi AC_SUBST([BOOT_TIME_STATS]) +AC_ARG_ENABLE([skip-platform], + AS_HELP_STRING([--enable-skip-platform], + [build only host tools])) + +if test x$enable_skip_platform = xyes; then + skipplatform=SKIP +else + skipplatform= +fi +AC_SUBST([skipplatform]) + AC_ARG_ENABLE([grub-emu-usb], [AS_HELP_STRING([--enable-grub-emu-usb], [build and install the `grub-emu' debugging utility with USB support (default=guessed)])]) diff --git a/arch/all-pc/boot/grub2-aros/grub-core/Makefile.in b/arch/all-pc/boot/grub2-aros/grub-core/Makefile.in index f08ec1fa5b..07f93a127a 100644 --- a/arch/all-pc/boot/grub2-aros/grub-core/Makefile.in +++ b/arch/all-pc/boot/grub2-aros/grub-core/Makefile.in @@ -80,6 +80,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +SKIPPLATFORM = @skipplatform@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @@ -7611,7 +7612,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(platformdir)" \ @COND_i386_pc_TRUE@am__EXEEXT_711 = lzma_decompress.image$(EXEEXT) @COND_mips_loongson_TRUE@am__EXEEXT_712 = fwstart.image$(EXEEXT) \ @COND_mips_loongson_TRUE@ fwstart_fuloong2f.image$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(platform_PROGRAMS) \ +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(platform_PROGRAMS$(SKIPPLATFORM)) \ $(sbin_PROGRAMS) am__acpi_module_SOURCES_DIST = commands/efi/acpi.c commands/acpi.c \ commands/i386/pc/acpi.c @@ -12262,8 +12263,8 @@ am__dist_noinst_DATA_DIST = kern/disk_common.c gentrigtables.c \ gensyminfo.sh.in genmod.sh.in modinfo.sh.in gmodule.pl.in \ gdb_grub.in boot/powerpc/grub.chrp.in \ boot/powerpc/bootinfo.txt.in -DATA = $(dist_grubconf_DATA) $(dist_noinst_DATA) $(noinst_DATA) \ - $(pkgdata_DATA) $(platform_DATA) +DATA = $(dist_grubconf_DATA) $(dist_noinst_DATA) $(noinst_DATA$(SKIPPLATFORM)) \ + $(pkgdata_DATA) $(platform_DATA$(SKIPPLATFORM)) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -37627,8 +37628,8 @@ info: info-am info-am: install-data-am: install-dist_grubconfDATA install-grubconfSCRIPTS \ - install-man install-pkgdataDATA install-platformDATA \ - install-platformPROGRAMS install-platformSCRIPTS + install-man install-pkgdataDATA install-platformDATA$(SKIPPLATFORM) \ + install-platformPROGRAMS$(SKIPPLATFORM) install-platformSCRIPTS install-dvi: install-dvi-am @@ -37696,7 +37697,7 @@ uninstall-man: uninstall-man1 install-grubconfSCRIPTS install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-pkgdataDATA \ - install-platformDATA install-platformPROGRAMS \ + install-platformDATA install-platformDATASKIP install-platformPROGRAMS install-platformPROGRAMSSKIP\ install-platformSCRIPTS install-ps install-ps-am \ install-sbinPROGRAMS install-sbinSCRIPTS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ diff --git a/arch/all-pc/boot/grub2-aros/mmakefile.src b/arch/all-pc/boot/grub2-aros/mmakefile.src dissimilarity index 85% index 502785ec59..ae16b0a0da 100644 --- a/arch/all-pc/boot/grub2-aros/mmakefile.src +++ b/arch/all-pc/boot/grub2-aros/mmakefile.src @@ -1,51 +1,29 @@ -# Copyright © 2004-2010, The AROS Development Team. All rights reserved. -# $Id$ -# just for building the grub2 utils -# in prevision to use grub-mkimage in InstallAROS - -include $(SRCDIR)/config/aros.cfg - -##MM- arch-common-grub2 : grub2-aros-quick - -EXCL_FLAGS := -Werror -Werror-implicit-function-declaration - -# remove the -s & --strip-all flags, just in case -# ... to no strip grub_mod_init or something from modules -CFLAGS1 := $(filter-out -mcmodel=large -s --strip-all $(EXCL_FLAGS),$(HOST_CFLAGS)) -CFLAGS2 := $(filter-out -mcmodel=large -s --strip-all $(EXCL_FLAGS),$(CFLAGS)) - -# avoid the make.tmpl s_flag in order to disable stripping of binaries -# WE SHOULD FIND A WORKAROUND AGAINST THIS HACK, I didn't check if extract -# code is linked in grub modules & utils -export DEBUG := yes - -# trick make.tmpl %build_with_configure compiler=host (what a hack) -export TARGET_CFLAGS := $(CFLAGS1) # grub target cflags -export HOST_DEF_CC := $(TARGET_CC) # aros target cc -export CFLAGS := $(CFLAGS2) # aros target cflags -export KERNEL_CFLAGS := # undef -export HOST_CFLAGS := # undef - -ifeq ($(AROS_TARGET_VARIANT),efi) - GRUB_ARCH := efi -else - GRUB_ARCH := pc -endif - -# override %(mmake)-install_opts in make.tmpl -# because if compiler=host, nix_dir_layout can't be used -DESTDIR := $(AROS_CONTRIB)/GNU -INSTALL_ENV := bindir=$(DESTDIR)/bin sbindir=$(DESTDIR)/sbin -CONFIG_OPTS := --build=$(AROS_HOST_CPU)-$(AROS_HOST_ARCH) \ - --host=$(AROS_TARGET_CPU)-aros \ - --with-platform=$(GRUB_ARCH) \ - --datarootdir=$(DESTDIR)/share \ - --sysconfdir=$(DESTDIR)/etc \ - --disable-grub-mkfont \ - --disable-werror \ - --program-prefix= - -%build_with_configure mmake=grub2-aros compiler=host \ - prefix="$(DESTDIR)" aros_prefix="/GNU" nix=yes \ - extraoptions="$(CONFIG_OPTS)" \ - install_env="$(INSTALL_ENV)" +# Copyright © 2004-2016, The AROS Development Team. All rights reserved. +# $Id$ +# just for building the grub2 utils +# in prevision to use grub-mkimage in InstallAROS + +include $(SRCDIR)/config/aros.cfg + +#MM- arch-common-grub2 : grub2-aros-quick + +ifeq ($(AROS_TARGET_VARIANT),efi) + GRUB_ARCH := efi +else + GRUB_ARCH := pc +endif + +DESTDIR := $(AROS_CONTRIB)/GNU +CONFIG_OPTS := \ + --with-platform=$(GRUB_ARCH) \ + --datarootdir=$(DESTDIR)/share \ + --sysconfdir=$(DESTDIR)/etc \ + --disable-grub-mkfont \ + --disable-werror \ + --program-prefix= \ + --enable-skip-platform + +%build_with_configure mmake=grub2-aros \ + prefix="$(DESTDIR)" aros_prefix="/GNU" nix=yes \ + extraoptions="$(CONFIG_OPTS)" + diff --git a/arch/all-pc/boot/grub2-host/mmakefile.src b/arch/all-pc/boot/grub2-host/mmakefile.src index afe846df36..f90d63260d 100644 --- a/arch/all-pc/boot/grub2-host/mmakefile.src +++ b/arch/all-pc/boot/grub2-host/mmakefile.src @@ -3,7 +3,7 @@ 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 +#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 -- 2.11.4.GIT