LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1495|回复: 2

求助 Linux2.6.18.3在ARM2410上移植出错

[复制链接]
发表于 2007-11-14 21:46:18 | 显示全部楼层 |阅读模式
vivi> param set linux_cmd_line "noinitrd root=/dev/mtdblock3 init=/linuxrc conso
le=ttySAC0"
Change linux command line to "noinitrd root=/dev/mtdblock3 init=/linuxrc console
=ttySAC0"
vivi> boot
Copy linux kernel from 0x00030000 to 0x30008000, size = 0x002d0000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySA
C0"
MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux.............................................................
.............. done, booting the kernel.
Linux version 2.6.18.3 (root@localhost.localdomain) (gcc 版本 4.1.0) #2 Tue No
v 6 10:20:50 CST 2007
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists.  Total pages: 16384
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
irq: clearing pending ext status 00000100
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 2048 bytes)
timer tcon=00000000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
Console: colour dummy device 80x30
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: 62464KB available (1908K code, 428K data, 96K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410: Initialising architecture
kobject_add failed for s3c2410-nand with -EEXIST, don't try to register things w
ith the same name in the same directory.
s3c24xx: failed to add board device s3c2410-nand (-17) @c0203de4
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 80x25
fb0: Virtual frame buffer device, using 1024K of video memory
S3C2410 RTC, (c) 2004 Simtec Electronics
s3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand s3c2410-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Creating 8 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00004000 : "Boot Agent"
0x00000000-0x00200000 : "S3C2410 flash partition 1"
0x00400000-0x00800000 : "S3C2410 flash partition 2"
0x00800000-0x00a00000 : "S3C2410 flash partition 3"
0x00a00000-0x00e00000 : "S3C2410 flash partition 4"
0x00e00000-0x01800000 : "S3C2410 flash partition 5"
0x01800000-0x03000000 : "S3C2410 flash partition 6"
0x03000000-0x04000000 : "S3C2410 flash partition 7"
usbmon: debugfs is not available
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
mice: PS/2 mouse device common for all mice
TCP bic registered
NET: Registered protocol family 1
No filesystem could mount root, tried:  cramfs romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
发表于 2007-11-15 18:14:41 | 显示全部楼层
我想问一下,你是怎样编译vivi的?
我的步骤:
1)make distclean
2) cp ../config-orig .config  (config-orig :是供货商提供的, 我另外改名保存了起来)
3)make menuconfig(啥都没动,只是退出时候选择`保存`,否则就无法编译了)
4)make
可是编译了不到30秒,就好了。但在vivi目录下,也没找到有vivi(makefile里的目标是vivi),但有vivi-elf, vivi-map。
我怀疑是Makefile(供应商提供。见后,不会加附件,请见谅)有问题.
其中的Line 137:
        $(OBJCOPY) -O binary -S vivi-elf vivi2410.nand $(OBJCOPYFLAGS)

我已经被折磨了2天,希望作过的或高人指点一下,先行谢过了。
-------------------------------------------------------------------------------------
VERSION = 0
PATCHLEVEL = 1
SUBLEVEL = 4

VIVIRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)

ARCH := arm

CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
        else if [ -x /bin/bash ]; then echo /bin/bash; \
        else echo sh; fi ; fi)
TOPDIR        := $(shell /bin/pwd)

#
# change this to point to the Linux include directory
#
#LINUX_INCLUDE_DIR        = /usr/local/arm/3.3.2/arm-linux/sys-include
LINUX_INCLUDE_DIR        = /usr/local/arm/2.95.3/arm-linux/sys-include


VIVIPATH           = $(TOPDIR)/include

HOSTCC          = gcc
HOSTCFLAGS      = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer

CROSS_COMPILE   = /usr/local/arm/2.95.3/bin/arm-linux-

#
# Include the make variables (CC, etc...)
#

AS              = $(CROSS_COMPILE)as
LD              = $(CROSS_COMPILE)ld
CC              = $(CROSS_COMPILE)gcc
CPP             = $(CC) -E
AR              = $(CROSS_COMPILE)ar
NM              = $(CROSS_COMPILE)nm
STRIP           = $(CROSS_COMPILE)strip
OBJCOPY         = $(CROSS_COMPILE)objcopy
OBJDUMP         = $(CROSS_COMPILE)objdump
MAKEFILES       = $(TOPDIR)/.config
MD5SUM                = md5sum
PERL            = perl
AWK                = awk

export  VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE \
        CONFIG_SHELL TOPDIR VIVIPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
        CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES MD5SUM PERL AWK

all:         do-it-all

ifeq (.config,$(wildcard .config))
include .config
else
CONFIGURATION = config
do-it-all:        config
endif
do-it-all:        Version vivi

#
# standard CFLAGS
#

CPPFLAGS := -I$(VIVIPATH) -I$(LINUX_INCLUDE_DIR)
#CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
#          -fomit-frame-pointer -fno-strict-aliasing -fno-common
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -O2 -fPIC -fomit-frame-pointer
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)

CORE_FILES        = init/main.o init/version.o lib/lib.o
ifneq ($(CONFIG_NETWORK),y)
#NET_LIB                = mylib/netlink.lo mylib/netdev_dm9k.lo
endif
#NET_LIB                = mylib/net.lo mylib/netdev.lo mylib/chechid.o
NET_LIB-y                :=
NET_LIB-$(CONFIG_NETWORK)                += net/network.o
#VGA_LIB                = mylib/vgadev.lo
LIBS            := lib/priv_data/priv_data.o $(NET_LIB-y) $(NET_LIB)

SUBDIRS-y       := drivers lib
SUBDIRS-$(CONFIG_NETWORK)    += net
SUBDIRS         := $(SUBDIRS-y)

DRIVERS-y :=
DRIVERS-$(CONFIG_SERIAL) += drivers/serial/serial.o
DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtd.o
#DRIVERS-$(CONFIG_DRIVER_CS8900) += drivers/net/netdev_cs89.lo
#DRIVERS-$(CONFIG_DRIVER_CS8900) += drivers/net/netdev.o
#DRIVERS-$(CONFIG_DRIVER_DM9000) += drivers/net/netdev.o
#DRIVERS-$(CONFIG_DRIVER_DM9000) += drivers/net/netdev_dm9k.lo
DRIVERS-$(CONFIG_NETWORK) += drivers/net/netdev.o
DRIVERS-$(CONFIG_CMD_VGA) += drivers/vga/vgadev.o

#DRIVERS-y += drivers/net/netdev.lo
DRIVERS := $(DRIVERS-y)

CLEAN_FILES = \
        vivi-elf \
        vivi \
        vivi.nm \
        vivi.map

#
# Location of the gcc arm libs.
#
ARM_GCC_LIBS        = /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3

OBJCOPYFLAGS = -R .comment -R .stab -R .stabstr

CLIBS = -L$(ARM_GCC_LIBS) -lgcc -lc
LINKFLAGS = -Tarch/vivi.lds -Bstatic

DISTCLEAN_FILES = \
        include/autoconf.h include/version.h \
        scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
        .menuconfig.log \
        .config .config.old TAGS tags

include arch/Makefile

export  CPPFLAGS CFLAGS AFLAGS

export  DRIVERS LDFLAGS

Version: dummy
        @rm -f include/compile.h

vivi: include/version.h $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
        $(LD) -v $(LINKFLAGS) \
                $(HEAD) \
                $(CORE_FILES) \
                $(DRIVERS) \
                $(LIBS) \
                $(CLIBS) \
                -o vivi-elf
        $(NM) -v -l vivi-elf > vivi.map
        $(OBJCOPY) -O binary -S vivi-elf vivi2410.nand $(OBJCOPYFLAGS)

oldconfig:
        $(CONFIG_SHELL) scripts/Configure -d arch/Config.in

config:
        $(CONFIG_SHELL) scripts/Configure arch/Config.in

menuconfig: include/version.h
        $(MAKE) -C scripts/lxdialog all
        $(CONFIG_SHELL) scripts/Menuconfig arch/Config.in

clean:
        find . \( -name '*.o' -o -name core -o -name ".*.flags" \) -type f -print \
        | grep -v lxdialog/ | xargs rm -f
        rm -f $(CLEAN_FILES)

distclean: clean
        rm -f $(DISTCLEAN_FILES)

rebuild: clean all

linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))

$(patsubst %, _dir_%, $(SUBDIRS)) : include/version.h
        $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)

$(TOPDIR)/include/version.h: include/version.h
$(TOPDIR)/include/compile.h: include/compile.h

include/compile.h: $(CONFIGURATION) include/version.h
        @echo -n \#define UTS_VERSION \"\#$(VIVIRELEASE) > .ver
        @if [ -f .name ]; then  echo -n \-`cat .name` >> .ver; fi
        @echo ' '`date`'"' >> .ver
        @echo \#define VIVI_COMPILE_TIME \"`date +%T`\" >> .ver
        @echo \#define VIVI_COMPILE_BY \"`whoami`\" >> .ver
        @echo \#define VIVI_COMPILE_HOST \"`hostname`\" >> .ver
        @if [ -x /bin/dnsdomainname ]; then \
           echo \#define VIVI_COMPILE_DOMAIN \"`dnsdomainname`\"; \
         elif [ -x /bin/domainname ]; then \
           echo \#define VIVI_COMPILE_DOMAIN \"`domainname`\"; \
         else \
           echo \#define VIVI_COMPILE_DOMAIN ; \
         fi >> .ver
        @echo \#define VIVI_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver
        @mv -f .ver $@

include/version.h:
        @echo \#define VIVI_RELEASE \"$(VIVIRELEASE)\" > .ver
        @echo \#define VIVI_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
        @echo '#define VIVI_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
        @mv -f .ver $@

init/version.o: init/version.c include/compile.h
        $(CC) $(CFLAGS) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c

init/main.o: init/main.c
        $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $<

TAGS: dummy
        etags `find include -name '*.h'`
        find $(SUBDIRS) init -name '*.[ch]' | xargs etags -a

# Exuberant ctags works better with -I
tags: dummy
        CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
        ctags $$CTAGSF `find include -name '*.h'` && \
        find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a

%: ./arch/def-configs/%
        $(MAKE) distclean
        cp arch/def-configs/$* ./.config -f
        $(MAKE) oldconfig
        $(MAKE)
       

ifdef CONFIGURATION
..$(CONFIGURATION):
        @echo
        @echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
        @echo
        $(MAKE) $(CONFIGURATION)
        @echo
        @echo "Successful. Try re-making (ignore the error that follows)"
        @echo
        exit 1

dummy:

else

dummy:

endif

include Rules.make
=================================================
回复 支持 反对

使用道具 举报

发表于 2007-11-15 19:09:59 | 显示全部楼层
有人知道不???
急呀!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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