Commit Graph

27 Commits

Author SHA1 Message Date
Guido Martínez 5dac9fddbf boot/grub: use install instead of cp
This way we don't depend on the permissions of files under boot/grub/,
which aren't tracked.

While we're at it, change all 'cp' usages into 'install' with the
correct mode for each file.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-11-22 19:01:12 +01:00
Karoly Kasza 5f1eeae24b boot/grub: update patchlevel, update snapshot.debian.org date
Signed-off-by: Karoly Kasza <kaszak@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-10-25 11:26:39 +02:00
Thomas De Schampheleire f268f7131b .mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.

This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.

Alignment of line continuation characters (\) is kept as-is.

The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
    -e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'

Brief explanation of this command:
    ^\([A-Z0-9a-z_]\+\)     a regular variable at the beginning of the line
    \([?:+]\?=\)            any assignment character =, :=, ?=, +=
    \([^\\]\+\)             any string not containing a line continuation
    \([^\\ \t]\+\s*\\\)     string, optional whitespace, followed by a
                            line continuation character
    \(\s*\\\)               optional whitespace, followed by a line
                            continuation character

Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.

This expression was tested on following test text: (initial tab not
included)

	FOO     = spaces before
	FOO     =   spaces before and after
	FOO	= tab before
	FOO	  = tab and spaces before
	FOO =	tab after
	FOO =	   tab and spaces after
	FOO =   	spaces and tab after
	FOO =    \
	FOO = bar \
	FOO = bar space    \
	FOO   =		   \
	GENIMAGE_DEPENDENCIES   = host-pkgconf libconfuse
	FOO     += spaces before
	FOO     ?=   spaces before and after
	FOO     :=
	FOO     =
	FOO	=
	FOO	  =
	FOO =
	   $(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
	AT91BOOTSTRAP3_DEFCONFIG = \
	AXEL_DISABLE_I18N=--i18n=0

After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
  expression leaves the number of whitespace between the value and line
  continuation character intact, but the whitespace before that could have
  changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
  actually makes the code more readable.

Finally, the end result was manually reviewed.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 15:00:28 +02:00
Thomas De Schampheleire aaffd209fa packages: rename FOO_CONF_OPT into FOO_CONF_OPTS
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>
2014-10-04 18:54:16 +02:00
Jerzy Grzegorek c7f4b96471 package: remove the trailing slash sign from <PKG>_SITE variable
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>
2014-07-31 23:17:46 +02:00
Thomas Petazzoni a79ea8a60b grub: bump to 0.97-67
Bump to a more recent version of the Debian patches for grub legacy,
that fix an incorrect build with gcc 4.6.

Fixes #6092 and #2629.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-07 10:22:35 +01:00
Thomas Petazzoni 5cab919bb3 grub: align splashscreen handling with iso9660 code
This commit aligns the Grub handling of the splash screen with what is
done in the ISO9660 code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-31 00:10:44 +01:00
Thomas Petazzoni 6d65d8ba13 grub: really disable splash screen support
When BR2_TARGET_GRUB_SPLASH is enabled, we were passing
--enable-graphics, but when it was disabled, we were not doing
anything. However, in Grub, graphics support is enabled by default,
and you have to pass --disable-graphics to disable it.

Fix this by passing --enable-graphics or --disable-graphics as
appropriate.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-29 12:18:30 +01:00
Thomas Petazzoni 4e0257bb90 grub: replace string option for filesystem selection by booleans
In 1cece2813b (grub: add option to
configure the list of supported filesystems), we introduced the
BR2_TARGET_GRUB_FS_SUPPORT option which allows to provide a
space-separated list of filesystems that Grub should support.

However, it turns out that this not very practical, because the
iso9660 filesystem logic in Buildroot should force the ISO9660 support
to be enabled in Grub, which is not easy to do with a string option.

Therefore, this patch changes this option from a string option to a
list of boolean option, one per filesystem supported.

A few useful details:

 - Since Grub legacy is dead, the list of filesystem, and therefore
   the number of options, will not grow.

 - We have only added options for filesystems that are likely to be
   used in an embedded Linux context. Filesystems such as VSTAfs,
   Minix, UFS2 or FFS2 are not supported.

 - There is no need to add some Config.in.legacy support for the
   previous option, since it was added after Buildroot 2013.11, and
   was therefore never part of an official Buildroot release.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-29 12:17:46 +01:00
Thomas Petazzoni 8c66baa06c grub: force -m32 so we build grub 32 bits on 64 bits architecture
As reported by Matthew Weber, Grub doesn't build on 64 bits build
machines, because the host compiler produces 64 bits binaries by
default, while Grub should be built 32 bits. Therefore, this commit
passes -m32 to the Grub CFLAGS, so that 32 bits binaries are always
produced.

Reported-by: Matthew Weber <mlweber1@rockwellcollins.com>
Cc: Matthew Weber <mlweber1@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by:  Matthew Weber <mlweber1@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-04 22:04:23 +01:00
Thomas Petazzoni 1cece2813b grub: add option to configure the list of supported filesystems
Grub can be configured to enable or disable the filesystems supported
in the stage 2. In addition, there are filesystem specific stage
1.5. In order to save space and build time, we provide a new option
that allows to give a space-separated list of filesystems that Grub
should support.

We default to support FAT and ext2, since most of the other
filesystems are fairly unlikely to be used.

We use this option to:

 1) Pass --enable-<fs> or --disable-<fs>, which enables/disables the
    support of <fs> in Grub stage 2.

 2) Install only the stage 1.5 that correspond to the selected
    filesystems.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-01 23:44:13 +01:00
Thomas Petazzoni 741740cee6 grub: adjust splashimage in menu.lst depending on configuration
Make the splashimage line in menu.lst only active when splashimage
support has really been enabled in the Grub configuration.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-01 23:44:07 +01:00
Thomas Petazzoni bba9eb1ea4 grub: install the sample menu.lst into $(TARGET_DIR)/boot/grub
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-01 23:44:04 +01:00
Thomas Petazzoni da60753a43 grub: support build on x86-64, and misc other improvements
This commit brings a number of improvements to the grub packaging:

 * It builds grub with the host compiler, which is needed so that we
   can build a 32 bits grub even if the target architecture is
   x86-64. To make sure we have a host compiler capable of generating
   32 bits code, grub now selects the BR2_HOSTARCH_NEEDS_IA32_COMPILER
   option. Building with the host compiler is done by cheating and
   passing $(HOST_CONFIGURE_OPTS) in GRUB_CONF_ENV.

 * Some additional CFLAGS are added to make sure grub builds properly
   with modern compilers (-O0, --build-id=none, -fno-stack-protector).

 * Removal of the GRUB_INSTALL_STAGING_CMDS which were not used, since
   GRUB_INSTALL_STAGING was not set to YES.

 * Installation of the "grub" binary in $(HOST_DIR) instead of
   $(TARGET_DIR) since it's actually used only on the host to install
   grub into an image or device.

 * Removal of the grub uninstall commands, since they are generally
   considered useless.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-01 23:35:28 +01:00
Jerzy Grzegorek 086f333f39 Normalize separator size to 80
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-07 10:54:54 +02:00
Simon Dawson 6643351d0b grub: add license information
Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-08-21 12:09:20 +02:00
Arnout Vandecappelle (Essensium/Mind) e1502ebc0c all packages: rename XXXTARGETS to xxx-package
Also remove the redundant $(call ...).

This is a purely mechanical change, performed with
find package linux toolchain boot -name \*.mk | \
  xargs sed -i -e 's/$(eval $(call GENTARGETS))/$(eval $(generic-package))/' \
               -e 's/$(eval $(call AUTOTARGETS))/$(eval $(autotools-package))/' \
               -e 's/$(eval $(call CMAKETARGETS))/$(eval $(cmake-package))/'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-17 20:23:05 +02:00
Danomi Mocelopolis ec02a34b0a Prevent patch commands from accessing source control
Closes #4357

Add -g0 option to patch to ensure it doesn't try to access source control.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-11-26 21:56:25 +01:00
Thomas Petazzoni 300f9c9c9d package: remove useless arguments from AUTOTARGETS
Thanks to the pkgparentdir and pkgname functions, we can rewrite the
AUTOTARGETS macro in a way that avoids the need for each package to
repeat its name and the directory in which it is present.

[Peter: pkgdir->pkgparentdir]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-29 23:12:27 +02:00
Thomas Petazzoni b0d446dee4 Improve TARGETS handling for bootloaders and kernel
As the kernel and bootloaders do not use the normal BR2_PACKAGE_*
Kconfig options, their target name was not automatically added to the
global TARGETS variable. Each bootloader .mk and the linux.mk had to
add their own target manually to TARGETS, and the package
infrastructure was making tests on non-existing Kconfig variables.

This commit improves the package infrastructure so that it looks at
BR2_PACKAGE_<pkg> for packages, BR2_TARGET_<pkg> for bootloaders and
at the special BR2_LINUX_KERNEL for the linux package.

This allows to simplify a little bit the bootloaders and linux .mk
files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-11 23:40:23 +02:00
Thomas Petazzoni a4f58506ac grub: convert to AUTOTARGETS
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-10 15:28:23 +02:00
Peter Korsgaard 950ee4585b grub: fix download URL
The Debian package snapshot service moved to an official debian.org
address last year (http://www.debian.org/News/2010/20100412) with a
slightly different URL structure, so adjust the download URL to match.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-03-13 21:42:06 +01:00
Thomas Petazzoni a1c8fa41f6 Update all packages to quote $(TARGET_CC)
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>
2010-07-07 08:20:21 +02:00
Thomas Petazzoni bff56ab548 grub/grub2: update splash image location
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-12 13:38:43 +02:00
Thomas Petazzoni e6b73b6548 grub/grub2: drop unnecessary dependency on uclibc
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-12 13:38:43 +02:00
Thomas Petazzoni 5aa5ccb9e4 grub: remove GRUB_SUPPORTED_ARCH
grub can already only be selected for x86 and x86_64. No need to check
again for this in grub.mk.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-12 13:38:42 +02:00
Thomas Petazzoni 649b5b9250 bootloaders: move bootloader build code to boot/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-06-10 21:05:12 +02:00