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] arm64: No rule to make checkarmreloc
Date: Tue, 14 Jul 2015 17:04:20 +0200	[thread overview]
Message-ID: <20150714170420.548baa22@lilith> (raw)
In-Reply-To: <CAD6G_RRCo76nsz2jt7dKC1G7hJT9Q_zXPraCVzPwOzO-dY3kWw@mail.gmail.com>

Hello Jagan,

On Tue, 14 Jul 2015 17:32:06 +0530, Jagan Teki <jteki@openedev.com>
wrote:
> Hi Albert,
> 
> I have enabled SPL support for ARM64 target and make a build.
> 
> log:
>   LD      u-boot
> RELOC="`aarch64-linux-gnu-readelf -r -W u-boot | cut -d ' ' -f 4 | \
> grep R_A | sort -u`"; \
> if test "$RELOC" != "R_ARM_RELATIVE" -a \
> "$RELOC" != "R_AARCH64_RELATIVE"; then \
> echo "u-boot contains unexpected relocations: $RELOC"; \
> false; \
> fi

Not sure why the above appears here; it should not be displayed at all.

>   OBJCOPY u-boot.srec
>   OBJCOPY u-boot.bin
> start=$(aarch64-linux-gnu-nm u-boot | grep __rel_dyn_start | cut -f 1
> -d ' '); end=$(aarch64-linux-gnu-nm u-boot | grep __rel_dyn_end | cut
> -f 1 -d ' '); tools/relocate-rela u-boot.bin 0x4000000000 $start $end
>   CFG     u-boot.cfg
> make[1]: *** No rule to make target `checkarmreloc', needed by `all'.  Stop.
> make: *** [spl/u-boot-spl] Error 2

Note that the error message here is different from the one which the
rule above may emit.

> $ file u-boot
> u-boot:      ELF 64-bit LSB  executable, ARM aarch64, version 1
> (SYSV), statically linked, not stripped
> 
> Does this an issue with ELF where relocation record other than
> R_ARM_RELATIVE or something, any help?

Since the error message is not the one which the relocation check may
emit, this is not a relocation problem. You can check for yourself by
executing:

$ aarch64-linux-gnu-readelf -r -W u-boot | cut -d ' ' -f 4 | \
> grep R_A | sort -u

This should produce a single line:

	R_AARCH64_RELATIVE

If it does, then the binary is fine (and I think it is).

The problem you have is with 'checkarmreloc' itself.

A git grep checkarmreloc shows only two instances in the source code:

Makefile:checkarmreloc: u-boot
arch/arm/config.mk:ALL-y += checkarmreloc

The first occurrence is the definition of the 'checkarmreloc' target:
it depends on u-boot and does the check about R_A*_RELATIVE. This
definition has no effect until Make is instructed to actually build the
target. 

The second occurrence adds the checkarmreloc target to the list of
targets to build -- but only if not doing an SP build. So how come it
tried to build that target in your case?

The only way we can find is that you indicate which target you were
actually building and what changes you made to mainline U-Boot to get
it to build.

Can you make the exact source code available as a branch on a git repo
somewhere, and also indicate the exact command line you used? If not,
can you provide a complete log, possibly passing V=1 to your 'make'
command?

> thanks!
> -- 
> Jagan | openedev.

Amicalement,
-- 
Albert.

      parent reply	other threads:[~2015-07-14 15:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 12:02 [U-Boot] arm64: No rule to make checkarmreloc Jagan Teki
2015-07-14 14:56 ` Jagan Teki
2015-07-14 15:04 ` 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=20150714170420.548baa22@lilith \
    --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