Преглед изворни кода

[legal] Add FILE_LICENCE declarations to EFI header files

Autodetect the BSD licence statement in EFI header files, and add a
suitable FILE_LICENCE macro to the version imported into the iPXE
tree.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown пре 14 година
родитељ
комит
03b1020acc
40 измењених фајлова са 96 додато и 0 уклоњено
  1. 2
    0
      src/include/ipxe/efi/Base.h
  2. 2
    0
      src/include/ipxe/efi/Guid/HiiFormMapMethodGuid.h
  3. 2
    0
      src/include/ipxe/efi/Guid/PcAnsi.h
  4. 2
    0
      src/include/ipxe/efi/Guid/SmBios.h
  5. 2
    0
      src/include/ipxe/efi/Guid/WinCertificate.h
  6. 2
    0
      src/include/ipxe/efi/Ia32/ProcessorBind.h
  7. 2
    0
      src/include/ipxe/efi/IndustryStandard/Pci22.h
  8. 2
    0
      src/include/ipxe/efi/IndustryStandard/PeImage.h
  9. 2
    0
      src/include/ipxe/efi/Pi/PiBootMode.h
  10. 2
    0
      src/include/ipxe/efi/Pi/PiDependency.h
  11. 2
    0
      src/include/ipxe/efi/Pi/PiDxeCis.h
  12. 2
    0
      src/include/ipxe/efi/Pi/PiFirmwareFile.h
  13. 2
    0
      src/include/ipxe/efi/Pi/PiFirmwareVolume.h
  14. 2
    0
      src/include/ipxe/efi/Pi/PiHob.h
  15. 2
    0
      src/include/ipxe/efi/Pi/PiMultiPhase.h
  16. 2
    0
      src/include/ipxe/efi/Pi/PiS3BootScript.h
  17. 2
    0
      src/include/ipxe/efi/Pi/PiStatusCode.h
  18. 2
    0
      src/include/ipxe/efi/PiDxe.h
  19. 2
    0
      src/include/ipxe/efi/Protocol/ComponentName2.h
  20. 2
    0
      src/include/ipxe/efi/Protocol/Cpu.h
  21. 2
    0
      src/include/ipxe/efi/Protocol/CpuIo.h
  22. 2
    0
      src/include/ipxe/efi/Protocol/CpuIo2.h
  23. 2
    0
      src/include/ipxe/efi/Protocol/DebugSupport.h
  24. 2
    0
      src/include/ipxe/efi/Protocol/DevicePath.h
  25. 2
    0
      src/include/ipxe/efi/Protocol/DriverBinding.h
  26. 2
    0
      src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h
  27. 2
    0
      src/include/ipxe/efi/Protocol/PciIo.h
  28. 2
    0
      src/include/ipxe/efi/Protocol/PciRootBridgeIo.h
  29. 2
    0
      src/include/ipxe/efi/Protocol/SimpleNetwork.h
  30. 2
    0
      src/include/ipxe/efi/Protocol/SimpleTextIn.h
  31. 2
    0
      src/include/ipxe/efi/Protocol/SimpleTextOut.h
  32. 2
    0
      src/include/ipxe/efi/Uefi.h
  33. 2
    0
      src/include/ipxe/efi/Uefi/UefiBaseType.h
  34. 2
    0
      src/include/ipxe/efi/Uefi/UefiGpt.h
  35. 2
    0
      src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h
  36. 2
    0
      src/include/ipxe/efi/Uefi/UefiMultiPhase.h
  37. 2
    0
      src/include/ipxe/efi/Uefi/UefiPxe.h
  38. 2
    0
      src/include/ipxe/efi/Uefi/UefiSpec.h
  39. 2
    0
      src/include/ipxe/efi/X64/ProcessorBind.h
  40. 18
    0
      src/include/ipxe/efi/import.pl

+ 2
- 0
src/include/ipxe/efi/Base.h Прегледај датотеку

@@ -22,6 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 22
 #ifndef __BASE_H__
23 23
 #define __BASE_H__
24 24
 
25
+FILE_LICENCE ( BSD3 );
26
+
25 27
 //
26 28
 // Include processor specific binding
27 29
 //

+ 2
- 0
src/include/ipxe/efi/Guid/HiiFormMapMethodGuid.h Прегледај датотеку

@@ -17,6 +17,8 @@
17 17
 #ifndef __EFI_HII_FORMMAP_GUID_H__
18 18
 #define __EFI_HII_FORMMAP_GUID_H__
19 19
 
20
+FILE_LICENCE ( BSD3 );
21
+
20 22
 #define EFI_HII_STANDARD_FORM_GUID \
21 23
   { 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 } }
22 24
 

+ 2
- 0
src/include/ipxe/efi/Guid/PcAnsi.h Прегледај датотеку

@@ -18,6 +18,8 @@
18 18
 #ifndef __PC_ANSI_H__
19 19
 #define __PC_ANSI_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 #define EFI_PC_ANSI_GUID \
22 24
   { \
23 25
     0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \

+ 2
- 0
src/include/ipxe/efi/Guid/SmBios.h Прегледај датотеку

@@ -22,6 +22,8 @@
22 22
 #ifndef __SMBIOS_GUID_H__
23 23
 #define __SMBIOS_GUID_H__
24 24
 
25
+FILE_LICENCE ( BSD3 );
26
+
25 27
 #define SMBIOS_TABLE_GUID \
26 28
   { \
27 29
     0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \

+ 2
- 0
src/include/ipxe/efi/Guid/WinCertificate.h Прегледај датотеку

@@ -17,6 +17,8 @@
17 17
 #ifndef __EFI_WIN_CERTIFICATE_H__
18 18
 #define __EFI_WIN_CERTIFICATE_H__
19 19
 
20
+FILE_LICENCE ( BSD3 );
21
+
20 22
 //
21 23
 // _WIN_CERTIFICATE.wCertificateType
22 24
 //

+ 2
- 0
src/include/ipxe/efi/Ia32/ProcessorBind.h Прегледај датотеку

@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 15
 #ifndef __PROCESSOR_BIND_H__
16 16
 #define __PROCESSOR_BIND_H__
17 17
 
18
+FILE_LICENCE ( BSD3 );
19
+
18 20
 ///
19 21
 /// Define the processor type so other code can make processor based choices.
20 22
 ///

+ 2
- 0
src/include/ipxe/efi/IndustryStandard/Pci22.h Прегледај датотеку

@@ -20,6 +20,8 @@
20 20
 #ifndef _PCI22_H_
21 21
 #define _PCI22_H_
22 22
 
23
+FILE_LICENCE ( BSD3 );
24
+
23 25
 #define PCI_MAX_BUS     255
24 26
 #define PCI_MAX_DEVICE  31
25 27
 #define PCI_MAX_FUNC    7

+ 2
- 0
src/include/ipxe/efi/IndustryStandard/PeImage.h Прегледај датотеку

@@ -22,6 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 22
 #ifndef __PE_IMAGE_H__
23 23
 #define __PE_IMAGE_H__
24 24
 
25
+FILE_LICENCE ( BSD3 );
26
+
25 27
 //
26 28
 // PE32+ Subsystem type for EFI images
27 29
 //

+ 2
- 0
src/include/ipxe/efi/Pi/PiBootMode.h Прегледај датотеку

@@ -18,6 +18,8 @@
18 18
 #ifndef __PI_BOOT_MODE_H__
19 19
 #define __PI_BOOT_MODE_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 ///
22 24
 /// EFI boot mode
23 25
 ///

+ 2
- 0
src/include/ipxe/efi/Pi/PiDependency.h Прегледај датотеку

@@ -17,6 +17,8 @@
17 17
 #ifndef __PI_DEPENDENCY_H__
18 18
 #define __PI_DEPENDENCY_H__
19 19
 
20
+FILE_LICENCE ( BSD3 );
21
+
20 22
 ///
21 23
 /// If present, this must be the first and only opcode,
22 24
 /// EFI_DEP_BEFORE is only used by DXE driver.

+ 2
- 0
src/include/ipxe/efi/Pi/PiDxeCis.h Прегледај датотеку

@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 18
 #ifndef __PI_DXECIS_H__
19 19
 #define __PI_DXECIS_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 #include <ipxe/efi/Uefi/UefiMultiPhase.h>
22 24
 #include <ipxe/efi/Pi/PiMultiPhase.h>
23 25
 

+ 2
- 0
src/include/ipxe/efi/Pi/PiFirmwareFile.h Прегледај датотеку

@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 19
 #ifndef __PI_FIRMWARE_FILE_H__
20 20
 #define __PI_FIRMWARE_FILE_H__
21 21
 
22
+FILE_LICENCE ( BSD3 );
23
+
22 24
 #pragma pack(1)
23 25
 ///
24 26
 /// Used to verify the integrity of the file.

+ 2
- 0
src/include/ipxe/efi/Pi/PiFirmwareVolume.h Прегледај датотеку

@@ -18,6 +18,8 @@
18 18
 #ifndef __PI_FIRMWAREVOLUME_H__
19 19
 #define __PI_FIRMWAREVOLUME_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 ///
22 24
 /// EFI_FV_FILE_ATTRIBUTES
23 25
 ///

+ 2
- 0
src/include/ipxe/efi/Pi/PiHob.h Прегледај датотеку

@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 18
 #ifndef __PI_HOB_H__
19 19
 #define __PI_HOB_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 //
22 24
 // HobType of EFI_HOB_GENERIC_HEADER.
23 25
 //

+ 2
- 0
src/include/ipxe/efi/Pi/PiMultiPhase.h Прегледај датотеку

@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 18
 #ifndef __PI_MULTIPHASE_H__
19 19
 #define __PI_MULTIPHASE_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 #include <ipxe/efi/Pi/PiFirmwareVolume.h>
22 24
 #include <ipxe/efi/Pi/PiFirmwareFile.h>
23 25
 #include <ipxe/efi/Pi/PiBootMode.h>

+ 2
- 0
src/include/ipxe/efi/Pi/PiS3BootScript.h Прегледај датотеку

@@ -16,6 +16,8 @@
16 16
 #ifndef _PI_S3_BOOT_SCRIPT_H_
17 17
 #define _PI_S3_BOOT_SCRIPT_H_
18 18
 
19
+FILE_LICENCE ( BSD3 );
20
+
19 21
 //*******************************************
20 22
 // EFI Boot Script Opcode definitions
21 23
 //*******************************************

+ 2
- 0
src/include/ipxe/efi/Pi/PiStatusCode.h Прегледај датотеку

@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 19
 #ifndef __PI_STATUS_CODE_H__
20 20
 #define __PI_STATUS_CODE_H__
21 21
 
22
+FILE_LICENCE ( BSD3 );
23
+
22 24
 //
23 25
 // Required for IA32 and IPF defines for CPU exception types
24 26
 //

+ 2
- 0
src/include/ipxe/efi/PiDxe.h Прегледај датотеку

@@ -16,6 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 16
 #ifndef __PI_DXE_H__
17 17
 #define __PI_DXE_H__
18 18
 
19
+FILE_LICENCE ( BSD3 );
20
+
19 21
 #include <ipxe/efi/Uefi/UefiBaseType.h>
20 22
 #include <ipxe/efi/Uefi/UefiSpec.h>
21 23
 

+ 2
- 0
src/include/ipxe/efi/Protocol/ComponentName2.h Прегледај датотеку

@@ -17,6 +17,8 @@
17 17
 #ifndef __EFI_COMPONENT_NAME2_H__
18 18
 #define __EFI_COMPONENT_NAME2_H__
19 19
 
20
+FILE_LICENCE ( BSD3 );
21
+
20 22
 ///
21 23
 /// Global ID for the Component Name Protocol
22 24
 ///

+ 2
- 0
src/include/ipxe/efi/Protocol/Cpu.h Прегледај датотеку

@@ -17,6 +17,8 @@
17 17
 #ifndef __ARCH_PROTOCOL_CPU_H__
18 18
 #define __ARCH_PROTOCOL_CPU_H__
19 19
 
20
+FILE_LICENCE ( BSD3 );
21
+
20 22
 #include <ipxe/efi/Protocol/DebugSupport.h>
21 23
 
22 24
 #define EFI_CPU_ARCH_PROTOCOL_GUID \

+ 2
- 0
src/include/ipxe/efi/Protocol/CpuIo.h Прегледај датотеку

@@ -24,6 +24,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24 24
 #ifndef _CPUIO_H_
25 25
 #define _CPUIO_H_
26 26
 
27
+FILE_LICENCE ( BSD3 );
28
+
27 29
 #include <ipxe/efi/Protocol/CpuIo2.h>
28 30
 
29 31
 #define EFI_CPU_IO_PROTOCOL_GUID \

+ 2
- 0
src/include/ipxe/efi/Protocol/CpuIo2.h Прегледај датотеку

@@ -30,6 +30,8 @@
30 30
 #ifndef __CPU_IO2_H__
31 31
 #define __CPU_IO2_H__
32 32
 
33
+FILE_LICENCE ( BSD3 );
34
+
33 35
 #define EFI_CPU_IO2_PROTOCOL_GUID \
34 36
   { \
35 37
     0xad61f191, 0xae5f, 0x4c0e, {0xb9, 0xfa, 0xe8, 0x69, 0xd2, 0x88, 0xc6, 0x4f} \

+ 2
- 0
src/include/ipxe/efi/Protocol/DebugSupport.h Прегледај датотеку

@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 19
 #ifndef __DEBUG_SUPPORT_H__
20 20
 #define __DEBUG_SUPPORT_H__
21 21
 
22
+FILE_LICENCE ( BSD3 );
23
+
22 24
 #include <ipxe/efi/IndustryStandard/PeImage.h>
23 25
 
24 26
 typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;

+ 2
- 0
src/include/ipxe/efi/Protocol/DevicePath.h Прегледај датотеку

@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 19
 #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__
20 20
 #define __EFI_DEVICE_PATH_PROTOCOL_H__
21 21
 
22
+FILE_LICENCE ( BSD3 );
23
+
22 24
 #include <ipxe/efi/Guid/PcAnsi.h>
23 25
 
24 26
 ///

+ 2
- 0
src/include/ipxe/efi/Protocol/DriverBinding.h Прегледај датотеку

@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 18
 #ifndef __EFI_DRIVER_BINDING_H__
19 19
 #define __EFI_DRIVER_BINDING_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 ///
22 24
 /// The global ID for the ControllerHandle Driver Protocol.
23 25
 ///

+ 2
- 0
src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h Прегледај датотеку

@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 18
 #ifndef __EFI_NETWORK_INTERFACE_IDENTIFER_H__
19 19
 #define __EFI_NETWORK_INTERFACE_IDENTIFER_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 //
22 24
 // GUID retired from UEFI Specification 2.1b
23 25
 //

+ 2
- 0
src/include/ipxe/efi/Protocol/PciIo.h Прегледај датотеку

@@ -16,6 +16,8 @@
16 16
 #ifndef __PCI_IO_H__
17 17
 #define __PCI_IO_H__
18 18
 
19
+FILE_LICENCE ( BSD3 );
20
+
19 21
 ///
20 22
 /// Global ID for the PCI I/O Protocol
21 23
 ///

+ 2
- 0
src/include/ipxe/efi/Protocol/PciRootBridgeIo.h Прегледај датотеку

@@ -19,6 +19,8 @@
19 19
 #ifndef __PCI_ROOT_BRIDGE_IO_H__
20 20
 #define __PCI_ROOT_BRIDGE_IO_H__
21 21
 
22
+FILE_LICENCE ( BSD3 );
23
+
22 24
 #define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \
23 25
   { \
24 26
     0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \

+ 2
- 0
src/include/ipxe/efi/Protocol/SimpleNetwork.h Прегледај датотеку

@@ -26,6 +26,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
26 26
 #ifndef __SIMPLE_NETWORK_H__
27 27
 #define __SIMPLE_NETWORK_H__
28 28
 
29
+FILE_LICENCE ( BSD3 );
30
+
29 31
 #define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
30 32
   { \
31 33
     0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \

+ 2
- 0
src/include/ipxe/efi/Protocol/SimpleTextIn.h Прегледај датотеку

@@ -18,6 +18,8 @@
18 18
 #ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__
19 19
 #define __SIMPLE_TEXT_IN_PROTOCOL_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 #define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \
22 24
   { \
23 25
     0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \

+ 2
- 0
src/include/ipxe/efi/Protocol/SimpleTextOut.h Прегледај датотеку

@@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 20
 #ifndef __SIMPLE_TEXT_OUT_H__
21 21
 #define __SIMPLE_TEXT_OUT_H__
22 22
 
23
+FILE_LICENCE ( BSD3 );
24
+
23 25
 #define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \
24 26
   { \
25 27
     0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \

+ 2
- 0
src/include/ipxe/efi/Uefi.h Прегледај датотеку

@@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 20
 #ifndef __PI_UEFI_H__
21 21
 #define __PI_UEFI_H__
22 22
 
23
+FILE_LICENCE ( BSD3 );
24
+
23 25
 #include <ipxe/efi/Uefi/UefiBaseType.h>
24 26
 #include <ipxe/efi/Uefi/UefiSpec.h>
25 27
 

+ 2
- 0
src/include/ipxe/efi/Uefi/UefiBaseType.h Прегледај датотеку

@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 15
 #ifndef __UEFI_BASETYPE_H__
16 16
 #define __UEFI_BASETYPE_H__
17 17
 
18
+FILE_LICENCE ( BSD3 );
19
+
18 20
 #include <ipxe/efi/Base.h>
19 21
 
20 22
 //

+ 2
- 0
src/include/ipxe/efi/Uefi/UefiGpt.h Прегледај датотеку

@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 15
 #ifndef __UEFI_GPT_H__
16 16
 #define __UEFI_GPT_H__
17 17
 
18
+FILE_LICENCE ( BSD3 );
19
+
18 20
 ///
19 21
 /// The primary GUID Partition Table Header must be
20 22
 /// located in LBA 1 (i.e., the second logical block).

+ 2
- 0
src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h Прегледај датотеку

@@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 20
 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
21 21
 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
22 22
 
23
+FILE_LICENCE ( BSD3 );
24
+
23 25
 #include <ipxe/efi/Guid/HiiFormMapMethodGuid.h>
24 26
 
25 27
 ///

+ 2
- 0
src/include/ipxe/efi/Uefi/UefiMultiPhase.h Прегледај датотеку

@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 15
 #ifndef __UEFI_MULTIPHASE_H__
16 16
 #define __UEFI_MULTIPHASE_H__
17 17
 
18
+FILE_LICENCE ( BSD3 );
19
+
18 20
 #include <ipxe/efi/Guid/WinCertificate.h>
19 21
 ///
20 22
 /// Enumeration of memory types introduced in UEFI.

+ 2
- 0
src/include/ipxe/efi/Uefi/UefiPxe.h Прегледај датотеку

@@ -21,6 +21,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 21
 #ifndef __EFI_PXE_H__
22 22
 #define __EFI_PXE_H__
23 23
 
24
+FILE_LICENCE ( BSD3 );
25
+
24 26
 #pragma pack(1)
25 27
 
26 28
 #define PXE_BUSTYPE(a, b, c, d) \

+ 2
- 0
src/include/ipxe/efi/Uefi/UefiSpec.h Прегледај датотеку

@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 19
 #ifndef __UEFI_SPEC_H__
20 20
 #define __UEFI_SPEC_H__
21 21
 
22
+FILE_LICENCE ( BSD3 );
23
+
22 24
 #include <ipxe/efi/Uefi/UefiMultiPhase.h>
23 25
 
24 26
 #include <ipxe/efi/Protocol/DevicePath.h>

+ 2
- 0
src/include/ipxe/efi/X64/ProcessorBind.h Прегледај датотеку

@@ -15,6 +15,8 @@
15 15
 #ifndef __PROCESSOR_BIND_H__
16 16
 #define __PROCESSOR_BIND_H__
17 17
 
18
+FILE_LICENCE ( BSD3 );
19
+
18 20
 ///
19 21
 /// Define the processor type so other code can make processor based choices
20 22
 ///

+ 18
- 0
src/include/ipxe/efi/import.pl Прегледај датотеку

@@ -16,6 +16,7 @@ sub try_import_file {
16 16
   return unless $filename =~ /\.h$/;
17 17
   print "$filename...";
18 18
 
19
+  ( undef, undef, my $basename ) = splitpath ( $filename );
19 20
   my $outfile = catfile ( $ipxedir, $filename );
20 21
   foreach my $edkdir ( @$edkdirs ) {
21 22
     my $infile = catfile ( $edkdir, $filename );
@@ -27,6 +28,8 @@ sub try_import_file {
27 28
       mkpath ( $outdir );
28 29
       open my $outfh, ">$outfile" or die "Could not open $outfile: $!\n";
29 30
       my @dependencies = ();
31
+      my $licence;
32
+      my $guard;
30 33
       while ( <$infh> ) {
31 34
 	# Strip CR and trailing whitespace
32 35
 	s/\r//g;
@@ -36,10 +39,25 @@ sub try_import_file {
36 39
 	if ( s/^\#include\s+[<\"](\S+)[>\"]/\#include <ipxe\/efi\/$1>/ ) {
37 40
 	  push @dependencies, $1;
38 41
 	}
42
+	# Check for BSD licence statement
43
+	if ( /^\s*THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE/ ) {
44
+	  die "Licence detected after header guard\n" if $guard;
45
+	  $licence = "BSD3";
46
+	}
47
+	# Write out line
39 48
 	print $outfh "$_\n";
49
+	# Apply FILE_LICENCE() immediately after include guard
50
+	if ( /^\#define\s+_?_\S+_H_?_$/ ) {
51
+	  die "Duplicate header guard detected in $infile\n" if $guard;
52
+	  $guard = 1;
53
+	  print $outfh "\nFILE_LICENCE ( $licence );\n" if $licence;
54
+	}
40 55
       }
41 56
       close $outfh;
42 57
       close $infh;
58
+      # Warn if no licence was detected
59
+      warn "Cannot detect licence in $infile\n" unless $licence;
60
+      warn "Cannot detect header guard in $infile\n" unless $guard;
43 61
       # Recurse to handle any included files that we don't already have
44 62
       foreach my $dependency ( @dependencies ) {
45 63
 	if ( ! -e catfile ( $ipxedir, $dependency ) ) {

Loading…
Откажи
Сачувај