Browse Source

[efi] Minimise use of iPXE header files when building host utilities

Avoid dragging in unnecessary iPXE header files such as <ipxe/uuid.h>
and <ipxe/tables.h> when building host utilities, and ensure that
FILE_LICENCE() (present in the imported EDK2 headers) expands to a
no-op.

Reported-by: Michael Tautschnig <mt@debian.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
fdad22a1ed
3 changed files with 6 additions and 3 deletions
  1. 2
    1
      src/util/efifatbin.c
  2. 2
    1
      src/util/efirom.c
  3. 2
    1
      src/util/elf2efi.c

+ 2
- 1
src/util/efifatbin.c View File

17
  * 02110-1301, USA.
17
  * 02110-1301, USA.
18
  */
18
  */
19
 
19
 
20
+#define FILE_LICENCE(...) extern void __file_licence ( void )
20
 #include <stdint.h>
21
 #include <stdint.h>
21
 #include <stddef.h>
22
 #include <stddef.h>
22
 #include <stdlib.h>
23
 #include <stdlib.h>
27
 #include <errno.h>
28
 #include <errno.h>
28
 #include <assert.h>
29
 #include <assert.h>
29
 #include <getopt.h>
30
 #include <getopt.h>
30
-#include <ipxe/efi/efi.h>
31
+#include <ipxe/efi/Uefi.h>
31
 #include <ipxe/efi/IndustryStandard/PeImage.h>
32
 #include <ipxe/efi/IndustryStandard/PeImage.h>
32
 
33
 
33
 #define eprintf(...) fprintf ( stderr, __VA_ARGS__ )
34
 #define eprintf(...) fprintf ( stderr, __VA_ARGS__ )

+ 2
- 1
src/util/efirom.c View File

17
  * 02110-1301, USA.
17
  * 02110-1301, USA.
18
  */
18
  */
19
 
19
 
20
+#define FILE_LICENCE(...) extern void __file_licence ( void )
20
 #include <stdint.h>
21
 #include <stdint.h>
21
 #include <stddef.h>
22
 #include <stddef.h>
22
 #include <stdlib.h>
23
 #include <stdlib.h>
27
 #include <errno.h>
28
 #include <errno.h>
28
 #include <assert.h>
29
 #include <assert.h>
29
 #include <getopt.h>
30
 #include <getopt.h>
30
-#include <ipxe/efi/efi.h>
31
+#include <ipxe/efi/Uefi.h>
31
 #include <ipxe/efi/IndustryStandard/PeImage.h>
32
 #include <ipxe/efi/IndustryStandard/PeImage.h>
32
 #include <ipxe/efi/IndustryStandard/Pci22.h>
33
 #include <ipxe/efi/IndustryStandard/Pci22.h>
33
 
34
 

+ 2
- 1
src/util/elf2efi.c View File

20
 #define _GNU_SOURCE
20
 #define _GNU_SOURCE
21
 #define PACKAGE "elf2efi"
21
 #define PACKAGE "elf2efi"
22
 #define PACKAGE_VERSION "1"
22
 #define PACKAGE_VERSION "1"
23
+#define FILE_LICENCE(...) extern void __file_licence ( void )
23
 #include <stdint.h>
24
 #include <stdint.h>
24
 #include <stddef.h>
25
 #include <stddef.h>
25
 #include <stdlib.h>
26
 #include <stdlib.h>
30
 #include <assert.h>
31
 #include <assert.h>
31
 #include <getopt.h>
32
 #include <getopt.h>
32
 #include <bfd.h>
33
 #include <bfd.h>
33
-#include <ipxe/efi/efi.h>
34
+#include <ipxe/efi/Uefi.h>
34
 #include <ipxe/efi/IndustryStandard/PeImage.h>
35
 #include <ipxe/efi/IndustryStandard/PeImage.h>
35
 #include <libgen.h>
36
 #include <libgen.h>
36
 
37
 

Loading…
Cancel
Save