On Wed, Feb 15, 2017 at 08:34:15PM +0100, Jean-Christophe PLAGNIOL-VILLARD
wrote:
> prepare to drop the efi arch as efi boot up is not arch sepecific
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
> ---
> Documentation/boards/efi.rst | 2 +-
> arch/x86/Kconfig | 53 --
> arch/x86/Makefile| 74 +--
> arch/x86/configs/efi_defconfig | 78
> arch/x86/configs/generic_defconfig | 1 +
> arch/x86/include/asm/elf.h | 86 +++---
> arch/x86/include/asm/io.h| 71 +-
> arch/x86/include/asm/types.h | 51 -
> arch/x86/include/asm/unaligned.h | 5 ++
> arch/x86/lib/Makefile| 2 +
> arch/x86/lib/asm-offsets.c | 7 ++
> arch/x86/mach-efi/.gitignore | 2 +
> arch/x86/mach-efi/Makefile | 4 +
> arch/x86/mach-efi/crt0-efi-ia32.S| 76 +++
> arch/x86/mach-efi/crt0-efi-x86_64.S | 75 +++
> arch/x86/mach-efi/elf_ia32_efi.lds.S | 106
> +++
> arch/x86/mach-efi/elf_x86_64_efi.lds.S | 99 +
> arch/x86/mach-efi/include/mach/barebox.lds.h | 0
I think this should be done instead of adding an empty file:
diff --git a/include/asm-generic/barebox.lds.h
b/include/asm-generic/barebox.lds.h
index c8a919b928c9..dd2d286d32ec 100644
--- a/include/asm-generic/barebox.lds.h
+++ b/include/asm-generic/barebox.lds.h
@@ -6,7 +6,7 @@
#define STRUCT_ALIGNMENT 32
#define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT)
-#if defined CONFIG_X86 || \
+#if defined CONFIG_X86_32 || \
defined CONFIG_ARCH_EP93XX || \
defined CONFIG_ARCH_ZYNQ
#include
> arch/x86/mach-efi/include/mach/debug_ll.h| 1 +
> arch/x86/mach-efi/reloc_ia32.c | 97
> arch/x86/mach-efi/reloc_x86_64.c | 96
> commands/Kconfig | 2 +-
> commands/edit.c | 2 +-
> common/memory.c | 2 +-
> drivers/clocksource/Kconfig | 2 +-
> drivers/net/Kconfig | 2 +-
> drivers/of/Kconfig | 2 +-
> drivers/serial/Kconfig | 2 +-
> fs/Kconfig | 4 +-
> include/efi.h| 2 +-
> 30 files changed, 899 insertions(+), 107 deletions(-)
> create mode 100644 arch/x86/configs/efi_defconfig
> rewrite arch/x86/include/asm/elf.h (97%)
> create mode 100644 arch/x86/mach-efi/.gitignore
> create mode 100644 arch/x86/mach-efi/Makefile
> create mode 100644 arch/x86/mach-efi/crt0-efi-ia32.S
> create mode 100644 arch/x86/mach-efi/crt0-efi-x86_64.S
> create mode 100644 arch/x86/mach-efi/elf_ia32_efi.lds.S
> create mode 100644 arch/x86/mach-efi/elf_x86_64_efi.lds.S
> create mode 100644 arch/x86/mach-efi/include/mach/barebox.lds.h
> create mode 100644 arch/x86/mach-efi/include/mach/debug_ll.h
> create mode 100644 arch/x86/mach-efi/reloc_ia32.c
> create mode 100644 arch/x86/mach-efi/reloc_x86_64.c
>
> diff --git a/Documentation/boards/efi.rst b/Documentation/boards/efi.rst
> index b7ad40e47..ecadb3ebb 100644
> --- a/Documentation/boards/efi.rst
> +++ b/Documentation/boards/efi.rst
> @@ -25,7 +25,7 @@ Use the following to build barebox for EFI:
>
> .. code-block:: sh
>
> - export ARCH=efi
> + export ARCH=x86
>make efi_defconfig
>make
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 346640dcd..9803f3f95 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1,9 +1,16 @@
> #
> #
> #
> +config X86
> + bool
> + select HAS_KALLSYMS
> + select GENERIC_FIND_NEXT_BIT
> + default y
> +
> config ARCH_TEXT_BASE
> hex
> default 0x7c00 if MACH_X86_GENERIC
> + default 0x0 if MACH_EFI_GENERIC
>
> config BOARD_LINKER_SCRIPT
> bool
> @@ -14,17 +21,33 @@ config GENERIC_LINKER_SCRIPT
> default y
> depends on !BOARD_LINKER_SCRIPT
>
> -config X86
> +menu "ARCH specific settings"
> +
> +config 64BIT
> + def_bool y if X86_EFI
> + help
> + Say yes to build a 64-bit binary - formerly known as x86_64
> + Say no to build a 32-bit binary - formerly known as i386.
> +
> + 32-bit support currently does not compile and is not tested
> + due to the lack of hardware.
> +
> +config X86_32
> + def_bool y
> + depends on !64BIT
> +
> +config X86_64
> + def_bool y
> + depends on 64BIT
> +
> +endmenu
> +
> +config X86_BOOTLOADER
> bool
> - select HAS_KALLSYMS
> + select X86_32
> select HAS_MODULES
> select