Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4471974
  • 博文数量: 1148
  • 博客积分: 25453
  • 博客等级: 上将
  • 技术积分: 11949
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-06 21:14
文章分类

全部博文(1148)

文章存档

2012年(15)

2011年(1078)

2010年(58)

分类: 嵌入式

2011-03-29 14:56:40

说明:gcc 4.3.3  TQ制作的编译工具
     主机:ubuntu10.10
     开发板:TQ2440 256MB  2009年版 东华LCD-3.5寸
    
     uboot:u-boot_W35_20091031.bin
     内核文件: 由第一步制作的文件系统
     文件系统: 自己建立文件系统

参考资料: 天嵌科技出品-Linux移植之Step By Step_V4.5_20100605.pdf  内核配置单
          天嵌科技出品-Linux移植之Step By Step_V4.5_20100605.pdf  step10~11
   
说明:这里建立的文件系统参照的是2010年版的。
      这次实验使用的内核,的内核配置与初级移植(一),稍有不同,主要是对fs 重新配置了。
      添加了如下配置,为了解决 kernel panic
  1. general setup->
  2.      choose slab allocteror(slub(unquenued allocator))
  3. 这里是选择slab 分配器
配置单: 3-config.rar  
   
1.获取 busybox 源码 1.13.0.tar.bz2
        busybox 源码:
  注意:使用4.3.3 交叉编译环境,内核编译与文件系统编译需要移植编译器

2.配置 busybox 时,需要注意一点 [networking/libiproute/iptunnel.o] 错误 1

  1. In file included from /opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/if_tunnel.h:5,
  2.                  from networking/libiproute/iptunnel.c:24:
  3. /opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/ip.h:85: error: redefinition of 'struct iphdr'
  4. make[1]: *** [networking/libiproute/iptunnel.o] 错误 1
  5. make: *** [networking/libiproute] 错误 2
  6.   CC networking/libiproute/iptunnel.o
  7. In file included from /opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/if_tunnel.h:5,
  8.                  from networking/libiproute/iptunnel.c:24:
  9. /opt/EmbedSky/4.3.3/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/ip.h:85: error: redefinition of 'struct iphdr'
  10. make[1]: *** [networking/libiproute/iptunnel.o] 错误 1
  11. make: *** [networking/libiproute] 错误 2
  12. root@ywx:/opt/me_linux/busybox-1.13.0# make menuconfig
  13. scripts/kconfig/mconf Config.in

  14. ###########################
  15. #####解决:make menuconfig 取消 network iptunnel

3.etc/inittab 这个问题?? 请看:etc/inittab tq2440_serial0 问题解析

4.在制作 lib 目录时,
    当我从EABI-4.3.3拷贝库文件时,最后板子不能启动
  1. Freeing init memory: 112K
  2. Warning: unable to open an initial console.
  3. Failed to execute /linuxrc. Attempting defaults...
  4. Kernel panic - not syncing: No init found. Try passing init= option to kernel.
  5. [<c002a700>] (unwind_backtrace+0x0/0xdc) from [<c025bb48>] (panic+0x40/0x110)
  6. [<c025bb48>] (panic+0x40/0x110) from [<c00244c0>] (init_post+0xcc/0xf4)
   所以,我直接拷贝 tq制作好的 /lib 下 动态链接库,没有拷贝 *.ko fireware ts WebCam


5.成功处理移植

  但是 [\u@\h \W]#  为什么会这样??
  我仅仅是修改etc/sysconfig/HOSTNAME 将HOSTNAME中的内容修改为ywx
  应该是 [root@EmbedSky /]  如是HOSTNAME的内容是EmbedSky
  1. ##### EmbedSky BIOS for SKY2440/TQ2440 #####
  2. Press Space key to Download Mode !
  3. Booting Linux ...
  4. Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00200000 ... Copy Kernel to SDRAM done,NOW, Booting Linux......
  5. Uncompressing Linux.................................................................................................................... done, booting the kernel.
  6. Linux version 2.6.30.4-EmbedSky (root@ywx) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) ) #1 Tue Mar 29 19:14:29 CST 2011
  7. CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
  8. CPU: VIVT data cache, VIVT instruction cache
  9. Machine: SMDK2440
  10. ATAG_INITRD is deprecated; please update your bootloader.
  11. Memory policy: ECC disabled, Data cache writeback
  12. CPU S3C2440A (id 0x32440001)
  13. S3C24XX Clocks, (c) 2004 Simtec Electronics
  14. S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
  15. CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
  16. Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
  17. Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
  18. NR_IRQS:85
  19. irq: clearing pending ext status 00080000
  20. irq: clearing subpending status 00000002
  21. PID hash table entries: 256 (order: 8, 1024 bytes)
  22. Console: colour dummy device 80x30
  23. console [ttySAC0] enabled
  24. Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
  25. Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
  26. Memory: 64MB = 64MB total
  27. Memory: 61108KB available (3264K code, 277K data, 116K init, 0K highmem)
  28. SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
  29. Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
  30. Mount-cache hash table entries: 512
  31. CPU: Testing write buffer coherency: ok
  32. net_namespace: 936 bytes
  33. NET: Registered protocol family 16
  34. S3C Power Management, Copyright 2004 Simtec Electronics
  35. S3C2440: Initialising architecture
  36. S3C2440: IRQ Support
  37. S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
  38. DMA channel 0 at c4808000, irq 33
  39. DMA channel 1 at c4808040, irq 34
  40. DMA channel 2 at c4808080, irq 35
  41. DMA channel 3 at c48080c0, irq 36
  42. S3C244X: Clock Support, DVS off
  43. bio: create slab <bio-0> at 0
  44. SCSI subsystem initialized
  45. usbcore: registered new interface driver usbfs
  46. usbcore: registered new interface driver hub
  47. usbcore: registered new device driver usb
  48. s3c2440-i2c s3c2440-i2c: slave address 0x10
  49. s3c2440-i2c s3c2440-i2c: bus frequency set to 97 KHz
  50. s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
  51. NET: Registered protocol family 2
  52. IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
  53. TCP established hash table entries: 2048 (order: 2, 16384 bytes)
  54. TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
  55. TCP: Hash tables configured (established 2048 bind 2048)
  56. TCP reno registered
  57. NET: Registered protocol family 1
  58. NetWinder Floating Point Emulator V0.97 (extended precision)
  59. yaffs Mar 29 2011 19:02:32 Installing.
  60. msgmni has been set to 119
  61. io scheduler noop registered
  62. io scheduler anticipatory registered (default)
  63. io scheduler deadline registered
  64. io scheduler cfq registered
  65. Console: switching to colour frame buffer device 30x40
  66. fb0: s3c2410fb frame buffer device
  67. lp: driver loaded but no devices found
  68. ppdev: user-space parallel port driver
  69. Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
  70. s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
  71. s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
  72. s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
  73. brd: module loaded
  74. loop: module loaded
  75. Uniform Multi-Platform E-IDE driver
  76. ide-gd driver 1.18
  77. ide-cd driver 5.00
  78. Driver 'sd' needs updating - please use bus_type methods
  79. dm9000 Ethernet Driver, V1.31
  80. S3C24XX NAND Driver, (c) 2004 Simtec Electronics
  81. s3c2440-nand s3c2440-nand: Tacls=2, 20ns Twrph0=3 30ns, Twrph1=2 20ns
  82. NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
  83. Scanning device for bad blocks
  84. Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
  85. 0x000000000000-0x000000040000 : "ywx-uboot"
  86. 0x000000200000-0x000000400000 : "ywx-kernel"
  87. 0x000000400000-0x00000ff80000 : "ywx-yaffs2"
  88. usbmon: debugfs is not available
  89. ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
  90. s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
  91. s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
  92. s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
  93. usb usb1: configuration #1 chosen from 1 choice
  94. hub 1-0:1.0: USB hub found
  95. hub 1-0:1.0: 2 ports detected
  96. usbcore: registered new interface driver libusual
  97. usbcore: registered new interface driver usbserial
  98. USB Serial support registered for generic
  99. usbcore: registered new interface driver usbserial_generic
  100. usbserial: USB Serial Driver core
  101. USB Serial support registered for FTDI USB Serial Device
  102. usbcore: registered new interface driver ftdi_sio
  103. ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
  104. USB Serial support registered for pl2303
  105. usbcore: registered new interface driver pl2303
  106. pl2303: Prolific PL2303 USB to serial adaptor driver
  107. mice: PS/2 mouse device common for all mice
  108. S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
  109. s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
  110. Advanced Linux Sound Architecture Driver Version 1.0.20.
  111. ALSA device list:
  112.   No soundcards found.
  113. TCP cubic registered
  114. NET: Registered protocol family 17
  115. RPC: Registered udp transport module.
  116. RPC: Registered tcp transport module.
  117. yaffs: dev is 32505858 name is "mtdblock2"
  118. yaffs: passed flags ""
  119. yaffs: Attempting MTD mount on 31.2, "mtdblock2"
  120. yaffs: auto selecting yaffs2
  121. yaffs_read_super: isCheckpointed 0
  122. VFS: Mounted root (yaffs filesystem) on device 31:2.
  123. Freeing init memory: 116K

  124. Please press Enter to activate this console.
  125. [\u@\h \W]# ls
  126. bin lib opt sddisk usr
  127. dev linuxrc proc sys var
  128. etc lost+found root tmp web
  129. home mnt sbin udisk
  130. [\u@\h \W]#


阅读(1238) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~