]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[legal] Add FILE_LICENCE declarations to EFI header files
authorMichael Brown <mcb30@ipxe.org>
Sat, 29 May 2010 22:06:06 +0000 (23:06 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sat, 29 May 2010 22:49:47 +0000 (23:49 +0100)
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>
40 files changed:
src/include/ipxe/efi/Base.h
src/include/ipxe/efi/Guid/HiiFormMapMethodGuid.h
src/include/ipxe/efi/Guid/PcAnsi.h
src/include/ipxe/efi/Guid/SmBios.h
src/include/ipxe/efi/Guid/WinCertificate.h
src/include/ipxe/efi/Ia32/ProcessorBind.h
src/include/ipxe/efi/IndustryStandard/Pci22.h
src/include/ipxe/efi/IndustryStandard/PeImage.h
src/include/ipxe/efi/Pi/PiBootMode.h
src/include/ipxe/efi/Pi/PiDependency.h
src/include/ipxe/efi/Pi/PiDxeCis.h
src/include/ipxe/efi/Pi/PiFirmwareFile.h
src/include/ipxe/efi/Pi/PiFirmwareVolume.h
src/include/ipxe/efi/Pi/PiHob.h
src/include/ipxe/efi/Pi/PiMultiPhase.h
src/include/ipxe/efi/Pi/PiS3BootScript.h
src/include/ipxe/efi/Pi/PiStatusCode.h
src/include/ipxe/efi/PiDxe.h
src/include/ipxe/efi/Protocol/ComponentName2.h
src/include/ipxe/efi/Protocol/Cpu.h
src/include/ipxe/efi/Protocol/CpuIo.h
src/include/ipxe/efi/Protocol/CpuIo2.h
src/include/ipxe/efi/Protocol/DebugSupport.h
src/include/ipxe/efi/Protocol/DevicePath.h
src/include/ipxe/efi/Protocol/DriverBinding.h
src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h
src/include/ipxe/efi/Protocol/PciIo.h
src/include/ipxe/efi/Protocol/PciRootBridgeIo.h
src/include/ipxe/efi/Protocol/SimpleNetwork.h
src/include/ipxe/efi/Protocol/SimpleTextIn.h
src/include/ipxe/efi/Protocol/SimpleTextOut.h
src/include/ipxe/efi/Uefi.h
src/include/ipxe/efi/Uefi/UefiBaseType.h
src/include/ipxe/efi/Uefi/UefiGpt.h
src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h
src/include/ipxe/efi/Uefi/UefiMultiPhase.h
src/include/ipxe/efi/Uefi/UefiPxe.h
src/include/ipxe/efi/Uefi/UefiSpec.h
src/include/ipxe/efi/X64/ProcessorBind.h
src/include/ipxe/efi/import.pl

index 6042841f0190b6549524449c281b451140d19857..d95f24bd4256249901a1551e42be24817d074326 100644 (file)
@@ -22,6 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __BASE_H__
 #define __BASE_H__
 
+FILE_LICENCE ( BSD3 );
+
 //
 // Include processor specific binding
 //
index ab508fd3c9209d6f235ee477373084ed024d5972..c8f37213fadc19a0f4dc1f6bb71899d5b7b512e9 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef __EFI_HII_FORMMAP_GUID_H__
 #define __EFI_HII_FORMMAP_GUID_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define EFI_HII_STANDARD_FORM_GUID \
   { 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 } }
 
index 8f312542de9bf7c9c1245dba21c3e9d7d7fcc70a..8b3e63f35e4d705b3ab4a2d8148287b9f002da58 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __PC_ANSI_H__
 #define __PC_ANSI_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define EFI_PC_ANSI_GUID \
   { \
     0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
index 4bda1f349da5aa1948aab3e9ac74b9a5f1677116..cc4a1f946541fd8455a56c3a966a2dc37788878c 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef __SMBIOS_GUID_H__
 #define __SMBIOS_GUID_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define SMBIOS_TABLE_GUID \
   { \
     0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
index 3f91b123245bcc0417ceb2dda59ad31a12f21520..75fc642f09e633a08668280f721e476a687101e0 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef __EFI_WIN_CERTIFICATE_H__
 #define __EFI_WIN_CERTIFICATE_H__
 
+FILE_LICENCE ( BSD3 );
+
 //
 // _WIN_CERTIFICATE.wCertificateType
 //
index 38de24573882df5fd30cd9f723b1d9bb93b7cfe8..20cf407b6a5f8f84d47488d8ed95e8224305411e 100644 (file)
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PROCESSOR_BIND_H__
 #define __PROCESSOR_BIND_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// Define the processor type so other code can make processor based choices.
 ///
index 62f0a26a109abcfca8ad305f0950f0a5303c508c..b57059a945e3b004ea1714e4e46b71804f04dd65 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef _PCI22_H_
 #define _PCI22_H_
 
+FILE_LICENCE ( BSD3 );
+
 #define PCI_MAX_BUS     255
 #define PCI_MAX_DEVICE  31
 #define PCI_MAX_FUNC    7
index 74941f55e32512cb8b0f4b0feb0371f173648f0a..281d486bfb108b3bf0276096b89812fac5c47d8a 100644 (file)
@@ -22,6 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PE_IMAGE_H__
 #define __PE_IMAGE_H__
 
+FILE_LICENCE ( BSD3 );
+
 //
 // PE32+ Subsystem type for EFI images
 //
index 504a67f9a57eb17b28c625324ee281ae3f92ecbc..30fd4437782b89ef9a9ce1e621373264d61d512f 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __PI_BOOT_MODE_H__
 #define __PI_BOOT_MODE_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// EFI boot mode
 ///
index 7d67da584d4ebe80c257f0f50ef44cd5bf748e5e..7ad81a730dadc6837d99f62bcc27111ad9b82dff 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef __PI_DEPENDENCY_H__
 #define __PI_DEPENDENCY_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// If present, this must be the first and only opcode,
 /// EFI_DEP_BEFORE is only used by DXE driver.
index 959d00a0eaeb2c41ab555a208e59161a983580a4..6c4f44b900ce842fa3ddd2e3f58904e4d6ac26d4 100644 (file)
@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PI_DXECIS_H__
 #define __PI_DXECIS_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Uefi/UefiMultiPhase.h>
 #include <ipxe/efi/Pi/PiMultiPhase.h>
 
index b0dea867bd72ca5c7ad9c1c9eea95c7d1c859e94..6909018bce50ce147f8cf4f03c6c243183090c29 100644 (file)
@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PI_FIRMWARE_FILE_H__
 #define __PI_FIRMWARE_FILE_H__
 
+FILE_LICENCE ( BSD3 );
+
 #pragma pack(1)
 ///
 /// Used to verify the integrity of the file.
index 4d2ba88fd3678673a3d3973ff3b4af159850dc76..605c46810983c57e44ae8a9f5d0bca0b59ba3373 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __PI_FIRMWAREVOLUME_H__
 #define __PI_FIRMWAREVOLUME_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// EFI_FV_FILE_ATTRIBUTES
 ///
index 4d09521a4084c2aa738f666dc8061a6556c4c384..cd196cb3018f0c21baf21f01015787b60138bcf5 100644 (file)
@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PI_HOB_H__
 #define __PI_HOB_H__
 
+FILE_LICENCE ( BSD3 );
+
 //
 // HobType of EFI_HOB_GENERIC_HEADER.
 //
index a9020837ade073afcac389ee800c8c75dbc593a7..d5d7aaa4266a85a50ba7b7adae9cff644026d0a7 100644 (file)
@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PI_MULTIPHASE_H__
 #define __PI_MULTIPHASE_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Pi/PiFirmwareVolume.h>
 #include <ipxe/efi/Pi/PiFirmwareFile.h>
 #include <ipxe/efi/Pi/PiBootMode.h>
index e4ce6880ac7e82d43153596f9a52013ccd5fd824..01cae154c6bd3055ed0078facf67ed362be7bcb5 100644 (file)
@@ -16,6 +16,8 @@
 #ifndef _PI_S3_BOOT_SCRIPT_H_
 #define _PI_S3_BOOT_SCRIPT_H_
 
+FILE_LICENCE ( BSD3 );
+
 //*******************************************
 // EFI Boot Script Opcode definitions
 //*******************************************
index cca7b1aeb9abe2d02bef69f95256e9f68de02e65..71fd22add179b1a1bf06b06787fd5c7e90030c03 100644 (file)
@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PI_STATUS_CODE_H__
 #define __PI_STATUS_CODE_H__
 
+FILE_LICENCE ( BSD3 );
+
 //
 // Required for IA32 and IPF defines for CPU exception types
 //
index 5ffd1a56c14ecd14e7f61c6ddedae17425a3dfab..94433680d4963a8c5ef433134a293dbbade1b5db 100644 (file)
@@ -16,6 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PI_DXE_H__
 #define __PI_DXE_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Uefi/UefiBaseType.h>
 #include <ipxe/efi/Uefi/UefiSpec.h>
 
index 3c5ec07d9456a8471ba441dff20eb1209b9a99f7..978ede5ab67067431bcca8c168dd23f6a3749419 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef __EFI_COMPONENT_NAME2_H__
 #define __EFI_COMPONENT_NAME2_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// Global ID for the Component Name Protocol
 ///
index 73200aaec0654e14596e9b9b32a33db18509b568..ebcaf5f10d3cd0ef898deaea83880b496377b389 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef __ARCH_PROTOCOL_CPU_H__
 #define __ARCH_PROTOCOL_CPU_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Protocol/DebugSupport.h>
 
 #define EFI_CPU_ARCH_PROTOCOL_GUID \
index 53283170296ecdc588ac59a180fdb3c27b01f537..39b82b3bc76db4215fc490d1bb37b5f376c86ede 100644 (file)
@@ -24,6 +24,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef _CPUIO_H_
 #define _CPUIO_H_
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Protocol/CpuIo2.h>
 
 #define EFI_CPU_IO_PROTOCOL_GUID \
index e6fd0f2309d62d9749f23f7ca3734eab894d0ff2..aef8157d8fe4ab3add8ce52d1cd91e6aff77f104 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef __CPU_IO2_H__
 #define __CPU_IO2_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define EFI_CPU_IO2_PROTOCOL_GUID \
   { \
     0xad61f191, 0xae5f, 0x4c0e, {0xb9, 0xfa, 0xe8, 0x69, 0xd2, 0x88, 0xc6, 0x4f} \
index 0b6f4ed097dcff2d79591ad629407f90569df139..ea5cec5785daad55f58f56db7aee7262cd8ac563 100644 (file)
@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __DEBUG_SUPPORT_H__
 #define __DEBUG_SUPPORT_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/IndustryStandard/PeImage.h>
 
 typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL;
index f8556b8de63aa0bac8566af1f3bb62c4f8b4056e..5c6787080787b9c5cb2b3fcedf92d12a266caa2b 100644 (file)
@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__
 #define __EFI_DEVICE_PATH_PROTOCOL_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Guid/PcAnsi.h>
 
 ///
index 94fe36feb9357f9ee7a7fc6e3b622d73fefc1a70..1f464a730a6f3ba9e1c72ed5d5b25ca4edafb547 100644 (file)
@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __EFI_DRIVER_BINDING_H__
 #define __EFI_DRIVER_BINDING_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// The global ID for the ControllerHandle Driver Protocol.
 ///
index dc0c7090366b94720b183a8ae4da2f7501894eb1..ac86e972ee61f3c2181d7dc83fa5015e844a745f 100644 (file)
@@ -18,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __EFI_NETWORK_INTERFACE_IDENTIFER_H__
 #define __EFI_NETWORK_INTERFACE_IDENTIFER_H__
 
+FILE_LICENCE ( BSD3 );
+
 //
 // GUID retired from UEFI Specification 2.1b
 //
index 3ec9a424d9a1ad230971dd1672555b6196c288bc..d99820841f61e92447af28c6b39f369c50bed657 100644 (file)
@@ -16,6 +16,8 @@
 #ifndef __PCI_IO_H__
 #define __PCI_IO_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// Global ID for the PCI I/O Protocol
 ///
index 482c4383e843e35bd69b5dde30e796ab59a8b1d8..5d8724198d8e2d8945fda7bbe77d8b3390685c5b 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef __PCI_ROOT_BRIDGE_IO_H__
 #define __PCI_ROOT_BRIDGE_IO_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \
   { \
     0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
index 30575901b3de51ed04346eecc69903d0ccfd3d57..2b521a9de8c50371e78ac0ea0c6c8febdd5894f5 100644 (file)
@@ -26,6 +26,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __SIMPLE_NETWORK_H__
 #define __SIMPLE_NETWORK_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \
   { \
     0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \
index 83ba9e77eed8e3245898cb545d976f3b0e436f2d..31cab3dfc65d766bcb91a2941d63d7f8192fc409 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__
 #define __SIMPLE_TEXT_IN_PROTOCOL_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \
   { \
     0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
index 7e1c70c61d87b6c6137181b9939849be00add2ca..a79cf431c1c68eebade032e5dc0c420b0a065fc7 100644 (file)
@@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __SIMPLE_TEXT_OUT_H__
 #define __SIMPLE_TEXT_OUT_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \
   { \
     0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
index 6950bb295e265b63c45b4983a60203bad57836fa..a5a25a9c42d40c644da95c8e2ff636f7069f4c98 100644 (file)
@@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PI_UEFI_H__
 #define __PI_UEFI_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Uefi/UefiBaseType.h>
 #include <ipxe/efi/Uefi/UefiSpec.h>
 
index 4fdca578381b9276387574f7c2632a9c64a359c8..05170390219660a4cff2eb23ff9a7f4bf7aae85c 100644 (file)
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __UEFI_BASETYPE_H__
 #define __UEFI_BASETYPE_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Base.h>
 
 //
index 9f563382d2ccdc2a996e41b5465b3ed4321d36e5..0ea2d70a0a77689b077b4f6f8a9e56baacc9fcfb 100644 (file)
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __UEFI_GPT_H__
 #define __UEFI_GPT_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// The primary GUID Partition Table Header must be
 /// located in LBA 1 (i.e., the second logical block).
index d9ddff55ecc0578a72d5286f4b5668cecd70c5c0..6b6d1e066dc4a309c85d05f68e6a68cb8a187bcb 100644 (file)
@@ -20,6 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Guid/HiiFormMapMethodGuid.h>
 
 ///
index d1fe6165272e5044ff3d25b4fae1cd243aa9ab04..6ecbcf118f2ec2836276dc9057fc465a153c423e 100644 (file)
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __UEFI_MULTIPHASE_H__
 #define __UEFI_MULTIPHASE_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Guid/WinCertificate.h>
 ///
 /// Enumeration of memory types introduced in UEFI.
index 582d0f8dd360f8b2b1d726b5fb0dfe0df6eb0f11..0b8da5fa9c61aea42879cffffa6f759adb9d5c1f 100644 (file)
@@ -21,6 +21,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __EFI_PXE_H__
 #define __EFI_PXE_H__
 
+FILE_LICENCE ( BSD3 );
+
 #pragma pack(1)
 
 #define PXE_BUSTYPE(a, b, c, d) \
index 6e2f26b1f4d04ffc7e4f1d62892d0818ad1964df..6fe5752002d85b1cf795b1aba0257c880143b447 100644 (file)
@@ -19,6 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __UEFI_SPEC_H__
 #define __UEFI_SPEC_H__
 
+FILE_LICENCE ( BSD3 );
+
 #include <ipxe/efi/Uefi/UefiMultiPhase.h>
 
 #include <ipxe/efi/Protocol/DevicePath.h>
index b026859a03fba65fb7bf1a1f6c9d8a91f0b5149d..0b1a3e11e51c4673fb4b4e283c5b1697f7f0d47e 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef __PROCESSOR_BIND_H__
 #define __PROCESSOR_BIND_H__
 
+FILE_LICENCE ( BSD3 );
+
 ///
 /// Define the processor type so other code can make processor based choices
 ///
index 4ea5175b2e70aecfd0ef776017d16a17e6bbb13a..629624cedc8afbe6dc0b42b1185d38b1896c241d 100755 (executable)
@@ -16,6 +16,7 @@ sub try_import_file {
   return unless $filename =~ /\.h$/;
   print "$filename...";
 
+  ( undef, undef, my $basename ) = splitpath ( $filename );
   my $outfile = catfile ( $ipxedir, $filename );
   foreach my $edkdir ( @$edkdirs ) {
     my $infile = catfile ( $edkdir, $filename );
@@ -27,6 +28,8 @@ sub try_import_file {
       mkpath ( $outdir );
       open my $outfh, ">$outfile" or die "Could not open $outfile: $!\n";
       my @dependencies = ();
+      my $licence;
+      my $guard;
       while ( <$infh> ) {
        # Strip CR and trailing whitespace
        s/\r//g;
@@ -36,10 +39,25 @@ sub try_import_file {
        if ( s/^\#include\s+[<\"](\S+)[>\"]/\#include <ipxe\/efi\/$1>/ ) {
          push @dependencies, $1;
        }
+       # Check for BSD licence statement
+       if ( /^\s*THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE/ ) {
+         die "Licence detected after header guard\n" if $guard;
+         $licence = "BSD3";
+       }
+       # Write out line
        print $outfh "$_\n";
+       # Apply FILE_LICENCE() immediately after include guard
+       if ( /^\#define\s+_?_\S+_H_?_$/ ) {
+         die "Duplicate header guard detected in $infile\n" if $guard;
+         $guard = 1;
+         print $outfh "\nFILE_LICENCE ( $licence );\n" if $licence;
+       }
       }
       close $outfh;
       close $infh;
+      # Warn if no licence was detected
+      warn "Cannot detect licence in $infile\n" unless $licence;
+      warn "Cannot detect header guard in $infile\n" unless $guard;
       # Recurse to handle any included files that we don't already have
       foreach my $dependency ( @dependencies ) {
        if ( ! -e catfile ( $ipxedir, $dependency ) ) {