public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6] efi_loader: Improve .dtb search for arm64
Date: Tue, 12 Jul 2016 17:59:58 +0200	[thread overview]
Message-ID: <d9c72cdd-8a70-a18a-ed21-05927a982b19@suse.de> (raw)
In-Reply-To: <20160712145033.GF25382@bill-the-cat>

Am 12.07.2016 um 16:50 schrieb Tom Rini:
> On Tue, Jul 12, 2016 at 06:21:45AM +0200, Andreas F?rber wrote:
> 
>> On arm64 Linux device trees are organized by SoC vendor. Therefore we
>> need to search the vendor subdirectory as well.
>>
>> Since the SoC vendor may be different from ${vendor}, introduce a new
>> ${soc_vendor}. If this is not set, the behavior remains unchanged.
>>
>> Cc: Alexander Graf <agraf@suse.de>
>> Signed-off-by: Andreas F?rber <afaerber@suse.de>
>> ---
>>  include/config_distro_bootcmd.h | 18 +++++++++++++++++-
>>  1 file changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
>> index eadec2e..8f14457 100644
>> --- a/include/config_distro_bootcmd.h
>> +++ b/include/config_distro_bootcmd.h
>> @@ -113,6 +113,15 @@
>>  #define BOOTENV_EFI_SET_FDTFILE_FALLBACK
>>  #endif
>>  
>> +#if defined(CONFIG_ARM64)
>> +#define BOOTENV_EFI_SET_FDTFILE_VENDOR                                    \
>> +	"if test -n \"${soc_vendor}\"; then "                             \
>> +		"setenv efi_dtb_vendor_prefix ${soc_vendor}/; "           \
>> +	"fi; "
>> +#else
> 
> OK.  Looking at the current Linux kernel, it's a given that for arm64 a
> DTB will be in a subdirectory, always.  Perhaps we should fix this in
> Kconfig and have... CONFIG_FDTFILE_VENDOR_DIRECTORY and set this
> correctly per vendor (and yes, eventually there will be some "fun" as
> NXP boards will sometimes be in freescale/ and sometimes nxp/ so maybe
> try and futureproof ourselves so that we loop over this variable) ?

Yes, it's a given that in the kernel the .dts is always in a vendor
subdirectory - as listed in an earlier thread also for mips etc.

And yes, it's also true that due to our scripted openSUSE packaging we
therefore install .dtb to /boot/dtb-foo/vendor/ - but that's not
guaranteed for other distros and users, is it? Therefore I include "" in
the loop further down.

Anyway, adding a config option sounds good. Will you look into that
yourself or should I do that as part of this series?

I had considered the ambiguous vendor case and am iterating over
$efi_dtb_vendor_prefix in a list of vendors already below, only the
addition of the trailing slash above is limiting us to one currently. Do
you have a concrete suggestion of how to make that more flexible?

Cheers,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160712/f168de3c/attachment.sig>

  reply	other threads:[~2016-07-12 15:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12  4:21 [U-Boot] [PATCH 0/6] efi_loader: Improvements to .dtb handling Andreas Färber
2016-07-12  4:21 ` [U-Boot] [PATCH 1/6] efi_loader: Cosmetic distro script cleanups Andreas Färber
2016-07-12  4:21 ` [U-Boot] [PATCH 2/6] efi_loader: Respect $boot_prefixes for EFI .dtb search Andreas Färber
2016-07-12  4:21 ` [U-Boot] [PATCH 3/6] efi_loader: Search .dtb on non-EFI partitions Andreas Färber
2016-07-12  7:25   ` Alexander Graf
2016-07-12 11:45     ` Andreas Färber
2016-07-12  4:21 ` [U-Boot] [PATCH 4/6] efi_loader: Improve .dtb search for arm64 Andreas Färber
2016-07-12  7:29   ` Alexander Graf
2016-07-12 12:38     ` Andreas Färber
2016-07-12 13:49       ` Andreas Färber
2016-07-12 16:05     ` Stephen Warren
2016-07-12 14:50   ` Tom Rini
2016-07-12 15:59     ` Andreas Färber [this message]
2016-07-12 18:05       ` Tom Rini
2016-07-12  4:21 ` [U-Boot] [PATCH 5/6] dragonboard410c: Set soc_vendor Andreas Färber
2016-07-12  4:21 ` [U-Boot] [PATCH 6/6] efi_loader: Display which .dtb we found Andreas Färber
2016-07-12  7:30   ` Alexander Graf
2016-07-12 12:45     ` Andreas Färber
2016-07-12 14:25       ` Alexander Graf
2016-07-12 14:27         ` Andreas Färber

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=d9c72cdd-8a70-a18a-ed21-05927a982b19@suse.de \
    --to=afaerber@suse.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