public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] __FILE__ usage and and SPL limits for SRAM
Date: Tue, 28 Mar 2017 14:47:03 +0300	[thread overview]
Message-ID: <87k279hbd4.fsf@linux.intel.com> (raw)
In-Reply-To: <CAGo_u6r-ZE5MA1uWkRj-mK93066kZsiyNHquXESwqK9WiNjiqw@mail.gmail.com>


Hi,

Nishanth Menon <nm@ti.com> writes:
> Hi Masahiro-san,
>
> On Tue, Mar 28, 2017 at 1:29 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> [...]
>>
>> When O= is given, the build system runs in the object tree,
>> not in the source tree.
>> (This is the same as Linux.)
>>
>> If you see the top Makefile:
>>
>> ifeq ($(KBUILD_SRC),)
>>         # building in the source tree
>>         srctree := .
>> else
>>         ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
>>                 # building in a subdirectory of the source tree
>>                 srctree := ..
>>         else
>>                 srctree := $(KBUILD_SRC)
>>         endif
>> endif
>>
>>
>>
>>
>> If O=  points to a sub-directory of the source tree,
>> the relative path "srctree := .." is used.
>>
>> Otherwise, the absolute path srctree := $(KBUILD_SRC) is used.
>> In your case, "O=../b" means the source tree and the obj tree
>> are siblings.  So, absolute path.
>
> I did simplify this a bit with O=../b to highlight exactly what you
> mentioned above. in our case, the O=path points to a completely
> different directory path.
>
>> If you want to see a short relative path for __FILE__,
>> I'd recommend to use a sub-directory for O=.
>>
>> For example, your source tree is located at
>> ~/aaaaaaaaa/bbbbbbb/cccccccc/u-boot,
>> create a directory  ~/aaaaaaaaa/bbbbbbb/cccccccc/u-boot/foo,
>> then give  O=foo
>
> Typical product build such as OE recipes used (in our case) does not
> build into the source folder, instead, all binary builds are pointed
> to either a temporary location or a package build location. So, while
> O=source_path/build would aliviate the problem, it still does'nt
> really solve the root of the issue.

have you tried using __BASE_FILE__ instead of __FILE__? You could also
redefine __FILE__ or __BASE_FILE__ while building SPL.

-- 
balbi

  reply	other threads:[~2017-03-28 11:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 21:44 [U-Boot] __FILE__ usage and and SPL limits for SRAM Nishanth Menon
2017-03-28  6:07 ` Lokesh Vutla
2017-04-04 19:06   ` Tom Rini
2017-04-05 11:27     ` Wolfgang Denk
2017-04-09 19:27     ` Simon Glass
2017-04-22  5:30       ` Masahiro Yamada
2017-05-22 17:23         ` Denys Dmytriyenko
2017-05-23  0:57           ` Masahiro Yamada
2017-05-23  1:27             ` Tom Rini
2017-05-31  4:51               ` Masahiro Yamada
2017-05-31 11:32                 ` Tom Rini
2017-03-28  6:29 ` Masahiro Yamada
2017-03-28 11:20   ` Nishanth Menon
2017-03-28 11:47     ` Felipe Balbi [this message]
2017-03-28 11:59       ` Nishanth Menon
2017-03-29 10:57       ` Masahiro Yamada

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=87k279hbd4.fsf@linux.intel.com \
    --to=felipe.balbi@linux.intel.com \
    --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