uClinux编译方法(uClinux-dist-20041215.tar.gz+S3C44B0X)

 

http://www.uclinux.org/pub/uClinux/arm-elf-tools/ 下载arm-elf-tools-20030314.sh

http://www.uclinux.org/pub/uClinux/dist/ 下载uClinux-dist-20041215.tar.gz

执行./arm-elf-tools-20030314.sh,安装工具链,执行tar zxvf uClinux-dist-20041215.tar.gz并进入uClinux-dist目录。

 

 

l         linux-2.4.x/arch/armnommu/vmlinux-armv.lds.in文件中找到以下行:

*(got) /* Global Offset table */

在其之后添加如下语句:

 

 

romfs_data = .;

 

romfs.o

 

romfs_data_end = .;

 

注意,等号两边都要有空格。

 

 

l         vendors/Samsung/4510B/Makefile 文件中添加image目标的第三行,增加一条语句:arm-elf-ld -r -o $(ROOTDIR)/$(LINUXDIR)/romfs.o -b binary $(ROMFSIMG)

如下为增加之后:

 

 

image:

 

[ -d $(IMAGEDIR) ] || mkdir -p $(IMAGEDIR)

 

genromfs -v -V "ROMdisk" -f $(ROMFSIMG) -d $(ROMFSDIR)

 

arm-elf-ld –r –o /root/uclinux/uClinux-dist/linux-2.4.x/romfs.o –b binary /root/uclinux/uClinux-dist/images/romfs.img

 

(/root/uclinux是我存放uClinux-dist的目录)

 

 

l         修改linux-2.4.x/drivers/char/serial_samsung.c, 找到uart_config数组,把如下项:

{ "S3C4510B", 1, 0}, /* Samsung S3C4510B uart support */

 

修改为:

{ "S3C4510B", 128, 0}, /* Samsung S3C4510B uart support */

 

 

 

l         执行make menuconfig

此处设置成S3C44B0X

 

 

l         修改config/.config,注释掉CONFIG_USER_OLD_PASSWORDS

 

 

l         执行make dep

 

 

l         执行make lib_only

 

 

l         执行make user_only

 

 

l         执行make romfs

 

 

l         修改linux-2.4.x/arch/armnommu/mach-S3C44B0X/arch.c

23行的S3C44B0X改为S3C44B0

在代码末尾添加”}”

 

 

修改linux-2.4.x/arch/armnommu/kernel/head-armv.S

206行以及439行的S3C44B0X改为S3C44B0

 

 

l         执行make

 

 

make成功后,uClinux-dist目录里将出现一个images目录。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


我编译的是uClinux-dist-20041215.tar.gz
在编译过程中并没有出现错误。


代码:

***********************************************************************
****                                                               ****
****   SkyEye  Simulator Ver 0.9.5 with  GDB/Insight 5.3 Interface ****
****                                                               ****
***********************************************************************
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(SkyEye) target sim
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x8160154
nic[0] info: state=1, ethmod num=1, mac addr=0:5:3:2:1:f, hostip=192.168.0.99
nic_init_begin
tapif_init begin
tapif_init: fd 6
tapif_init: system("ifconfig tap0 inet 192.168.0.99");
tapif_init end
nic_init_end
SKYEYE: use arm7100 mmu ops
Loaded ROM   ./boot.rom
Connected to the simulator.
(SkyEye) load
Loading section .init, size 0xa000 vma 0x1000000
Loading section .text, size 0xd72e8 vma 0x100a000
Loading section .data, size 0x9b30 vma 0x10e2000
Start address 0x1000000
Transfer rate: 7696576 bits in <1 sec.
(SkyEye) r
Starting program: /root/uClinux/Source/uclinux/uClinux-dist/linux-2.4.x/linux
Linux version 2.4.24-uc0 (root@TEST) (gcc version 2.95.3 20010315 (release)) #11 Fri Jul 1 15:35:29 CST 2005
Processor: Atmel AT91M40xxx revision 0
Architecture: EB01
On node 0 totalpages: 1024
zone(0): 0 pages.
zone(1): 1024 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/rom0
Calibrating delay loop... 15.82 BogoMIPS
Memory: 4MB = 4MB total
Memory: 2952KB available (860K code, 185K data, 40K init)
Dentry cache hash table entries: 512 (order: 0, 4096 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 1024 (order: 0, 4096 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Atmel USART driver version 0.99
ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USART
ttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USART
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: 1400000-15103FF [VIRTUAL 1400000-15103FF] (RO)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
pktgen.c: v1.3: Packet Generator for packet performance testing.
pktgen: Error: your machine does not have working cycle counter.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
BINFMT_FLAT: reloc outside program 0x74790000 (0 - 0x1bb5c/0x6d50), killing init!
BINFMT_FLAT: reloc outside program 0x74790000 (0 - 0x1bb5c/0x6d50), killing init!
BINFMT_FLAT: reloc outside program 0x74790000 (0 - 0x1bb5c/0x6d50), killing init!
BINFMT_FLAT: reloc outside program 0x74790000 (0 - 0x1bb5c/0x6d50), killing init!
BINFMT_FLAT: reloc outside program 0x84340100 (0 - 0x14248/0x10950), killing sh!
BINFMT_FLAT: reloc outside program 0x84340100 (0 - 0x14248/0x10950), killing sh!
Kernel panic: No init found.  Try passing init= option to kernel.




代码:

#skyeye config file sample
cpu: arm7tdmi
mach: at91
mem_bank: map=M, type=RW, addr=0x00000000, size=0x00004000
mem_bank: map=M, type=RW, addr=0x01000000, size=0x00400000
mem_bank: map=M, type=R,  addr=0x01400000, size=0x00400000, file=./boot.rom  #romfs.img并没有超过这个size
mem_bank: map=M, type=RW, addr=0x02000000, size=0x00400000
mem_bank: map=M, type=RW, addr=0x02400000, size=0x00008000
mem_bank: map=M, type=RW, addr=0x04000000, size=0x00400000
mem_bank: map=I, type=RW, addr=0xf0000000, size=0x10000000
#set nic info state=on/off  mac=xx:xx:xx:xx:xx:xx  ethmod=tuntap/vnet hostip=dd.dd.dd.dd
net: state=on, mac=0:5:3:2:1:f, ethmod=tuntap, hostip=192.168.0.99
我的tool-chain是都是下面这个URL的RPM包

代码:

http://www.uclinux.org/pub/uClinux/arm-tools/RPMS/ 
arm-elf-binutils-2.12.1-5.i386.rpm   
arm-elf-gcc-2.95.3-5.i386.rpm 
arm-elf-gdb-5.2-0.i386.rpm 
arm-elf-uClibc-0.9.20-2.i386.rpm


操作系统是FC1 for x86
skyeye的版本是0.9.5
可能是tool-chain中的rpm包又问题
我换了一个tool-chain(arm-elf-tools-20030314.sh)可以正常运行了。。
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值