All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] Kconfig: import some options related to general setup
@ 2014-08-22 10:42 Masahiro Yamada
  2014-08-22 10:42 ` [U-Boot] [PATCH 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Masahiro Yamada @ 2014-08-22 10:42 UTC (permalink / raw)
  To: u-boot


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(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
  2014-08-22 10:42 [U-Boot] [PATCH 0/3] Kconfig: import some options related to general setup Masahiro Yamada
@ 2014-08-22 10:42 ` Masahiro Yamada
  2014-08-29 14:41   ` [U-Boot] [U-Boot, " Tom Rini
  2014-08-22 10:42 ` [U-Boot] [PATCH 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16 Masahiro Yamada
  2014-08-22 10:42 ` [U-Boot] [PATCH 3/3] kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE Masahiro Yamada
  2 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2014-08-22 10:42 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Kconfig | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/Kconfig b/Kconfig
index 1a38645..ea2c836 100644
--- a/Kconfig
+++ b/Kconfig
@@ -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"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16
  2014-08-22 10:42 [U-Boot] [PATCH 0/3] Kconfig: import some options related to general setup Masahiro Yamada
  2014-08-22 10:42 ` [U-Boot] [PATCH 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO Masahiro Yamada
@ 2014-08-22 10:42 ` Masahiro Yamada
  2014-08-29 14:41   ` [U-Boot] [U-Boot, " Tom Rini
  2014-08-22 10:42 ` [U-Boot] [PATCH 3/3] kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE Masahiro Yamada
  2 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2014-08-22 10:42 UTC (permalink / raw)
  To: u-boot

Now 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.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 scripts/setlocalversion | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index f551b4c..63d91e2 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -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*)"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 3/3] kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
  2014-08-22 10:42 [U-Boot] [PATCH 0/3] Kconfig: import some options related to general setup Masahiro Yamada
  2014-08-22 10:42 ` [U-Boot] [PATCH 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO Masahiro Yamada
  2014-08-22 10:42 ` [U-Boot] [PATCH 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16 Masahiro Yamada
@ 2014-08-22 10:42 ` Masahiro Yamada
  2014-08-29 14:41   ` [U-Boot] [U-Boot,3/3] " Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2014-08-22 10:42 UTC (permalink / raw)
  To: u-boot

Copy the Kconfig option from "init/Kconfig" of Linux v3.16 tag
and adjust the help document.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Kconfig  | 10 ++++++++++
 Makefile |  6 +++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/Kconfig b/Kconfig
index ea2c836..cbb691e 100644
--- a/Kconfig
+++ b/Kconfig
@@ -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"
diff --git a/Makefile b/Makefile
index 2938dec..95e298b 100644
--- a/Makefile
+++ b/Makefile
@@ -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)"'
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot, 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
  2014-08-22 10:42 ` [U-Boot] [PATCH 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO Masahiro Yamada
@ 2014-08-29 14:41   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2014-08-29 14:41 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 22, 2014 at 07:42:27PM +0900, Masahiro Yamada wrote:

> 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.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot, 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16
  2014-08-22 10:42 ` [U-Boot] [PATCH 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16 Masahiro Yamada
@ 2014-08-29 14:41   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2014-08-29 14:41 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 22, 2014 at 07:42:28PM +0900, Masahiro Yamada wrote:

> Now 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.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot,3/3] kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
  2014-08-22 10:42 ` [U-Boot] [PATCH 3/3] kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE Masahiro Yamada
@ 2014-08-29 14:41   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2014-08-29 14:41 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 22, 2014 at 07:42:29PM +0900, Masahiro Yamada wrote:

> Copy the Kconfig option from "init/Kconfig" of Linux v3.16 tag
> and adjust the help document.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-29 14:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-22 10:42 [U-Boot] [PATCH 0/3] Kconfig: import some options related to general setup Masahiro Yamada
2014-08-22 10:42 ` [U-Boot] [PATCH 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO Masahiro Yamada
2014-08-29 14:41   ` [U-Boot] [U-Boot, " Tom Rini
2014-08-22 10:42 ` [U-Boot] [PATCH 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16 Masahiro Yamada
2014-08-29 14:41   ` [U-Boot] [U-Boot, " Tom Rini
2014-08-22 10:42 ` [U-Boot] [PATCH 3/3] kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE Masahiro Yamada
2014-08-29 14:41   ` [U-Boot] [U-Boot,3/3] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.