diff mbox series

[U-Boot,03/18] x86: efi: app: Fix broken EFI application

Message ID 1528637118-32739-4-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Bin Meng
Headers show
Series x86: efi: Fixes and enhancements to application and payload support | expand

Commit Message

Bin Meng June 10, 2018, 1:25 p.m. UTC
The EFI application does not boot currently. It's due to the call
to syscon_get_by_driver_data() in cpu_init_r() maps to nowhere as
CONFIG_SYSCON is not included in the configuration.

EFI application is built as a shared library, so GCC won't complain
during the build process if some symbols are not found. GCC will
simply put these symbols into the .plt section and expect dynamic
loader to fix these up.

While we are here, remove some commands and drivers that are not
needed at present.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 configs/efi-x86_defconfig | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Simon Glass June 11, 2018, 2:53 p.m. UTC | #1
On 10 June 2018 at 05:25, Bin Meng <bmeng.cn@gmail.com> wrote:
> The EFI application does not boot currently. It's due to the call
> to syscon_get_by_driver_data() in cpu_init_r() maps to nowhere as
> CONFIG_SYSCON is not included in the configuration.
>
> EFI application is built as a shared library, so GCC won't complain
> during the build process if some symbols are not found. GCC will
> simply put these symbols into the .plt section and expect dynamic
> loader to fix these up.
>
> While we are here, remove some commands and drivers that are not
> needed at present.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  configs/efi-x86_defconfig | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt June 11, 2018, 5:18 p.m. UTC | #2
On 06/10/2018 03:25 PM, Bin Meng wrote:
> The EFI application does not boot currently. It's due to the call
> to syscon_get_by_driver_data() in cpu_init_r() maps to nowhere as
> CONFIG_SYSCON is not included in the configuration.
> 
> EFI application is built as a shared library, so GCC won't complain
> during the build process if some symbols are not found. GCC will
> simply put these symbols into the .plt section and expect dynamic
> loader to fix these up.
> 
> While we are here, remove some commands and drivers that are not
> needed at present.

This patch is not applicable to master:

Applying: x86: efi: app: Fix broken EFI application
error: patch failed: configs/efi-x86_defconfig:28
error: configs/efi-x86_defconfig: patch does not apply

Please, rebase.

Best regards

Heinrich

> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
> 
>  configs/efi-x86_defconfig | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig
> index 4cf5554..741a169 100644
> --- a/configs/efi-x86_defconfig
> +++ b/configs/efi-x86_defconfig
> @@ -11,12 +11,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
>  CONFIG_LAST_STAGE_INIT=y
>  CONFIG_HUSH_PARSER=y
>  # CONFIG_CMD_BOOTM is not set
> -CONFIG_CMD_GPIO=y
>  CONFIG_CMD_PART=y
> -CONFIG_CMD_SF=y
>  # CONFIG_CMD_SF_TEST is not set
> -CONFIG_CMD_SPI=y
> -CONFIG_CMD_USB=y
>  # CONFIG_CMD_NET is not set
>  CONFIG_CMD_TIME=y
>  CONFIG_CMD_EXT2=y
> @@ -28,12 +24,12 @@ CONFIG_MAC_PARTITION=y
>  CONFIG_ISO_PARTITION=y
>  CONFIG_EFI_PARTITION=y
>  CONFIG_OF_EMBED=y
> +CONFIG_REGMAP=y
> +CONFIG_SYSCON=y
>  # CONFIG_DM_ETH is not set
>  CONFIG_DEBUG_EFI_CONSOLE=y
>  CONFIG_DEBUG_UART_BASE=0
>  CONFIG_DEBUG_UART_CLOCK=0
> -CONFIG_SPI=y
> -CONFIG_ICH_SPI=y
>  # CONFIG_REGEX is not set
>  CONFIG_EFI=y
>  # CONFIG_EFI_LOADER is not set
>
Bin Meng June 11, 2018, 11:19 p.m. UTC | #3
Hi Heinrich,

On Tue, Jun 12, 2018 at 1:18 AM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> On 06/10/2018 03:25 PM, Bin Meng wrote:
>> The EFI application does not boot currently. It's due to the call
>> to syscon_get_by_driver_data() in cpu_init_r() maps to nowhere as
>> CONFIG_SYSCON is not included in the configuration.
>>
>> EFI application is built as a shared library, so GCC won't complain
>> during the build process if some symbols are not found. GCC will
>> simply put these symbols into the .plt section and expect dynamic
>> loader to fix these up.
>>
>> While we are here, remove some commands and drivers that are not
>> needed at present.
>
> This patch is not applicable to master:
>
> Applying: x86: efi: app: Fix broken EFI application
> error: patch failed: configs/efi-x86_defconfig:28
> error: configs/efi-x86_defconfig: patch does not apply
>
> Please, rebase.
>

Will do in v2. But if you want some testing, please use
u-boot-x86/efi-working branch. Thanks!

Regards,
Bin
Bin Meng June 12, 2018, 1:07 p.m. UTC | #4
On Mon, Jun 11, 2018 at 10:53 PM, Simon Glass <sjg@chromium.org> wrote:
> On 10 June 2018 at 05:25, Bin Meng <bmeng.cn@gmail.com> wrote:
>> The EFI application does not boot currently. It's due to the call
>> to syscon_get_by_driver_data() in cpu_init_r() maps to nowhere as
>> CONFIG_SYSCON is not included in the configuration.
>>
>> EFI application is built as a shared library, so GCC won't complain
>> during the build process if some symbols are not found. GCC will
>> simply put these symbols into the .plt section and expect dynamic
>> loader to fix these up.
>>
>> While we are here, remove some commands and drivers that are not
>> needed at present.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  configs/efi-x86_defconfig | 8 ++------
>>  1 file changed, 2 insertions(+), 6 deletions(-)
>>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!
diff mbox series

Patch

diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig
index 4cf5554..741a169 100644
--- a/configs/efi-x86_defconfig
+++ b/configs/efi-x86_defconfig
@@ -11,12 +11,8 @@  CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_BOOTM is not set
-CONFIG_CMD_GPIO=y
 CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
 # CONFIG_CMD_SF_TEST is not set
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
 # CONFIG_CMD_NET is not set
 CONFIG_CMD_TIME=y
 CONFIG_CMD_EXT2=y
@@ -28,12 +24,12 @@  CONFIG_MAC_PARTITION=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_OF_EMBED=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
 # CONFIG_DM_ETH is not set
 CONFIG_DEBUG_EFI_CONSOLE=y
 CONFIG_DEBUG_UART_BASE=0
 CONFIG_DEBUG_UART_CLOCK=0
-CONFIG_SPI=y
-CONFIG_ICH_SPI=y
 # CONFIG_REGEX is not set
 CONFIG_EFI=y
 # CONFIG_EFI_LOADER is not set