soc/intel/cannonlake: Correct number of root ports for CNL PCH H
[coreboot.git] / Documentation / Binary_Extraction.md
blobfe8c25ca4e08ade95e593f4183c65696184f6d0a
1 # Intel IFD Binary Extraction Tutorial
3 ## Part 1: Extracting Binaries
5 To begin extracting the binaries, first create a directory labeled "binaries"
6 in the coreboot directory (i.e. /path/to/coreboot/binaries/).
8 Now, execute the following commands to extract the binaries from a ROM image.
9 **Note:** Make sure you are in the root coreboot directory.
11     cd /path/to/coreboot/util/ifdtool
12     ./ifdtool COREBOOT_IMAGE
13     ./ifdtool -d COREBOOT_IMAGE
14     ./ifdtool -x COREBOOT_IMAGE
16 In the above steps, COREBOOT_IMAGE is the name of the ROM image to extract the
17 binaries from, including the file path (ex. /build/coreboot.rom).
19 Copy the extracted .bin files to the binaries directory you created previously.
20 **Note:** You may want to rename your various .bin files to more clearly
21 indicate what they are and their purpose.
23 To extract the mrc.bin, move to the /coreboot/build directory and run the
24 following command:
26     cd /path/to/coreboot/build/
27     ./cbfstool COREBOOT_IMAGE extract -n mrc.bin -f /path/to/destination/filename
29 where COREBOOT_IMAGE is the filepath to the ROM image (same image as above),
30 /path/to/destination is the filepath to the destination directory and filename
31 is the output filename. An example command is given below:
33     ./cbfstool coreboot.rom extract -n mrc.bin -f /path/to/coreboot/binaries/mrc.bin
35 ## Part 2: Using extract_blobs.sh
37 To simplify some of the steps above, there is a script in the
38 /path/to/coreboot/util/chromeos/ directory called extract_blobs.sh what will
39 extract the flashdescriptor.bin and intel_me.bin files.
41 To run this script, switch to the /path/to/coreboot/util/chromeos/ directory
42 and execute the script providing a coreboot image as an argument.
44     cd /path/to/coreboot/util/chromeos/
45     ./extract_blobs.sh COREBOOT_IMAGE
47 Executing those commands will result in two binary blobs to appear in the
48 /path/to/coreboot/util/chromeos/ directory under the names
49 'flashdescriptor.bin' and 'me.bin'.
51 ## Part 3: Changing the coreboot configuration settings
53 To begin using the binaries extracted above, enable the use of binary
54 repositories in the menuconfig. From the main coreboot directory, run
55 'make menuconfig'. Select "General Setup", then select "Allow use of
56 binary-only repository", then exit to the main menu.
58 To configure the ROM image for a specific board, select "Mainboard". Select
59 "Mainboard vendor" and scroll to the correct vendor. Then select "Mainboard
60 model" and select the name of the board model. Exit back to the main menu.
62 To add the binaries you extracted, select "Chipset". Scroll and select "Add a
63 System Agent Binary" and set the filepath to your mrc.bin file's filepath.
64 Scroll and select "Add Intel descriptor.bin file" and type the filepath for
65 your descriptor.bin file. Scroll down and select "Add Intel ME/TXE firmware
66 file" and type the filepath for your ME file. Exit to the main menu.
68 Select "Exit", and select "Yes" when prompted to save your configuration.