* [U-Boot] [PATCH 1/7] kconfig: move CONFIG_SYS_HZ to lib/Kconfig
2014-09-26 10:23 [U-Boot] [PATCH 0/7] kconfig: Move CONFIG_SYS_HZ and CONFIG_USE_PRIVATE_LIBGCC, bug fixes Masahiro Yamada
@ 2014-09-26 10:23 ` Masahiro Yamada
2014-09-26 10:38 ` Marek Vasut
2014-09-26 10:23 ` [U-Boot] [PATCH 2/7] x86: set CONFIG_USE_PRIVATE_LIBGCC to y Masahiro Yamada
` (5 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Masahiro Yamada @ 2014-09-26 10:23 UTC (permalink / raw)
To: u-boot
CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h
(but some boards still have redundant definitions).
This commit moves the definition and the document in README to
Kconfig. Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000,
the sanity check in lib/time.c can be removed.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
README | 7 -------
include/config_fallbacks.h | 4 ----
include/configs/cm_fx6.h | 1 -
include/configs/edb93xx.h | 1 -
include/configs/ks2_evm.h | 1 -
include/configs/ls1021aqds.h | 1 -
include/configs/ls1021atwr.h | 1 -
include/configs/ls2085a_common.h | 2 --
include/configs/sunxi-common.h | 2 --
include/configs/tqma6.h | 1 -
lib/Kconfig | 8 ++++++++
lib/time.c | 4 ----
12 files changed, 8 insertions(+), 25 deletions(-)
diff --git a/README b/README
index 766e9e0..a698d19 100644
--- a/README
+++ b/README
@@ -611,13 +611,6 @@ The following options need to be configured:
exists, unlike the similar options in the Linux kernel. Do not
set these options unless they apply!
-- CPU timer options:
- CONFIG_SYS_HZ
-
- The frequency of the timer returned by get_timer().
- get_timer() must operate in milliseconds and this CONFIG
- option must be set to 1000.
-
- Linux Kernel Interface:
CONFIG_CLOCKS_IN_MHZ
diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index 76818f6..7d8daa2 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -79,10 +79,6 @@
#define CONFIG_SYS_PROMPT "=> "
#endif
-#ifndef CONFIG_SYS_HZ
-#define CONFIG_SYS_HZ 1000
-#endif
-
#ifndef CONFIG_FIT_SIGNATURE
#define CONFIG_IMAGE_FORMAT_LEGACY
#endif
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 10d02b4..26731e9 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -19,7 +19,6 @@
#define CONFIG_MX6
#define CONFIG_SYS_LITTLE_ENDIAN
#define CONFIG_MACH_TYPE 4273
-#define CONFIG_SYS_HZ 1000
/* Display information on boot */
#define CONFIG_DISPLAY_CPUINFO
diff --git a/include/configs/edb93xx.h b/include/configs/edb93xx.h
index 37bdcc0..47a8420 100644
--- a/include/configs/edb93xx.h
+++ b/include/configs/edb93xx.h
@@ -89,7 +89,6 @@
#define CONFIG_EP93XX 1 /* in a Cirrus Logic 93xx SoC */
#define CONFIG_SYS_CLK_FREQ 14745600 /* EP93xx has a 14.7456 clock */
-#define CONFIG_SYS_HZ 1000 /* decr freq: 1 ms ticks */
#undef CONFIG_USE_IRQ /* Don't need IRQ/FIQ */
/* Monitor configuration */
diff --git a/include/configs/ks2_evm.h b/include/configs/ks2_evm.h
index 51926f7..137d9b0 100644
--- a/include/configs/ks2_evm.h
+++ b/include/configs/ks2_evm.h
@@ -23,7 +23,6 @@
#define CONFIG_ARMV7
#define CONFIG_ARCH_CPU_INIT
#define CONFIG_SYS_ARCH_TIMER
-#define CONFIG_SYS_HZ 1000
#define CONFIG_SYS_TEXT_BASE 0x0c001000
#define CONFIG_SPL_TARGET "u-boot-spi.gph"
#define CONFIG_SYS_DCACHE_OFF
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 657e3b6..0d84f1e 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -357,7 +357,6 @@ unsigned long get_board_ddr_clk(void);
#define CONFIG_SYS_MEMTEST_END 0x9fffffff
#define CONFIG_SYS_LOAD_ADDR 0x82000000
-#define CONFIG_SYS_HZ 1000
/*
* Stack sizes
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 45b2272..1f4a716 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -259,7 +259,6 @@
#define CONFIG_SYS_MEMTEST_END 0x9fffffff
#define CONFIG_SYS_LOAD_ADDR 0x82000000
-#define CONFIG_SYS_HZ 1000
/*
* Stack sizes
diff --git a/include/configs/ls2085a_common.h b/include/configs/ls2085a_common.h
index 2bd5a47..8f0877f 100644
--- a/include/configs/ls2085a_common.h
+++ b/include/configs/ls2085a_common.h
@@ -176,8 +176,6 @@
#define CONFIG_NR_DRAM_BANKS 2
-#define CONFIG_SYS_HZ 1000
-
#define CONFIG_HWCONFIG
#define HWCONFIG_BUFFER_SIZE 128
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 1d947d7..0c117bc 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -105,8 +105,6 @@
/* standalone support */
#define CONFIG_STANDALONE_LOAD_ADDR 0x42000000
-#define CONFIG_SYS_HZ 1000
-
/* baudrate */
#define CONFIG_BAUDRATE 115200
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 2705d2c..d97a961 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -450,7 +450,6 @@
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
-#define CONFIG_SYS_HZ 1000
#define CONFIG_CMDLINE_EDITING
#define CONFIG_STACKSIZE (128u * SZ_1K)
diff --git a/lib/Kconfig b/lib/Kconfig
index 88e5da7..a889c22 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -8,4 +8,12 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED
If unsure, say N.
+config SYS_HZ
+ int
+ default 1000
+ help
+ The frequency of the timer returned by get_timer().
+ get_timer() must operate in milliseconds and this option must be
+ set to 1000.
+
endmenu
diff --git a/lib/time.c b/lib/time.c
index c7b0264..5ebd1be 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -10,10 +10,6 @@
#include <div64.h>
#include <asm/io.h>
-#if CONFIG_SYS_HZ != 1000
-#warning "CONFIG_SYS_HZ must be 1000 and should not be defined by platforms"
-#endif
-
#ifndef CONFIG_WD_PERIOD
# define CONFIG_WD_PERIOD (10 * 1000 * 1000) /* 10 seconds default */
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [U-Boot] [PATCH 1/7] kconfig: move CONFIG_SYS_HZ to lib/Kconfig
2014-09-26 10:23 ` [U-Boot] [PATCH 1/7] kconfig: move CONFIG_SYS_HZ to lib/Kconfig Masahiro Yamada
@ 2014-09-26 10:38 ` Marek Vasut
0 siblings, 0 replies; 13+ messages in thread
From: Marek Vasut @ 2014-09-26 10:38 UTC (permalink / raw)
To: u-boot
On Friday, September 26, 2014 at 12:23:22 PM, Masahiro Yamada wrote:
> CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h
> (but some boards still have redundant definitions).
>
> This commit moves the definition and the document in README to
> Kconfig. Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000,
> the sanity check in lib/time.c can be removed.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Nice,
Reviewed-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 2/7] x86: set CONFIG_USE_PRIVATE_LIBGCC to y
2014-09-26 10:23 [U-Boot] [PATCH 0/7] kconfig: Move CONFIG_SYS_HZ and CONFIG_USE_PRIVATE_LIBGCC, bug fixes Masahiro Yamada
2014-09-26 10:23 ` [U-Boot] [PATCH 1/7] kconfig: move CONFIG_SYS_HZ to lib/Kconfig Masahiro Yamada
@ 2014-09-26 10:23 ` Masahiro Yamada
2014-10-06 20:14 ` Simon Glass
2014-09-26 10:23 ` [U-Boot] [PATCH 3/7] kbuild: drop CONFIG_USE_PRIVATE_LIBGCC=<path/to/libgcc> syntax Masahiro Yamada
` (4 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Masahiro Yamada @ 2014-09-26 10:23 UTC (permalink / raw)
To: u-boot
The motivation of this commit is to change CONFIG_USE_PRIVATE_LIBGCC
to a boolean macro so we can move it to Kconfig.
In the current implementation, there are two forms of syntax
for this macro:
- CONFIG_USE_PRIVATE_LIBGCC=y
- CONFIG_USE_PRIVATE_LIBGCC=<path/to/private/libgcc>
The latter is only used by x86 architecture.
With a little bit refactoring, it can be converted to the former.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
---
arch/x86/config.mk | 3 ---
arch/x86/include/asm/config.h | 3 +++
arch/x86/lib/Makefile | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 3106079..3e7fedb 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -28,6 +28,3 @@ PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386
LDFLAGS_FINAL += --gc-sections -pie
LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3
LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3
-
-export NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
-CONFIG_USE_PRIVATE_LIBGCC := arch/x86/lib
diff --git a/arch/x86/include/asm/config.h b/arch/x86/include/asm/config.h
index f06a15c..6827424 100644
--- a/arch/x86/include/asm/config.h
+++ b/arch/x86/include/asm/config.h
@@ -8,4 +8,7 @@
#define _ASM_CONFIG_H_
#define CONFIG_SYS_GENERIC_BOARD
+
+#define CONFIG_USE_PRIVATE_LIBGCC
+
#endif
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index f7303ab..25b672a 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -20,9 +20,9 @@ obj-$(CONFIG_SYS_X86_TSC_TIMER) += tsc_timer.o
obj-$(CONFIG_VIDEO_VGA) += video.o
obj-$(CONFIG_CMD_ZBOOT) += zimage.o
-LIBGCC := $(notdir $(NORMAL_LIBGCC))
-extra-y := $(LIBGCC)
+extra-$(CONFIG_USE_PRIVATE_LIBGCC) := lib.a
+NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
OBJCOPYFLAGS := --prefix-symbols=__normal_
-$(obj)/$(LIBGCC): $(NORMAL_LIBGCC) FORCE
+$(obj)/lib.a: $(NORMAL_LIBGCC) FORCE
$(call if_changed,objcopy)
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [U-Boot] [PATCH 2/7] x86: set CONFIG_USE_PRIVATE_LIBGCC to y
2014-09-26 10:23 ` [U-Boot] [PATCH 2/7] x86: set CONFIG_USE_PRIVATE_LIBGCC to y Masahiro Yamada
@ 2014-10-06 20:14 ` Simon Glass
0 siblings, 0 replies; 13+ messages in thread
From: Simon Glass @ 2014-10-06 20:14 UTC (permalink / raw)
To: u-boot
On 26 September 2014 04:23, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> The motivation of this commit is to change CONFIG_USE_PRIVATE_LIBGCC
> to a boolean macro so we can move it to Kconfig.
>
> In the current implementation, there are two forms of syntax
> for this macro:
>
> - CONFIG_USE_PRIVATE_LIBGCC=y
> - CONFIG_USE_PRIVATE_LIBGCC=<path/to/private/libgcc>
>
> The latter is only used by x86 architecture.
> With a little bit refactoring, it can be converted to the former.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Tested on link (Chromebook Pixel)
Tested-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 3/7] kbuild: drop CONFIG_USE_PRIVATE_LIBGCC=<path/to/libgcc> syntax
2014-09-26 10:23 [U-Boot] [PATCH 0/7] kconfig: Move CONFIG_SYS_HZ and CONFIG_USE_PRIVATE_LIBGCC, bug fixes Masahiro Yamada
2014-09-26 10:23 ` [U-Boot] [PATCH 1/7] kconfig: move CONFIG_SYS_HZ to lib/Kconfig Masahiro Yamada
2014-09-26 10:23 ` [U-Boot] [PATCH 2/7] x86: set CONFIG_USE_PRIVATE_LIBGCC to y Masahiro Yamada
@ 2014-09-26 10:23 ` Masahiro Yamada
2014-10-06 20:15 ` Simon Glass
2014-09-26 10:23 ` [U-Boot] [PATCH 4/7] kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig Masahiro Yamada
` (3 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Masahiro Yamada @ 2014-09-26 10:23 UTC (permalink / raw)
To: u-boot
Now CONFIG_USE_PRIVATE_LIBGCC is only used as a boolean macro.
Remove CONFIG_USE_PRIVATE_LIBGCC=<path/to/libgcc> syntax.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
Makefile | 4 ----
1 file changed, 4 deletions(-)
diff --git a/Makefile b/Makefile
index 6221113..d506b2e 100644
--- a/Makefile
+++ b/Makefile
@@ -670,13 +670,9 @@ u-boot-main := $(libs-y)
# Add GCC lib
-ifdef CONFIG_USE_PRIVATE_LIBGCC
ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y)
PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a
else
-PLATFORM_LIBGCC = -L $(CONFIG_USE_PRIVATE_LIBGCC) -lgcc
-endif
-else
PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc
endif
PLATFORM_LIBS += $(PLATFORM_LIBGCC)
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [U-Boot] [PATCH 4/7] kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig
2014-09-26 10:23 [U-Boot] [PATCH 0/7] kconfig: Move CONFIG_SYS_HZ and CONFIG_USE_PRIVATE_LIBGCC, bug fixes Masahiro Yamada
` (2 preceding siblings ...)
2014-09-26 10:23 ` [U-Boot] [PATCH 3/7] kbuild: drop CONFIG_USE_PRIVATE_LIBGCC=<path/to/libgcc> syntax Masahiro Yamada
@ 2014-09-26 10:23 ` Masahiro Yamada
2014-10-06 20:15 ` Simon Glass
2014-09-26 10:23 ` [U-Boot] [PATCH 5/7] kbuild: fix a bug of the u-boot-spl link rule Masahiro Yamada
` (2 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Masahiro Yamada @ 2014-09-26 10:23 UTC (permalink / raw)
To: u-boot
The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86.
Those architectures should "select" HAVE_PRIVATE_LIBGCC and
CONFIG_USE_PRIVATE_LIBGCC should depend on it.
Currently, this option is enabled on Tegra boards and x86 architecture.
Move the definition from header files to Kconfig.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
---
arch/Kconfig | 5 +++++
arch/arm/cpu/armv7/tegra-common/Kconfig | 3 +++
arch/x86/Kconfig | 3 +++
arch/x86/include/asm/config.h | 2 --
include/configs/tegra-common.h | 4 ----
lib/Kconfig | 11 +++++++++++
6 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index bf26764..f63cc5a 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -7,6 +7,7 @@ config ARC
config ARM
bool "ARM architecture"
+ select HAVE_PRIVATE_LIBGCC
select SUPPORT_OF_CONTROL
config AVR32
@@ -24,6 +25,7 @@ config MICROBLAZE
config MIPS
bool "MIPS architecture"
+ select HAVE_PRIVATE_LIBGCC
config NDS32
bool "NDS32 architecture"
@@ -36,6 +38,7 @@ config OPENRISC
config PPC
bool "PowerPC architecture"
+ select HAVE_PRIVATE_LIBGCC
config SANDBOX
bool "Sandbox"
@@ -43,12 +46,14 @@ config SANDBOX
config SH
bool "SuperH architecture"
+ select HAVE_PRIVATE_LIBGCC
config SPARC
bool "SPARC architecture"
config X86
bool "x86 architecture"
+ select HAVE_PRIVATE_LIBGCC
select SUPPORT_OF_CONTROL
endchoice
diff --git a/arch/arm/cpu/armv7/tegra-common/Kconfig b/arch/arm/cpu/armv7/tegra-common/Kconfig
index bcae2d6..3ea6d76 100644
--- a/arch/arm/cpu/armv7/tegra-common/Kconfig
+++ b/arch/arm/cpu/armv7/tegra-common/Kconfig
@@ -17,6 +17,9 @@ config TEGRA124
endchoice
+config USE_PRIVATE_LIBGCC
+ default y if SPL_BUILD
+
config SYS_CPU
default "arm720t" if SPL_BUILD
default "armv7" if !SPL_BUILD
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ff9935a..0dba8ac 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -4,6 +4,9 @@ menu "x86 architecture"
config SYS_ARCH
default "x86"
+config USE_PRIVATE_LIBGCC
+ default y
+
choice
prompt "Target select"
diff --git a/arch/x86/include/asm/config.h b/arch/x86/include/asm/config.h
index 6827424..dd1329e 100644
--- a/arch/x86/include/asm/config.h
+++ b/arch/x86/include/asm/config.h
@@ -9,6 +9,4 @@
#define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_USE_PRIVATE_LIBGCC
-
#endif
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 834b3d5..c7b2778 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -152,10 +152,6 @@
#define CONFIG_SPL_SERIAL_SUPPORT
#define CONFIG_SPL_GPIO_SUPPORT
-#ifdef CONFIG_SPL_BUILD
-# define CONFIG_USE_PRIVATE_LIBGCC
-#endif
-
#define CONFIG_SYS_GENERIC_BOARD
/* Misc utility code */
diff --git a/lib/Kconfig b/lib/Kconfig
index a889c22..8460439 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -8,6 +8,17 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED
If unsure, say N.
+config HAVE_PRIVATE_LIBGCC
+ bool
+
+config USE_PRIVATE_LIBGCC
+ bool "Use private libgcc"
+ depends on HAVE_PRIVATE_LIBGCC
+ help
+ This option allows you to use the built-in libgcc implementation
+ of U-boot instead of the one privided by the compiler.
+ If unsure, say N.
+
config SYS_HZ
int
default 1000
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [U-Boot] [PATCH 4/7] kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig
2014-09-26 10:23 ` [U-Boot] [PATCH 4/7] kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig Masahiro Yamada
@ 2014-10-06 20:15 ` Simon Glass
0 siblings, 0 replies; 13+ messages in thread
From: Simon Glass @ 2014-10-06 20:15 UTC (permalink / raw)
To: u-boot
On 26 September 2014 04:23, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86.
> Those architectures should "select" HAVE_PRIVATE_LIBGCC and
> CONFIG_USE_PRIVATE_LIBGCC should depend on it.
>
> Currently, this option is enabled on Tegra boards and x86 architecture.
> Move the definition from header files to Kconfig.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Stephen Warren <swarren@nvidia.com>
> Cc: Tom Warren <twarren@nvidia.com>
For the x86 bits:
Acked-by: Simon Glass <sjg@chromium.org>
Tested on link (Chromebook Pixel)
Tested-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [U-Boot] [PATCH 5/7] kbuild: fix a bug of the u-boot-spl link rule
2014-09-26 10:23 [U-Boot] [PATCH 0/7] kconfig: Move CONFIG_SYS_HZ and CONFIG_USE_PRIVATE_LIBGCC, bug fixes Masahiro Yamada
` (3 preceding siblings ...)
2014-09-26 10:23 ` [U-Boot] [PATCH 4/7] kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig Masahiro Yamada
@ 2014-09-26 10:23 ` Masahiro Yamada
2014-09-26 10:23 ` [U-Boot] [PATCH 6/7] kconfig: invoke silentoldconfig if spl, tpl/.config is updated Masahiro Yamada
2014-09-26 10:23 ` [U-Boot] [PATCH 7/7] mips: enable CONFIG_USE_PRIVATE_LIBGCC by default Masahiro Yamada
6 siblings, 0 replies; 13+ messages in thread
From: Masahiro Yamada @ 2014-09-26 10:23 UTC (permalink / raw)
To: u-boot
cmd_u-boot-spl includes $(PLATFORM_LIBS) which changes
when CONFIG_USE_PRIVATE_GCC is updated. The u-boot-spl image
should be re-linked if any prerequisite is newer than it
or the command line has changed.
$(call, if_changed,...) should be used instead of $(call cmd,...).
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
scripts/Makefile.spl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 88c01d1..7afe437 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -216,13 +216,13 @@ $(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin
endif
quiet_cmd_u-boot-spl = LD $@
- cmd_u-boot-spl = cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
+ cmd_u-boot-spl = (cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
$(patsubst $(obj)/%,%,$(u-boot-spl-init)) --start-group \
$(patsubst $(obj)/%,%,$(u-boot-spl-main)) --end-group \
- $(PLATFORM_LIBS) -Map $(SPL_BIN).map -o $(SPL_BIN)
+ $(PLATFORM_LIBS) -Map $(SPL_BIN).map -o $(SPL_BIN))
-$(obj)/$(SPL_BIN): $(u-boot-spl-init) $(u-boot-spl-main) $(obj)/u-boot-spl.lds
- $(call cmd,u-boot-spl)
+$(obj)/$(SPL_BIN): $(u-boot-spl-init) $(u-boot-spl-main) $(obj)/u-boot-spl.lds FORCE
+ $(call if_changed,u-boot-spl)
$(sort $(u-boot-spl-init) $(u-boot-spl-main)): $(u-boot-spl-dirs) ;
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [U-Boot] [PATCH 6/7] kconfig: invoke silentoldconfig if spl, tpl/.config is updated
2014-09-26 10:23 [U-Boot] [PATCH 0/7] kconfig: Move CONFIG_SYS_HZ and CONFIG_USE_PRIVATE_LIBGCC, bug fixes Masahiro Yamada
` (4 preceding siblings ...)
2014-09-26 10:23 ` [U-Boot] [PATCH 5/7] kbuild: fix a bug of the u-boot-spl link rule Masahiro Yamada
@ 2014-09-26 10:23 ` Masahiro Yamada
2014-09-26 10:23 ` [U-Boot] [PATCH 7/7] mips: enable CONFIG_USE_PRIVATE_LIBGCC by default Masahiro Yamada
6 siblings, 0 replies; 13+ messages in thread
From: Masahiro Yamada @ 2014-09-26 10:23 UTC (permalink / raw)
To: u-boot
When spl/.config is updated by "make spl/menuconfig" or friends,
spl/include/config/auto.conf, spl/include/generated/autoconf.h
and some other files must be updated by "make silentoldconfig".
There is no hook for SPL in the top Makefile, so this commit
touches .config when spl/.config is updated to invoke silentoldconfig.
Likewise for TPL.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
scripts/multiconfig.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh
index b5185a8..d128bee 100644
--- a/scripts/multiconfig.sh
+++ b/scripts/multiconfig.sh
@@ -297,9 +297,24 @@ do_others () {
else
objdir=${1%/*}
check_enabled_subimage $1 $objdir
+
+ if [ -f "$objdir/$KCONFIG_CONFIG" ]; then
+ timestamp_before=$(stat --printf="%Y" \
+ $objdir/$KCONFIG_CONFIG)
+ fi
fi
run_make_config $target $objdir
+
+ if [ "$timestamp_before" -a -f "$objdir/$KCONFIG_CONFIG" ]; then
+ timestamp_after=$(stat --printf="%Y" $objdir/$KCONFIG_CONFIG)
+
+ if [ "$timestamp_after" -gt "$timestamp_before" ]; then
+ # $objdir/.config has been updated.
+ # touch .config to invoke "make silentoldconfig"
+ touch $KCONFIG_CONFIG
+ fi
+ fi
}
progname=$(basename $0)
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [U-Boot] [PATCH 7/7] mips: enable CONFIG_USE_PRIVATE_LIBGCC by default
2014-09-26 10:23 [U-Boot] [PATCH 0/7] kconfig: Move CONFIG_SYS_HZ and CONFIG_USE_PRIVATE_LIBGCC, bug fixes Masahiro Yamada
` (5 preceding siblings ...)
2014-09-26 10:23 ` [U-Boot] [PATCH 6/7] kconfig: invoke silentoldconfig if spl, tpl/.config is updated Masahiro Yamada
@ 2014-09-26 10:23 ` Masahiro Yamada
2014-10-08 10:16 ` Daniel Schwierzeck
6 siblings, 1 reply; 13+ messages in thread
From: Masahiro Yamada @ 2014-09-26 10:23 UTC (permalink / raw)
To: u-boot
Without the private libgcc, we need a full multilib toolchain with
different libgcc or multiple toolchains to build all BE/LE and
hard-float/soft-float variants of MIPS boards. That is not feasible.
This commit allows us to build all the MIPS boards with a single
kernel.org toolchain:
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
x86_64-gcc-4.9.0-nolibc_mips-linux.tar.xz
This change would be reasonable for most users. If necessary,
you can disable this option via "make menuconfig" or friends.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
arch/mips/Kconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 7686b77..9b72bab 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -4,6 +4,9 @@ menu "MIPS architecture"
config SYS_ARCH
default "mips"
+config USE_PRIVATE_LIBGCC
+ default y
+
choice
prompt "Target select"
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [U-Boot] [PATCH 7/7] mips: enable CONFIG_USE_PRIVATE_LIBGCC by default
2014-09-26 10:23 ` [U-Boot] [PATCH 7/7] mips: enable CONFIG_USE_PRIVATE_LIBGCC by default Masahiro Yamada
@ 2014-10-08 10:16 ` Daniel Schwierzeck
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Schwierzeck @ 2014-10-08 10:16 UTC (permalink / raw)
To: u-boot
On 26.09.2014 12:23, Masahiro Yamada wrote:
> Without the private libgcc, we need a full multilib toolchain with
> different libgcc or multiple toolchains to build all BE/LE and
> hard-float/soft-float variants of MIPS boards. That is not feasible.
>
> This commit allows us to build all the MIPS boards with a single
> kernel.org toolchain:
>
> https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
> x86_64-gcc-4.9.0-nolibc_mips-linux.tar.xz
>
> This change would be reasonable for most users. If necessary,
> you can disable this option via "make menuconfig" or friends.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
>
> arch/mips/Kconfig | 3 +++
> 1 file changed, 3 insertions(+)
>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
--
- Daniel
^ permalink raw reply [flat|nested] 13+ messages in thread