From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Date: Tue, 12 Jul 2016 17:59:58 +0200 Subject: [U-Boot] [PATCH 4/6] efi_loader: Improve .dtb search for arm64 In-Reply-To: <20160712145033.GF25382@bill-the-cat> References: <1468297308-32102-1-git-send-email-afaerber@suse.de> <1468297308-32102-5-git-send-email-afaerber@suse.de> <20160712145033.GF25382@bill-the-cat> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >> Signed-off-by: Andreas F?rber >> --- >> 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: