2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2008-03-11 19:26:07 +01:00
|
|
|
#
|
2013-06-06 23:54:12 +02:00
|
|
|
# uboot
|
2008-03-11 19:26:07 +01:00
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
.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 09:06:03 +02:00
|
|
|
UBOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION))
|
2011-07-11 22:46:09 +02:00
|
|
|
UBOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME))
|
2011-07-05 21:54:07 +02:00
|
|
|
|
2012-08-18 11:25:40 +02:00
|
|
|
UBOOT_LICENSE = GPLv2+
|
2014-01-21 14:26:16 +01:00
|
|
|
UBOOT_LICENSE_FILES = Licenses/gpl-2.0.txt
|
2012-08-18 11:25:40 +02:00
|
|
|
|
2011-07-11 22:46:09 +02:00
|
|
|
UBOOT_INSTALL_IMAGES = YES
|
2009-01-02 12:18:09 +01:00
|
|
|
|
2011-07-11 22:46:09 +02:00
|
|
|
ifeq ($(UBOOT_VERSION),custom)
|
2010-06-12 13:18:04 +02:00
|
|
|
# Handle custom U-Boot tarballs as specified by the configuration
|
2011-07-11 22:46:09 +02:00
|
|
|
UBOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
|
.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 09:06:03 +02:00
|
|
|
UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
|
|
|
|
UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL))
|
2015-05-02 11:05:01 +02:00
|
|
|
BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE)
|
2011-07-11 22:46:12 +02:00
|
|
|
else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y)
|
.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 09:06:03 +02:00
|
|
|
UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
|
2011-07-11 22:46:12 +02:00
|
|
|
UBOOT_SITE_METHOD = git
|
2013-09-02 22:07:55 +02:00
|
|
|
else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_HG),y)
|
.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 09:06:03 +02:00
|
|
|
UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
|
2013-09-02 22:07:55 +02:00
|
|
|
UBOOT_SITE_METHOD = hg
|
2016-03-29 19:22:57 +02:00
|
|
|
else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_SVN),y)
|
|
|
|
UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL))
|
|
|
|
UBOOT_SITE_METHOD = svn
|
2010-06-12 13:18:04 +02:00
|
|
|
else
|
|
|
|
# Handle stable official U-Boot versions
|
.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 09:06:03 +02:00
|
|
|
UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot
|
|
|
|
UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2
|
2015-05-02 11:05:01 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_CUSTOM_VERSION),y)
|
|
|
|
BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE)
|
|
|
|
endif
|
2010-06-12 13:18:04 +02:00
|
|
|
endif
|
2009-01-03 16:50:38 +01:00
|
|
|
|
2016-09-02 14:26:26 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_BIN),y)
|
|
|
|
UBOOT_BINS += u-boot.bin
|
|
|
|
endif
|
|
|
|
|
2013-05-16 01:12:02 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
|
2016-09-02 14:26:26 +02:00
|
|
|
UBOOT_BINS += u-boot
|
2016-05-27 19:51:41 +02:00
|
|
|
# To make elf usable for debuging on ARC use special target
|
|
|
|
ifeq ($(BR2_arc),y)
|
2016-09-02 14:26:26 +02:00
|
|
|
UBOOT_MAKE_TARGET += mdbtrick
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
|
|
|
|
UBOOT_BINS += u-boot.kwb
|
|
|
|
UBOOT_MAKE_TARGET += u-boot.kwb
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_AIS),y)
|
|
|
|
UBOOT_BINS += u-boot.ais
|
|
|
|
UBOOT_MAKE_TARGET += u-boot.ais
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y)
|
|
|
|
UBOOT_BINS += u-boot.ldr
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y)
|
|
|
|
UBOOT_BINS += u-boot-nand.bin
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMG),y)
|
|
|
|
UBOOT_BINS += u-boot-dtb.img
|
|
|
|
UBOOT_MAKE_TARGET += all u-boot-dtb.img
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y)
|
|
|
|
UBOOT_BINS += u-boot.img
|
|
|
|
UBOOT_MAKE_TARGET += u-boot.img
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y)
|
|
|
|
UBOOT_BINS += u-boot.imx
|
|
|
|
UBOOT_MAKE_TARGET += u-boot.imx
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y)
|
|
|
|
UBOOT_BINS += u-boot.sb
|
|
|
|
UBOOT_MAKE_TARGET += u-boot.sb
|
2016-05-20 06:57:24 +02:00
|
|
|
# mxsimage needs OpenSSL
|
|
|
|
UBOOT_DEPENDENCIES += host-elftosb host-openssl
|
2016-09-02 14:26:26 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_SD),y)
|
2015-03-22 14:25:14 +01:00
|
|
|
# BootStream (.sb) is generated by U-Boot, we convert it to SD format
|
2016-09-02 14:26:26 +02:00
|
|
|
UBOOT_BINS += u-boot.sd
|
|
|
|
UBOOT_MAKE_TARGET += u-boot.sb
|
2016-05-20 06:57:24 +02:00
|
|
|
UBOOT_DEPENDENCIES += host-elftosb host-openssl
|
2016-09-02 14:26:26 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND),y)
|
|
|
|
UBOOT_BINS += u-boot.nand
|
|
|
|
UBOOT_MAKE_TARGET += u-boot.sb
|
2016-05-20 06:57:24 +02:00
|
|
|
UBOOT_DEPENDENCIES += host-elftosb host-openssl
|
2016-09-02 14:26:26 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y)
|
|
|
|
UBOOT_BINS += $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y)
|
|
|
|
UBOOT_BINS += u-boot.bin
|
|
|
|
UBOOT_BIN_IFT = u-boot.bin.ift
|
2010-07-26 16:14:41 +02:00
|
|
|
endif
|
2009-01-06 15:16:27 +01:00
|
|
|
|
2015-10-12 20:53:16 +02:00
|
|
|
# The kernel calls AArch64 'arm64', but U-Boot calls it just 'arm', so
|
2015-11-15 20:55:32 +01:00
|
|
|
# we have to special case it. Similar for i386/x86_64 -> x86
|
2015-10-12 20:53:16 +02:00
|
|
|
ifeq ($(KERNEL_ARCH),arm64)
|
|
|
|
UBOOT_ARCH = arm
|
2015-11-15 20:55:32 +01:00
|
|
|
else ifneq ($(filter $(KERNEL_ARCH),i386 x86_64),)
|
|
|
|
UBOOT_ARCH = x86
|
2015-10-12 20:53:16 +02:00
|
|
|
else
|
.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 09:06:03 +02:00
|
|
|
UBOOT_ARCH = $(KERNEL_ARCH)
|
2015-10-12 20:53:16 +02:00
|
|
|
endif
|
2009-01-03 16:50:38 +01:00
|
|
|
|
2011-07-11 22:46:09 +02:00
|
|
|
UBOOT_MAKE_OPTS += \
|
2015-10-04 14:28:49 +02:00
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
2016-05-20 06:57:24 +02:00
|
|
|
ARCH=$(UBOOT_ARCH) \
|
2016-07-05 11:31:08 +02:00
|
|
|
HOSTCC="$(HOSTCC) $(HOST_CFLAGS)" \
|
2016-05-20 06:57:24 +02:00
|
|
|
HOSTLDFLAGS="$(HOST_LDFLAGS)"
|
2011-07-05 21:54:07 +02:00
|
|
|
|
2015-10-03 21:44:13 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
|
|
|
|
UBOOT_DEPENDENCIES += host-dtc
|
|
|
|
endif
|
|
|
|
|
2014-03-25 07:18:15 +01:00
|
|
|
# prior to u-boot 2013.10 the license info was in COPYING. Copy it so
|
|
|
|
# legal-info finds it
|
|
|
|
define UBOOT_COPY_OLD_LICENSE_FILE
|
|
|
|
if [ -f $(@D)/COPYING ]; then \
|
|
|
|
$(INSTALL) -m 0644 -D $(@D)/COPYING $(@D)/Licenses/gpl-2.0.txt; \
|
|
|
|
fi
|
|
|
|
endef
|
|
|
|
|
|
|
|
UBOOT_POST_EXTRACT_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE
|
2015-12-29 03:27:30 +01:00
|
|
|
UBOOT_POST_RSYNC_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE
|
2014-03-25 07:18:15 +01:00
|
|
|
|
2015-04-18 22:27:42 +02:00
|
|
|
# Analogous code exists in linux/linux.mk. Basically, the generic
|
|
|
|
# package infrastructure handles downloading and applying remote
|
|
|
|
# patches. Local patches are handled depending on whether they are
|
|
|
|
# directories or files.
|
|
|
|
UBOOT_PATCHES = $(call qstrip,$(BR2_TARGET_UBOOT_PATCH))
|
|
|
|
UBOOT_PATCH = $(filter ftp://% http://% https://%,$(UBOOT_PATCHES))
|
|
|
|
|
|
|
|
define UBOOT_APPLY_LOCAL_PATCHES
|
|
|
|
for p in $(filter-out ftp://% http://% https://%,$(UBOOT_PATCHES)) ; do \
|
|
|
|
if test -d $$p ; then \
|
|
|
|
$(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
|
|
|
|
else \
|
|
|
|
$(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
|
|
|
|
fi \
|
|
|
|
done
|
|
|
|
endef
|
|
|
|
UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES
|
|
|
|
|
2015-07-16 21:19:04 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
|
2011-07-11 22:46:09 +02:00
|
|
|
define UBOOT_CONFIGURE_CMDS
|
2015-01-10 14:47:20 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2011-07-11 22:46:09 +02:00
|
|
|
$(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
|
|
|
|
$(UBOOT_BOARD_NAME)_config
|
2011-07-05 21:54:07 +02:00
|
|
|
endef
|
2015-07-16 21:19:04 +02:00
|
|
|
else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y)
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y)
|
2015-12-22 22:52:47 +01:00
|
|
|
UBOOT_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG))_defconfig
|
2015-07-16 21:19:04 +02:00
|
|
|
else ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y)
|
2015-12-22 22:52:47 +01:00
|
|
|
UBOOT_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE))
|
2015-07-16 21:19:04 +02:00
|
|
|
endif # BR2_TARGET_UBOOT_USE_DEFCONFIG
|
|
|
|
|
|
|
|
UBOOT_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
|
|
|
|
UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS)
|
|
|
|
endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
|
2008-04-23 15:03:53 +02:00
|
|
|
|
2011-07-11 22:46:09 +02:00
|
|
|
define UBOOT_BUILD_CMDS
|
2015-01-10 14:47:20 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2011-07-11 22:46:09 +02:00
|
|
|
$(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \
|
|
|
|
$(UBOOT_MAKE_TARGET)
|
2015-03-22 14:25:14 +01:00
|
|
|
$(if $(BR2_TARGET_UBOOT_FORMAT_SD),
|
|
|
|
$(@D)/tools/mxsboot sd $(@D)/u-boot.sb $(@D)/u-boot.sd)
|
2015-03-29 18:10:46 +02:00
|
|
|
$(if $(BR2_TARGET_UBOOT_FORMAT_NAND),
|
|
|
|
$(@D)/tools/mxsboot \
|
|
|
|
-w $(BR2_TARGET_UBOOT_FORMAT_NAND_PAGE_SIZE) \
|
|
|
|
-o $(BR2_TARGET_UBOOT_FORMAT_NAND_OOB_SIZE) \
|
|
|
|
-e $(BR2_TARGET_UBOOT_FORMAT_NAND_ERASE_SIZE) \
|
|
|
|
nand $(@D)/u-boot.sb $(@D)/u-boot.nand)
|
2011-07-05 21:54:07 +02:00
|
|
|
endef
|
2008-03-11 19:26:07 +01:00
|
|
|
|
2012-05-17 12:11:31 +02:00
|
|
|
define UBOOT_BUILD_OMAP_IFT
|
|
|
|
$(HOST_DIR)/usr/bin/gpsign -f $(@D)/u-boot.bin \
|
|
|
|
-c $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))
|
|
|
|
endef
|
|
|
|
|
2011-07-11 22:46:09 +02:00
|
|
|
define UBOOT_INSTALL_IMAGES_CMDS
|
2016-09-02 14:26:26 +02:00
|
|
|
$(foreach f,$(UBOOT_BINS), \
|
|
|
|
cp -dpf $(@D)/$(f) $(BINARIES_DIR)/
|
|
|
|
)
|
2015-03-29 18:10:46 +02:00
|
|
|
$(if $(BR2_TARGET_UBOOT_FORMAT_NAND),
|
2016-09-02 14:26:26 +02:00
|
|
|
cp -dpf $(@D)/u-boot.sb $(BINARIES_DIR))
|
2012-03-18 23:04:50 +01:00
|
|
|
$(if $(BR2_TARGET_UBOOT_SPL),
|
2016-07-05 13:17:25 +02:00
|
|
|
$(foreach f,$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)), \
|
|
|
|
cp -dpf $(@D)/$(f) $(BINARIES_DIR)/
|
|
|
|
)
|
|
|
|
)
|
2012-12-20 03:47:18 +01:00
|
|
|
$(if $(BR2_TARGET_UBOOT_ENVIMAGE),
|
2016-01-31 01:48:33 +01:00
|
|
|
cat $(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) | \
|
|
|
|
$(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \
|
|
|
|
$(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \
|
|
|
|
-o $(BINARIES_DIR)/uboot-env.bin -)
|
2011-07-05 21:54:07 +02:00
|
|
|
endef
|
2008-03-11 19:26:07 +01:00
|
|
|
|
2012-05-17 12:11:31 +02:00
|
|
|
define UBOOT_INSTALL_OMAP_IFT_IMAGE
|
|
|
|
cp -dpf $(@D)/$(UBOOT_BIN_IFT) $(BINARIES_DIR)/
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y)
|
2015-04-26 11:51:15 +02:00
|
|
|
ifeq ($(BR_BUILDING),y)
|
2012-05-17 12:11:31 +02:00
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)),)
|
|
|
|
$(error No gpsign config file. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting)
|
|
|
|
endif
|
|
|
|
ifeq ($(wildcard $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))),)
|
|
|
|
$(error gpsign config file $(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG) not found. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
UBOOT_DEPENDENCIES += host-omap-u-boot-utils
|
|
|
|
UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT
|
|
|
|
UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE
|
|
|
|
endif
|
|
|
|
|
2015-07-14 17:16:02 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_ZYNQ_IMAGE),y)
|
|
|
|
define UBOOT_GENERATE_ZYNQ_IMAGE
|
2016-07-05 13:17:25 +02:00
|
|
|
$(HOST_DIR)/usr/bin/python2 \
|
|
|
|
$(HOST_DIR)/usr/bin/zynq-boot-bin.py \
|
2016-07-06 21:05:29 +02:00
|
|
|
-u $(@D)/$(firstword $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))) \
|
2015-07-14 17:16:02 +02:00
|
|
|
-o $(BINARIES_DIR)/BOOT.BIN
|
|
|
|
endef
|
|
|
|
UBOOT_DEPENDENCIES += host-zynq-boot-bin
|
|
|
|
UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_GENERATE_ZYNQ_IMAGE
|
|
|
|
endif
|
|
|
|
|
2015-10-20 13:32:20 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC),y)
|
|
|
|
define UBOOT_CRC_ALTERA_SOCFPGA_IMAGE
|
2016-07-05 13:17:25 +02:00
|
|
|
$(foreach f,$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)), \
|
|
|
|
$(HOST_DIR)/usr/bin/mkpimage \
|
|
|
|
-o $(BINARIES_DIR)/$(notdir $(call qstrip,$(f))).crc \
|
|
|
|
$(@D)/$(call qstrip,$(f))
|
|
|
|
)
|
2015-10-20 13:32:20 +02:00
|
|
|
endef
|
|
|
|
UBOOT_DEPENDENCIES += host-mkpimage
|
|
|
|
UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_CRC_ALTERA_SOCFPGA_IMAGE
|
|
|
|
endif
|
|
|
|
|
2012-12-20 03:47:18 +01:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y)
|
2015-04-26 11:51:15 +02:00
|
|
|
ifeq ($(BR_BUILDING),y)
|
2012-12-20 03:47:18 +01:00
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),)
|
|
|
|
$(error Please define a source file for Uboot environment (BR2_TARGET_UBOOT_ENVIMAGE_SOURCE setting))
|
|
|
|
endif
|
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SIZE)),)
|
|
|
|
$(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
UBOOT_DEPENDENCIES += host-uboot-tools
|
|
|
|
endif
|
|
|
|
|
2015-04-26 11:51:15 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy)
|
2015-07-16 21:19:04 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Check U-Boot board name (for legacy) or the defconfig/custom config
|
|
|
|
# file options (for kconfig)
|
|
|
|
#
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
|
2011-07-11 22:46:09 +02:00
|
|
|
ifeq ($(UBOOT_BOARD_NAME),)
|
2015-04-08 02:53:36 +02:00
|
|
|
$(error No U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting)
|
2015-07-16 21:19:04 +02:00
|
|
|
endif # UBOOT_BOARD_NAME
|
|
|
|
else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y)
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y)
|
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG)),)
|
|
|
|
$(error No board defconfig name specified, check your BR2_TARGET_UBOOT_DEFCONFIG setting)
|
|
|
|
endif # qstrip BR2_TARGET_UBOOT_BOARD_DEFCONFIG
|
|
|
|
endif # BR2_TARGET_UBOOT_USE_DEFCONFIG
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y)
|
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)),)
|
|
|
|
$(error No board configuration file specified, check your BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE setting)
|
|
|
|
endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE
|
|
|
|
endif # BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG
|
|
|
|
endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
|
2014-05-20 22:42:31 +02:00
|
|
|
|
2015-07-16 21:19:04 +02:00
|
|
|
#
|
|
|
|
# Check custom version option
|
|
|
|
#
|
2014-05-20 22:42:31 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_CUSTOM_VERSION),y)
|
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE)),)
|
|
|
|
$(error No custom U-Boot version specified. Check your BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE setting)
|
|
|
|
endif # qstrip BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE
|
|
|
|
endif # BR2_TARGET_UBOOT_CUSTOM_VERSION
|
|
|
|
|
2015-07-16 21:19:04 +02:00
|
|
|
#
|
|
|
|
# Check custom tarball option
|
|
|
|
#
|
2014-05-20 22:42:31 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_CUSTOM_TARBALL),y)
|
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)),)
|
|
|
|
$(error No custom U-Boot tarball specified. Check your BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION setting)
|
|
|
|
endif # qstrip BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION
|
|
|
|
endif # BR2_TARGET_UBOOT_CUSTOM_TARBALL
|
|
|
|
|
2015-07-16 21:19:04 +02:00
|
|
|
#
|
|
|
|
# Check Git/Mercurial repo options
|
|
|
|
#
|
2014-05-20 22:42:31 +02:00
|
|
|
ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT)$(BR2_TARGET_UBOOT_CUSTOM_HG),y)
|
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)),)
|
|
|
|
$(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_URL setting)
|
|
|
|
endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_URL
|
|
|
|
ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION)),)
|
|
|
|
$(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION setting)
|
|
|
|
endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_VERSION
|
|
|
|
endif # BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG
|
|
|
|
|
2015-04-26 11:51:15 +02:00
|
|
|
endif # BR2_TARGET_UBOOT && BR_BUILDING
|
2015-07-16 21:19:04 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y)
|
|
|
|
$(eval $(generic-package))
|
|
|
|
else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y)
|
|
|
|
$(eval $(kconfig-package))
|
|
|
|
endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
|