Appendix C Sample Driver INF Files

The following INF file example are from EDK II MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf and IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf driver modules.

C.1 DiskIoDxe INF file

## @file
# Module that lays Disk I/O protocol on every Block I/O protocol.
#
# This module produces Disk I/O protocol to abstract the block accesses
# of the Block I/O protocol to a more general offset-length protocol
# to provide byte-oriented access to block media. It adds this protocol
# to any Block I/O interface that appears in the system that does not
# already have a Disk I/O protocol. File systems and other disk access
# code utilize the Disk I/O protocol.
#
# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the
# BSD License which accompanies this distribution. The full text of the
# license may be found at:
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
# IMPLIED.
#
##

[Defines]
  INF_VERSION     = 0x0001001B
  BASE_NAME       = DiskIoDxe
  MODULE_UNI_FILE = DiskIoDxe.uni
  FILE_GUID       = 6B38F7B4-AD98-40e9-9093-ACA2B5A253C4
  MODULE_TYPE     = UEFI_DRIVER
  VERSION_STRING  = 1.0
  ENTRY_POINT     = InitializeDiskIo

#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
# DRIVER_BINDING = gDiskIoDriverBinding
# COMPONENT_NAME = gDiskIoComponentName
# COMPONENT_NAME2 = gDiskIoComponentName2
#

[Sources]
  ComponentName.c
  DiskIo.h
  DiskIo.c

[Packages]
  MdePkg/MdePkg.dec

[LibraryClasses]
  UefiBootServicesTableLib
  MemoryAllocationLib
  BaseMemoryLib
  BaseLib
  UefiLib
  UefiDriverEntryPoint
  DebugLib

[Protocols]
  gEfiDiskIoProtocolGuid   ## BY_START
  gEfiBlockIoProtocolGuid  ## TO_START

C.2 StatusCodeRuntimeDxe INF file

Note: In the above example, the backslash "\" character is used to show a line continuation for readability. Use of a backslash character in the actual INF file is not permitted.

Last updated

Was this helpful?