版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
本文格式为Word版,下载可任意编辑——使用QEMU建立Mini2440的模拟环境=0){
if(pid==0){
charpath[20];/*baconadd*/intopen_max=sysconf(_SC_OPEN_MAX),i;for(i=0;i
gitclonegit://repo.or.cz/qemu/mini2440.gitqemu
修改启动部分为ram的最小地址直接启动[cpp]viewplaincopy1.2.3.4.5.6.7.8.9.ricky@ricky-laptop:~/ecos/projects/mini2440-qemu/mini2440$gitdiffdiff--gita/hw/mini2440.cb/hw/mini2440.cindex5decf4b..7a70aae100644a/hw/mini2440.c+++b/hw/mini2440.c@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)structmini2440_board_s*s=(structmini2440_board_s*)opaque;uint32_timage_size;10.-/*11.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but12.-*itisnotworkingperfectlyasexpected,sowecheatandload13.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere14.-*/15.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*116.-mini2440_printf(\);17.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddr18.-}19.-#if0/*startaddress22.-mini2440_printf(\23.-}24.-#endif25.:26.diff--gita/hw/mini2440.cb/hw/mini2440.c27.index5decf4b..7a70aae10064428.a/hw/mini2440.c29.+++b/hw/mini2440.c30.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)31.structmini2440_board_s*s=(structmini2440_board_s*)opaque;32.uint32_timage_size;33.34.-/*35.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but36.-*itisnotworkingperfectlyasexpected,sowecheatandload37.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere38.-*/
39.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*1040.-mini2440_printf(\);41.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddre42.-}43.-#if0/*startaddress,46.-mini2440_printf(\47.-}48.-#endif49.-/*50.:51.diff--gita/hw/mini2440.cb/hw/mini2440.c52.index5decf4b..7a70aae10064453.a/hw/mini2440.c54.+++b/hw/mini2440.c55.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)56.structmini2440_board_s*s=(structmini2440_board_s*)opaque;57.uint32_timage_size;58.59.-/*60.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but61.-*itisnotworkingperfectlyasexpected,sowecheatandload62.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere63.-*/64.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*10265.-mini2440_printf(\);66.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddres67.-}68.-#if0/*startaddress,71.-mini2440_printf(\72.-}73.-#endif74.-/*75.-*ifau--bootisavailableasafile,wealwaysuseit76.:77.diff--gita/hw/mini2440.cb/hw/mini2440.c78.index5decf4b..7a70aae10064479.a/hw/mini2440.c80.+++b/hw/mini2440.c81.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)82.structmini2440_board_s*s=(structmini2440_board_s*)opaque;
83.uint32_timage_size;84.85.-/*86.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but87.-*itisnotworkingperfectlyasexpected,sowecheatandload88.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere89.-*/90.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*1024)>91.-mini2440_printf(\);92.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,93.-}94.-#if0/*startaddress,u-b97.-mini2440_printf(\98.-}99.-#endif100.-/*101.-*ifau--bootisavailableasafile,wealwaysuseit102.-*/103.-{104.-image_size=load_image(\,qemu_get_ram_ptr(0x03f8000105.:106.diff--gita/hw/mini2440.cb/hw/mini2440.c107.index5decf4b..7a70aae100644108.a/hw/mini2440.c109.+++b/hw/mini2440.c110.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)111.structmini2440_board_s*s=(structmini2440_board_s*)opaque;112.uint32_timage_size;113.114.-/*115.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but116.-*itisnotworkingperfectlyasexpected,sowecheatandload117.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere118.-*/119.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*1024)>0)120.-mini2440_printf(\);121.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-b122.-}123.-#if0/*startaddress,u-boot126.-mini2440_printf(\
127.-}128.-#endif129.-/*130.-*ifau--bootisavailableasafile,wealwaysuseit131.-*/132.-{133.-image_size=load_image(\,qemu_get_ram_ptr(0x03f80000))134.-if(image_size0){137.:138.diff--gita/hw/mini2440.cb/hw/mini2440.c139.index5decf4b..7a70aae100644140.a/hw/mini2440.c141.+++b/hw/mini2440.c142.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)143.structmini2440_board_s*s=(structmini2440_board_s*)opaque;144.uint32_timage_size;145.146.-/*147.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but148.-*itisnotworkingperfectlyasexpected,sowecheatandload149.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere150.-*/151.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*1024)>0){152.-mini2440_printf(\);153.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-boot154.-}155.-#if0/*startaddress,u-bootrel158.-mini2440_printf(\159.-}160.-#endif161.-/*162.-*ifau--bootisavailableasafile,wealwaysuseit163.-*/164.-{165.-image_size=load_image(\,qemu_get_ram_ptr(0x03f80000));166.-if(image_size0){169.-if(image_size171.-mini2440_printf(\172.:173.diff--gita/hw/mini2440.cb/hw/mini2440.c174.index5decf4b..7a70aae100644175.a/hw/mini2440.c176.+++b/hw/mini2440.c177.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)178.structmini2440_board_s*s=(structmini2440_board_s*)opaque;179.uint32_timage_size;180.181.-/*182.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but183.-*itisnotworkingperfectlyasexpected,sowecheatandload184.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere185.-*/186.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*1024)>0){187.-mini2440_printf(\);188.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-bootalrea189.-}190.-#if0/*startaddress,u-bootrelocati193.-mini2440_printf(\194.-}195.-#endif196.-/*197.-*ifau--bootisavailableasafile,wealwaysuseit198.-*/199.-{200.-image_size=load_image(\,qemu_get_ram_ptr(0x03f80000));201.-if(image_size0){204.-if(image_size&(512-1))/*roundsizetoaNANDblocksize*/
205.-image_size=(image_size+512)206.-mini2440_printf(\,image_size);207.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-boot208.-}209.-}210.:211.diff--gita/hw/mini2440.cb/hw/mini2440.c212.index5decf4b..7a70aae100644213.a/hw/mini2440.c214.+++b/hw/mini2440.c215.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)216.structmini2440_board_s*s=(structmini2440_board_s*)opaque;217.uint32_timage_size;218.219.-/*220.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but221.-*itisnotworkingperfectlyasexpected,sowecheatandload222.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere223.-*/224.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*1024)>0){225.-mini2440_printf(\);226.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-bootalreadyrelo227.-}228.-#if0/*startaddress,u-bootrelocatingcode231.-mini2440_printf(\232.-}233.-#endif234.-/*235.-*ifau--bootisavailableasafile,wealwaysuseit236.-*/237.-{238.-image_size=load_image(\,qemu_get_ram_ptr(0x03f80000));239.-if(image_size0){
242.-if(image_size244.-mini2440_printf(\,image_size);245.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-bootalready246.-}247.-}248.-/*249.-*ifakernelwasexplicitlyspecified,weloadittoo250.-*/251.-if(s->kernel){252.-image_size=load_image(s->kernel,qemu_get_ram_ptr(0x02000000));253.:254.diff--gita/hw/mini2440.cb/hw/mini2440.c255.index5decf4b..7a70aae100644256.a/hw/mini2440.c257.+++b/hw/mini2440.c258.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)259.structmini2440_board_s*s=(structmini2440_board_s*)opaque;260.uint32_timage_size;261.262.-/*263.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but264.-*itisnotworkingperfectlyasexpected,sowecheatandload265.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere266.-*/267.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*1024)>0){268.-mini2440_printf(\);269.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-bootalreadyrelocated270.-}271.-#if0/*startaddress,u-bootrelocatingcode*/274.-mini2440_printf(\);275.-}276.-#endif277.-/*278.-*ifau--bootisavailableasafile,wealwaysuseit
279.-*/280.-{281.-image_size=load_image(\,qemu_get_ram_ptr(0x03f80000));282.-if(image_size0){285.-if(image_size287.-mini2440_printf(\,image_size);288.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-bootalreadyreloc289.-}290.-}291.-/*292.-*ifakernelwasexplicitlyspecified,weloadittoo293.-*/294.-if(s->kernel){295.-image_size=load_image(s->kernel,qemu_get_ram_ptr(0x02000000));296.-if(image_size>0){297.-if(image_size305.uint32_timage_size;306.307.-/*308.-*Normallywewouldload4KBofnandtoSRAMandjumpthere,but309.-*itisnotworkingperfectlyasexpected,sowecheatandload310.-*itfromnanddirectlyrelocatedto0x33f80000andjumpthere311.-*/312.-if(mini2440_load_from_nand(s->nand,0,S3C_RAM_BASE|0x03f80000,256*1024)>0){313.-mini2440_printf(\);314.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-bootalreadyrelocated*315.-}316.-#if0/*startaddress,u-bootrelocatingcode*/319.-mini2440_printf(\);320.-}321.-#endif322.-/*323.-*ifau--bootisavailableasafile,wealwaysuseit324.-*/325.-{326.-image_size=load_image(\,qemu_get_ram_ptr(0x03f80000));327.-if(image_size0){330.-if(image_size332.-mini2440_printf(\,image_size);333.-s->cpu->env->regs[15]=S3C_RAM_BASE|0x03f80000;/*startaddress,u-bootalreadyreloca334.-}335.-}336.-/*337.-*ifakernelwasexplicitlyspecified,weloadittoo338.-*/339.-if(s->kernel){340.-image_size=load_image(s->kernel,qemu_get_ram_ptr(0x02000000));341.-if(image_size>0){342.-if(image_size344.:345.diff--gita/hw/mini2440.cb/hw/mini2440.c346.index5decf4b..7a70aae100644347.a/hw/mini2440.c348.+++b/hw/mini2440.c349.@@-258,46+258,15@@staticvoidmini2440_reset(void*opaque)350.structmini2440_board_s*s=(structmini2440_board_s*)opaque;351.uint32_timage_size;352.353.-/*354.-*Normallywewouldload4K
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 艺术摄影服务合同
- 定制公司工作服合同
- 合同协议订金合同的合同争议解决
- 购买招标文件关键要点介绍信
- 房地产招标函全解析案例
- 酒店式办公室租赁合同
- 购房合同安全保证函
- 正规不锈钢购销合同
- 合同违约处理律师协助
- 烟煤粉采购合同的采购流程
- 第13课+清前中期的兴盛与危机【中职专用】《中国历史》(高教版2023基础模块)
- 国开电大行政管理专科《监督学》期末考试总题库2024版
- 项目部安全生产考核实施细则
- 人教鄂教版版五年级上册科学期末测试题
- 工程造价专业《工程经济》课程标准
- 野外安全应急预案
- 智慧冷链物流产业园建设项目可行性报告
- 租赁营销方案
- 中医减肥药方-超有效分类型
- 小学科学试卷分析存在问题及整改措施4篇-
- JJF 1184-2024热电偶检定炉温度场测试技术规范
评论
0/150
提交评论