mbox

[U-Boot] Pull request: u-boot-mips

Message ID 6f9e245d-6214-bb54-fad7-d44461b56ab9@gmail.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Pull-request

git://git.denx.de/u-boot-mips.git master

Message

Daniel Schwierzeck July 12, 2017, 8:32 p.m. UTC
Hi Tom,

This supports dynamic relocation on MIPS without the need for building a 
position-independent executable. This notably reduces the code size for 
all MIPS boards. 


The following changes since commit d85ca029f257b53a96da6c2fb421e78a003a9943:

  Prepare v2017.07 (2017-07-10 13:07:38 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-mips.git master

for you to fetch changes up to f653dcd5720c4135607211f7304283d7a8ec3b8a:

  MIPS: bootm: Fix broken boot_env_legacy codepath (2017-07-12 22:10:42 +0200)

----------------------------------------------------------------
Paul Burton (2):
      Makefile: Allow arch post-link hook
      MIPS: Stop building position independent code

Zubair Lutfullah Kakakhel (1):
      MIPS: bootm: Fix broken boot_env_legacy codepath

 Makefile                         |   7 +-
 arch/mips/Makefile.postlink      |  23 ++++++
 arch/mips/config.mk              |  21 ++---
 arch/mips/cpu/start.S            | 130 -------------------------------
 arch/mips/cpu/u-boot.lds         |  41 +++-------
 arch/mips/include/asm/relocs.h   |  24 ++++++
 arch/mips/include/asm/sections.h |   7 ++
 arch/mips/lib/Makefile           |   1 +
 arch/mips/lib/bootm.c            |   8 +-
 arch/mips/lib/reloc.c            | 164 +++++++++++++++++++++++++++++++++++++++
 common/board_f.c                 |   2 +-
 tools/.gitignore                 |   1 +
 tools/Makefile                   |   2 +
 tools/mips-relocs.c              | 426 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 14 files changed, 672 insertions(+), 185 deletions(-)
 create mode 100644 arch/mips/Makefile.postlink
 create mode 100644 arch/mips/include/asm/relocs.h
 create mode 100644 arch/mips/lib/reloc.c
 create mode 100644 tools/mips-relocs.c

Comments

Tom Rini July 12, 2017, 8:57 p.m. UTC | #1
On Wed, Jul 12, 2017 at 10:32:29PM +0200, Daniel Schwierzeck wrote:

> Hi Tom,
> 
> This supports dynamic relocation on MIPS without the need for building a 
> position-independent executable. This notably reduces the code size for 
> all MIPS boards. 
> 
> 
> The following changes since commit d85ca029f257b53a96da6c2fb421e78a003a9943:
> 
>   Prepare v2017.07 (2017-07-10 13:07:38 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-mips.git master
> 
> for you to fetch changes up to f653dcd5720c4135607211f7304283d7a8ec3b8a:
> 
>   MIPS: bootm: Fix broken boot_env_legacy codepath (2017-07-12 22:10:42 +0200)
> 

I'm seeing:
      mips:  +   tplink_wdr4300
+(tplink_wdr4300)    pfx##hdr32[idx].field = _val;   \
+(tplink_wdr4300)                          ^
+(tplink_wdr4300) ../tools/mips-relocs.c:51:11: note: ?_val? was declared here
+(tplink_wdr4300)   uint64_t _val;      \
+(tplink_wdr4300)            ^
+(tplink_wdr4300) ../tools/mips-relocs.c:88:2: note: in expansion of macro ?set_hdr_field?
+(tplink_wdr4300)   set_hdr_field(p, idx, field, val)
+(tplink_wdr4300)   ^~~~~~~~~~~~~
+(tplink_wdr4300) ../tools/mips-relocs.c:408:3: note: in expansion of macro ?set_phdr_field?
+(tplink_wdr4300)    set_phdr_field(i, p_filesz, load_sz);
+(tplink_wdr4300)    ^~~~~~~~~~~~~~
w+(tplink_wdr4300) ../tools/mips-relocs.c: In function ?main?:
w+(tplink_wdr4300) ../tools/mips-relocs.c:77:25: warning: ?_val? may be used uninitialized in this function [-Wmaybe-uninitialized]

for what I suspect is going to be all MIPS.  Host tools here are gcc-6.3.
Tom Rini July 13, 2017, 12:33 a.m. UTC | #2
On Wed, Jul 12, 2017 at 04:57:42PM -0400, Tom Rini wrote:
> On Wed, Jul 12, 2017 at 10:32:29PM +0200, Daniel Schwierzeck wrote:
> 
> > Hi Tom,
> > 
> > This supports dynamic relocation on MIPS without the need for building a 
> > position-independent executable. This notably reduces the code size for 
> > all MIPS boards. 
> > 
> > 
> > The following changes since commit d85ca029f257b53a96da6c2fb421e78a003a9943:
> > 
> >   Prepare v2017.07 (2017-07-10 13:07:38 -0400)
> > 
> > are available in the git repository at:
> > 
> >   git://git.denx.de/u-boot-mips.git master
> > 
> > for you to fetch changes up to f653dcd5720c4135607211f7304283d7a8ec3b8a:
> > 
> >   MIPS: bootm: Fix broken boot_env_legacy codepath (2017-07-12 22:10:42 +0200)
> > 
> 
> I'm seeing:
>       mips:  +   tplink_wdr4300
> +(tplink_wdr4300)    pfx##hdr32[idx].field = _val;   \
> +(tplink_wdr4300)                          ^
> +(tplink_wdr4300) ../tools/mips-relocs.c:51:11: note: ?_val? was declared here
> +(tplink_wdr4300)   uint64_t _val;      \
> +(tplink_wdr4300)            ^
> +(tplink_wdr4300) ../tools/mips-relocs.c:88:2: note: in expansion of macro ?set_hdr_field?
> +(tplink_wdr4300)   set_hdr_field(p, idx, field, val)
> +(tplink_wdr4300)   ^~~~~~~~~~~~~
> +(tplink_wdr4300) ../tools/mips-relocs.c:408:3: note: in expansion of macro ?set_phdr_field?
> +(tplink_wdr4300)    set_phdr_field(i, p_filesz, load_sz);
> +(tplink_wdr4300)    ^~~~~~~~~~~~~~
> w+(tplink_wdr4300) ../tools/mips-relocs.c: In function ?main?:
> w+(tplink_wdr4300) ../tools/mips-relocs.c:77:25: warning: ?_val? may be used uninitialized in this function [-Wmaybe-uninitialized]
> 
> for what I suspect is going to be all MIPS.  Host tools here are gcc-6.3.

Yeah, this is all MIPS boards.  Please fix, thanks!
Daniel Schwierzeck July 13, 2017, 10:51 a.m. UTC | #3
Hi Paul,

2017-07-13 2:33 GMT+02:00 Tom Rini <trini@konsulko.com>:
> On Wed, Jul 12, 2017 at 04:57:42PM -0400, Tom Rini wrote:
>> On Wed, Jul 12, 2017 at 10:32:29PM +0200, Daniel Schwierzeck wrote:
>>
>> > Hi Tom,
>> >
>> > This supports dynamic relocation on MIPS without the need for building a
>> > position-independent executable. This notably reduces the code size for
>> > all MIPS boards.
>> >
>> >
>> > The following changes since commit d85ca029f257b53a96da6c2fb421e78a003a9943:
>> >
>> >   Prepare v2017.07 (2017-07-10 13:07:38 -0400)
>> >
>> > are available in the git repository at:
>> >
>> >   git://git.denx.de/u-boot-mips.git master
>> >
>> > for you to fetch changes up to f653dcd5720c4135607211f7304283d7a8ec3b8a:
>> >
>> >   MIPS: bootm: Fix broken boot_env_legacy codepath (2017-07-12 22:10:42 +0200)
>> >
>>
>> I'm seeing:
>>       mips:  +   tplink_wdr4300
>> +(tplink_wdr4300)    pfx##hdr32[idx].field = _val;   \
>> +(tplink_wdr4300)                          ^
>> +(tplink_wdr4300) ../tools/mips-relocs.c:51:11: note: ?_val? was declared here
>> +(tplink_wdr4300)   uint64_t _val;      \
>> +(tplink_wdr4300)            ^
>> +(tplink_wdr4300) ../tools/mips-relocs.c:88:2: note: in expansion of macro ?set_hdr_field?
>> +(tplink_wdr4300)   set_hdr_field(p, idx, field, val)
>> +(tplink_wdr4300)   ^~~~~~~~~~~~~
>> +(tplink_wdr4300) ../tools/mips-relocs.c:408:3: note: in expansion of macro ?set_phdr_field?
>> +(tplink_wdr4300)    set_phdr_field(i, p_filesz, load_sz);
>> +(tplink_wdr4300)    ^~~~~~~~~~~~~~
>> w+(tplink_wdr4300) ../tools/mips-relocs.c: In function ?main?:
>> w+(tplink_wdr4300) ../tools/mips-relocs.c:77:25: warning: ?_val? may be used uninitialized in this function [-Wmaybe-uninitialized]
>>
>> for what I suspect is going to be all MIPS.  Host tools here are gcc-6.3.
>
> Yeah, this is all MIPS boards.  Please fix, thanks!
>

Paul, could you send a follow-up patch to fix this? Thanks.
Daniel Schwierzeck July 13, 2017, 11:05 a.m. UTC | #4
Hi Tom,

2017-07-12 22:57 GMT+02:00 Tom Rini <trini@konsulko.com>:
> On Wed, Jul 12, 2017 at 10:32:29PM +0200, Daniel Schwierzeck wrote:
>
>> Hi Tom,
>>
>> This supports dynamic relocation on MIPS without the need for building a
>> position-independent executable. This notably reduces the code size for
>> all MIPS boards.
>>
>>
>> The following changes since commit d85ca029f257b53a96da6c2fb421e78a003a9943:
>>
>>   Prepare v2017.07 (2017-07-10 13:07:38 -0400)
>>
>> are available in the git repository at:
>>
>>   git://git.denx.de/u-boot-mips.git master
>>
>> for you to fetch changes up to f653dcd5720c4135607211f7304283d7a8ec3b8a:
>>
>>   MIPS: bootm: Fix broken boot_env_legacy codepath (2017-07-12 22:10:42 +0200)
>>
>
> I'm seeing:
>       mips:  +   tplink_wdr4300
> +(tplink_wdr4300)    pfx##hdr32[idx].field = _val;   \
> +(tplink_wdr4300)                          ^
> +(tplink_wdr4300) ../tools/mips-relocs.c:51:11: note: ?_val? was declared here
> +(tplink_wdr4300)   uint64_t _val;      \
> +(tplink_wdr4300)            ^
> +(tplink_wdr4300) ../tools/mips-relocs.c:88:2: note: in expansion of macro ?set_hdr_field?
> +(tplink_wdr4300)   set_hdr_field(p, idx, field, val)
> +(tplink_wdr4300)   ^~~~~~~~~~~~~
> +(tplink_wdr4300) ../tools/mips-relocs.c:408:3: note: in expansion of macro ?set_phdr_field?
> +(tplink_wdr4300)    set_phdr_field(i, p_filesz, load_sz);
> +(tplink_wdr4300)    ^~~~~~~~~~~~~~
> w+(tplink_wdr4300) ../tools/mips-relocs.c: In function ?main?:
> w+(tplink_wdr4300) ../tools/mips-relocs.c:77:25: warning: ?_val? may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> for what I suspect is going to be all MIPS.  Host tools here are gcc-6.3.
>

how about adding a separate build step in Travis CI for all host tools
and building that step with different compilers (recent gcc or clang)?
Or we always install a recent x86_64 toolchain and override the host
toolchain contained in the Ubuntu builder image. This toolchain is
then used for all build steps.
Tom Rini July 13, 2017, 12:30 p.m. UTC | #5
On Thu, Jul 13, 2017 at 01:05:33PM +0200, Daniel Schwierzeck wrote:
> Hi Tom,
> 
> 2017-07-12 22:57 GMT+02:00 Tom Rini <trini@konsulko.com>:
> > On Wed, Jul 12, 2017 at 10:32:29PM +0200, Daniel Schwierzeck wrote:
> >
> >> Hi Tom,
> >>
> >> This supports dynamic relocation on MIPS without the need for building a
> >> position-independent executable. This notably reduces the code size for
> >> all MIPS boards.
> >>
> >>
> >> The following changes since commit d85ca029f257b53a96da6c2fb421e78a003a9943:
> >>
> >>   Prepare v2017.07 (2017-07-10 13:07:38 -0400)
> >>
> >> are available in the git repository at:
> >>
> >>   git://git.denx.de/u-boot-mips.git master
> >>
> >> for you to fetch changes up to f653dcd5720c4135607211f7304283d7a8ec3b8a:
> >>
> >>   MIPS: bootm: Fix broken boot_env_legacy codepath (2017-07-12 22:10:42 +0200)
> >>
> >
> > I'm seeing:
> >       mips:  +   tplink_wdr4300
> > +(tplink_wdr4300)    pfx##hdr32[idx].field = _val;   \
> > +(tplink_wdr4300)                          ^
> > +(tplink_wdr4300) ../tools/mips-relocs.c:51:11: note: ?_val? was declared here
> > +(tplink_wdr4300)   uint64_t _val;      \
> > +(tplink_wdr4300)            ^
> > +(tplink_wdr4300) ../tools/mips-relocs.c:88:2: note: in expansion of macro ?set_hdr_field?
> > +(tplink_wdr4300)   set_hdr_field(p, idx, field, val)
> > +(tplink_wdr4300)   ^~~~~~~~~~~~~
> > +(tplink_wdr4300) ../tools/mips-relocs.c:408:3: note: in expansion of macro ?set_phdr_field?
> > +(tplink_wdr4300)    set_phdr_field(i, p_filesz, load_sz);
> > +(tplink_wdr4300)    ^~~~~~~~~~~~~~
> > w+(tplink_wdr4300) ../tools/mips-relocs.c: In function ?main?:
> > w+(tplink_wdr4300) ../tools/mips-relocs.c:77:25: warning: ?_val? may be used uninitialized in this function [-Wmaybe-uninitialized]
> >
> > for what I suspect is going to be all MIPS.  Host tools here are gcc-6.3.
> 
> how about adding a separate build step in Travis CI for all host tools
> and building that step with different compilers (recent gcc or clang)?
> Or we always install a recent x86_64 toolchain and override the host
> toolchain contained in the Ubuntu builder image. This toolchain is
> then used for all build steps.

Travis CI doesn't fail on warning only.  I'd like to move us to an
optional -Werror, but we're not there yet either.  That said, we might
be able to force clang to be used, which would probably have caught
that, even in the version shipped in Ubuntu 14.04, more easily than we
can update the host tools on the VMs.  But I'd be happy to look at
patches and I know you can tell travis to add feeds and then update
things.