public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] MIPS: fix building and linking of standalone programs
@ 2018-09-23 17:15 Daniel Schwierzeck
  2018-09-23 17:15 ` [U-Boot] [PATCH 1/3] Kbuild: add LDFLAGS_STANDALONE Daniel Schwierzeck
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Daniel Schwierzeck @ 2018-09-23 17:15 UTC (permalink / raw)
  To: u-boot


This series fixes the long-time broken support of standalone
programs on MIPS. All MIPS standalone programs now use the
main MIPS linker script and all available code size optimizations.
Finally the deprecated Makefiles arch/mips/cpu/mips[32,64]/config.mk
could be removed.

The series also improves the passing of additional linker flags
to standalone programs by introducing a Makefile variable
LDFLAGS_STANDALONE. Currently the variable CONFIG_STANDALONE_LOAD_ADDR
is misused on some archs to pass the path to the linker script. The
variable LDFLAGS_STANDALONE now provides a cleaner way to do that.
Furthermore it is now possible to migrate CONFIG_STANDALONE_LOAD_ADDR
to Kconfig as a hex symbol.

Sample test session with Malta board in Qemu:

U-Boot 2018.09-00270-g19936da8bc (Sep 23 2018 - 18:43:17 +0200)

Board: MIPS Malta CoreLV
DRAM:  256 MiB
Flash: 4 MiB
*** Warning - bad CRC, using default environment

In:    serial at 3f8
Out:   serial at 3f8
Err:   serial at 3f8
Net:   pcnet#0
IDE:   Bus 0: not available
malta #
malta #
malta # dhcp 80200000 hello_world.bin
BOOTP broadcast 1
DHCP client bound to address 10.0.2.15 (3 ms)
Using pcnet#0 device
TFTP from server 10.0.2.2; our IP address is 10.0.2.15
Filename 'hello_world.bin'.
Load address: 0x80200000
Loading: ###
	 32.2 MiB/s
done
Bytes transferred = 33784 (83f8 hex)
malta # go 80200000
Example expects ABI version 9
Actual U-Boot ABI version 9
Hello World
argc = 1
argv[0] = "80200000"
argv[1] = "<NULL>"
Hit any key to exit ...

malta # go 80200000 666
Example expects ABI version 9
Actual U-Boot ABI version 9
Hello World
argc = 2
argv[0] = "80200000"
argv[1] = "666"
argv[2] = "<NULL>"
Hit any key to exit ...



Daniel Schwierzeck (3):
  Kbuild: add LDFLAGS_STANDALONE
  Kbuild: standalone: do not ignore platform-specific OBJCOPYFLAGS
  MIPS: fix linking of standalone programs

 arch/mips/config.mk            |  5 ++++
 arch/mips/cpu/mips32/config.mk |  7 ------
 arch/mips/cpu/mips64/config.mk |  7 ------
 arch/nds32/config.mk           |  4 ++--
 arch/riscv/config.mk           |  4 ++--
 arch/sh/config.mk              |  2 +-
 config.mk                      |  2 ++
 examples/standalone/Makefile   |  8 ++++---
 examples/standalone/mips.lds   | 42 ----------------------------------
 examples/standalone/mips64.lds | 42 ----------------------------------
 10 files changed, 17 insertions(+), 106 deletions(-)
 delete mode 100644 arch/mips/cpu/mips32/config.mk
 delete mode 100644 arch/mips/cpu/mips64/config.mk
 delete mode 100644 examples/standalone/mips.lds
 delete mode 100644 examples/standalone/mips64.lds

-- 
2.19.0

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

end of thread, other threads:[~2018-11-02 22:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-23 17:15 [U-Boot] [PATCH 0/3] MIPS: fix building and linking of standalone programs Daniel Schwierzeck
2018-09-23 17:15 ` [U-Boot] [PATCH 1/3] Kbuild: add LDFLAGS_STANDALONE Daniel Schwierzeck
2018-10-28 20:12   ` Daniel Schwierzeck
2018-10-29 13:34     ` Tom Rini
     [not found]       ` <752D002CFF5D0F4FA35C0100F1D73F3FA3A3B5EC@ATCPCS16.andestech.com>
2018-10-30  1:40         ` Rick Chen
2018-11-02 22:28   ` Daniel Schwierzeck
2018-09-23 17:15 ` [U-Boot] [PATCH 2/3] Kbuild: standalone: do not ignore platform-specific OBJCOPYFLAGS Daniel Schwierzeck
2018-10-28 20:13   ` Daniel Schwierzeck
2018-10-29 13:34     ` Tom Rini
2018-11-02 22:29   ` Daniel Schwierzeck
2018-09-23 17:15 ` [U-Boot] [PATCH 3/3] MIPS: fix linking of standalone programs Daniel Schwierzeck
2018-11-02 22:30   ` Daniel Schwierzeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox