| 网站首页 | 新闻 | SOPC | FPGA | DSP | ARM | 嵌入式操作系统 | 下载 | 网上商城 | 芯片价格参考 | 留言 | 论坛 | 网络协议 | 驱动设计 | 购买指南-HowtoBuy | 
您现在的位置: FPGA开发板&SOPC开发板-嵌入式控制研究室 >> ARM >> ARM入门 >> 文章正文 用户登录 新用户注册
在ARMulator中移植uClinux(1)           ★★★ 【字体:
在ARMulator中移植uClinux(1)
作者:佚名    文章来源:互联网    点击数:    更新时间:2007-6-9

Getting Familiar with uClinux/ARM 2.6
by Hyok S. Choi <hyok.choi@samsung.com>
the author and maintainer of uClinux/ARM2.6
 
Why uClinux/ARM 2.6?
Why would you want to use uClinux? There could be many reasons to consider the uClinux for your embedded OS. Some of them could be as following:

Lightweight
You can make a complete linux 2.6 preemptible kernel image including console and some basic device drivers and ROMFS under 300KB! (zImage) and the applications in flat-binary format are approximately 30~50% lighter than typical conventional linux ELF binaries, thanks to lighter standard C and C++ libraries.

XIP
With much smaller RAM, you can execute your kernel and even the applications by XIP(eXecution In Place). It could help you to boot up faster, although the access time for the flash or rom for boot image should be fast enough and/or enough cache size. (There could be a trade-off between those values if we want to find the optimal balance.)

Cheaper
It is known that the MMU core size in typical ARM SoC wafer is about 30%. In typical network or embedded systems more than a half of applications do not need the MMU. Many of RTOS do not use MMU in default, even if target CPU has one.

Full Linux API
You can use the full Linux APIs on your uClinux platform with few exceptions. You can use the pThread in uClibc and the standard system calls. There are plenty of applications which are ported to uClinux in the userland in uClinux distribution package.

Easier to adapt
One of the interesting natures of uClinux is the possibility of user application accessing the whole system, including registers in devices. With a bit of wrapper, we can make the firmware code run on uClinux as a plain application! Of course, you can add some device driver and call the linux system calls and use many open Ips in mixed with the old firmware code. If you're planning to migrate your firmware codes to Linux, but you're not familiar with Linux system programming, uClinux could be a good starting point. ;-)

Full Linux 2.6 kernel features
Although, it is lighter, it supports almost full features of conventional linux 2.6 kernel, including preemptible kernel feature and so many file-systems, device drivers. Porting of device drivers for conventional Linux is handy. Almost all codes should be compiled without change, except memory mapping from virtual address to physical.

The First Compile Guide
If you decided to set up an uClinux development environment, this is the list that you have to grab on your linux host:

uClinux distribution
The easiest way to get started with uClinux is to play with a copy of uClinux-dist from the uClinux.org site at:
http://www.uclinux.org/pub/uClinux/dist/
Note that the kernel version in the distribution may not be the latest. You'll be able to gather the latest patch set and the vanilla Linux kernel from the kernel.org to make a latest copy of uClinux kernel.
At this time (20040427), the latest distribution is “http://www.uclinux.org/pub/uClinux/dist/uClinux-dist-20040408.tar.gz”. If you have some strange trouble with compilation, even after following this guide, simply use this distribution for your testing, and update later. :-)

the Kernel and patch
You could find the latest uClinux/ARM kernel patch at:
http://opensrc.sec.samsung.com/
At the download section, you'll find the link of latest “linux-2.6.x-hscx.patch.gz” and the original kernel package like:
http://opensrc.sec.samsung.com/download/linux-2.6.5-hsc2.patch.gz
and
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.5.tar.bz2

ARM-ELF toolchain
Since the Linux 2.6 kernel code uses some of the new features from newer binutils, you need a newer ARM-ELF toolchain for kernel compilation than the one of uclinux.org. You could find the latest toolchain at the same place with the kernel and patch download section above, and the direct url at current time is :
http://opensrc.sec.samsung.com/download/arm-elf-tools-20040427.sh

Hardware Platform or an ARMulator
Of course, you need a platform to run the kernel on. Please refer the notice section which platform is supported. Even if you can not find the one that you have, or if you don't have any hardware platform, you can run a complete kernel on your Linux PC! : the ARMulator.
The ARMulator is a GDB based emulator which emulates full Atmel AT91x, arm7tdmi EB01. The url of ARMulator home is :
http://www.uclinux.org/pub/uClinux/utilities/armulator/
You can download directly at this urls:
http://www.uclinux.org/pub/uClinux/utilities/armulator/gdb-5.0.tar.bz2 (the original gdb-5.0 archive)
http://www.uclinux.org/pub/uClinux/utilities/armulator/gdb-5.0-uclinux-armulator-20021127.patch.gz (Patches against gdb-5.0)

And another patch if you want to run the kernel with ramdisk on the ARMulator :
http://opensrc.sec.samsung.com/download/gdb-5.0-uclinux-armulator-ramdisk-20040412.patch.gz

That's all for your first compilation.

Okay, here we go step by step.
(This guide is assuming that the downloaded files are located at ~/incoming and the ARMulator is used for platform to run on.)

文章录入:fengfeiyi    责任编辑:fengfeiyi 
  • 上一篇文章:

  • 下一篇文章: 没有了
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    S3c2410软件调试总结
    MiniGUI在AT91RM9200开发板上…
    从Flash和SRAM中触发中断的过…
    S3C44B0X应用设计(一)-存储…
    S3C44B0X应用设计(二)-存储…
    S3C44B0X的可用I/O口分析
    UCGUI在44BO上的移植
    在S3C2410上移植bluetooth(蓝…
    在S3C2410上移植bluetooth(蓝…
    S3C2410通过IIS总线与音频芯…
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)