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

Install the toolchain

su to log in as the root then execute the arm-elf-tools-20040427.sh like:

[root@hyoklinux /]# /bin/sh ~/incoming/arm-elf-tools-20040427.sh

You should see the list of files that is installed. The toolchain binaries for execution are installed to /usr/local/bin. So you need the directory to be included in your search path, usually it is default for common Linux distribution like Redhat.

Untar the uClinux distribution

On a directory which has enough free available space(about 2GB?), untar the uclinux distribution :
[root@hyoklinux /]# tar -zxvf ~/incoming/uClinux-dist-20040408.tar.gz

Let's look around what we have on the uClinux-dist directory:

[root@hyoklinux /]# cd uClinux-dist/

[root@hyoklinux uClinux-dist]# ls -al

total 104
drwxr-xr-x 15 1000 users 4096 Apr 8 09:27 .
drwxr-xr-x 28 root root 4096 Apr 27 20:32 ..
-rw-r--r-- 1 1000 users 18007 Apr 8 09:13 COPYING
drwxr-xr-x 3 1000 users 4096 Apr 8 09:13 Documentation
-rw-r--r-- 1 1000 users 9305 Apr 8 09:13 Makefile
-rw-r--r-- 1 1000 users 4934 Apr 8 09:13 README
-rw-r--r-- 1 1000 users 1743 Apr 8 09:13 SOURCE
drwxr-xr-x 2 1000 users 4096 Apr 15 15:19 bin
drwxr-xr-x 3 1000 users 4096 Apr 8 09:27 config <-- the configuration files for userland and etc.
drwxr-xr-x 11 1000 users 4096 Apr 8 09:27 freeswan <-- IPsec implementation
drwxr-xr-x 68 1000 users 4096 Apr 8 09:23 glibc <-- Yes, the GNU C library.
drwxr-xr-x 18 1000 users 4096 Apr 8 09:28 lib <-- many libraries ported to uClinux include uC-libc.
drwxr-xr-x 15 1000 users 4096 Apr 8 09:27 linux-2.0.x <-- uClinux 2.0.x kernel
drwxr-xr-x 16 1000 users 4096 Apr 8 09:27 linux-2.4.x <-- uClinux 2.4.x kernel
drwxr-xr-x 18 1000 users 4096 Apr 8 09:27 linux-2.6.x <-- uClinux 2.6.x kernel
drwxr-xr-x 3 1000 users 4096 Apr 8 09:26 tools <-- utilities for romfs install and etc.
drwxr-xr-x 17 1000 users 4096 Apr 8 09:27 uClibc <-- the uClibc, from uclibc.org. Differ to uC-libc.
drwxr-xr-x 174 1000 users 4096 Apr 8 09:27 user <-- the “userland”. The applications that is ported.
drwxr-xr-x 44 1000 users 4096 Apr 8 09:27 vendors <-- the configuration files for each vendor/models.

Make a new linux-2.6.x kernel from the scratch

The kernel version of linux-2.6.x directory in the 20040408 distribution is “linux-2.6.2-uc0”. We need another kernel with newer kernel version for uClinux/ARM 2.6, here.

[root@hyoklinux uClinux-dist]# tar -jxvf ~/incoming/linux-2.6.5.tar.bz2

Now we got the whole linux-2.6.5 codes, and need to patch the kernel.

[root@hyoklinux uClinux-dist]# gzip -dc ~/incoming/linux-2.6.5-hsc2.patch.gz | patch -p0

You should see the codes patched in directories that contain “armnommu” string. You can use the directory >So you don't need the linux-2.6.x directory which is included in the uClinux-dist. :

[root@hyoklinux uClinux-dist]# rm -rf linux-2.6.x/

And we re>

[root@hyoklinux uClinux-dist]# mv linux-2.6.5 linux-2.6.x

Confirm the configuration files

The current uClinux distribution does not contain the proper configuration files for uClinux/ARM 2.6. We need a simple fix-up. The default configuration for ARMulator is at vendors/GDB/ARMulator. We can fix-up the configuration files like this :

[root@hyoklinux uClinux-dist]# cp linux-2.6.x/arch/armnommu/configs/GDB_ARMulator_defconfig vendors/GDB/ARMulator/config.linux-2.6.x

Since we'll use a ramdisk for the rootfs, we need to fix the “rc” in the configuration directory to use ramdisk device number 1.

Edit the vendors/GDB/ARMulator/rc to just like :

[root@hyoklinux uClinux-dist]# vim vendors/GDB/ARMulator/rc

host>/bin/expand /etc/ramfs.img /dev/ram1
mount -t proc proc /proc
mount -t ext2 /dev/ram1 /var
mkdir /var/tmp
mkdir /var/log
mkdir /var/run
mkdir /var/lock
mkdir /var/empty
cat /etc/motd

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

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