Kconfig: import some options related to general setup
cover Kconfig: import some options related to general setup
Masahiro Yamada (3):
kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
scripts: refetch scripts/setlocalversion from Linux 3.16
kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
Kconfig | 48 +++++++++++++++++++++++++++++++++++++++++++++++- Makefile | 6 +++++- scripts/setlocalversion | 31 ++++++++++++++----------------- 3 files changed, 66 insertions(+), 19 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
Copy Kconfig options from "init/Kconfig" of Linux v3.16 tag and adjust some parts of the help document.
Move CONFIG_SPL, CONFIG_TPL, ... etc. to "Boot images" menu.
---
Kconfig | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-)
Kconfig +37 -1
@@ -14,6 +14,42 @@ config KCONFIG_OBJDIR menu "General setup" +config LOCALVERSION + string "Local version - append to U-Boot release" + depends on !SPL_BUILD + help + Append an extra string to the end of your U-Boot version. + This will show up on your boot log, for example. + The string you set here will be appended after the contents of + any files with a filename matching localversion* in your + object and source tree, in that order. Your total string can + be a maximum of 64 characters. + +config LOCALVERSION_AUTO + bool "Automatically append version information to the version string" + depends on !SPL_BUILD + default y + help + This will try to automatically determine if the current tree is a + release tree by looking for git tags that belong to the current + top of tree revision. + + A string of the format -gxxxxxxxx will be added to the localversion + if a git-based tree is found. The string generated by this will be + appended after any matching localversion* files, and after the value + set in CONFIG_LOCALVERSION. + + (The actual string used here is the first eight characters produced + by running the command: + + $ git rev-parse --verify HEAD + + which is done within the script "scripts/setlocalversion".) + +endmenu # General setup + +menu "Boot images" + config SPL_BUILD bool depends on $KCONFIG_OBJDIR="spl" || $KCONFIG_OBJDIR="tpl"
@@ -54,6 +90,6 @@ config SYS_EXTRA_OPTIONS configuration to Kconfig. Since this option will be removed sometime, new boards should not use this option. -endmenu # General setup +endmenu # Boot images source "arch/Kconfig"
Signature · 1 line
1.9.1
PATCH 1/3 kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
Quoted 6 lines · Masahiro Yamada
Copy
Kconfigoptions from "init/Kconfig" of Linux v3.16 tag and adjust some parts of the help document.Move
CONFIG_SPL,CONFIG_TPL, ... etc. to "Boot images" menu.Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140829/f3e97396/attachment.pgp>
PATCH 2/3 scripts: refetch scripts/setlocalversion from Linux 3.16
In reply to Masahiro YamadaNow we have CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO in Kconfig so we can use scripts/setlocalversion without any adjustment. Copy it from Linux 3.16 as is.
---
scripts/setlocalversion | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-)
scripts/setlocalversion +14 -17
@@ -3,8 +3,10 @@ # This scripts adds local version information from the version # control systems git, mercurial (hg) and subversion (svn). # -# It was originally copied from the Linux kernel v3.2.0-rc4 and modified -# to support the U-Boot build-system. +# If something goes wrong, send a mail the kernel build mailinglist +# (see MAINTAINERS) and CC Nico Schottelius +# <nico-linuxsetlocalversion -at- schottelius.org>. +# # usage() {
@@ -41,7 +43,8 @@ scm_version() fi # Check for git and a git repo. - if test -e .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then + if test -z "$(git rev-parse --show-cdup 2>/dev/null)" && + head=`git rev-parse --verify --short HEAD 2>/dev/null`; then # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore # it, because this version is defined in the top level Makefile.
@@ -69,12 +72,8 @@ scm_version() printf -- '-svn%s' "`git svn find-rev $head`" fi - # Update index only on r/w media - [ -w . ] && git update-index --refresh --unmerged > /dev/null - # Check for uncommitted changes - if git diff-index --name-only HEAD | grep -v "^scripts/package" \ - | read dummy; then + if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then printf '%s' -dirty fi
@@ -107,7 +106,7 @@ scm_version() fi # Check for svn and a svn repo. - if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then + if rev=`LANG= LC_ALL= LC_MESSAGES=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then rev=`echo $rev | awk '{print $NF}'` printf -- '-svn%s' "$rev"
@@ -141,14 +140,12 @@ if $scm_only; then exit fi -#if test -e include/config/auto.conf; then -# . include/config/auto.conf -#else -# echo "Error: kernelrelease not valid - run 'make prepare' to update it" -# exit 1 -#fi -CONFIG_LOCALVERSION= -CONFIG_LOCALVERSION_AUTO=y +if test -e include/config/auto.conf; then + . include/config/auto.conf +else + echo "Error: kernelrelease not valid - run 'make prepare' to update it" + exit 1 +fi # localversion* files in the build and source directory res="$(collect_files localversion*)"
Signature · 1 line
1.9.1
PATCH 2/3 scripts: refetch scripts/setlocalversion from Linux 3.16
Quoted 5 lines · Masahiro Yamada
Now we have
CONFIG_LOCALVERSIONandCONFIG_LOCALVERSION_AUTOinKconfigso we can usescripts/setlocalversionwithout any adjustment. Copy it from Linux 3.16 as is.Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140829/6f79ab53/attachment.pgp>
PATCH 3/3 kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
In reply to Masahiro YamadaCopy the Kconfig option from "init/Kconfig" of Linux v3.16 tag and adjust the help document.
---
Kconfig | 10 ++++++++++ Makefile | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-)
Kconfig +10 -0
@@ -46,6 +46,16 @@ config LOCALVERSION_AUTO which is done within the script "scripts/setlocalversion".) +config CC_OPTIMIZE_FOR_SIZE + bool "Optimize for size" + depends on !SPL_BUILD + default y + help + Enabling this option will pass "-Os" instead of "-O2" to gcc + resulting in a smaller U-Boot image. + + This option is enabled by default for U-Boot. + endmenu # General setup menu "Boot images"
Makefile +5 -1
@@ -533,7 +533,11 @@ else include/config/auto.conf: ; endif # $(dot-config) -KBUILD_CFLAGS += -Os #-fomit-frame-pointer +ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE +KBUILD_CFLAGS += -Os +else +KBUILD_CFLAGS += -O2 +endif ifdef BUILD_TAG KBUILD_CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"'
Signature · 1 line
1.9.1
PATCH 3/3 kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
Quoted 4 lines · Masahiro Yamada
Copy the
Kconfigoption from "init/Kconfig" of Linux v3.16 tag and adjust the help document.Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140829/95d79c7b/attachment.pgp>