public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] efi_loader: Pass fdt address directly to bootefi cmd
Date: Thu, 14 Apr 2016 11:55:46 -0600	[thread overview]
Message-ID: <570FD9A2.3070005@wwwdotorg.org> (raw)
In-Reply-To: <570FB8BC.3020602@suse.de>

On 04/14/2016 09:35 AM, Andreas F?rber wrote:
> Am 14.04.2016 um 16:07 schrieb Alexander Graf:
>> The bootefi cmd today fetches its device tree pointer from either the
>> location appointed by "fdt addr" with a fallback to the U-Boot control
>> fdt.
>>
>> This integration is unusual for U-Boot and diverges from the way we
>> usually handle parameters to boot commands. So let's pass the fdt
>> directly into the bootefi command instead and move the control fdt
>> logic into the distro boot script.

>> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
>> index ad9045e..dddebc3 100644
>> --- a/include/config_distro_bootcmd.h
>> +++ b/include/config_distro_bootcmd.h
>> @@ -103,12 +103,15 @@
>>   	"boot_efi_binary="                                                \
>>   		"load ${devtype} ${devnum}:${distro_bootpart} "           \
>>   			"${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; "      \
>> -		"bootefi ${kernel_addr_r}\0"                              \
>> +		"if fdt addr ${fdt_addr_r}; then "                        \
>> +			"bootefi ${kernel_addr_r} ${fdt_addr_r};"         \
>> +		"else"                                                    \
>> +			"bootefi ${kernel_addr_r} ${fdtcontroladdr};"     \
>
> Stephen, didn't you say you had problems with this? Might've been nice
> to put this behavioral change into a separate patch as before, but well:
>
> Reviewed-by: Andreas F?rber <afaerber@suse.de>

The issue was with bootefi assuming that the control FDT was what gets 
passed to the EFI binary. With the above, the command takes an explicit 
parameter and hence makes no such assumption. It would be nice if there 
was an "fdt validate its a device tree" rather than "fdt addr" command 
to use here, but there isn't right now.

  reply	other threads:[~2016-04-14 17:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 14:07 [U-Boot] [PATCH v2 1/2] efi_loader: Pass fdt address directly to bootefi cmd Alexander Graf
2016-04-14 14:07 ` [U-Boot] [PATCH v2 2/2] efi_loader: Fall back to fdtfile naming convention Alexander Graf
2016-04-14 15:37   ` Andreas Färber
2016-04-21 11:25   ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-04-14 15:29 ` [U-Boot] [PATCH v2 1/2] efi_loader: Pass fdt address directly to bootefi cmd Stephen Warren
2016-04-14 15:35 ` Andreas Färber
2016-04-14 17:55   ` Stephen Warren [this message]
2016-04-21 11:25 ` [U-Boot] [U-Boot, v2, " Tom Rini

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=570FD9A2.3070005@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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