From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Tue, 12 Jun 2018 07:42:56 +0200 Subject: [U-Boot] [PATCH v4 07/16] efi: sandbox: Add distroboot support In-Reply-To: References: <20180516154233.21457-1-sjg@chromium.org> <20180516154233.21457-8-sjg@chromium.org> <207ec811-fbaf-beb0-2719-44436c37a77a@suse.de> Message-ID: <17f8c6d9-4839-61da-1d59-76a116fa0c77@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12.06.18 07:27, Simon Glass wrote: > Hi Alex, > > On 24 May 2018 at 06:32, Alexander Graf wrote: >> >> >> On 16.05.18 17:42, Simon Glass wrote: >>> With sandbox these values depend on the host system. Let's assume that it >>> is x86_64 for now. >>> >>> Signed-off-by: Simon Glass >>> --- >>> >>> Changes in v4: None >>> Changes in v3: None >>> Changes in v2: None >>> >>> include/config_distro_bootcmd.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h >>> index 8d5feb3ac77..97d6baab4be 100644 >>> --- a/include/config_distro_bootcmd.h >>> +++ b/include/config_distro_bootcmd.h >>> @@ -246,7 +246,7 @@ >>> #elif defined(CONFIG_ARM) >>> #define BOOTENV_EFI_PXE_ARCH "0xa" >>> #define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00010:UNDI:003000" >>> -#elif defined(CONFIG_X86) >>> +#elif defined(CONFIG_X86) || defined(CONFIG_SANDBOX) >> >> Why not >> >> #elif defined(CONFIG_X86) || (defined(CONFIG_SANDBOX) && >> defined(__x86_64__)) >> >> and similar for other architectures? That way we should be quite safe in >> determining our target architecture, no? > > I suspect that would work, although I think it would need to be done > centrally, rather than ad-hoc in files that need to know the sandbox > host architecture. > > We are not currently aware of the sandbox host architecture, but I > wonder whether we are going to have to teach the build system about > it. Does U-Boot sandbox actually run on ARM platforms? I have not > tried it. I haven't tried it either, but IMHO it's a bug if it doesn't run :). I also don't quite understand why CONFIG_SANDBOX contradicts CONFIG_X86. They probably should both be set for an x86 host system. That way you wouldn't have to double-check these conditionals all over the code base. Alex