fdf(flash description file)用於生成韌體映像,定義image的內容和布局資訊,它由[defines],[fd],[fv],[rule]等幾個部分組成
[fd.msm8998_efi]
baseaddress = 0x9fc00000|gembeddedtokenspaceguid.pcdembeddedfdbaseaddress #the base address of the flash device.
size = 0x00200000|gembeddedtokenspaceguid.pcdembeddedfdsize #the size in bytes of the flash device
erasepolarity = 1
blocksize = 0x200
numblocks = 0x1000
fd又被分成多個邏輯區域,每個區域定義了位置,大小以及內容,格式如下:
# offset|size
# pcdoffsetcname|pcdsizecname
# regiontype
// 高通平台fv定義如下:
0x00000000|0x00200000
gembeddedtokenspaceguid.pcdflashfvmainbase|gembeddedtokenspaceguid.pcdflashfvmainsize
fv = fvmain_compact
fv就是我們要找的firmware volume,編譯完成後,會在編譯目錄的fv目錄生成多個".fv"檔案;
ffs是fv中檔案的組織形式,fv的工程檔案描述fv由哪些ffs組成:
fvmain.inf
[files]
efi_file_name = boot_images/build/msm8998la_core/debug_clang38linux/fv/ffs/fc510ee7-ffdc-
11d4-bd41-0080c73c8881fvmain/fc510ee7-ffdc-11d4-bd41-0080c73c8881fvmain.ffs
efi_file_name = boot_images/build/msm8998la_core/debug_clang38linux/fv/ffs/d6a2cb7f-6a18-
4e2f-b43b-9920a733700adxecore/d6a2cb7f-6a18-4e2f-b43b-9920a733700a.ffs
... ...
進入到ffs目錄可以看到ffs檔案的編譯命令,首先使用gensec命令生成pe32格式的image,然後使用genffs命令最終生成的ffs檔案,".ui"檔案是fdf中定義的編譯規則:
dxecore的工程檔案在mdemodulepkg/core/dxe/dxemain.inf,其中定義了模組名,模組型別,模組的guid等資訊;
ffs/d6a2cb7f-6a18-4e2f-b43b-9920a733700adxecore/d6a2cb7f-6a18-4e2f-b43b-9920a733700asec1.1.pe32.txt
gensec -s efi_section_pe32 -o boot_images/build/msm8998la_core/debug_clang38linux/fv/ffs/
d6a2cb7f-6a18-4e2f-b43b-9920a733700adxecore/d6a2cb7f-6a18-4e2f-b43b-9920a733700asec1.1.pe32 boot_images/build/msm8998la_core/debug_clang38linux/aarch64/mdemodulepkg/core/dxe/dxemain/output/dxecore.efi
ffs/d6a2cb7f-6a18-4e2f-b43b-9920a733700adxecore/d6a2cb7f-6a18-4e2f-b43b-9920a733700a.ffs.txt
genffs -t efi_fv_filetype_dxe_core -g d6a2cb7f-6a18-4e2f-b43b-9920a733700a -o boot_images/
build/msm8998la_core/debug_clang38linux/fv/ffs/d6a2cb7f-6a18-4e2f-b43b-9920a733700adxecore/d6a2cb7f-6a18-4e2f-b43b-9920a733700a.ffs -i boot_images/build/msm8998la_core/debug_clang38linux/fv/ffs/d6a2cb7f-6a18-4e2f-b43b-
9920a733700adxecore/d6a2cb7f-6a18-4e2f-b43b-9920a733700asec1.1.pe32 -i boot_images/build/
msm8998la_core/debug_clang38linux/fv/ffs/d6a2cb7f-6a18-4e2f-b43b-9920a733700adxecore/d6a2cb7f-6a18-4e2f-b43b-9920a733700asec2.ui
[fv]:定義韌體卷的組織形式:
[fv.fvmain]
blocksize = 0x40
numblocks = 0 # this fv gets compressed so make it just big enough
fvalignment = 8 # fv alignment and fv attributes setting.
... ...
!include apriori.fdf.inc
inf mdemodulepkg/core/dxe/dxemain.inf #
# pi dxe drivers producing architectural protocols (efi services) #
inf armpkg/drivers/cpudxe/cpudxe.inf
... ... #
# file freeform = a91d838e-a5fa-4138-825d-455e2303079e
... ...
[fv.fvmain_compact]
fvalignment = 8
erase_polarity = 1
... ...
inf qcompkg/xblcore/xblcore.inf
file freeform = dde58710-41cd-4306-dbfb-3fa90bb1d2dd
file fv_image = 9e21fd93-9c72-4c15-8c4b-e77f1db2d792 }
[rule]:定義根據給定inf生成ffs檔案的規則,ui指示unicode string:
[rule.common.dxe_driver]
file driver = $(named_guid)
ui string ="$(module_name)" optional
pe32 pe32 |.efi }
常用縮寫:
fd:韌體裝置,指任何可以儲存韌體的裝置或裝置集合:
ff:韌體檔案,指在fv上組織**和資料的乙個集合;
ffs:fv上的檔案實際上是以ffs的形式儲存在fv上;
Oracle 控制檔案格式ctl檔案格式
options skip 1,errors 10 load data characterset zhs16gbk infile into table table name truncate fields terminated by optionally enclosed by trailing nu...
檔案格式 gff格式
gff檔案格式 gff格式是 sanger 研究所定義,是一種簡單的 方便的對於 dna rna以及蛋白質序列的特徵進行描述的一種資料格式,已經成為序列注釋的通用格式,比如基因組的基因 許多軟體都支援輸入或者輸出gff格式。前格式定義的最新版本是版本3。原始定義見 song websitegff是存...
DOS檔案格式 與 UNIX檔案格式 轉換
這裡闡述兩種方法 1.使用vim的方法 在vim下 使用如下命令 set fileformat unix 就可轉換成 unix 檔案格式,也可使用其縮寫形式命令 set ff unix 直接輸入命令 set fileformat 或 set ff 還可查詢當前的命令格式。2.使用linux命令工具 ...