summaryrefslogtreecommitdiffstats
path: root/boot/grub2/grub2.mk
Commit message (Collapse)AuthorAgeFilesLines
* boot/grub2: enable support for arm and aarch64 targetsErico Nunes2018-11-261-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit enables the arm-uboot, arm-efi and aarch64-efi grub2 platforms in Buildroot. With the uboot platform, the grub2 image gets built as a u-boot image and is loaded from u-boot through a regular "bootm". The only requirement from the u-boot side in order to allow this is that u-boot is built with CONFIG_API enabled. CONFIG_API seems to not be enabled by default in most in-tree configurations, however, it seems to be available for quite some time now. So it might be possible to use this even on older u-boot versions. This is available only for arm (32-bit). With the efi platform, grub2 gets built as an EFI executable. This allows EFI firmware to find and load it similarly as it can be done for x86_64. Also, since u-boot v2016.05, u-boot is able to load and boot an EFI executable, so the uboot efi platform can also be used from u-boot in recent versions. This has been enabled (mostly) by default for ARM u-boot. efi platform is available for both arm and aarch64. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> [Thomas: move the BR2_USE_MMU dependency in BR2_TARGET_GRUB2_ARCH_SUPPORTS] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/grub2: add option to install toolsErico Nunes2018-11-261-0/+5
| | | | | | | | | | | Add an option to install grub2 support tools to the target. In the context of Buildroot, some useful target tools provided are grub2-editenv, grub2-reboot, which provide means to manage the grub2, environment, boot order, and others. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* boot/grub2: separate target and host buildsErico Nunes2018-11-261-23/+25
| | | | | | | | | | | | | | | | | | grub2 requires the host grub2-mkimage tool to build some of its target images. The current way of building this tool in the grub2 package is to perform a simultaneous host-tools/target-bootloader build during the grub2 build step. This method makes the recipe complex to understand, and proved to be a complication during the work to enable grub2 support for architectures other than x86. This patch tries to do a better separation between the build of grub2 host tools and target boot loader image, as a partial step to enable grub2 to build for other architectures. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* grub2: force -fno-stack-protector in CPPFLAGSTarek El-Sherbiny2018-04-191-2/+2
| | | | | | | | | | | | | | | | | | | | In commit 2a27294e9ade6130a12ced9a1f152c51431a870e ("grub2: force -fno-stack-protector in CFLAGS"), a fix was made to the grub2 package to make it build properly even when SSP support is enabled. However, commit 20a4583ebf7fe97ea22a1ea11621dd44a8114ca5 ("security hardening: add RELFO, FORTIFY options") reworked how SSP options are passed, and they are now passed in CPPFLAGS instead of CFLAGS, making the fix introduced by 2a27294e9ade6130a12ced9a1f152c51431a870e no longer operating. This commit will force no-stack-protector in CPPFLAGS instead of CFLAGS. Fixes bug #10961. Signed-off-by: Tarek El-Sherbiny <tarek_el-sherbiny@waters.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* grub2: force -fno-stack-protector in CFLAGSErico Nunes2017-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | grub2 fails to configure when BR2_SSP_ALL is enabled, with the following configure error: checking whether -fno-asynchronous-unwind-tables works... yes checking whether -fno-unwind-tables works... yes checking for target linking format... unknown configure: error: no suitable link format found This can be worked around by enforcing -fno-stack-protector in the package CFLAGS in a way that overrides the SSP flag, as is already done for the valgrind package. Fixes bug #10261. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Reported-by: Dr I J Ormshaw <ian_ormshaw@waters.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: bump up versionErico Nunes2017-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | After many years since the last release and a long time with grub 2.02 in beta, there is finally a release and it brings many bug fixes and interesting features such as support for ARM. Patch boot/grub2/0001-remove-gets.patch doesn't seem to be required anymore as grub-core/gnulib/stdio.in.h has changed significantly since "053cfcd Import new gnulib." and has another treatment for gets. Patch boot/grub2/0002-grub-core-gettext-gettext.c-main_context-secondary_c.patch was a backport which is present after the bump and therefore is also no longer necessary. Since we're adding a Config.in comment, we also introduce a BR2_TARGET_GRUB2_ARCH_SUPPORTS hidden boolean, in order to avoid repeating the architecture dependencies. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [Thomas: add BR2_TARGET_GRUB2_ARCH_SUPPORTS, remove bogus dependencies on ARM and AArch64, since enabling Grub2 on those architectures is done in another commit.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: install in $(HOST_DIR) instead of $(HOST_DIR)/usrArnout Vandecappelle2017-07-051-0/+2
| | | | | | | | | | | | grub2 builds for the target but installs with DESTDIR=$(HOST_DIR). Since we set prefix to /usr in TARGET_CONF_OPTS, this results in installing things in $(HOST_DIR)/usr. To make sure we don't install in $(HOST_DIR)/usr, override --prefix and --exec-prefix. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Globally replace $(HOST_DIR)/usr/lib with $(HOST_DIR)/libArnout Vandecappelle2017-07-051-2/+2
| | | | | | | | | | | Since things are no longer installed in $(HOST_DIR)/usr, the callers should also not refer to it. This is a mechanical change with git grep -l '$(HOST_DIR)/usr/lib' | xargs sed -i 's%$(HOST_DIR)/usr/lib%$(HOST_DIR)/lib%g' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/binArnout Vandecappelle2017-07-051-1/+1
| | | | | | | | | | | Since things are no longer installed in $(HOST_DIR)/usr, the callers should also not refer to it. This is a mechanical change with git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* core: change the strip command from a choice to a booleanYann E. MORIN2017-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Curently, we have a choice to select between stripping and not stripping. This is legacy code from back when we had a third option, sstrip (super-strip). Since we removed sstrip, stripping or not stripping is now just a boolean rather than a choice. Make it so. We make BR2_STRIP_strip default to 'y' to keep the current behaviour of defaulting to stripping. Move BR2_STIP_none to legacy, and instruct the user to review the new setting. Drop any reference to BR2_STRIP_none in comments. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* boot, package: use SPDX short identifier for GPLv3/GPLv3+Rahul Bedarkar2017-04-011-1/+1
| | | | | | | | | | | | We want to use SPDX identifier for license string as much as possible. SPDX short identifier for GPLv3/GPLv3+ is GPL-3.0/GPL-3.0+. This change is done using following command. find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/\<GPLv3\>/GPL-3.0/g' Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: fix build with BR2_STRIP_noneCharles Hardin2016-07-311-1/+4
| | | | | | | | | | grub2 assumes the strip command will generate output and the output should always be stripped - so, just use the $(TARGET_CROSS)strip to make sure that the build succeeds regardless of the buildroot strip configuration. Signed-off-by: Charles Hardin <ckhardin@exablox.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* grub2: really disable liblzmaGilles Chanteperdrix2016-06-151-1/+1
| | | | | | | | | | | | There is no option --enable-liblzma=no in grub2's configure script, so the only way to disable liblzma support is to pass ac_cv_lib_lzma_lzma_code=no. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Thomas: expand commit log, as suggested by Yann E. Morin.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: pass target NM, OBJCOPY and STRIPArnout Vandecappelle2015-09-201-3/+10
| | | | | | | | | | | | | | | | | | | Fixes https://bugs.busybox.net/show_bug.cgi?id=8256 grub2's build system interprets CC, CFLAGS and CPPFLAGS as for the host and uses TARGET_CC etc. for the target. However, NM, OBJCOPY and STRIP are used for the target. We currently pass the host-versions of these tools as part of $(HOST_CONFIGURE_OPTS). While we're at it, also pass TARGET_LDFLAGS. This problem had not been noticed up to now because usually we build on an x86 machine for the x86 architecture, so the binutils are compatible. However, this is not true on an i386 when building for x86_64. Cc: Christophe Bricout <christophebricout@yahoo.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: build El Torito image only for i386 PC platformKinsella, Ray2015-07-291-2/+8
| | | | | | | | | | | | | | Building Grub2 El Torito for i386 EFI errors complaining it cannot find cdboot.img cdboot.img: No such file or directory This commit builds El Torito for i386 PC only. [Thomas: fix installation ordering.] Signed-off-by: Ray Kinsella <ray.kinsella@intel.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: prepare and install El Torito imageThomas Petazzoni2015-06-141-0/+2
| | | | | | | | | | | | | | | In order to support ISO9660 bootable images that rely on Grub 2, this commit modifies thr Grub 2 makefile to generate and install an El Torito image. Such an image is simply produced by concatenating the cdboot.img provided by Grub 2, and the Grub 2 image generated by Buildroot using grub-mkimage. Since this action is so simple and cost-free, we don't bother adding a Grub 2 sub-option for that, and simply generate the El Torito image unconditionally. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* packages: rename FOO_CONF_OPT into FOO_CONF_OPTSThomas De Schampheleire2014-10-041-1/+1
| | | | | | | | | | | | To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS, make the same change for FOO_CONF_OPT. Sed command used: find * -type f | xargs sed -i 's#_CONF_OPT\>#&S#g' Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* packages: rename FOO_INSTALL_TARGET_OPT into FOO_INSTALL_TARGET_OPTSThomas De Schampheleire2014-10-041-1/+1
| | | | | | | | | | | | To be consistent with the recent change of FOO_MAKE_OPT into FOO_MAKE_OPTS, make the same change for FOO_INSTALL_TARGET_OPT. Sed command used: find * -type f | xargs sed -i 's#_INSTALL_TARGET_OPT\>#&S#g' Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package: remove the trailing slash sign from <PKG>_SITE variableJerzy Grzegorek2014-07-311-1/+1
| | | | | | | | | | | | Since the trailing slash is stripped from $($(PKG)_SITE) by pkg-generic.mk: $(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE)) so it is redundant. This patch removes it from $(PKG)_SITE variable for BR consistency. Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: Specify boot partitionJérôme Pouiller2014-07-021-4/+6
| | | | | | | | | | Since boot partition was not specified, grub tools try to detect it automatically. This patch add an option to force it. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* grub2: add a configuration option to embed a config fileDima Zavin2014-04-201-0/+2
| | | | | | | Add an option for embedding a config file directly in grub. Signed-off-by: Dima Zavin <dmitriyz@google.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: add new packageThomas Petazzoni2014-02-191-0/+88
| | | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* grub2: remove packageThomas Petazzoni2011-07-101-93/+0
| | | | | | | | | | | | | | | | | | | | | Grub 2 has been marked BROKEN in June 2010, and nobody cared to fix it since then. At that time, it was marked broken because the build process needed a Ruby interpreter available on the host, and it's really a pain that building a bootloader needs such a thing. I've tried to upgrade the package to Grub2 1.99-rcX, and now it does not need a Ruby interpreter anymore, but instead requires a tool called "autogen", which itself needs the Guile Scheme interpreter. Since we haven't heard any complaints about Grub2 being marked broken, and since it's such a pain to package, let's get rid of it. Of course, anybody interested in Grub2 is invited to contribute a working package. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Update all packages to quote $(TARGET_CC)Thomas Petazzoni2010-07-071-2/+2
| | | | | | | Now that TARGET_CC contains several space-separated words, it must be used quoted everywhere. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: remove non-existing optionsThomas Petazzoni2010-06-121-27/+0
| | | | | | | | Much of the grub2.mk seems to have been copy/pasted from grub.mk. However, all the network/splashimage related ./configure options do not exist in grub2. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: fix buildThomas Petazzoni2010-06-121-22/+27
| | | | | | | | grub2 now builds fine, but some work remains to make it usable. What should be installed exactly in the TARGET_DIR ? What is the installation procedure and what should Buildroot do ? Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: bump versionThomas Petazzoni2010-06-121-4/+4
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub/grub2: update splash image locationThomas Petazzoni2010-06-121-1/+1
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub/grub2: drop unnecessary dependency on uclibcThomas Petazzoni2010-06-121-1/+1
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* grub2: remove GRUB2_ARCH_SUPPORTEDThomas Petazzoni2010-06-121-19/+0
| | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* bootloaders: move bootloader build code to boot/Thomas Petazzoni2010-06-101-0/+134
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
OpenPOWER on IntegriCloud