]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: move dtbdump.c, initrddump.c to lib/efi_loader
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 3 Mar 2022 07:13:53 +0000 (08:13 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 20 Mar 2022 16:01:00 +0000 (17:01 +0100)
The tools dtbdump.efi and initrddump.efi are useful for Python testing even
if CONFIG_EFI_SELFTEST=n.

Don't clear the screen as it is incompatible with Python testing.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/Makefile
lib/efi_loader/dtbdump.c [moved from lib/efi_selftest/dtbdump.c with 100% similarity]
lib/efi_loader/initrddump.c [moved from lib/efi_selftest/initrddump.c with 99% similarity]
lib/efi_selftest/Makefile

index b2c664d108be257ef0411208fc89dd684b6ba39b..befed7144e7891f18a96044eb30d0ed637295db4 100644 (file)
@@ -14,12 +14,24 @@ CFLAGS_efi_boottime.o += \
   -DFW_PATCHLEVEL="0x$(PATCHLEVEL)"
 CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding
 CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI)
+CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding
+CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI)
+CFLAGS_initrddump_exit.o := $(CFLAGS_EFI) -Os -ffreestanding
+CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI)
 
 ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
 always += helloworld.efi
 targets += helloworld.o
 endif
 
+ifeq ($(CONFIG_GENERATE_ACPI_TABLE),)
+always += dtbdump.efi
+endif
+
+ifdef CONFIG_EFI_LOAD_FILE2_INITRD
+always += initrddump.efi
+endif
+
 obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
 obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += efi_bootmgr.o
 obj-y += efi_boottime.o
similarity index 99%
rename from lib/efi_selftest/initrddump.c
rename to lib/efi_loader/initrddump.c
index 4648d54b1369aee13b2851387b788002790d807a..7de43bcfff49bd1723367394f4c18634721c8b35 100644 (file)
@@ -420,7 +420,7 @@ efi_status_t EFIAPI efi_main(efi_handle_t image_handle,
        cout->set_attribute(cout, EFI_LIGHTBLUE | EFI_BACKGROUND_BLACK);
        cout->clear_screen(cout);
        cout->set_attribute(cout, EFI_WHITE | EFI_BACKGROUND_BLACK);
-       print(u"INITRD Dump\r\n========\r\n\r\n");
+       print(u"INITRD Dump\r\n===========\r\n\r\n");
        cout->set_attribute(cout, EFI_LIGHTBLUE | EFI_BACKGROUND_BLACK);
 
        for (;;) {
index 9ff6e1760c6b811147dd1b123918326cc7be8494..be8040d1c7e2dd3c6eec3816d491d4c70bdf5f17 100644 (file)
@@ -8,16 +8,12 @@
 asflags-y += -DHOST_ARCH="$(HOST_ARCH)"
 ccflags-y += -DHOST_ARCH="$(HOST_ARCH)"
 
-CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding
-CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI)
 CFLAGS_efi_selftest_miniapp_exception.o := $(CFLAGS_EFI) -Os -ffreestanding
 CFLAGS_REMOVE_efi_selftest_miniapp_exception.o := $(CFLAGS_NON_EFI)
 CFLAGS_efi_selftest_miniapp_exit.o := $(CFLAGS_EFI) -Os -ffreestanding
 CFLAGS_REMOVE_efi_selftest_miniapp_exit.o := $(CFLAGS_NON_EFI)
 CFLAGS_efi_selftest_miniapp_return.o := $(CFLAGS_EFI) -Os -ffreestanding
 CFLAGS_REMOVE_efi_selftest_miniapp_return.o := $(CFLAGS_NON_EFI)
-CFLAGS_initrddump_exit.o := $(CFLAGS_EFI) -Os -ffreestanding
-CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI)
 
 obj-y += \
 efi_selftest.o \
@@ -83,14 +79,6 @@ efi_selftest_miniapp_exception.efi \
 efi_selftest_miniapp_exit.efi \
 efi_selftest_miniapp_return.efi
 
-ifeq ($(CONFIG_GENERATE_ACPI_TABLE),)
-always += dtbdump.efi
-endif
-
-ifdef CONFIG_EFI_LOAD_FILE2_INITRD
-always += initrddump.efi
-endif
-
 $(obj)/efi_miniapp_file_image_exception.h: $(obj)/efi_selftest_miniapp_exception.efi
        $(obj)/../../tools/file2include $(obj)/efi_selftest_miniapp_exception.efi > \
        $(obj)/efi_miniapp_file_image_exception.h