Skip to contentSkip to conversation

Get AVR32 boards working with partial linking

PATCH New Andreas Bießmann 3 participants 9 messages Feb 9, 2011 – Apr 18, 2011 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

cover Get AVR32 boards working with partial linking

This patch series make avr32 boards compile again. They where broken by partial linking changes.

Additionally two warnings fixed. MAKEALL complained broken boards cause of these warnings.

In my opinion these changes are fixes and should go into v2011.03. Some more changes will follow for AVR32/AT91 rework branch.

All patches tested with atstk1002 and one selfmade board not in official tree.

Andreas Bie?mann (3):
cmd_nvedit: use explicit typecast for printf
avr32: fix linking
common/cmd_bdinfo.c: fix do_bdinfo() for AVR32

 arch/avr32/config.mk                   |    2 +-
 board/atmel/atngw100/config.mk         |    1 -
 board/atmel/atstk1000/config.mk        |    1 -
 board/earthlcd/favr-32-ezkit/config.mk |    1 -
 board/mimc/mimc200/config.mk           |    1 -
 board/miromico/hammerhead/config.mk    |    1 -
 common/cmd_bdinfo.c                    |    2 +-
 common/cmd_nvedit.c                    |    4 ++--
 8 files changed, 4 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/3 cmd_nvedit: use explicit typecast for printf

This patch fixes warnings in MAKEALL for avr32:

---8<---
cmd_nvedit.c: In function 'do_env_export':
cmd_nvedit.c:663: warning: format '%zX' expects type 'size_t', but argument 3 has type 'ssize_t' --->8---

---
 common/cmd_nvedit.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
common/cmd_nvedit.c +2 -2
index fb69c24..6d8512a 100644
@@ -659,7 +659,7 @@ static int do_env_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
 				errno);
 			return 1;
 		}
-		sprintf(buf, "%zX", len);
+		sprintf(buf, "%zX", (size_t)len);
 		setenv("filesize", buf);
 
 		return 0;
@@ -685,7 +685,7 @@ static int do_env_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
 		envp->flags = ACTIVE_FLAG;
 #endif
 	}
-	sprintf(buf, "%zX", len + offsetof(env_t,data));
+	sprintf(buf, "%zX", (size_t)(len + offsetof(env_t,data)));
 	setenv("filesize", buf);
 
 	return 0;
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 1/3 cmd_nvedit: use explicit typecast for printf

Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,

Quoted 11 lines · In message <[email protected]> you…

This patch fixes warnings in MAKEALL for avr32:

---8<---
cmd_nvedit.c: In function 'do_env_export':
cmd_nvedit.c:663: warning: format '%zX' expects type 'size_t', but argument 3 has type 'ssize_t' --->8---

---
 common/cmd_nvedit.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you want strict real-time behavior, run in the real  time  schedu-
ling class.  But there are no seatbelts or airbags;  main(){for(;;);}
can hard hang your system.                          -- Bart Smaalders
#3 lore raw

PATCH 2/3 avr32: fix linking

In reply to Andreas Bießmann

This patch fixes following error:

---8<---
avr32-linux-ld: --gc-sections and -r may not be used together --->8---

Since 8aba9dceebb14144e07d19593111ee3a999c37fc all avr32 boards are broken due to linking error as seen above.

---
 arch/avr32/config.mk                   |    2 +-
 board/atmel/atngw100/config.mk         |    1 -
 board/atmel/atstk1000/config.mk        |    1 -
 board/earthlcd/favr-32-ezkit/config.mk |    1 -
 board/mimc/mimc200/config.mk           |    1 -
 board/miromico/hammerhead/config.mk    |    1 -
 6 files changed, 1 insertions(+), 6 deletions(-)
arch/avr32/config.mk +1 -1
index 1121ca1..51b9995 100644
@@ -26,4 +26,4 @@ CROSS_COMPILE ?= avr32-linux-
 STANDALONE_LOAD_ADDR = 0x00000000
 
 PLATFORM_RELFLAGS	+= -ffixed-r5 -fPIC -mno-init-got -mrelax
-PLATFORM_LDFLAGS	+= --relax
+LDFLAGS_u-boot		= --gc-sections --relax
board/atmel/atngw100/config.mk +0 -1
index ea76d05..c3c7433 100644
@@ -1,3 +1,2 @@
 CONFIG_SYS_TEXT_BASE		= 0x00000000
 PLATFORM_RELFLAGS	+= -ffunction-sections -fdata-sections
-PLATFORM_LDFLAGS	+= --gc-sections
board/atmel/atstk1000/config.mk +0 -1
index 8c03b77..bec7b7d 100644
@@ -1,4 +1,3 @@
 PLATFORM_RELFLAGS	+= -ffunction-sections -fdata-sections
-PLATFORM_LDFLAGS	+= --gc-sections
 CONFIG_SYS_TEXT_BASE		= 0x00000000
 LDSCRIPT		= $(src)board/atmel/atstk1000/u-boot.lds
board/earthlcd/favr-32-ezkit/config.mk +0 -1
index f8bc88d..eb607ee 100644
@@ -1,4 +1,3 @@
 PLATFORM_RELFLAGS	+= -ffunction-sections -fdata-sections
-PLATFORM_LDFLAGS	+= --gc-sections
 CONFIG_SYS_TEXT_BASE		= 0x00000000
 LDSCRIPT		= $(src)board/earthlcd/favr-32-ezkit/u-boot.lds
board/mimc/mimc200/config.mk +0 -1
index ea76d05..c3c7433 100644
@@ -1,3 +1,2 @@
 CONFIG_SYS_TEXT_BASE		= 0x00000000
 PLATFORM_RELFLAGS	+= -ffunction-sections -fdata-sections
-PLATFORM_LDFLAGS	+= --gc-sections
board/miromico/hammerhead/config.mk +0 -1
index ea76d05..c3c7433 100644
@@ -1,3 +1,2 @@
 CONFIG_SYS_TEXT_BASE		= 0x00000000
 PLATFORM_RELFLAGS	+= -ffunction-sections -fdata-sections
-PLATFORM_LDFLAGS	+= --gc-sections
Signature · 1 line
1.7.2.3
#4 lore raw

PATCH 2/3 avr32: fix linking

Dear Andreas Bie?mann:

Quoted 10 lines

This patch fixes following error:

---8<---
avr32-linux-ld: --gc-sections and -r may not be used together --->8---

Since 8aba9dceebb14144e07d19593111ee3a999c37fc all avr32 boards are broken due to linking error as seen above.

Quoted 8 lines
---
 arch/avr32/config.mk                   |    2 +-
 board/atmel/atngw100/config.mk         |    1 -
 board/atmel/atstk1000/config.mk        |    1 -
 board/earthlcd/favr-32-ezkit/config.mk |    1 -
 board/mimc/mimc200/config.mk           |    1 -
 board/miromico/hammerhead/config.mk    |    1 -
 6 files changed, 1 insertions(+), 6 deletions(-)

Applied to u-boot-atmel/next, thanks.

Reinhard

#5 lore raw

PATCH 3/3 common/cmd_bdinfo.c: fix do_bdinfo() for AVR32

In reply to Andreas Bießmann

This patch fixes following warning message:

---8<---
cmd_bdinfo.c:458: warning: initialization from incompatible pointer type --->8---

There was a prototype change in 54841ab50c20d6fa6c9cc3eb826989da3a22d934 for argv[] pointer type to const. This change was not made for AVR32 cause this code came in later by a merge.

---
 common/cmd_bdinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_bdinfo.c +1 -1
index bba7374..1d76ffa 100644
@@ -304,7 +304,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_AVR32)
 
-int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	bd_t *bd = gd->bd;
 
Signature · 1 line
1.7.2.3
#6 lore raw

PATCH 3/3 common/cmd_bdinfo.c: fix do_bdinfo() for AVR32

Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,

Quoted 6 lines · In message <[email protected]> you…

This patch fixes following warning message:

---8<---
cmd_bdinfo.c:458: warning: initialization from incompatible pointer type --->8---

Quoted 8 lines

There was a prototype change in 54841ab50c20d6fa6c9cc3eb826989da3a22d934 for argv[] pointer type to const. This change was not made for AVR32 cause this code came in later by a merge.

---
 common/cmd_bdinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Overflow on /dev/null, please empty the bit bucket.
#7 lore raw

cover Get AVR32 boards working with partial linking

In reply to Andreas Bießmann

Dear Andreas Bie?mann,

Quoted 8 lines

This patch series make avr32 boards compile again. They where broken by partial linking changes.

Additionally two warnings fixed. MAKEALL complained broken boards cause of these warnings.

In my opinion these changes are fixes and should go into v2011.03. Some more changes will follow for AVR32/AT91 rework branch.

Ok, yes it should be a bug fix.

Quoted 8 lines

All patches tested with atstk1002 and one selfmade board not in official tree.

Andreas Bie?mann (3):
cmd_nvedit: use explicit typecast for printf
avr32: fix linking
common/cmd_bdinfo.c: fix do_bdinfo() for AVR32

Quoted 6 lines
 arch/avr32/config.mk                   |    2 +-
 board/atmel/atngw100/config.mk         |    1 -
 board/atmel/atstk1000/config.mk        |    1 -
 board/earthlcd/favr-32-ezkit/config.mk |    1 -
 board/mimc/mimc200/config.mk           |    1 -
 board/miromico/hammerhead/config.mk    |    1 -

I can take those through u-boot-atmel.

Quoted 2 lines
 common/cmd_bdinfo.c                    |    2 +-
 common/cmd_nvedit.c                    |    4 ++--

Shall I also handle those, or is someone else going to handle them? Wolfgang?

Best Regards,
Reinhard

#8 lore raw

cover Get AVR32 boards working with partial linking

Dear Reinhard Meyer,

Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 3 lines
 common/cmd_bdinfo.c                    |    2 +-
 common/cmd_nvedit.c                    |    4 ++--

Shall I also handle those, or is someone else going to handle them? Wolfgang?

I took these, thanks.

Best regards,

Wolfgang Denk

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Quoted 1 line

Is there a way to determine Yesterday's date using Unix utilities?

echo "what is yesterday's date?" | /bin/mail root -- Randal L. Schwartz in <[email protected]>