免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1130 | 回复: 0
打印 上一主题 下一主题

项目一 iMX21整体方案(2): OS设计及系统启动 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-02 11:58 |只看该作者 |倒序浏览

                                OS Design and Architecture

In the imx21
operating system, the hardware driver presents abstraction of external devices
as well as firmware. Particularly, there are APIs to control touchscreen and
framebuffer in QT GUI environment.

In the user space, there is one interface to realize
the Input/Output control of external devices and firmware.  Then user applications make use of this
interface to realize the hardware control. Such a design makes the whole system
easy to port on multiple platforms.


  Normal
  0
  
   
  
  


  Normal
  0
  
   
  
  

System
Booting

In the
design of Linux, the root file system is designed to put on flash and mmc block
optionally.

The NOR
flash is divided into three sections for bootloader, kernel and root
file-system separately.

Here I
would like to show the booting procedure. Bootloader will set the SDRAM and
other setting of CPU as well as UART. After that bootloader will load kernel
into SDRAM and jump to kernel. Then we begins to run Linux Kernel.

Linux
Kernel begins to execute the code in head.s.

-        
Turn on the cache. We need to setup some PAGE tables so that we can have both the I & D caches on
-        
Decompress the kernel
-        
Call_kernel will clean flush cache and turn off cache
-        
Go to entry of the kernel and go to execute it

From
/arch/arm/boot/compressed/Makefile, we can see the head of zImage include codes
in head.s.

Execute the kernel
-        
Read the process id register and calculate the offset of procinfo
-        
Get the machine type
-        
Create page table
-        
Initialize processor
-        
Start bss
-        
Get the processor id
-        
……
-        
start_kernel is called, go to start kernel

Start kernel
-        
setup architecture
-        
setup parsing option
-        
initialize trap, a sort of initialization
-        
kernel_thread call init, init() will open the console and
execute shell command.
-        
Unlock kernel can setup cpu to be idle

User application
All the
user application is called up in the shell/busybox.

Above it a primary introduction of system
booting on imx21 platform. This is also applicable for arm-Linux (version
2.4.x).
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7273/showart_1916142.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP