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.
【技术实现步骤摘要】
一种嵌入式系统自适应不同flash进行分区的方法
本专利技术涉及计算机
,具体地说是一种嵌入式系统自适应不同flash进行分区的方法。
技术介绍
嵌入式系统不同于通用计算机系统,嵌入式系统的flash分区没有UI呈现,无需用户干预,常常将分区表预先放置到程序中。实施中又经常要求嵌入式的软件可以做到兼容不同的flash大小。嵌入式系统的flash分区,往往由内置在软件模块中的分区表决定。如果变换flash大小,就必须调整源码中的flash分区配置,然后编译,再次烧录使能。不同的flash大小必须烧录携带不同分区表的程序。这样的方式有很多弊端,1)软件无法做到兼容,维护成本变大2)对于一些初级用户替换不同的分区表有些困难,难以避免错误。基于此,本文设计实现了一种根据flash大小,可以自动分区,自适应的方法。达到软件兼容,零配置。基本原理是软件内置不同的分区表,根据flash的大小,可自动选取合适的分区表应用到系统。
技术实现思路
本专利技术的技术任务是针对以上不足之处,提供一种嵌入式系统自适应不同flash进行分区的方法。一种嵌入式系统自适应不同flash进行分区的方法,其实现过程为:基于嵌入式系统,且该嵌入式系统中主控芯片最开始运行的代码为BootLoader,用于初始化硬件,其实现过程为:在BootLoader增加自适应分区功能,即通过在BootLoader中集成flash驱动模块,来对flash进行读写操作。所述flash驱动模块包括自适应分区应用层、逻辑实现层、操作抽象层和Flash驱动层,其中,自适应分区应用层用于根据用户定制条件完成分区的检查和 ...
【技术保护点】
一种嵌入式系统自适应不同flash进行分区的方法,其特征在于,其实现过程为:基于嵌入式系统,且该嵌入式系统中主控芯片最开始运行的代码为BootLoader,用于初始化硬件,其实现过程为:在BootLoader增加自适应分区功能,即通过在BootLoader中集成flash驱动模块,来对flash进行读写操作。
【技术特征摘要】
1.一种嵌入式系统自适应不同flash进行分区的方法,其特征在于,其实现过程为:基于嵌入式系统,且该嵌入式系统中主控芯片最开始运行的代码为BootLoader,用于初始化硬件,其实现过程为:在BootLoader增加自适应分区功能,即通过在BootLoader中集成flash驱动模块,来对flash进行读写操作。2.根据权利要求1所述的一种嵌入式系统自适应不同flash进行分区的方法,其特征在于,所述flash驱动模块包括自适应分区应用层、逻辑实现层、操作抽象层和Flash驱动层,其中,自适应分区应用层用于根据用户定制条件完成分区的检查和更新;逻辑实现层用于存储MBR/GPT分区表,并由系统内核来自动识别;操作抽象层用于将FlashIO操作进行抽象...
【专利技术属性】
技术研发人员:周元元,
申请(专利权)人:山东浪潮商用系统有限公司,
类型:发明
国别省市:山东,37
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。