天嵌 ARM开发社区

 找回密码
 注册
查看: 2743|回复: 10

内核移植疑问

[复制链接]
lx773533 发表于 2010-10-14 11:16:11 | 显示全部楼层 |阅读模式
今天重新对内核进行移植,分别参考Mini2440移植手册和TQ2440移植手册,但是出现了几个疑问,还望高手可以解决:
在配置内核make menconfig,-->system type-->s3c2440machines里面,为什么我选择EmbedSky Sky2440/TQ2440 board,然后make zImage会报错,而不选择它就能够编译成功呢?
天嵌_support1 发表于 2010-10-14 13:52:13 | 显示全部楼层
1# lx773533


错误信息呢?
 楼主| lx773533 发表于 2010-10-14 19:35:20 | 显示全部楼层
报错信息:
[root@EmbedSky linux-2.6.30.4]# make zImage
scripts/kconfig/conf -s arch/arm/Kconfig
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CALL    scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
  CHK     include/linux/compile.h
  LD      arch/arm/mach-s3c2440/built-in.o
arch/arm/mach-s3c2440/mach-smdk2440.o:(.data+0x0): multiple definition of `s3c_device_dm9000'
arch/arm/mach-s3c2440/mach-tq2440.o:(.data+0x10): first defined here
make[1]: *** [arch/arm/mach-s3c2440/built-in.o] Error 1
make: *** [arch/arm/mach-s3c2440] Error 2
machoe 发表于 2010-10-14 22:00:54 | 显示全部楼层
提示是多重定义,看一下你的代码吧,建议移植的时候,选“一个”内核版本,选“一个手册”,否则容易混淆。
天嵌_support1 发表于 2010-10-15 10:15:59 | 显示全部楼层
3# lx773533

System Type  ---> 进入
           S3C2440 Machines  --->  进入
                          
  • EmbedSky SKY2440/TQ2440 Board  //只选这个
                              [ ] SMDK2440   //不选这个
  •  楼主| lx773533 发表于 2010-10-15 19:49:32 | 显示全部楼层
    按照楼主改了,可是依然出现错误,看不懂:
    Start Linux ...
    Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00200000 ... Copy Kernel to SDRAM done,NOW, Booting Linux......
    Uncompressing Linux............................................................................................................................ done, booting the kernel.
    Linux version 2.6.30.4-EmbedSky (root@EmbedSky) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #14 Fri Oct 15 18:38:03 CST 2010
    CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: TQ2440
    ATAG_INITRD is deprecated; please update your bootloader.
    Memory policy: ECC disabled, Data cache writeback
    CPU S3C2440A (id 0x32440001)
    S3C24XX Clocks, (c) 2004 Simtec Electronics
    S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
    CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
    Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
    NR_IRQS:85
    irq: clearing pending ext status 00080000
    irq: clearing subpending status 00000003
    irq: clearing subpending status 00000002
    PID hash table entries: 256 (order: 8, 1024 bytes)
    Console: colour dummy device 80x30
    console [ttySAC0] enabled
    Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    Memory: 64MB = 64MB total
    Memory: 60792KB available (3508K code, 378K data, 184K init, 0K highmem)
    SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    net_namespace: 500 bytes
    NET: Registered protocol family 16
    kobject (c03a9248): tried to init an initialized object, something is seriously wrong.
    Backtrace:
    [<c003afd4>] (dump_backtrace+0x0/0x10c) from [<c02c7a98>] (dump_stack+0x18/0x1c)
    r7:c381c000 r6:c0020f3c r5:c03bd920 r4:c03a9248
    [<c02c7a80>] (dump_stack+0x0/0x1c) from [<c0139950>] (kobject_init+0xa4/0xb8)
    [<c01398ac>] (kobject_init+0x0/0xb8) from [<c017cf28>] (device_initialize+0x28/0x70)
    r5:00000002 r4:c03a9240
    [<c017cf00>] (device_initialize+0x0/0x70) from [<c0180f30>] (platform_device_register+0x18/0x24)
    r5:00000002 r4:c03a9238
    [<c0180f18>] (platform_device_register+0x0/0x24) from [<c01811d0>] (platform_add_devices+0x38/0x78)
    r5:00000002 r4:00000000
    [<c0181198>] (platform_add_devices+0x0/0x78) from [<c000cc28>] (EmbedSky_machine_init+0x24/0x34)
    r7:c381c000 r6:00000000 r5:c001e1bc r4:c0020cc4
    [<c000cc04>] (EmbedSky_machine_init+0x0/0x34) from [<c000bcb4>] (tq2440_machine_init+0x30/0x5c)
    [<c000bc84>] (tq2440_machine_init+0x0/0x5c) from [<c0009904>] (customize_machine+0x20/0x2c)
    r5:c001e1bc r4:c001e218
    [<c00098e4>] (customize_machine+0x0/0x2c) from [<c0036284>] (do_one_initcall+0x3c/0x1bc)
    [<c0036248>] (do_one_initcall+0x0/0x1bc) from [<c0008438>] (kernel_init+0x88/0xf4)
    [<c00083b0>] (kernel_init+0x0/0xf4) from [<c004bf8c>] (do_exit+0x0/0x620)
    r7:00000000 r6:00000000 r5:00000000 r4:00000000
    ------------[ cut here ]------------
    WARNING: at fs/sysfs/dir.c:487 sysfs_add_one+0x88/0xb0()
    sysfs: cannot create duplicate filename '/devices/platform/s3c2440-nand'
    Modules linked in:
    Backtrace:
    [<c003afd4>] (dump_backtrace+0x0/0x10c) from [<c02c7a98>] (dump_stack+0x18/0x1c)
    r7:c381dd68 r6:c00d8f50 r5:c035791c r4:000001e7
    [<c02c7a80>] (dump_stack+0x0/0x1c) from [<c0048fac>] (warn_slowpath_common+0x4c/0x80)
    [<c0048f60>] (warn_slowpath_common+0x0/0x80) from [<c004902c>] (warn_slowpath_fmt+0x30/0x38)
    r7:c3809000 r6:c384f330 r5:ffffffef r4:c381dd8c
    [<c0048ffc>] (warn_slowpath_fmt+0x0/0x38) from [<c00d8f50>] (sysfs_add_one+0x88/0xb0)
    r3:c3809000 r2:c035792c
    r4:c3809000
    [<c00d8ec8>] (sysfs_add_one+0x0/0xb0) from [<c00d95a0>] (create_dir+0x58/0xb0)
    r7:c3810180 r6:c03a9248 r5:c384f330 r4:c381ddb0
    [<c00d9548>] (create_dir+0x0/0xb0) from [<c00d9630>] (sysfs_create_dir+0x38/0x64)
    r8:c03bda70 r7:c381c000 r6:c03bda70 r5:c03a9248 r4:c03a9248
    [<c00d95f8>] (sysfs_create_dir+0x0/0x64) from [<c0139c4c>] (kobject_add_internal+0xac/0x1d8)
    r4:c03a9248
    [<c0139ba0>] (kobject_add_internal+0x0/0x1d8) from [<c0139e70>] (kobject_add_varg+0x34/0x50)
    r9:c03bda68 r8:00000000 r7:c381c000 r6:c03bda70 r5:00000000
    r4:c03a9248
    [<c0139e3c>] (kobject_add_varg+0x0/0x50) from [<c0139f0c>] (kobject_add+0x3c/0x64)
    r7:c381c000 r6:c03a9238 r5:c03a9240 r4:00000001
    [<c0139ed0>] (kobject_add+0x0/0x64) from [<c017d3e8>] (device_add+0xc4/0x540)
    r3:00000016 r2:00000000
    [<c017d324>] (device_add+0x0/0x540) from [<c0180edc>] (platform_device_add+0x14c/0x188)
    [<c0180d90>] (platform_device_add+0x0/0x188) from [<c0180f38>] (platform_device_register+0x20/0x24)
    r7:c381c000 r6:c0020f3c r5:00000002 r4:c03a9238
    [<c0180f18>] (platform_device_register+0x0/0x24) from [<c01811d0>] (platform_add_devices+0x38/0x78)
    r5:00000002 r4:00000000
    [<c0181198>] (platform_add_devices+0x0/0x78) from [<c000cc28>] (EmbedSky_machine_init+0x24/0x34)
    r7:c381c000 r6:00000000 r5:c001e1bc r4:c0020cc4
    [<c000cc04>] (EmbedSky_machine_init+0x0/0x34) from [<c000bcb4>] (tq2440_machine_init+0x30/0x5c)
    [<c000bc84>] (tq2440_machine_init+0x0/0x5c) from [<c0009904>] (customize_machine+0x20/0x2c)
    r5:c001e1bc r4:c001e218
    [<c00098e4>] (customize_machine+0x0/0x2c) from [<c0036284>] (do_one_initcall+0x3c/0x1bc)
    [<c0036248>] (do_one_initcall+0x0/0x1bc) from [<c0008438>] (kernel_init+0x88/0xf4)
    [<c00083b0>] (kernel_init+0x0/0xf4) from [<c004bf8c>] (do_exit+0x0/0x620)
    r7:00000000 r6:00000000 r5:00000000 r4:00000000
    ---[ end trace 1b75b31a2719ed1c ]---
    kobject_add_internal failed for s3c2440-nand with -EEXIST, don't try to register things with the same name in the same directory.
    Backtrace:
    [<c003afd4>] (dump_backtrace+0x0/0x10c) from [<c02c7a98>] (dump_stack+0x18/0x1c)
    r7:c381c000 r6:ffffffef r5:c03a9248 r4:c03a9248
    [<c02c7a80>] (dump_stack+0x0/0x1c) from [<c0139cb4>] (kobject_add_internal+0x114/0x1d8)
    [<c0139ba0>] (kobject_add_internal+0x0/0x1d8) from [<c0139e70>] (kobject_add_varg+0x34/0x50)
    r9:c03bda68 r8:00000000 r7:c381c000 r6:c03bda70 r5:00000000
    r4:c03a9248
    [<c0139e3c>] (kobject_add_varg+0x0/0x50) from [<c0139f0c>] (kobject_add+0x3c/0x64)
    r7:c381c000 r6:c03a9238 r5:c03a9240 r4:00000001
    [<c0139ed0>] (kobject_add+0x0/0x64) from [<c017d3e8>] (device_add+0xc4/0x540)
    r3:00000016 r2:00000000
    [<c017d324>] (device_add+0x0/0x540) from [<c0180edc>] (platform_device_add+0x14c/0x188)
    [<c0180d90>] (platform_device_add+0x0/0x188) from [<c0180f38>] (platform_device_register+0x20/0x24)
    r7:c381c000 r6:c0020f3c r5:00000002 r4:c03a9238
    [<c0180f18>] (platform_device_register+0x0/0x24) from [<c01811d0>] (platform_add_devices+0x38/0x78)
    r5:00000002 r4:00000000
    [<c0181198>] (platform_add_devices+0x0/0x78) from [<c000cc28>] (EmbedSky_machine_init+0x24/0x34)
    r7:c381c000 r6:00000000 r5:c001e1bc r4:c0020cc4
    [<c000cc04>] (EmbedSky_machine_init+0x0/0x34) from [<c000bcb4>] (tq2440_machine_init+0x30/0x5c)
    [<c000bc84>] (tq2440_machine_init+0x0/0x5c) from [<c0009904>] (customize_machine+0x20/0x2c)
    r5:c001e1bc r4:c001e218
    [<c00098e4>] (customize_machine+0x0/0x2c) from [<c0036284>] (do_one_initcall+0x3c/0x1bc)
    [<c0036248>] (do_one_initcall+0x0/0x1bc) from [<c0008438>] (kernel_init+0x88/0xf4)
    [<c00083b0>] (kernel_init+0x0/0xf4) from [<c004bf8c>] (do_exit+0x0/0x620)
    r7:00000000 r6:00000000 r5:00000000 r4:0000000
     楼主| lx773533 发表于 2010-10-15 19:54:14 | 显示全部楼层
    S3C2440: Initialising architecture
    S3C2440: IRQ Support
    S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
    DMA channel 0 at c4808000, irq 33
    DMA channel 1 at c4808040, irq 34
    DMA channel 2 at c4808080, irq 35
    DMA channel 3 at c48080c0, irq 36
    S3C244X: Clock Support, DVS off
    bio: create slab <bio-0> at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    s3c2440-i2c s3c2440-i2c: slave address 0x10
    s3c2440-i2c s3c2440-i2c: bus frequency set to 97 KHz
    s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
    cfg80211: Calling CRDA to update world regulatory domain
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 2048 (order: 2, 16384 bytes)
    TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    TCP: Hash tables configured (established 2048 bind 2048)
    TCP reno registered
    NET: Registered protocol family 1
    yaffs Oct 13 2010 15:13:41 Installing.
    msgmni has been set to 118
    alg: No test for stdrng (krng)
    io scheduler noop registered (default)
    Console: switching to colour frame buffer device 40x15
    fb0: s3c2410fb frame buffer device
    backlight initialized
    GPIO-Control initialized
    PWM-Test initialized
    adc initialized
    lp: driver loaded but no devices found
    ppdev: user-space parallel port driver
    s3c2440-uart.0: tq2440_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
    s3c2440-uart.1: tq2440_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
    s3c2440-uart.2: tq2440_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
    loop: module loaded
    Driver 'sd' needs updating - please use bus_type methods
    dm9000 Ethernet Driver, V1.31
    Now use the default MAC address: 10:23:45:67:89:ab
    eth0 (dm9000): not using net_device_ops yet
    eth0: dm9000e at c4814000,c4818004 IRQ 51 MAC: 10:23:45:67:89:ab (EmbedSky)
    S3C24XX NAND Driver, (c) 2004 Simtec Electronics
    ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
    s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
    s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: S3C24XX OHCI
    usb usb1: Manufacturer: Linux 2.6.30.4-EmbedSky ohci_hcd
    usb usb1: SerialNumber: s3c24xx
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 2 ports detected
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new interface driver usbserial
    usbserial: USB Serial Driver core
    USB Serial support registered for pl2303
    usbcore: registered new interface driver pl2303
    pl2303: Prolific PL2303 USB to serial adaptor driver
    s3c2410_udc: debugfs dir creation failed -19
    s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
    mice: PS/2 mouse device common for all mice
    TQ2440 TouchScreen successfully loaded
    input: TQ2440 TouchScreen as /devices/virtual/input/input0
    S3C24XX RTC, (c) 2004,2006 Simtec Electronics
    s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
    s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
    i2c /dev entries driver
    Linux video capture interface: v2.00
    zc0301: V4L2 driver for ZC0301[P] Image Processor and Control Chip v1:1.10
    usbcore: registered new interface driver zc0301
    gspca: main v2.5.0 registered
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (v0.1.0)
    S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
    s3c2410-wdt s3c2410-wdt: starting watchdog timer
    s3c2410-wdt s3c2410-wdt: watchdog active, reset abled, irq enabled
    usbcore: registered new interface driver usbhid
    usbhid: v2.6:USB HID core driver
    Advanced Linux Sound Architecture Driver Version 1.0.18a.
    No device for DAI UDA134X
    No device for DAI s3c24xx-i2s
    S3C24XX_UDA134X SoC Audio driver
    UDA134X SoC Audio Codec
    asoc: UDA134X <-> s3c24xx-i2s mapping ok
    ALSA device list:
      #0: S3C24XX_UDA134X (UDA134X)
    TCP cubic registered
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    lib80211: common routines for IEEE802.11 drivers
    s3c2410-rtc s3c2410-rtc: setting system clock to 2009-02-06 21:50:19 UTC (1233957019)
    Root-NFS: No NFS server available, giving up.
    VFS: Unable to mount root fs via NFS, trying floppy.
    VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
    Please append a correct "root=" boot option; here are the available partitions:
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
    Backtrace:
    [<c003afd4>] (dump_backtrace+0x0/0x10c) from [<c02c7a98>] (dump_stack+0x18/0x1c)
    r7:c380b0cb r6:c03d0520 r5:c380b000 r4:c381df40
    [<c02c7a80>] (dump_stack+0x0/0x1c) from [<c02c7ae8>] (panic+0x4c/0x124)
    [<c02c7a9c>] (panic+0x0/0x124) from [<c0008e30>] (mount_block_root+0x178/0x234)
    r3:00000000 r2:c3801dac r1:c381df40 r0:c034e758
    [<c0008cb8>] (mount_block_root+0x0/0x234) from [<c0008f9c>] (mount_root+0xb0/0xf4)
    [<c0008eec>] (mount_root+0x0/0xf4) from [<c00090d8>] (prepare_namespace+0xf8/0x18c)
    r7:c03cff04 r6:c001f83c r5:c001f83c r4:c001f84c
    [<c0008fe0>] (prepare_namespace+0x0/0x18c) from [<c0008478>] (kernel_init+0xc8/0xf4)
    r7:00000000 r6:c001e548 r5:c001e1bc r4:c001e548
    [<c00083b0>] (kernel_init+0x0/0xf4) from [<c004bf8c>] (do_exit+0x0/0x620)
    r7:00000000 r6:00000000 r5:00000000 r4:00000000
    *** Warning - bad CRC or NAND, using default environment
    天嵌_support1 发表于 2010-10-16 10:28:18 | 显示全部楼层
    7# lx773533


    你一楼的错误是编译内核的错误,改了后已经编译通过。
    你现在的错误是内核引导文件系统时的错误。
    从你最后的信息看,你是在用nfs,系统很聪明的提示你,你的nfs server 没有设置好了。
    你看看linux 移植手册,里面有介绍怎么设置nfs服务器
    zr_714 发表于 2010-10-16 20:20:29 | 显示全部楼层
    7# lx773533


    MTD设置的问题 确定选上nand的模块和yaffs的支持
     楼主| lx773533 发表于 2010-10-16 21:28:02 | 显示全部楼层
    8# embedsky_lxt


    用NFS?这话有点难以理解,我是按照手册一步一步走一遍的,可是走到yaffs文件移植就走不下去了,有点郁闷。。。而且我已经配置好了MTD,选择的NAND flash为256M的,支持yaffs文件系统啊。。。而且,在本论坛里面,有个内核移植问题汇总的栏目,里面好像关于
    [<c003afd4>] (dump_backtrace+0x0/0x10c) from [<c02c7a98>] (dump_stack+0x18/0x1c)
    r7:c380b0cb r6:c03d0520 r5:c380b000 r4:c381df40
    [<c02c7a80>] (dump_stack+0x0/0x1c) from [<c02c7ae8>] (panic+0x4c/0x124)
    [<c02c7a9c>] (panic+0x0/0x124) from [<c0008e30>] (mount_block_root+0x178/0x234)
    r3:00000000 r2:c3801dac r1:c381df40 r0:c034e758
    [<c0008cb8>] (mount_block_root+0x0/0x234) from [<c0008f9c>] (mount_root+0xb0/0xf4)
    [<c0008eec>] (mount_root+0x0/0xf4) from [<c00090d8>] (prepare_namespace+0xf8/0x18c)
    r7:c03cff04 r6:c001f83c r5:c001f83c r4:c001f84c
    [<c0008fe0>] (prepare_namespace+0x0/0x18c) from [<c0008478>] (kernel_init+0xc8/0xf4)
    r7:00000000 r6:c001e548 r5:c001e1bc r4:c001e548
    [<c00083b0>] (kernel_init+0x0/0xf4) from [<c004bf8c>] (do_exit+0x0/0x620)
    r7:00000000 r6:00000000 r5:00000000 r4:00000000
    有好多,但是都没人解答,求教、、、。。。
    zr_714 发表于 2010-10-16 22:00:06 | 显示全部楼层
    10# lx773533


    你轮流试试官方提供的文件系统和内核测试下你自己编译的看是内核还是文件系统有问题

    我当时遇到这个情况是有几个模块选得是M 但应该是*
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

    i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

    Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

    GMT+8, 2024-9-18 04:23 , Processed in 1.043878 second(s), 18 queries .

    Powered by Discuz! X3.4 Licensed

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表