如何將系統(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)為可選項,“[]”內(nèi)為必選項)。
2.2 BootLoader改進實驗
此次改進就是在原有BootLoader的基礎上,增加對移動存儲介質SD卡以FAT格式進行讀取數(shù)據(jù)的指令來實現(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)核的加載。
評論