pgtoxx 发表于 2010-10-2 16:16:46

自制的initrd.img不能在skyeye.1.3.1加载?

您好,我按下步骤,用busybox-1.9.2自已做了个initrd.img文件,但是加载时却出错了,请问是什么原因呀?

1.编译linux-2.6.30.5
        #make s3c2410_defconfig
        #make menuconfig
        我设置了内核启动参数
       1).Boot options ---> Default kernel command string:
          mem=32M console=ttySAC0 root=/dev/ram initrd=0xc0800000,0x00800000 ramdisk_size=8192 rw
       2).Device Drivers ---> Block devices??---> [ ] RAM disk support
          相应的将默认的 (4096) Default RAM disk size (kbytes) 改成 8192;
       3).将Device Drivers –> Character devices –> Serial drivers –> 8250/16550 and compatible serial support                    去除
        #make//能成功编译,但文件比较大。

2.编写skyeye.conf文件
        # skyeye config file for S3C2440
        arch:arm
        cpu: arm920t
        mach: s3c2440
        # physical memory
        mem_bank: map=M, type=RW, addr=0x30000000, size=0x00800000
        mem_bank: map=M, type=RW, addr=0x30800000, size=0x00800000, file=./initrd.img
        mem_bank: map=M, type=RW, addr=0x31000000, size=0x01000000
        # all peripherals I/O mapping area
        mem_bank: map=I, type=RW, addr=0x48000000, size=0x20000000
        mem_bank: map=I, type=RW, addr=0x19000300, size=0x00000020
        #net: type=cs8900a, base=0x19000300, size=0x20,int=9, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1
        #lcd: type=s3c2410x, mod=gtk
        uart:mod=stdio
        #uart:mod=term
        load_addr:base=0x30000000, mask=0xFFFFFF
        #dbct:state=on

3.制做initrd.img
        安装好了 busybox-处。9.2 后以命令制件步骤如下:
        创建映像文件并挂到 initrd 目录
        #mkdir initrd
        #dd if=/dev/zero of=initrd.img bs=1k count=4096
        #mke2fs -F -v initrd.img
        #mount -o loop initrd.img initrd
        将添加 busybox 到此映像文件
        #cd initrd
        #cp -r ../_install/* .
        #创建必要的目录
        #mkdir proc lib etc dev root home var tmp
        #chmod 777 tmp
        建立设备文件
        #cd dev
        #mknod -m 644 console c 5 1
        #mknod -m 644 null c 1 3
        #mknod -m 640 ram b 1 1
        #mknod -m 644 mem c 1 1
        #cd ..
        创建脚本文件 etc/inittab,内容如下:
        ::sysinit:/etc/init.d/rcS
        ::askfirst:-/bin/sh
        ::restart:/sbin/init
        ::ctrlaltdel:/sbin/reboot
        ::shutdown:/bin/umount -a -r
        ::shutdown:/sbin/swapoff -a
        设置此脚本执行权限
        #chmod 644 etc/inittab
        创建脚本文件 etc/init.d/rcS, 内容如下:
        #!/bin/sh
        /bin/mount -t proc none /proc
        /sbin/ifconfig lo 127.0.0.1 up
        /sbin/ifconfig eth0 10.0.0.2 netmask 255.0.0.0 up
        hostname skyeye
        mkdir /var/tmp
        mkdir /var/log
        mkdir /var/run
        mkdir /var/lock
        /bin/ash
        设置此脚本执行权限
        #chmod 755 etc/init.d/rcS
        最后一步,执行实际的写入操作,生成 initrd.img
        cd ..
        umount initrd

4.出现的错误
        (skyeye)(running)Bus read error, can not find corresponding bank for addr 0x0,pc=0x300083b0
        Linux version 2.6.30.5 (root@xlysue-desktop) (gcc version 3.4.4) #2 Sat Oct 2 06:24:10 CST 2010
        CPU: ARM920T revision 0 (ARMvundefined/unknown), cr=00003177
        CPU: VIVT data cache, VIVT instruction cache
        Machine: SMDK2440
        Warning: bad configuration page, trying to continue
        Memory policy: ECC disabled, Data cache writeback
        CPU S3C2440 (id 0x32440000)
        S3C24XX Clocks, (c) 2004 Simtec Electronics
        S3C244X: core 176.117 MHz, memory 88.058 MHz, peripheral 44.029 MHz
        CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on
        Built 1 zonelists in Zone order, mobility grouping on.Total pages: 8128
        Kernel command line: mem=32M console=ttySAC0 root=/dev/ram initrd=0x30800000,0x00800000 ramdisk_size=8192         rw
        NR_IRQS:99
        irq: clearing pending ext status ffffffff
        PID hash table entries: 128 (order: 7, 512 bytes)
        Console: colour dummy device 80x30
        console enabled
        Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
        Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
        Memory: 32MB = 32MB total
        Memory: 20132KB available (3604K code, 336K data, 152K init, 0K highmem)
        Calibrating delay loop... 25.60 BogoMIPS (lpj=64000)
        Mount-cache hash table entries: 512
        CPU: Testing write buffer coherency: ok
        net_namespace: 936 bytes
        NET: Registered protocol family 16
        S3C Power Management, Copyright 2004 Simtec Electronics
        S3C2440: Initialising architecture
        S3C2440: IRQ Support
        S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
        DMA channel 0 at c2808000, irq 33
        DMA channel 1 at c2808040, irq 34
        DMA channel 2 at c2808080, irq 35
        DMA channel 3 at c28080c0, irq 36
        S3C244X: Clock Support, DVS on
        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 85 KHz
        s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
        NET: Registered protocol family 2
        IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
        TCP established hash table entries: 1024 (order: 1, 8192 bytes)
        TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
        TCP: Hash tables configured (established 1024 bind 1024)
        TCP reno registered
        NET: Registered protocol family 1
        Trying to unpack rootfs image as initramfs...
        rootfs image is not initramfs (junk in compressed archive); looks like an initrd
        Freeing initrd memory: 8192K
        NetWinder Floating Point Emulator V0.97 (extended precision)
        JFFS2 version 2.2. (NAND) (SUMMARY)? 2001-2006 Red Hat, Inc.
        ROMFS MTD (C) 2007 Red Hat, Inc.
        msgmni has been set to 55
        io scheduler noop registered
        io scheduler anticipatory registered (default)
        io scheduler deadline registered
        io scheduler cfq registered
        Console: switching to colour frame buffer device 30x40
        fb0: s3c2410fb frame buffer device
        lp: driver loaded but no devices found
        ppdev: user-space parallel port driver
        s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
        s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440        
        s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
        brd: module loaded
        loop: module loaded
        Uniform Multi-Platform E-IDE driver
        ide-gd driver 1.18
        ide-cd driver 5.00
        Driver 'sd' needs updating - please use bus_type methods
        dm9000 Ethernet Driver, V1.31
        S3C24XX NAND Driver, (c) 2004 Simtec Electronics
        s3c2440-nand s3c2440-nand: Tacls=2, 22ns Twrph0=6 68ns, Twrph1=2 22ns
        No NAND device found!!!
        usbmon: debugfs is not available
        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
        s3c2410-ohci s3c2410-ohci: USB HC takeover failed!(BIOS/SMM bug)
        s3c2410-ohci s3c2410-ohci: startup error -16
        s3c2410-ohci s3c2410-ohci: USB bus 1 deregistered
        s3c2410-ohci: probe of s3c2410-ohci failed with error -16
        usbcore: registered new interface driver libusual
        usbcore: registered new interface driver usbserial        
        USB Serial support registered for generic
        usbcore: registered new interface driver usbserial_generic
        usbserial: USB Serial Driver core
        USB Serial support registered for FTDI USB Serial Device
        usbcore: registered new interface driver ftdi_sio
        ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
        USB Serial support registered for pl2303        
        usbcore: registered new interface driver pl2303
        pl2303: Prolific PL2303 USB to serial adaptor driver
        mice: PS/2 mouse device common for all mice
        S3C24XX RTC, (c) 2004,2006 Simtec Electronics
        S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
        s3c2410-wdt s3c2410-wdt: watchdog active, reset abled, irq abled
        Advanced Linux Sound Architecture Driver Version 1.0.20.
        ALSA device list:
        No soundcards found.
        TCP cubic registered
        NET: Registered protocol family 17
        RPC: Registered udp transport module.
        RPC: Registered tcp transport module.
        drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
        RAMDISK: ext2 filesystem found at block 0
        RAMDISK: Loading 4096KiB into ram disk... done.
        VFS: Mounted root (ext2 filesystem) on device 1:0.
        Freeing init memory: 152K
        init started: BusyBox v1.9.2 (2010-09-22 23:30:43 CST)
        'tarting pid 869, tty '': '/etc/init.d/rcS
        ': No such file or directory
       
        Please press Enter to activate this console. (running)

ksh 发表于 2010-10-3 17:03:52

感觉没有什么错误,应该都是正常的。你可以把skyeye.conf文件中的
"uart: mod=stdio" 改为
"uart: mod=term"

这样可以启动一个小窗口来显示串口信息,然后启动完毕,你敲入回车可以进入shell命令行

pgtoxx 发表于 2010-10-4 12:25:41

回复 2# ksh 的帖子

我们把uart:mod=stdio改成uart:mod=term
后,也不行,小窗口出现如下错误信息:
Freeing init memor:92K
init started:Busybox v1.9.2
starting pid 14,tty '':''/etc/init.d/rcS'

Please press Enter to activate this console.
页: [1]
查看完整版本: 自制的initrd.img不能在skyeye.1.3.1加载?