1 # SplitFspBin.py is a python script to support some operations on Intel FSP 1.x/2.x image.
5 - Split Intel FSP 2.x image into individual FSP-T/M/S/O component
7 - Rebase Intel FSP 1.x/2.x components to different base addresses
9 - Generate Intel FSP 1.x/2.x C header file
11 - Display Intel FSP 1.x/2.x information header for each FSP component
13 ## Split Intel FSP 2.x image
15 FSP 1.x image is not supported by split command.
16 To split individual FSP component in Intel FSP 2.x image, the following
19 **python SplitFspBin.py split [-h] -f FSPBINARY [-o OUTPUTDIR] [-n NAMETEMPLATE]**
23 `python SplitFspBin.py split -f FSP.bin`
25 It will create FSP_T.bin, FSP_M.bin and FSP_S.bin in current directory.
27 ## Rebase Intel FSP 1.x/2.x components
29 To rebase one or multiple FSP components in Intel FSP 1.x/2.x image, the following
32 **python SplitFspBin.py rebase [-h] -f FSPBINARY -c {t,m,s,o} [{t,m,s,o} ...] -b FSPBASE [FSPBASE ...] [-o OUTPUTDIR] [-n OUTPUTFILE]**
36 `python SplitFspBin.py rebase -f FSP.bin -c t -b 0xFFF00000 -n FSP_new.bin`
38 It will rebase FSP-T component inside FSP.bin to new base 0xFFF00000 and save the
39 rebased Intel FSP 2.x image into file FSP_new.bin.
40 For FSP 1.x image there is only one component in binary so above command also
41 works for FSP 1.x image.
43 `python SplitFspBin.py rebase -f FSP.bin -c t m -b 0xFFF00000 0xFEF80000 -n FSP_new.bin`
45 It will rebase FSP-T and FSP-M components inside FSP.bin to new base 0xFFF00000
46 and 0xFEF80000 respectively, and save the rebased Intel FSP 2.x image into file
49 ## Generate Intel FSP 1.x/2.x C header file
51 To generate Intel FSP 1.x/2.x C header file, the following command can be used:
53 **Python SplitFspBin.py genhdr [-h] -f FSPBINARY [-o OUTPUTDIR] [-n HFILENAME]**
57 `python SplitFspBin.py genhdr -f FSP.bin -n FSP.h`
59 It will create the C header file FSP.h containing the image ID, revision, offset
60 and size for each individual FSP component.
62 ## Display Intel FSP 1.x/2.x information header
64 To display Intel FSP 1.x/2.x information headers, the following command can be used:
66 **Python SplitFspBin.py info [-h] -f FSPBINARY**
70 `python SplitFspBin.py info -f FSP.bin`
72 It will print out the FSP information header for each FSP component.