redboot on QEMU for mini2440

发布者:EnchantedHeart最新更新时间:2024-06-27 来源: elecfans关键字:redboot  QEMU  for  mini2440 手机看文章 扫描二维码
随时随地手机看文章

这段时间一直在研究ecos,所以有了把ecos移植到mini2440的qemu平台的想法。经过几天的折腾,终于可以在qemu的上面看到redboot的命令了。

先看看成果,然后进入枯燥的coding历程 

现在开始看代码,:-) 

1. 获得代码 

git clone git://repo.or.cz/qemu/mini2440.git  qemu 

修改启动部分为ram的最小地址直接启动

  1. ricky@ricky-laptop:~/ecos/projects/mini2440-qemu/mini2440$ git diff  

  2. diff --git a/hw/mini2440.c b/hw/mini2440.c  

  3. index 5decf4b..7a70aae 100644  

  4. --- a/hw/mini2440.c  

  5. +++ b/hw/mini2440.c  

  6. @@ -258,46 +258,15 @@ static void mini2440_reset(void *opaque)  

  7.      struct mini2440_board_s *s = (struct mini2440_board_s *) opaque;  

  8.      uint32_t image_size;  

  9.    

  10. -       /* 

  11. -        * Normally we would load 4 KB of nand to SRAM and jump there, but 

  12. -        * it is not working perfectly as expected, so we cheat and load 

  13. -        * it from nand directly relocated to 0x33f80000 and jump there 

  14. -        */  

  15. -       if (mini2440_load_from_nand(s->nand, 0, S3C_RAM_BASE | 0x03f80000, 256*1  

  16. -               mini2440_printf('loaded default u-boot from NAND/n');  

  17. -               s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start addr 

  18. -       } 

  19. -#if 0 && defined(LATER) 

  20. -       if (mini2440_load_from_nand(s->nand, 0, S3C_SRAM_BASE_NANDBOOT, S3C_SRAM 

  21. -           s->cpu->env->regs[15] = S3C_SRAM_BASE_NANDBOOT;     /* start address 

  22. -           mini2440_printf('4KB SteppingStone loaded from NAND/n'); 

  23. -       } 

  24. -#endif 

  25. diff --git a/hw/mini2440.c b/hw/mini2440.c 

  26. index 5decf4b..7a70aae 100644 

  27. --- a/hw/mini2440.c 

  28. +++ b/hw/mini2440.c 

  29. @@ -258,46 +258,15 @@ static void mini2440_reset(void *opaque) 

  30.      struct mini2440_board_s *s = (struct mini2440_board_s *) opaque; 

  31.      uint32_t image_size; 

  32.   

  33. -       /* 

  34. -        * Normally we would load 4 KB of nand to SRAM and jump there, but 

  35. -        * it is not working perfectly as expected, so we cheat and load 

  36. -        * it from nand directly relocated to 0x33f80000 and jump there 

  37. -        */  

  38. -       if (mini2440_load_from_nand(s->nand, 0, S3C_RAM_BASE | 0x03f80000, 256*10  

  39. -               mini2440_printf('loaded default u-boot from NAND/n');  

  40. -               s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start addre 

  41. -       } 

  42. -#if 0 && defined(LATER) 

  43. -       if (mini2440_load_from_nand(s->nand, 0, S3C_SRAM_BASE_NANDBOOT, S3C_SRAM_ 

  44. -           s->cpu->env->regs[15] = S3C_SRAM_BASE_NANDBOOT;     /* start address, 

  45. -           mini2440_printf('4KB SteppingStone loaded from NAND/n'); 

  46. -       } 

  47. -#endif 

  48. -       /* 

  49. diff --git a/hw/mini2440.c b/hw/mini2440.c 

  50. index 5decf4b..7a70aae 100644 

  51. --- a/hw/mini2440.c 

  52. +++ b/hw/mini2440.c 

  53. @@ -258,46 +258,15 @@ static void mini2440_reset(void *opaque) 

  54.      struct mini2440_board_s *s = (struct mini2440_board_s *) opaque; 

  55.      uint32_t image_size; 

  56.   

  57. -       /* 

  58. -        * Normally we would load 4 KB of nand to SRAM and jump there, but 

  59. -        * it is not working perfectly as expected, so we cheat and load 

  60. -        * it from nand directly relocated to 0x33f80000 and jump there 

  61. -        */  

  62. -       if (mini2440_load_from_nand(s->nand, 0, S3C_RAM_BASE | 0x03f80000, 256*102  

  63. -               mini2440_printf('loaded default u-boot from NAND/n');  

  64. -               s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start addres 

  65. -       } 

  66. -#if 0 && defined(LATER) 

  67. -       if (mini2440_load_from_nand(s->nand, 0, S3C_SRAM_BASE_NANDBOOT, S3C_SRAM_S 

  68. -           s->cpu->env->regs[15] = S3C_SRAM_BASE_NANDBOOT;     /* start address,  

  69. -           mini2440_printf('4KB SteppingStone loaded from NAND/n'); 

  70. -       } 

  71. -#endif 

  72. -       /* 

  73. -        * if a u--boot is available as a file, we always use it 

  74. diff --git a/hw/mini2440.c b/hw/mini2440.c 

  75. index 5decf4b..7a70aae 100644 

  76. --- a/hw/mini2440.c 

  77. +++ b/hw/mini2440.c 

  78. @@ -258,46 +258,15 @@ static void mini2440_reset(void *opaque) 

  79.      struct mini2440_board_s *s = (struct mini2440_board_s *) opaque; 

  80.      uint32_t image_size; 

  81.   

  82. -       /* 

  83. -        * Normally we would load 4 KB of nand to SRAM and jump there, but 

  84. -        * it is not working perfectly as expected, so we cheat and load 

  85. -        * it from nand directly relocated to 0x33f80000 and jump there 

  86. -        */  

  87. -       if (mini2440_load_from_nand(s->nand, 0, S3C_RAM_BASE | 0x03f80000, 256*1024)>  

  88. -               mini2440_printf('loaded default u-boot from NAND/n');  

  89. -               s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start address,  

  90. -       } 

  91. -#if 0 && defined(LATER) 

  92. -       if (mini2440_load_from_nand(s->nand, 0, S3C_SRAM_BASE_NANDBOOT, S3C_SRAM_SIZE 

  93. -           s->cpu->env->regs[15] = S3C_SRAM_BASE_NANDBOOT;     /* start address, u-b 

  94. -           mini2440_printf('4KB SteppingStone loaded from NAND/n'); 

  95. -       } 

  96. -#endif 

  97. -       /* 

[1] [2] [3] [4] [5] [6] [7]
关键字:redboot  QEMU  for  mini2440 引用地址:redboot on QEMU for mini2440

上一篇:ecos on QEMU for mini2440 编译方法
下一篇:minigui1.6移植到mini2440

推荐阅读最新更新时间:2026-03-22 20:56

ecos on QEMU for mini2440 编译方法
1. Redboot的编译方法 ecosconfig new mini2440 redboot ecosconfig tree make 2. ecos 内核的编译方法 ecosconfig new mini2440 ecosconfig tree make 3.ecos的测试方法 在下载好的cos源码中的根目录有examples 进入这个目录 make INSTALL_DIR=你的ecos里面的install目录的绝对路径 会生成几个可执行文件。 修改qemu.sh,举例: ./qemu-system-arm -M mini2440 -m 128M -kernel examples/twothreads -show-curs
[单片机]
ecos <font color='red'>on</font> <font color='red'>QEMU</font> <font color='red'>for</font> <font color='red'>mini2440</font> 编译方法
linux内核配置对U盘的支持 (for mini2440
配置优盘 因为优盘用到了SCSI 命令,所以我们先增加SCSI 支持。在Device Drivers 菜单里面,选择SCSI devicesupport,按回车进入出现菜单,按空格键选择选项–SCSI device support,然后进入选择SCSI disk support,返回Device Drivers 菜单,再选择 USB support,按回车进入USB support 菜单,找到并选中“ * USB Mass Storage support”,另外,现在的优盘等移动存储器使用的大都是FAT/FAT32 格式的,因此我们还需要添加FAT32 文件系统的支持,在内核配置主菜单下依次选择如下菜单项: File syst
[单片机]
linux内核配置对U盘的支持 (<font color='red'>for</font> <font color='red'>mini2440</font>)
驱动开发之 LED(for mini2440
开发环境:ubuntu16.04 64bit Linux内核版本:linux-2.6.32.2 1、编写mini2440_leds.c 在/linux-2.6.32.2/drivers/char目录下,编写mini2440_leds.c,代码如下: #include linux/miscdevice.h #include linux/delay.h #include asm/irq.h #include mach/regs-gpio.h #include mach/hardware.h #include linux/kernel.h #include linux/module.h #include linux
[单片机]
驱动开发之 LED(<font color='red'>for</font> <font color='red'>mini2440</font>)
mini2440 make menuconfig 找不到Flash CFI支持的解决办法
今天准备试一下内核自带的norflash驱动,发现在配置项里面怎么都找不到,后来发现是一些选项没有选中造成的,下面这些选项全部选中之后就行了 Device Drivers --- Memory Technology Device (MTD) support --- RAM/ROM/Flash chip drivers --- 下面一大堆东西都选中: 最后在 Device Drivers --- Memory Technology Device (MTD) support --- Mapping drivers for chip access --- 这个位置就可以找到默认的norfla
[单片机]
<font color='red'>mini2440</font> make menuc<font color='red'>on</font>fig 找不到Flash CFI支持的解决办法
ubuntu下使用qemu模拟ARM(六)------驱动程序
驱动程序分为在ubuntu上运行和在ARM开发板上运行两种,我们分别来进行测试 1.源码 empty#include linux init.h= #include linux module.h= static int hello_init(void) { printk(KERN_EMERG Enter Hello abc World!n ); return 0; } static void hello_exit(void) { printk(KERN_EMERG Exit hello world!n ); } module_init(hello
[单片机]
Qemu搭建ARM vexpress开发环境(二)----通过u-boot启动Linux内核
在上文《Qemu搭建ARM vexpress开发环境(一)》中已经简单讲述了通过Qemu模拟直接启动Linux内核,并挂在SD卡根文件系统的方法,这种方法是直接启动内核,与实际应用中ARM板的启动方式:u-boot、kernel、rootfs有些不同。现在就来讲述下通过Qemu搭建通过u-boot启动Linux内核并挂载根文件系统的方法。 1. 开发环境简述 嵌入式系统要正常运行,应该包含:u-boot、kernel、rootfs、appfs。这几部分在ARM开发板Flash上的位置关系应该类似于下图所示: BootLoader BootParameters Kernel Rootfs Appfs ro
[单片机]
Conformal AI Studio 可将 SoC 设计师的效率提升 10 倍
新一代套件包括 AI 驱动的等价验证、ECO 自动化和低功耗静态签核产品 随着 SoC 设计日益复杂,形式等效性检查面临更大挑战。为此,Cadence 推出了 Conformal AI Studio——一套全新的逻辑等效性检查(LEC)、自动化ECO(Conformal ECO)和低功耗静态签核解决方案。 Conformal AI Studio 结合人工智能和机器学习(AI/ML)技术,可直接满足现代 SoC 团队日益增长的生产力需求。其核心引擎经加速优化,包括分布式低功耗引擎(支持对拥有数十亿实例的设计进行全芯片功耗签核)、全新算法创新以及面向 LEC 和 ECO 解决方案的简化设置和 AI 赋能流程。 借助
[半导体设计/制造]
C<font color='red'>on</font><font color='red'>for</font>mal AI Studio 可将 SoC 设计师的效率提升 10 倍
LRF020 DRIVER FOR LINUX(BASED ON TQ2440/ARM9)
LRF020 DRIVER FOR LINUX ======================= using includes/linux/spi/spidev.h,driver/spi/spidev.c 2012-3-23 xiaoyang@HIT Kernel Version: linux2.6.30 Board Info: tq2440 arm9(S3C2440) http://www.armbbs.net/forum.php LRF020: 2.4GHZ RF module:http://www.lustech.com.cn/index.php?case=archive&act=show&aid=24 Source@Git:
[单片机]
小广播
最新单片机文章
何立民专栏 单片机及嵌入式宝典

北京航空航天大学教授,20余年来致力于单片机与嵌入式系统推广工作。

厂商技术中心

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

 
机器人开发圈

电子工程世界版权所有 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2026 EEWORLD.com.cn, Inc. All rights reserved