这段时间一直在研究ecos,所以有了把ecos移植到mini2440的qemu平台的想法。经过几天的折腾,终于可以在qemu的上面看到redboot的命令了。
先看看成果,然后进入枯燥的coding历程
现在开始看代码,:-)
1. 获得代码
git clone git://repo.or.cz/qemu/mini2440.git qemu
修改启动部分为ram的最小地址直接启动
ricky@ricky-laptop:~/ecos/projects/mini2440-qemu/mini2440$ git diff
diff --git a/hw/mini2440.c b/hw/mini2440.c
index 5decf4b..7a70aae 100644
--- a/hw/mini2440.c
+++ b/hw/mini2440.c
@@ -258,46 +258,15 @@ static void mini2440_reset(void *opaque)
struct mini2440_board_s *s = (struct mini2440_board_s *) opaque;
uint32_t image_size;
- /*
- * Normally we would load 4 KB of nand to SRAM and jump there, but
- * it is not working perfectly as expected, so we cheat and load
- * it from nand directly relocated to 0x33f80000 and jump there
- */
- if (mini2440_load_from_nand(s->nand, 0, S3C_RAM_BASE | 0x03f80000, 256*1
- mini2440_printf('loaded default u-boot from NAND/n');
- s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start addr
- }
-#if 0 && defined(LATER)
- if (mini2440_load_from_nand(s->nand, 0, S3C_SRAM_BASE_NANDBOOT, S3C_SRAM
- s->cpu->env->regs[15] = S3C_SRAM_BASE_NANDBOOT; /* start address
- mini2440_printf('4KB SteppingStone loaded from NAND/n');
- }
-#endif
:
diff --git a/hw/mini2440.c b/hw/mini2440.c
index 5decf4b..7a70aae 100644
--- a/hw/mini2440.c
+++ b/hw/mini2440.c
@@ -258,46 +258,15 @@ static void mini2440_reset(void *opaque)
struct mini2440_board_s *s = (struct mini2440_board_s *) opaque;
uint32_t image_size;
- /*
- * Normally we would load 4 KB of nand to SRAM and jump there, but
- * it is not working perfectly as expected, so we cheat and load
- * it from nand directly relocated to 0x33f80000 and jump there
- */
- if (mini2440_load_from_nand(s->nand, 0, S3C_RAM_BASE | 0x03f80000, 256*10
- mini2440_printf('loaded default u-boot from NAND/n');
- s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start addre
- }
-#if 0 && defined(LATER)
- if (mini2440_load_from_nand(s->nand, 0, S3C_SRAM_BASE_NANDBOOT, S3C_SRAM_
- s->cpu->env->regs[15] = S3C_SRAM_BASE_NANDBOOT; /* start address,
- mini2440_printf('4KB SteppingStone loaded from NAND/n');
- }
-#endif
- /*
:
diff --git a/hw/mini2440.c b/hw/mini2440.c
index 5decf4b..7a70aae 100644
--- a/hw/mini2440.c
+++ b/hw/mini2440.c
@@ -258,46 +258,15 @@ static void mini2440_reset(void *opaque)
struct mini2440_board_s *s = (struct mini2440_board_s *) opaque;
uint32_t image_size;
- /*
- * Normally we would load 4 KB of nand to SRAM and jump there, but
- * it is not working perfectly as expected, so we cheat and load
- * it from nand directly relocated to 0x33f80000 and jump there
- */
- if (mini2440_load_from_nand(s->nand, 0, S3C_RAM_BASE | 0x03f80000, 256*102
- mini2440_printf('loaded default u-boot from NAND/n');
- s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start addres
- }
-#if 0 && defined(LATER)
- if (mini2440_load_from_nand(s->nand, 0, S3C_SRAM_BASE_NANDBOOT, S3C_SRAM_S
- s->cpu->env->regs[15] = S3C_SRAM_BASE_NANDBOOT; /* start address,
- mini2440_printf('4KB SteppingStone loaded from NAND/n');
- }
-#endif
- /*
- * if a u--boot is available as a file, we always use it
:
diff --git a/hw/mini2440.c b/hw/mini2440.c
index 5decf4b..7a70aae 100644
--- a/hw/mini2440.c
+++ b/hw/mini2440.c
@@ -258,46 +258,15 @@ static void mini2440_reset(void *opaque)
struct mini2440_board_s *s = (struct mini2440_board_s *) opaque;
uint32_t image_size;
- /*
- * Normally we would load 4 KB of nand to SRAM and jump there, but
- * it is not working perfectly as expected, so we cheat and load
- * it from nand directly relocated to 0x33f80000 and jump there
- */
- if (mini2440_load_from_nand(s->nand, 0, S3C_RAM_BASE | 0x03f80000, 256*1024)>
- mini2440_printf('loaded default u-boot from NAND/n');
- s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000; /* start address,
- }
-#if 0 && defined(LATER)
- if (mini2440_load_from_nand(s->nand, 0, S3C_SRAM_BASE_NANDBOOT, S3C_SRAM_SIZE
- s->cpu->env->regs[15] = S3C_SRAM_BASE_NANDBOOT; /* start address, u-b
- mini2440_printf('4KB SteppingStone loaded from NAND/n');
- }
-#endif
- /*
上一篇:ecos on QEMU for mini2440 编译方法
下一篇:minigui1.6移植到mini2440
推荐阅读最新更新时间:2024-11-17 00:14
设计资源 培训 开发板 精华推荐
- ZXCT1082EV1,基于 ZXCT1082 60V 高端电流监视器的评估板
- DC059A-C,基于 LTC1174HVCS8 的演示板,3.3V @ 375mA 可调、高效降压 DC-DC 转换器
- 使用 Analog Devices 的 LTC1258CS8-3 的参考设计
- FAN48632 2.5 MHz、2.0 A 脉冲负载同步微型升压稳压器的典型应用电路,具有 GSM PA 电源的旁路模式
- LT3091HR LDO 稳压器在并联器件中的典型应用
- LT1764EFE-1.8 SCR 预稳压器的典型应用可提供跨线路变化的效率
- 使用 ON Semiconductor 的 LV5693P 的参考设计
- 使用 ADP1660 电压调节模式进行 D 类音频应用的典型应用
- SEN-15269,SparkFun gator:environment - micro:bit 配件板
- DRAGONBOARD AUDIO MEZZ,音频夹层板是创建需要外部音频的多媒体系统的最简单方法
- Allegro MicroSystems 在 2024 年德国慕尼黑电子展上推出先进的磁性和电感式位置感测解决方案
- 左手车钥匙,右手活体检测雷达,UWB上车势在必行!
- 狂飙十年,国产CIS挤上牌桌
- 神盾短刀电池+雷神EM-i超级电混,吉利新能源甩出了两张“王炸”
- 浅谈功能安全之故障(fault),错误(error),失效(failure)
- 智能汽车2.0周期,这几大核心产业链迎来重大机会!
- 美日研发新型电池,宁德时代面临挑战?中国新能源电池产业如何应对?
- Rambus推出业界首款HBM 4控制器IP:背后有哪些技术细节?
- 村田推出高精度汽车用6轴惯性传感器
- 福特获得预充电报警专利 有助于节约成本和应对紧急情况