public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH/RFC] Reintegration of ns9750
Date: Sun, 8 Jun 2014 21:08:46 +0200	[thread overview]
Message-ID: <E1WtiSV-0001ta-FC@janus> (raw)
In-Reply-To: <201403221927.48410.marex@denx.de>

Hi Marek,

On Sat, 22 Mar 2014 19:27:48 +0100, Marek Vasut <marex@denx.de> wrote:

> On Saturday, March 22, 2014 at 11:18:05 AM, Rikard S?derstr?m wrote:
> > Hi Marex,
> > 
> > Are you referring to the code or the linkage issue as "nasty"?
> 
> Actually, both. But more the linker issue this time ;-)

Ok, here is my take on the issue(s), based on the build messages. First
the compiler warnings:

> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/ns9750dev.c: In function 'board_init':
> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/ns9750dev.c:68:2: warning: #warning Please register your machine at http: [-Wcpp]

Hmm, apparently U-Boot targets now have to register to 'teh Internetz'.
That, or the warning above is being cut down because of the '//' in
the URL, which cpp sees as a comment-to-end-of-line. :)

> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c: In function 'flash_get_offsets':
> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c:122:10: warning: variable 'pOrgDef' set but not used [-Wunused-but-set-variable]
> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c: In function 'flash_erase':
> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c:263:6: warning: variable 'flag' set but not used [-Wunused-but-set-variable]
> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c: In function 'write_data':
> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c:439:6: warning: variable 'flag' set but not used [-Wunused-but-set-variable]

Those are trivial to solve. :)

> /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c: In
> function
> 'flash_init': /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c:132:16:
> warning: array subscript is above array bounds
> [-Warray-bounds] /home/albert.u.boot/src/u-boot-arm/board/ns9750dev/flash.c:133:18:
> warning: array subscript is above array bounds [-Warray-bounds]

Those, please investigate. I hate it when the compiler says indexes
might be out of bounds, because it will invariably result in them
*actually* getting out of bounds, in a manner which will make it
really hard to realize they did.
 
> /home/albert.u.boot/src/u-boot-arm/lib/time.c:14:2: warning: #warning "CONFIG_SYS_HZ must be 1000 and should not be defined by platforms" [-Wcpp]

This one we have treated before.

> arm-linux-gnueabi-ld.bfd: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elf32-arm.c:7696
> arm-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not found in the linker script
> arm-linux-gnueabi-ld.bfd: final link failed: Invalid operation

I've tried adding .rel.plt manually, but I got the same error. O_o

Then instead of using MAKEALL, I tried make clean && make
ns9750dev_config && make V=1... And got linker errors that I didn't get
with MAKEALL:

> arch/arm/lib/built-in.o: In function `board_init_r':
> /home/albert.u.boot/src/u-boot-arm/arch/arm/lib/board.c:662: undefined reference to `eth_initialize'
> arch/arm/lib/built-in.o:(.data.init_sequence+0xc): undefined reference to `env_init'
> common/built-in.o: In function `env_relocate':
> /home/albert.u.boot/src/u-boot-arm/common/env_common.c:269: undefined reference to `env_relocate_spec'
> drivers/serial/built-in.o: In function `get_current':
> /home/albert.u.boot/src/u-boot-arm/drivers/serial/serial.c:352: undefined reference to `default_serial_console'
> drivers/serial/built-in.o: In function `serial_initialize':
> /home/albert.u.boot/src/u-boot-arm/drivers/serial/serial.c:256: undefined reference to `default_serial_console'
> arm-linux-gnueabi-ld.bfd: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elf32-arm.c:7696
> arm-linux-gnueabi-ld.bfd: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elf32-arm.c:7696
> arm-linux-gnueabi-ld.bfd: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elf32-arm.c:7696
> arm-linux-gnueabi-ld.bfd: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elf32-arm.c:7696
> arm-linux-gnueabi-ld.bfd: error: required section '.rel.plt' not found in the linker script
> arm-linux-gnueabi-ld.bfd: final link failed: Invalid operation

So I wonder whether the linker error shown by MAKEALL is a rightful
error or just the result of previous linker issues. I would suggest
going after the undefined references then check again whether the
message about .rel.plt still comes up. 

Also: I wonder why building with make shows errors that MAKEALL doesn't.

> make[1]: *** [u-boot] Error 1
> make: *** [sub-make] Error 2

> Best regards,
> Marek Vasut


Amicalement,
-- 
Albert.

      parent reply	other threads:[~2014-06-08 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 15:53 [U-Boot] [PATCH/RFC] Reintegration of ns9750 soderstrom.rikard at gmail.com
2014-03-21 18:28 ` Marek Vasut
2014-03-22 10:18   ` Rikard Söderström
2014-03-22 18:27     ` Marek Vasut
2014-04-07 16:34       ` Albert ARIBAUD
2014-06-08 19:08       ` Albert ARIBAUD [this message]

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=E1WtiSV-0001ta-FC@janus \
    --to=albert.u.boot@aribaud.net \
    --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