2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2012-10-28 17:40:36 +01:00
|
|
|
#
|
|
|
|
# boot-wrapper-aarch64
|
|
|
|
#
|
2013-06-06 23:54:13 +02:00
|
|
|
################################################################################
|
2012-10-28 17:40:36 +01: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
|
|
|
BOOT_WRAPPER_AARCH64_VERSION = 4266507a84f8c06452109d38e0350d4759740694
|
2016-11-16 01:52:45 +01:00
|
|
|
BOOT_WRAPPER_AARCH64_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git
|
.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
|
|
|
BOOT_WRAPPER_AARCH64_LICENSE = BSD3c
|
|
|
|
BOOT_WRAPPER_AARCH64_LICENSE_FILES = LICENSE.txt
|
|
|
|
BOOT_WRAPPER_AARCH64_DEPENDENCIES = linux
|
2012-10-28 17:40:36 +01:00
|
|
|
BOOT_WRAPPER_AARCH64_INSTALL_IMAGES = YES
|
|
|
|
|
2014-03-21 05:34:04 +01:00
|
|
|
# The Git repository does not have the generated configure script and
|
|
|
|
# Makefile.
|
|
|
|
BOOT_WRAPPER_AARCH64_AUTORECONF = YES
|
2012-10-28 17:40:36 +01:00
|
|
|
|
2014-03-21 05:34:04 +01:00
|
|
|
BOOT_WRAPPER_AARCH64_DTB = /arch/arm64/boot/dts/$(basename $(call qstrip,$(BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS))).dtb
|
|
|
|
|
|
|
|
# Fixup the path to the DTB in configure.ac. In the future, this
|
|
|
|
# should hopefully be made more configurable by the
|
|
|
|
# boot-wrapper-aarch64 developers.
|
|
|
|
define BOOT_WRAPPER_AARCH64_FIX_DTB_NAME
|
|
|
|
$(SED) 's%^KERN_DTB=.*%KERN_DTB=$(BOOT_WRAPPER_AARCH64_DTB)%' $(@D)/configure.ac
|
2012-10-28 17:40:36 +01:00
|
|
|
endef
|
|
|
|
|
2014-03-21 05:34:04 +01:00
|
|
|
BOOT_WRAPPER_AARCH64_PRE_PATCH_HOOKS += BOOT_WRAPPER_AARCH64_FIX_DTB_NAME
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
BOOT_WRAPPER_AARCH64_CONF_OPTS = \
|
2014-03-21 05:34:04 +01:00
|
|
|
--with-kernel-dir=$(LINUX_DIR) \
|
|
|
|
--with-cmdline=$(BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS)
|
|
|
|
|
2016-10-08 00:45:04 +02:00
|
|
|
ifeq ($(BR2_TARGET_BOOT_WRAPPER_AARCH64_PSCI),y)
|
|
|
|
BOOT_WRAPPER_AARCH64_CONF_OPTS += --enable-psci
|
|
|
|
else
|
|
|
|
BOOT_WRAPPER_AARCH64_CONF_OPTS += --disable-psci
|
|
|
|
endif
|
|
|
|
|
2014-03-21 05:34:04 +01:00
|
|
|
# We need to convince the configure script that the Linux kernel tree
|
|
|
|
# exists, as well as the DTB and the kernel Image. Even though those
|
|
|
|
# are available on the build machine, the configure script uses
|
|
|
|
# AC_CHECK_FILE tests, which are always disabled in cross-compilation
|
|
|
|
# situations.
|
|
|
|
BOOT_WRAPPER_AARCH64_CONF_ENV = \
|
|
|
|
$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR))=yes \
|
|
|
|
$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR)$(BOOT_WRAPPER_AARCH64_DTB))=yes \
|
|
|
|
$(call AUTOCONF_AC_CHECK_FILE_VAL,$(LINUX_DIR)/arch/arm64/boot/Image)=yes
|
|
|
|
|
2012-10-28 17:40:36 +01:00
|
|
|
define BOOT_WRAPPER_AARCH64_INSTALL_IMAGES_CMDS
|
|
|
|
cp $(@D)/linux-system.axf $(BINARIES_DIR)
|
|
|
|
endef
|
|
|
|
|
2014-03-21 05:34:04 +01:00
|
|
|
$(eval $(autotools-package))
|