如何將系統(tǒng)軟硬件環(huán)境帶到合適狀態(tài)解析方案
例如,F(xiàn)lash燒寫命令封裝如下:
CMD_TBL_FLASH
{flash,DoWriteToFlashBlocks,
flash {loader/kernel/root} {block1/.../block16}
Copy to Flash from SDRAM of Area.
flash [dest] [src] [len]
Copy to Flash from src to dest. ,
flash {loader/kernel/root} {block1/.../block16}
Copy to Flash from SDRAM. ,
flash {loader/kernel/root} {block1/.../block16}
Copy to Flash from SDRAM of Area.
flash [dest] [src] [len]
Copy to Flash from src to dest.
}
其中,flash是其命令字;DoWriteToFlashBlocks為其處理方法的方法名;flash {loader/kernel/root} {block1/.../block16}和flash [dest] [src] [len]為其命令的使用格式(其中“{}”內(nèi)為可選項(xiàng),“[]”內(nèi)為必選項(xiàng))。
2.2 BootLoader改進(jìn)實(shí)驗(yàn)
此次改進(jìn)就是在原有BootLoader的基礎(chǔ)上,增加對(duì)移動(dòng)存儲(chǔ)介質(zhì)SD卡以FAT格式進(jìn)行讀取數(shù)據(jù)的指令來(lái)實(shí)現(xiàn)的。命令封裝如下:
CMD_TBL_SD_READ
{readSD, DoReadFromSDBlocks,
readSD [filename] [addr] Read data from SD to SDRAM for startup. ,
readSD [filename] [addr] Read data from SD to SDRAM for startup. ,
readSD [filename] [addr] Read data from SD to SDRAM for startup.
}
其功能是,在SD卡中把指定目錄下的內(nèi)核文件提取到SDRAM區(qū)域中,從而完成內(nèi)核的加載。
評(píng)論