public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] printf("%d") breaks u-boot 2015.01+
Date: Mon, 13 Apr 2015 14:45:24 +0200	[thread overview]
Message-ID: <20150413124523.GA19441@amd> (raw)
In-Reply-To: <20150408160817.GR9524@bill-the-cat>

Hi!

> > I'll fire up ELDK 5.4 + Pandaboard later today (which uses thumb) but I
> > think you need to bisect down to when exactly things break since my gut
> > is telling me it's not toolchain / thumb but something else that broke
> > things.
> 
> Panda + ELDK 5.4, which sets CONFIG_SYS_THUMB_BUILD for both SPL and
> U-Boot boots up fine on top of tree, cold boot tested even.

Can you try with

CONFIG_USE_PRIVATE_LIBGCC=y

? Because it works for me, as long as I keep
CONFIG_USE_PRIVATE_LIBGCC unset.

Unfortunately, I need CONFIG_USE_PRIVATE_LIBGCC for my development
machine, otherwise I get compile failure.

It seems to me our private "library" would need special version for
thumb mode, in similar way memcpy.S needs it, no?

I think fix needs to be something along these lines, but this does not
work for me.

								Pavel

diff --git a/arch/arm/lib/_ashldi3.S b/arch/arm/lib/_ashldi3.S
index 2c26f84..0b537b0 100644
--- a/arch/arm/lib/_ashldi3.S
+++ b/arch/arm/lib/_ashldi3.S
@@ -12,6 +12,11 @@
 #define ah r1
 #endif
 
+#ifdef CONFIG_SYS_THUMB_BUILD
+	.thumb
+	.thumb_func
+#endif
+
 .globl __ashldi3
 .globl	__aeabi_llsl
 __ashldi3:
diff --git a/arch/arm/lib/_ashrdi3.S b/arch/arm/lib/_ashrdi3.S
index 4d93c8a..e1c1371 100644
--- a/arch/arm/lib/_ashrdi3.S
+++ b/arch/arm/lib/_ashrdi3.S
@@ -12,6 +12,11 @@
 #define ah r1
 #endif
 
+#ifdef CONFIG_SYS_THUMB_BUILD
+	.thumb
+	.thumb_func
+#endif
+	
 .globl __ashrdi3
 .globl __aeabi_lasr
 __ashrdi3:
diff --git a/arch/arm/lib/_divsi3.S b/arch/arm/lib/_divsi3.S
index 6015493..e073399 100644
--- a/arch/arm/lib/_divsi3.S
+++ b/arch/arm/lib/_divsi3.S
@@ -1,5 +1,9 @@
 .macro ARM_DIV_BODY dividend, divisor, result, curbit
 
+#ifdef CONFIG_SYS_THUMB_BUILD
+	.thumb
+	.thumb_func
+#endif
 #if __LINUX_ARM_ARCH__ >= 5
 
 	clz	\curbit, \divisor
diff --git a/arch/arm/lib/_lshrdi3.S b/arch/arm/lib/_lshrdi3.S
index 33296a0..b9efd4f 100644
--- a/arch/arm/lib/_lshrdi3.S
+++ b/arch/arm/lib/_lshrdi3.S
@@ -12,6 +12,11 @@
 #define ah r1
 #endif
 
+#ifdef CONFIG_SYS_THUMB_BUILD
+	.thumb
+	.thumb_func
+#endif
+
 .globl __lshrdi3
 .globl __aeabi_llsr
 __lshrdi3:
diff --git a/arch/arm/lib/_modsi3.S b/arch/arm/lib/_modsi3.S
index 3d31a55..d5c13f90 100644
--- a/arch/arm/lib/_modsi3.S
+++ b/arch/arm/lib/_modsi3.S
@@ -1,4 +1,8 @@
 .macro ARM_MOD_BODY dividend, divisor, order, spare
+#ifdef CONFIG_SYS_THUMB_BUILD
+	.thumb
+	.thumb_func
+#endif
 
 #if __LINUX_ARM_ARCH__ >= 5
 
diff --git a/arch/arm/lib/_umodsi3.S b/arch/arm/lib/_umodsi3.S
index 8465ef0..64385ad 100644
--- a/arch/arm/lib/_umodsi3.S
+++ b/arch/arm/lib/_umodsi3.S
@@ -1,6 +1,10 @@
 /* # 1 "libgcc1.S" */
 @ libgcc1 routines for ARM cpu.
 @ Division routines, written by Richard Earnshaw, (rearnsha at armltd.co.uk)
+#ifdef CONFIG_SYS_THUMB_BUILD
+	.thumb
+	.thumb_func
+#endif
 /* # 145 "libgcc1.S" */
 dividend	.req	r0
 divisor		.req	r1
diff --git a/mkit b/mkit
index 4b783ab..b956c4f 100755
--- a/mkit
+++ b/mkit
@@ -12,3 +12,4 @@ nice make -j 3 u-boot.img u-boot-dtb.bin && \
 
 # git diff 742de9076e8a8f44b77794b43e6175d86b897996 -- arch board common drivers include > ../wagabuibui.patch
 # scp ../wagabuibui.patch pavel at pollux.denx.de:~/wagabuibui/eldk/meta-eldk/recipes-bsp/uboot/u-boot/wagabuibui.patch
+# scp pavel at pollux.denx.de:~/wagabuibui/u-boot/u-boot-dtb.bin /srv/tftp/wagabuibui/u-boot.bin




-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2015-04-13 12:45 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 22:01 [U-Boot] [PATCHv3 00/17] Add SPL support for SoCFPGA dinguyen at opensource.altera.com
2015-03-30 22:01 ` [U-Boot] [PATCHv3 01/17] arm: socfpga: spl: Add main sdram code dinguyen at opensource.altera.com
2015-03-31  6:41   ` Wolfgang Denk
2015-04-03  2:00     ` Marek Vasut
2015-04-03  4:55       ` Dinh Nguyen
2015-04-03 23:31         ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 02/17] arm: socfpga: spl: Add CONFIG_SPL_MAX_SIZE to be 64KB dinguyen at opensource.altera.com
2015-04-03  1:44   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 03/17] arm: socfpga: add functions to bring sdram, timer, and uart out of reset dinguyen at opensource.altera.com
2015-04-03  1:45   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 04/17] arm: socfpga: spl: enable sdram, timer and uart dinguyen at opensource.altera.com
2015-04-03  1:45   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 05/17] arm: socfpga: spl: Add call to timer_init dinguyen at opensource.altera.com
2015-04-03  1:45   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 06/17] arm: socfpga: spl: allow bootrom to enable IOs after warm reset dinguyen at opensource.altera.com
2015-04-03  1:46   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 07/17] arm: socfpga: spl: add sdram init and calibration dinguyen at opensource.altera.com
2015-03-31 21:00   ` Pavel Machek
2015-04-03  1:47     ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 08/17] arm: socfpga: spl: printout sdram size dinguyen at opensource.altera.com
2015-04-03  1:47   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 09/17] arm: socfpga: spl: Use common lowlevel_init dinguyen at opensource.altera.com
2015-04-03  1:48   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 10/17] arm: socfpga: spl: Add s_init stub dinguyen at opensource.altera.com
2015-04-03  1:49   ` Marek Vasut
2015-04-07 14:31     ` Dinh Nguyen
2015-04-11 16:57       ` Marek Vasut
2015-04-13 15:20         ` Dinh Nguyen
2015-04-13 15:33           ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 11/17] arm: socfpga: spl: add CONFIG_SPL_STACK to socfpga_common.h dinguyen at opensource.altera.com
2015-04-03  1:50   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 12/17] arm: socfpga: spl: Adjust the SYS_INIT_RAM_SIZE to have room for the spl malloc dinguyen at opensource.altera.com
2015-04-03  1:51   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 13/17] arm: socfpga: spl: add board_init_f to SPL dinguyen at opensource.altera.com
2015-03-31 21:07   ` Pavel Machek
2015-04-03  1:52     ` Marek Vasut
2015-04-07 14:34       ` Dinh Nguyen
2015-04-11 16:57         ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 14/17] arm: socfpga: spl: Add SDRAM check dinguyen at opensource.altera.com
2015-03-31 21:11   ` Pavel Machek
2015-04-03  1:53     ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 15/17] arm: socfpga: spl: update pll_config for dev kit dinguyen at opensource.altera.com
2015-04-03  1:54   ` Marek Vasut
2015-04-15 20:49     ` Dinh Nguyen
2015-04-16  6:24       ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 16/17] arm: socfpga: remove the need to map sdram in arch_early_init dinguyen at opensource.altera.com
2015-03-31 21:13   ` Pavel Machek
2015-04-03  1:55   ` Marek Vasut
2015-03-30 22:01 ` [U-Boot] [PATCHv3 17/17] arm: socfpga: fix uart0 pin mux configuration dinguyen at opensource.altera.com
2015-03-31 20:48   ` Pavel Machek
2015-03-31 20:59     ` Dinh Nguyen
2015-03-31 21:13       ` Pavel Machek
2015-04-03  1:57         ` Marek Vasut
2015-04-03  1:56   ` Marek Vasut
2015-03-31 21:14 ` [U-Boot] [PATCHv3 00/17] Add SPL support for SoCFPGA Pavel Machek
2015-04-06 14:40 ` [U-Boot] printf("%d") breaks u-boot 2015.01+ Pavel Machek
2015-04-06 14:59   ` Marek Vasut
2015-04-06 18:14     ` Pavel Machek
2015-04-06 18:48       ` Marek Vasut
2015-04-06 19:23         ` Pavel Machek
2015-04-06 21:02           ` Marek Vasut
2015-04-07  7:53             ` Pavel Machek
2015-04-07 12:23     ` [U-Boot] u-boot 2015.04 on socfpga was " Pavel Machek
2015-04-07  5:13   ` [U-Boot] " Heiko Schocher
2015-04-07  7:56     ` Pavel Machek
2015-04-07  8:16       ` Heiko Schocher
2015-04-08 12:09         ` Pavel Machek
2015-04-08 13:13           ` Marek Vasut
2015-04-08 14:00             ` Pavel Machek
2015-04-13 11:12             ` [U-Boot] "socfpga sdram_applycfg" in mainline u-boot Pavel Machek
2015-04-13 11:24               ` Marek Vasut
2015-04-13 11:29                 ` Stefan Roese
2015-04-08 13:49           ` [U-Boot] printf("%d") breaks u-boot 2015.01+ Tom Rini
2015-04-08 14:06             ` Pavel Machek
2015-04-08 15:53               ` Tom Rini
2015-04-08 16:06                 ` Pavel Machek
2015-04-08 16:43                   ` Tom Rini
2015-04-08 16:08                 ` Tom Rini
2015-04-13 12:45                   ` Pavel Machek [this message]
2015-04-13 12:49                   ` [U-Boot] [patch] break build if it would produce broken binary Pavel Machek
2015-04-13 12:52                     ` Tom Rini
2015-04-13 20:38                       ` Pavel Machek
2015-06-02 17:11                         ` Simon Glass
2015-08-13 15:06                           ` Pavel Machek
2015-08-13 17:41                             ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150413124523.GA19441@amd \
    --to=pavel@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox