public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/5] mx6cuboxi: Load the correct 'fdt_file' variable
Date: Thu, 23 Apr 2015 20:26:02 +0200	[thread overview]
Message-ID: <5539393A.2080804@denx.de> (raw)
In-Reply-To: <CAOMZO5AhJ8w7xu-FQg5pN8NvP48qobsJUYVDZ5YXX2ksdqExPw@mail.gmail.com>

Hi Fabio,

On 23/04/2015 19:18, Fabio Estevam wrote:

>> What about to export your is_hummingboard() function as U-Boot command ?
>> You can then use it in U-Boot scripts, and the correct fdt name can be
>> set in the "bootcmd" variable. Something like "if is_humming;then ..."
> 
> I am not sure how I can retrieve the returned value from
> is_hummingboard() as a U-boot command and use it inside a script?
> Maybe I did not understand your suggestion. Please advise.

U_BOOT_CMD returns a value that can be evaluated, exactly as we do with
"if tftp.." or for other commands. So you could implement:

U_BOOT_CMD(is_hummingbird, 1, 1, do_is_hummingbird, ..

and the do_is_hummingbird can return CMD_RET_SUCCESS or CMD_RET_FAILURE.
This is then evaluated in the script as "if is_hummingbird;then
fdt_file=....;else fdt_file=...;fi"

> 
>> And if a user wants to use other names, he can because it is not hard-coded.
> 
> Yes, I understand the concern, but in this specific case we are
> talking about a DTB file, which is board specific and cannot really
> change.

Well, maybe I am alone, but I am used to have several DTB files during
the developmnet phase - I agree with you that at the end there should be
only one DTB file.

Anyway, my was only a proposal - it is also fine if you decide to
maintain the current implementation.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  reply	other threads:[~2015-04-23 18:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23  3:57 [U-Boot] [PATCH 1/5] mx6cuboxi: Fix the defconfig name Fabio Estevam
2015-04-23  3:57 ` [U-Boot] [PATCH 2/5] mx6cuboxi: Prepare for multi SoC support Fabio Estevam
2015-04-23  6:14   ` Stefano Babic
2015-04-23  3:57 ` [U-Boot] [PATCH 3/5] mx6cuboxi: Introduce multi-SoC support Fabio Estevam
2015-04-23  6:16   ` Stefano Babic
2015-04-23 19:09   ` Tom Rini
2015-04-23  3:57 ` [U-Boot] [PATCH 4/5] mx6cuboxi: Differentiate Cubox-i and Hummingboard Fabio Estevam
2015-04-23  6:16   ` Stefano Babic
2015-04-23 14:38   ` Nikolay Dimitrov
2015-04-23 15:17     ` Stefano Babic
2015-04-23  3:57 ` [U-Boot] [PATCH 5/5] mx6cuboxi: Load the correct 'fdt_file' variable Fabio Estevam
2015-04-23  6:13   ` Stefano Babic
2015-04-23 17:18     ` Fabio Estevam
2015-04-23 18:26       ` Stefano Babic [this message]
2015-04-23 19:10     ` Tom Rini
2015-04-23 18:47   ` [U-Boot] [U-Boot, " Vagrant Cascadian
2015-04-23  6:14 ` [U-Boot] [PATCH 1/5] mx6cuboxi: Fix the defconfig name Stefano Babic

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=5539393A.2080804@denx.de \
    --to=sbabic@denx.de \
    --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