diff mbox series

[U-Boot,v8,01/30] efi: Don't allow CMD_BOOTEFI_SELFTEST on sandbox

Message ID 20180618140835.195901-2-sjg@chromium.org
State Superseded
Delegated to: Alexander Graf
Headers show
Series efi: Enable sandbox support for EFI loader | expand

Commit Message

Simon Glass June 18, 2018, 2:08 p.m. UTC
This does not work at present and gives the following error:

output: 'ld.bfd: read in flex scanner failed
scripts/Makefile.lib:390: recipe for target 'lib/efi_selftest/efi_selftest_miniapp_return_efi.so' failed

It may be possible to figure this out with suitable linker magic but it
does not seem to be easy. Also, we will be able to run the tests on
sandbox without using the miniapp.

So for now at least, disable this option.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5:
- Add new patch to disallow CMD_BOOTEFI_SELFTEST on sandbox

Changes in v4: None
Changes in v3: None
Changes in v2: None

 lib/efi_selftest/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heinrich Schuchardt June 20, 2018, 6:03 a.m. UTC | #1
On 06/18/2018 04:08 PM, Simon Glass wrote:
> This does not work at present and gives the following error:
> 
> output: 'ld.bfd: read in flex scanner failed
> scripts/Makefile.lib:390: recipe for target 'lib/efi_selftest/efi_selftest_miniapp_return_efi.so' failed
> 
> It may be possible to figure this out with suitable linker magic but it
> does not seem to be easy. Also, we will be able to run the tests on
> sandbox without using the miniapp.
> 
> So for now at least, disable this option.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v8: None
> Changes in v7: None
> Changes in v6: None
> Changes in v5:
> - Add new patch to disallow CMD_BOOTEFI_SELFTEST on sandbox
> 
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>  lib/efi_selftest/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/efi_selftest/Kconfig b/lib/efi_selftest/Kconfig
> index 59f9f36801..b52696778d 100644
> --- a/lib/efi_selftest/Kconfig
> +++ b/lib/efi_selftest/Kconfig
> @@ -1,6 +1,6 @@
>  config CMD_BOOTEFI_SELFTEST
>  	bool "Allow booting an EFI efi_selftest"
> -	depends on CMD_BOOTEFI
> +	depends on CMD_BOOTEFI && !SANDBOX
>  	imply FAT
>  	imply FAT_WRITE
>  	help
> 

With Alex's patch series the sandbox can execute the selftests except
those requiring CRT0 and this is what I expect to be delivered by
whatever series is merged. Concerning CRT0 the build system should be
adjusted to build CRT0 according to the host architecture.

Best regards

Heinrich
Simon Glass June 20, 2018, 5:51 p.m. UTC | #2
Hi Heinrich,

On 20 June 2018 at 00:03, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> On 06/18/2018 04:08 PM, Simon Glass wrote:
>> This does not work at present and gives the following error:
>>
>> output: 'ld.bfd: read in flex scanner failed
>> scripts/Makefile.lib:390: recipe for target 'lib/efi_selftest/efi_selftest_miniapp_return_efi.so' failed
>>
>> It may be possible to figure this out with suitable linker magic but it
>> does not seem to be easy. Also, we will be able to run the tests on
>> sandbox without using the miniapp.
>>
>> So for now at least, disable this option.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v8: None
>> Changes in v7: None
>> Changes in v6: None
>> Changes in v5:
>> - Add new patch to disallow CMD_BOOTEFI_SELFTEST on sandbox
>>
>> Changes in v4: None
>> Changes in v3: None
>> Changes in v2: None
>>
>>  lib/efi_selftest/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/efi_selftest/Kconfig b/lib/efi_selftest/Kconfig
>> index 59f9f36801..b52696778d 100644
>> --- a/lib/efi_selftest/Kconfig
>> +++ b/lib/efi_selftest/Kconfig
>> @@ -1,6 +1,6 @@
>>  config CMD_BOOTEFI_SELFTEST
>>       bool "Allow booting an EFI efi_selftest"
>> -     depends on CMD_BOOTEFI
>> +     depends on CMD_BOOTEFI && !SANDBOX
>>       imply FAT
>>       imply FAT_WRITE
>>       help
>>
>
> With Alex's patch series the sandbox can execute the selftests except
> those requiring CRT0 and this is what I expect to be delivered by
> whatever series is merged. Concerning CRT0 the build system should be
> adjusted to build CRT0 according to the host architecture.

If you look at the end of my series I have a patch to enable it (and
reverse this). Assuming that we get that far, this patch can be
dropped. But given the very slow review progress and disagreement on
how sandbox should work, I feel that this patch is a good stopgap to
reflect current reality.

Regards,
Simon
diff mbox series

Patch

diff --git a/lib/efi_selftest/Kconfig b/lib/efi_selftest/Kconfig
index 59f9f36801..b52696778d 100644
--- a/lib/efi_selftest/Kconfig
+++ b/lib/efi_selftest/Kconfig
@@ -1,6 +1,6 @@ 
 config CMD_BOOTEFI_SELFTEST
 	bool "Allow booting an EFI efi_selftest"
-	depends on CMD_BOOTEFI
+	depends on CMD_BOOTEFI && !SANDBOX
 	imply FAT
 	imply FAT_WRITE
 	help