uClinux编译方法.doc_第1页
uClinux编译方法.doc_第2页
uClinux编译方法.doc_第3页
uClinux编译方法.doc_第4页
uClinux编译方法.doc_第5页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

uClinux编译方法在/pub/uClinux/arm-elf-tools/ 下载arm-elf-tools-20030314.sh在/pub/uClinux/dist/ 下载uClinux-dist-20041215.tar.gz执行./arm-elf-tools-20030314.sh,安装工具链,执行tar zxvf uClinux-dist-20041215.tar.gz并进入uClinux-dist目录。 在linux-2.4.x/arch/armnommu/vmlinux-armv.lds.in文件中找到以下行: *(got) /* Global Offset table */在其之后添加如下语句:romfs_data = .;romfs.oromfs_data_end = .;注意,等号两边都要有空格。 在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的目录) 修改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 */ 执行make menuconfig 此处设置成S3C44B0X 修改config/.config,注释掉CONFIG_USER_OLD_PASSWORDS 执行make dep 执行make lib_only 执行make user_only 执行make romfs 修改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 执行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.3Copyright 2002 Free Software Foundation, Inc.GDB is free software, covered by the GNU General Public License, and you arewelcome 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 simcpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0mach info: name at91, mach_init addr 0x8160154nic0 info: state=1, ethmod num=1, mac addr=0:5:3:2:1:f, hostip=9nic_init_begintapif_init begintapif_init: fd 6tapif_init: system(ifconfig tap0 inet 9);tapif_init endnic_init_endSKYEYE: use arm7100 mmu opsLoaded ROM ./boot.romConnected to the simulator.(SkyEye) loadLoading section .init, size 0xa000 vma 0x1000000Loading section .text, size 0xd72e8 vma 0x100a000Loading section .data, size 0x9b30 vma 0x10e2000Start address 0x1000000Transfer rate: 7696576 bits in 1 sec.(SkyEye) rStarting program: /root/uClinux/Source/uclinux/uClinux-dist/linux-2.4.x/linuxLinux version 2.4.24-uc0 (rootTEST) (gcc version 2.95.3 20010315 (release) #11 Fri Jul 1 15:35:29 CST 2005Processor: Atmel AT91M40xxx revision 0Architecture: EB01On node 0 totalpages: 1024zone(0): 0 pages.zone(1): 1024 pages.zone(2): 0 pages.Kernel command line: root=/dev/rom0Calibrating delay loop. 15.82 BogoMIPSMemory: 4MB = 4MB totalMemory: 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 UNIFIXLinux NET4.0 for Linux 2.4Based upon Swansea University Computer Society NET3.039Initializing RT netlink socketStarting kswapdAtmel USART driver version 0.99ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USARTttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USARTBlkmem copyright 1998,1999 D. Jeff DionneBlkmem copyright 1998 Kenneth AlbanowskiBlkmem 1 disk images:0: 1400000-15103FF VIRTUAL 1400000-15103FF (RO)RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizepktgen.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.0IP Protocols: ICMP, UDP, TCPIP: routing cache hash table of 512 buckets, 4KbytesTCP: 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 samplecpu: arm7tdmimach: at91mem_bank: map=M, type=RW, addr=0x00000000, size=0x00004000mem_bank: map=M, type=RW, addr=0x01000000, size=0x00400000mem_bank: map=M, type=R, addr=0x01400000, size=0x00400000, file=./boot.rom #romfs.img并没有超过这个sizemem_bank: map=M, type=RW, addr=0x02000000, size=0x00400000mem_bank: map=M, type=RW, addr=0x02400000, size=0x00008000mem_bank: map=M, type=RW, addr=0x04000000, size=0x00400000mem_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.ddnet: state=on, mac=0:5:3:2:1:f, ethmod=tuntap, hostip=9我的tool-chain是都是下面这个URL的RPM包

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论