From: Jules Maselbas <jmaselbas@kalray.eu>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 08/30] common: move EFI code into new efi/ top level directory
Date: Tue, 23 Nov 2021 09:55:01 +0100 [thread overview]
Message-ID: <20211123085501.GC15878@tellis.lin.mbt.kalray.eu> (raw)
In-Reply-To: <20211122084732.2597109-9-a.fatoum@pengutronix.de>
On Mon, Nov 22, 2021 at 09:47:10AM +0100, Ahmad Fatoum wrote:
> So far, barebox EFI meant EFI payload support on x86. Upcoming changes
> will extend barebox to support EFI payload _and_ loader on ARM64.
> Prepare for this by renaming files and directories appropriately, so
> it's immediately clear whether a file is about paylaod, loader or common
s/paylaod/payload/
> support.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> common/Kconfig | 10 ++--------
> common/Makefile | 4 +---
> common/efi/Kconfig | 16 ++++++++++++++++
> common/efi/Makefile | 9 +++++----
> common/{efi-devicepath.c => efi/devicepath.c} | 0
> common/{efi-guid.c => efi/guid.c} | 0
> common/efi/payload/Makefile | 6 ++++++
> .../{ => payload}/env-efi/network/eth0-discover | 0
> common/efi/{efi-image.c => payload/image.c} | 2 +-
> common/efi/{efi.c => payload/init.c} | 2 +-
> common/efi/{efi-iomem.c => payload/iomem.c} | 0
> drivers/efi/Kconfig | 1 +
> 12 files changed, 33 insertions(+), 17 deletions(-)
> create mode 100644 common/efi/Kconfig
> rename common/{efi-devicepath.c => efi/devicepath.c} (100%)
> rename common/{efi-guid.c => efi/guid.c} (100%)
> create mode 100644 common/efi/payload/Makefile
> rename common/efi/{ => payload}/env-efi/network/eth0-discover (100%)
> rename common/efi/{efi-image.c => payload/image.c} (99%)
> rename common/efi/{efi.c => payload/init.c} (99%)
> rename common/efi/{efi-iomem.c => payload/iomem.c} (100%)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index f4120b2083ee..42240ae8411b 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -78,14 +78,6 @@ config MENUTREE
> select GLOB
> select GLOB_SORT
>
> -config EFI_GUID
> - bool
> - help
> - With this option a table of EFI guids is compiled in.
> -
> -config EFI_DEVICEPATH
> - bool
> -
> config ARCH_DMA_ADDR_T_64BIT
> bool
>
> @@ -1538,6 +1530,8 @@ config COMPILE_TEST
>
> endmenu
>
> +source "common/efi/Kconfig"
> +
> config HAS_DEBUG_LL
> bool
>
> diff --git a/common/Makefile b/common/Makefile
> index 4b45f678c7de..9ed279806a08 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -63,9 +63,7 @@ obj-$(CONFIG_BOOTCHOOSER) += bootchooser.o
> obj-$(CONFIG_UIMAGE) += image.o uimage.o
> obj-$(CONFIG_FITIMAGE) += image-fit.o
> obj-$(CONFIG_MENUTREE) += menutree.o
> -obj-$(CONFIG_EFI_BOOTUP) += efi/
> -obj-$(CONFIG_EFI_GUID) += efi-guid.o
> -obj-$(CONFIG_EFI_DEVICEPATH) += efi-devicepath.o
> +obj-$(CONFIG_EFI) += efi/
> lwl-$(CONFIG_IMD) += imd-barebox.o
> obj-$(CONFIG_IMD) += imd.o
> obj-y += file-list.o
> diff --git a/common/efi/Kconfig b/common/efi/Kconfig
> new file mode 100644
> index 000000000000..a0565854c2f5
> --- /dev/null
> +++ b/common/efi/Kconfig
> @@ -0,0 +1,16 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +menu "EFI (Extensible Firmware Interface) Support"
> +
> +config EFI
> + bool
> +
> +config EFI_GUID
> + bool
> + help
> + With this option a table of EFI guids is compiled in.
> +
> +config EFI_DEVICEPATH
> + bool
> +
> +endmenu
> diff --git a/common/efi/Makefile b/common/efi/Makefile
> index d746fabe2109..1ed5d45c1f5e 100644
> --- a/common/efi/Makefile
> +++ b/common/efi/Makefile
> @@ -1,4 +1,5 @@
> -obj-y += efi.o
> -obj-y += efi-image.o
> -bbenv-y += env-efi
> -obj-$(CONFIG_CMD_IOMEM) += efi-iomem.o
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +obj-$(CONFIG_EFI_BOOTUP) += payload/
> +obj-$(CONFIG_EFI_GUID) += guid.o
> +obj-$(CONFIG_EFI_DEVICEPATH) += devicepath.o
> diff --git a/common/efi-devicepath.c b/common/efi/devicepath.c
> similarity index 100%
> rename from common/efi-devicepath.c
> rename to common/efi/devicepath.c
> diff --git a/common/efi-guid.c b/common/efi/guid.c
> similarity index 100%
> rename from common/efi-guid.c
> rename to common/efi/guid.c
> diff --git a/common/efi/payload/Makefile b/common/efi/payload/Makefile
> new file mode 100644
> index 000000000000..bcbdda335f06
> --- /dev/null
> +++ b/common/efi/payload/Makefile
> @@ -0,0 +1,6 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +obj-y += init.o
> +obj-y += image.o
> +bbenv-y += env-efi
> +obj-$(CONFIG_CMD_IOMEM) += iomem.o
> diff --git a/common/efi/env-efi/network/eth0-discover b/common/efi/payload/env-efi/network/eth0-discover
> similarity index 100%
> rename from common/efi/env-efi/network/eth0-discover
> rename to common/efi/payload/env-efi/network/eth0-discover
> diff --git a/common/efi/efi-image.c b/common/efi/payload/image.c
> similarity index 99%
> rename from common/efi/efi-image.c
> rename to common/efi/payload/image.c
> index bd1c58438e84..3c55a457eae3 100644
> --- a/common/efi/efi-image.c
> +++ b/common/efi/payload/image.c
> @@ -1,5 +1,5 @@
> /*
> - * efi-image.c - barebox EFI payload support
> + * image.c - barebox EFI payload support
> *
> * Copyright (c) 2014 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
> *
> diff --git a/common/efi/efi.c b/common/efi/payload/init.c
> similarity index 99%
> rename from common/efi/efi.c
> rename to common/efi/payload/init.c
> index 7f12342cf91b..88d0bfa939ec 100644
> --- a/common/efi/efi.c
> +++ b/common/efi/payload/init.c
> @@ -1,5 +1,5 @@
> /*
> - * efi.c - barebox EFI payload support
> + * init.c - barebox EFI payload support
> *
> * Copyright (c) 2014 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
> *
> diff --git a/common/efi/efi-iomem.c b/common/efi/payload/iomem.c
> similarity index 100%
> rename from common/efi/efi-iomem.c
> rename to common/efi/payload/iomem.c
> diff --git a/drivers/efi/Kconfig b/drivers/efi/Kconfig
> index dd3ac7525f9f..e8abc2709e26 100644
> --- a/drivers/efi/Kconfig
> +++ b/drivers/efi/Kconfig
> @@ -1,6 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0
> config EFI_BOOTUP
> bool
> + select EFI
> select BLOCK
> select PARTITION_DISK
> select HW_HAS_PCI
> --
> 2.30.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
>
> To declare a filtering error, please use the following link : https://www.security-mail.net/reporter.php?mid=d96b.619b5a76.a8745.0&r=jmaselbas%40kalray.eu&s=barebox-bounces%2Bjmaselbas%3Dkalray.eu%40lists.infradead.org&o=%5BPATCH+08%2F30%5D+common%3A+move+EFI+code+into+new+efi%2F+top+level+directory&verdict=C&c=45252004e55fff892806525f875d47f7eb127606
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-11-23 8:56 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 8:47 [PATCH 00/30] efi: refactor for upcoming loader support Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 01/30] fs: remove useless AT_FDCWD references Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 02/30] fs: remove unused struct node_d in struct dir Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 03/30] block : efi: rename driver variable from efi_fs_driver to efi_bio_driver Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 04/30] include: <linux/types.h>: wrap in #ifndef __ASSEMBLY__ Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 05/30] hw_random: stm32: propagate error codes from rng read Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 06/30] efi: align LOAD_FILE_PROTOCOL_GUID's name with other PROTOCOL_GUIDs Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 07/30] asm-generic: move sync_caches_for_execution declaration to <asm/cache.h> Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 08/30] common: move EFI code into new efi/ top level directory Ahmad Fatoum
2021-11-23 8:55 ` Jules Maselbas [this message]
2021-11-22 8:47 ` [PATCH 09/30] serial: efi-stdio: move efi-stdio.h header to central location Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 10/30] efi: use SPDX-License-Identifier where appropriate Ahmad Fatoum
2021-11-23 8:52 ` Jules Maselbas
2021-11-22 8:47 ` [PATCH 11/30] drivers: efi: move Kconfig options to new menu Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 12/30] efi: factor out errno translation Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 13/30] efi: rename <efi/efi.h> to <efi/efi-payload.h> Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 14/30] efi: centralize efivarfs_parse_filename Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 15/30] kbuild: force 16-bit wchar_t treewide Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 16/30] include: <linux/nls.h>: remove duplicate wchar_t typedef Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 17/30] lib: wchar: add wctomb and mbtowc Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 18/30] lib: implement wcsnlen Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 19/30] vsprintf: add optional support for %ls format modifier Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 20/30] libfile: null-terminate read_file of wchar_t buffer Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 21/30] commands: echo: add wide file output via wecho alias Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 22/30] efi: make efi_main __noreturn Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 23/30] efi: define and use new EFI_ERROR_MASK macro Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 24/30] common: move CONFIG_ELF into General Settings Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 25/30] efi: don't zero executable buffer before freeing Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 26/30] partitions: efi: move header to central location Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 27/30] efi: print early efi_main string on CONFIG_DEBUG_LL=y Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 28/30] ARM64: board-dt-2nd: remove no longer needed noinline function split Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 29/30] bus: acpi: register bus even if without ACPI EFI table Ahmad Fatoum
2021-11-22 8:47 ` [PATCH 30/30] efi: guid: fix typos Ahmad Fatoum
2021-11-25 7:44 ` [PATCH 00/30] efi: refactor for upcoming loader support Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211123085501.GC15878@tellis.lin.mbt.kalray.eu \
--to=jmaselbas@kalray.eu \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox