github.com/linuxboot/fiano@v1.2.0/README.md (about)

     1  # fiano
     2  
     3  Go-based tools for modifying UEFI firmware.
     4  
     5  [![CircleCI](https://circleci.com/gh/linuxboot/fiano.svg?style=shield)](https://circleci.com/gh/linuxboot/fiano)
     6  [![Go Report
     7  Card](https://goreportcard.com/badge/github.com/linuxboot/fiano)](https://goreportcard.com/report/github.com/linuxboot/fiano)
     8  [![GoDoc](https://godoc.org/github.com/linuxboot/fiano?status.svg)](https://godoc.org/github.com/linuxboot/fiano)
     9  [![CodeCov](https://codecov.io/gh/linuxboot/fiano/branch/master/graph/badge.svg)](https://codecov.io/gh/linuxboot/fiano/)
    10  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/linuxboot/fiano/blob/master/LICENSE)
    11  
    12  ![Fiano](./fiano-logo.svg)
    13  
    14  # Contributing
    15  
    16  For information about contributing, including how we sign off commits, please see
    17  CONTRIBUTING.md
    18  
    19  ## UTK: Generic UEFI tool kit meant to handle rom images
    20  
    21  Example usage:
    22  
    23  ```
    24  # For a comprehensive list of commands
    25  utk -h
    26  
    27  # Display the image in a compact table form:
    28  utk winterfell.rom table
    29  
    30  # Summarize everything in JSON:
    31  utk winterfell.rom json
    32  
    33  # List information about a single file in JSON (using regex):
    34  utk winterfell.rom find Shell
    35  
    36  # Dump an EFI file to an ffs
    37  utk winterfell.rom dump DxeCore dxecore.ffs
    38  
    39  # Insert an EFI file into an FV near another Dxe
    40  utk winterfell.rom insert_before Shell dxecore.ffs save inserted.rom
    41  utk winterfell.rom insert_after Shell dxecore.ffs save inserted.rom
    42  
    43  # Insert an EFI file into an FV at the front or the end
    44  # "Shell" is just a means of specifying the FV that contains Shell
    45  utk winterfell.rom insert_front Shell dxecore.ffs save inserted.rom
    46  utk winterfell.rom insert_end Shell dxecore.ffs save inserted.rom
    47  
    48  # Remove a file and pad the firmware volume to maintain offsets for the following files
    49  utk winterfell.rom remove_pad Shell save removed.rom
    50  
    51  # Remove two files by their GUID without padding and replace shell with Linux:
    52  utk winterfell.rom \
    53    remove 12345678-9abc-def0-1234-567890abcdef \
    54    remove 23830293-3029-3823-0922-328328330939 \
    55    replace_pe32 Shell linux.efi \
    56    save winterfell2.rom
    57  
    58  # Extract everything into a directory:
    59  utk winterfell.rom extract winterfell/
    60  
    61  # Re-assemble the directory into an image:
    62  utk winterfell/ save winterfell2.rom
    63  ```
    64  
    65  ### DXE Cleaner
    66  
    67  Delete unnecessary DXEs from your firmware. Free up space, speed up boot times
    68  and decrease the attack surface area! See the demo:
    69  
    70  [![asciicast](https://asciinema.org/a/233950.svg)](https://asciinema.org/a/233950)
    71  
    72  ## FMAP: Parses flash maps.
    73  
    74  Example usage:
    75  
    76    + `fmap checksum [md5|sha1|sha256] FILE`
    77    + `fmap extract i FILE`
    78    + `fmap jget JSONFILE FILE`
    79    + `fmap jput JSONFILE FILE`
    80    + `fmap summary FILE`
    81    + `fmap usage FILE`
    82    + `fmap verify FILE`
    83  
    84  ## Installation
    85  
    86      # Golang version 1.13 is required:
    87      go version
    88  
    89      # For UTK:
    90      go install github.com/linuxboot/fiano/cmds/utk
    91  
    92      # For fmap:
    93      go install github.com/linuxboot/fiano/cmds/fmap
    94  
    95  The executables are installed in `$HOME/go/bin`.
    96  
    97  ## Updating Dependencies
    98  
    99      # Fiano utilizes Go modules.
   100      Use the following to download the dependencies:
   101      ```
   102      go mod download
   103      go mod verify
   104      ```
   105  
   106      If you desire to update a existing dependency to a newer version:
   107      ```
   108      go get path/to/dependency/module@tag
   109      ```
   110      Execute this in any directory of fiano repository