The invention discloses a method for embedded system adaptive different flash partition, the realization process is based on the embedded system, the main control chip and the embedded system in the running code for BootLoader, for the hardware, the realization process is: increase the adaptive partition function in BootLoader, through the integration in BootLoader flash drive module to read and write operations on the flash. An embedded system of the invention is adaptive to different flash partition method compared with existing technology, can avoid because of the different size of flash and the development and maintenance of software according to different scenarios, flash achieve adaptive partition size, achieve software compatibility, zero configuration; the basic principle is the built-in different partition table, according to the size of flash can be. Automatically selects the appropriate partition table is applied to the system, no need to replace the software, strong practicability, wide application scope, has the very good application value.
【技術(shù)實現(xiàn)步驟摘要】
一種嵌入式系統(tǒng)自適應(yīng)不同flash進(jìn)行分區(qū)的方法
本專利技術(shù)涉及計算機(jī)
,具體地說是一種嵌入式系統(tǒng)自適應(yīng)不同flash進(jìn)行分區(qū)的方法。
技術(shù)介紹
嵌入式系統(tǒng)不同于通用計算機(jī)系統(tǒng),嵌入式系統(tǒng)的flash分區(qū)沒有UI呈現(xiàn),無需用戶干預(yù),常常將分區(qū)表預(yù)先放置到程序中。實施中又經(jīng)常要求嵌入式的軟件可以做到兼容不同的flash大小。嵌入式系統(tǒng)的flash分區(qū),往往由內(nèi)置在軟件模塊中的分區(qū)表決定。如果變換flash大小,就必須調(diào)整源碼中的flash分區(qū)配置,然后編譯,再次燒錄使能。不同的flash大小必須燒錄攜帶不同分區(qū)表的程序。這樣的方式有很多弊端,1)軟件無法做到兼容,維護(hù)成本變大2)對于一些初級用戶替換不同的分區(qū)表有些困難,難以避免錯誤。基于此,本文設(shè)計實現(xiàn)了一種根據(jù)flash大小,可以自動分區(qū),自適應(yīng)的方法。達(dá)到軟件兼容,零配置。基本原理是軟件內(nèi)置不同的分區(qū)表,根據(jù)flash的大小,可自動選取合適的分區(qū)表應(yīng)用到系統(tǒng)。
技術(shù)實現(xiàn)思路
本專利技術(shù)的技術(shù)任務(wù)是針對以上不足之處,提供一種嵌入式系統(tǒng)自適應(yīng)不同flash進(jìn)行分區(qū)的方法。一種嵌入式系統(tǒng)自適應(yīng)不同flash進(jìn)行分區(qū)的方法,其實現(xiàn)過程為:基于嵌入式系統(tǒng),且該嵌入式系統(tǒng)中主控芯片最開始運行的代碼為BootLoader,用于初始化硬件,其實現(xiàn)過程為:在BootLoader增加自適應(yīng)分區(qū)功能,即通過在BootLoader中集成flash驅(qū)動模塊,來對flash進(jìn)行讀寫操作。所述flash驅(qū)動模塊包括自適應(yīng)分區(qū)應(yīng)用層、邏輯實現(xiàn)層、操作抽象層和Flash驅(qū)動層,其中,自適應(yīng)分區(qū)應(yīng)用層用于根據(jù)用戶定制條件完成分區(qū)的檢查和 ...
【技術(shù)保護(hù)點】
一種嵌入式系統(tǒng)自適應(yīng)不同flash進(jìn)行分區(qū)的方法,其特征在于,其實現(xiàn)過程為:基于嵌入式系統(tǒng),且該嵌入式系統(tǒng)中主控芯片最開始運行的代碼為BootLoader,用于初始化硬件,其實現(xiàn)過程為:在BootLoader增加自適應(yīng)分區(qū)功能,即通過在BootLoader中集成flash驅(qū)動模塊,來對flash進(jìn)行讀寫操作。
【技術(shù)特征摘要】
1.一種嵌入式系統(tǒng)自適應(yīng)不同flash進(jìn)行分區(qū)的方法,其特征在于,其實現(xiàn)過程為:基于嵌入式系統(tǒng),且該嵌入式系統(tǒng)中主控芯片最開始運行的代碼為BootLoader,用于初始化硬件,其實現(xiàn)過程為:在BootLoader增加自適應(yīng)分區(qū)功能,即通過在BootLoader中集成flash驅(qū)動模塊,來對flash進(jìn)行讀寫操作。2.根據(jù)權(quán)利要求1所述的一種嵌入式系統(tǒng)自適應(yīng)不同flash進(jìn)行分區(qū)的方法,其特征在于,所述flash驅(qū)動模塊包括自適應(yīng)分區(qū)應(yīng)用層、邏輯實現(xiàn)層、操作抽象層和Flash驅(qū)動層,其中,自適應(yīng)分區(qū)應(yīng)用層用于根據(jù)用戶定制條件完成分區(qū)的檢查和更新;邏輯實現(xiàn)層用于存儲MBR/GPT分區(qū)表,并由系統(tǒng)內(nèi)核來自動識別;操作抽象層用于將FlashIO操作進(jìn)行抽象...
【專利技術(shù)屬性】
技術(shù)研發(fā)人員:周元元,
申請(專利權(quán))人:山東浪潮商用系統(tǒng)有限公司,
類型:發(fā)明
國別省市:山東,37
還沒有人留言評論。發(fā)表了對其他瀏覽者有用的留言會獲得科技券。