QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: jackzheng2002

嵌入式Linux 2.6 内核专题

[复制链接]
发表于 2006-9-18 15:13:26 | 显示全部楼层

求助

小弟使用
http://www.linuxfans.org/nuke//modules.php?name=Forums&file=viewtopic&t=112750&start=30
的驱动.
可是在make的时候有如下错误:
sound/oss/s3c2410-uda1341.c: In function `copy_from_user_mono_stereo':
sound/oss/s3c2410-uda1341.c:408: warning: implicit declaration of function `veri fy_area'
sound/oss/s3c2410-uda1341.c: In function `init_s3c2410_iis_bus_rx':
sound/oss/s3c2410-uda1341.c:1064: error: `S3C2410_IISMOD_MASTER' undeclared (fir st use in this function)
sound/oss/s3c2410-uda1341.c:1064: error: (Each undeclared identifier is reported only once
sound/oss/s3c2410-uda1341.c:1064: error: for each function it appears in.)
sound/oss/s3c2410-uda1341.c: In function `init_s3c2410_iis_bus_tx':
sound/oss/s3c2410-uda1341.c:1108: error: `S3C2410_IISMOD_MASTER' undeclared (fir st use in this function)
sound/oss/s3c2410-uda1341.c: In function `s3c2410iis_probe':
sound/oss/s3c2410-uda1341.c:1187: error: `S3C2410_VA_IIS' undeclared (first use in this function)
make[2]: *** [sound/oss/s3c2410-uda1341.o] 错误 1
make[1]: *** [sound/oss] 错误 2
make: *** [sound] 错误 2

望诸位大侠帮忙
回复

使用道具 举报

发表于 2006-9-18 15:31:56 | 显示全部楼层

2.6内核和无线网卡都跑起来了,感谢大家的支持

2.6.14+S3c2410+802.11g无线网卡成功运行!!!
多谢大家的帖子 好贴
回复

使用道具 举报

发表于 2006-9-19 10:16:30 | 显示全部楼层
非常好的文章,值得学习
回复

使用道具 举报

发表于 2006-9-19 15:36:17 | 显示全部楼层
小弟添加声卡驱动,编译内核时有如下错误:
sound/built-in.o(.text+0x98: In function `$a':
: undefined reference to `s3c2410_dma_ctrl'
sound/built-in.o(.text+0xc60): In function `audio_sync':
: undefined reference to `s3c2410_dma_enqueue'
sound/built-in.o(.text+0x100c): In function `$a':
: undefined reference to `s3c2410_dma_enqueue'
sound/built-in.o(.text+0x1174): In function `$a':
: undefined reference to `s3c2410_dma_enqueue'
sound/built-in.o(.text+0x12c0): In function `$a':
: undefined reference to `s3c2410_dma_enqueue'
sound/built-in.o(.text+0x2044): In function `$a':
: undefined reference to `s3c2410_dma_set_buffdone_fn'
sound/built-in.o(.text+0x2050): In function `$a':
: undefined reference to `s3c2410_dma_free'
sound/built-in.o(.init.text+0x9: In function `$a':
: undefined reference to `s3c2410_dma_request'
sound/built-in.o(.init.text+0xb0): In function `$a':
: undefined reference to `s3c2410_dma_devconfig'
sound/built-in.o(.init.text+0xc0): In function `$a':
: undefined reference to `s3c2410_dma_config'
sound/built-in.o(.init.text+0xcc): In function `$a':
: undefined reference to `s3c2410_dma_set_buffdone_fn'
sound/built-in.o(.init.text+0xd: In function `$a':
: undefined reference to `s3c2410_dma_setflags'
sound/built-in.o(.init.text+0x100): In function `$a':
: undefined reference to `s3c2410_dma_request'
sound/built-in.o(.init.text+0x110): In function `$a':
: undefined reference to `s3c2410_dma_set_buffdone_fn'

盼高手指点
回复

使用道具 举报

发表于 2006-9-19 19:34:15 | 显示全部楼层
请教一下楼主,我的是什么问题呢?出错提示如下

##################################################################
####Shen Zhen Yuanfeng Computer Technology Co.,Ltd ####
#### http://www.embedon.com ####
#### 0755-26995946 ####
NAND:*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
zImage magic = 0x016f2818
NOW, Booting Linux......
Uncompressing Linux.................................................... done, b.Linux version 2.4.18-rmk7-pxa1 ([email protected]) (gcc version 2.95.36CPU: ARM/CIRRUS Arm920Tsid(wb) revision 0
Machine: Samsung-SMDK2410
Warning: bad configuration page, trying to continue
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 noinitrd init=/linuxrc console=ttyS0
DEBUG: timer count 15626
Console: colour dummy device 80x30
Calibrating delay loop... 99.94 BogoMIPS
Memory: 64MB = 64MB total
Memory: 62716KB available (1368K code, 311K data, 72K init)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
CPU clock = 200.000 Mhz, HCLK = 100.000 Mhz, PCLK = 50.000 Mhz
Starting kswapd
devfs: v1.10 (20020120) Richard Gooch ([email protected])
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
ttyS%d0 at I/O 0x50000000 (irq = 52) is a S3C2410
ttyS%d1 at I/O 0x50004000 (irq = 55) is a S3C2410
ttyS%d2 at I/O 0x50008000 (irq = 5 is a S3C2410
test lcd start 0719
------------------1
------------------2
------------------3
--------------------6
testing the 640x480 lcd by softmcu
------------------4
--------------------6
testing the 640x480 lcd by softmcu
Console: switching to colour frame buffer device 80x60
------------------5
Installed S3C2410 frame buffer
pty: 256 Unix98 ptys configured
s3c2410-ts initialized
s3c2410-test initialized
S3C2410 Real Time Clock Driver v0.1
block: 128 slots per queue, batch=32
Test Uniform Multi-Platform E-IDE driver Revision: 6.31
ide_init
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
init_ide_data
IDE INIT
ideprove_int
select all=160
reg=-738197460select all=160
reg=-738197460select all=176
reg=-738197460select all=176
reg=-738197460<6>eth0: cs8900 rev K(3.3 Volts) found at 0xd0000300
cs89x0 media RJ-45, IRQ 37
NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)
Nand read blocks
Read block
Magic block is 10
10893471921762001319216419313192762051319268198131921489547192108934719260219132Magic
127 255 62 104 57 63 202 10
Block 14801 is bad
Block 32232 is bad
Block 35590 is bad
Block 4319 is bad
Block 61378 is bad
Block 36832 is bad
Block 5523 is bad
Block 34620 is bad
Block 5664 is bad
Block 12584 is bad
Block 5162 is bad
Block 1228 is bad
Block 30503 is bad
Block 45573 is bad
Block 38037 is bad
Block 14973 is bad
Block 63884 is bad
Block 53216 is bad
Block 41456 is bad
Block 17263 is bad
Creating 4 MTD partitions on "Samsung K9D1208V0M":
0x00000000-0x00030000 : "Bootloader"
0x00030000-0x00200000 : "kernel"
0x00200000-0x01f00000 : "root"
0x01f00000-0x02000000 : "userFS"
Mtd Block 0.
Mtd Block 1.
Mtd Block 2.
Mtd Block 3.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 72K
Error -3 while decompressing!
c0195370(-499357461)->c03c0000(4096)
Error -3 while decompressing!
c0195d3c(1038701322)->c000b000(4096)
kmod: failed to exec /sbin/modprobe -s -k binfmt-0000, errno = 13
kmod: failed to exec /sbin/modprobe -s -k binfmt-0000, errno = 13
Kernel panic: No init found. Try passing init= option to kernel.

我想是不是某些块坏了,所以烧写文件系统时多加了几个块,结果Error -3 while decompressing!
c0195370(-499357461)->c03c0000(4096) 前面flash的地址变化了,但是后面内存的地址还是一样,是不是内存有问题呀?
回复

使用道具 举报

发表于 2006-11-14 16:57:31 | 显示全部楼层
[quote="91program"]console=ttyS0
应该改为:
console=ttySAC0

内核对串口的命名改变了。[/quote]


bootloader 是U-BOOT 怎么改?
我改了,但是还是一样,

U-Boot 1.1.2 (Nov 13 2006 - 13:59:4


U-Boot code: 33F80000 -> 33F9B26C  BSS: -> 33F9F368

RAM Configuration:

Bank #0: 30000000 64 MB

Flash:  1 MB

NAND:  64 MB

In:    serial

Out:   serial

Err:   serial

008_uboot # printenv

bootdelay=3

baudrate=115200

ethaddr=08:01:3e:26:8a:5b

filesize=d857c

fileaddr=30008000

netmask=255.255.255.0

ipaddr=192.168.0.188

serverip=192.168.0.35

bootargs=console=ttySAC0,115200

stdin=serial

stdout=serial

stderr=serial


Environment size: 225/65532 bytes

008_uboot # tftp 0x30008000 zImage

TFTP from server 192.168.0.35; our IP address is 192.168.0.188

Filename 'zImage'.

Load address: 0x30008000

Loading: #################################################################

         #################################################################

         ############################################

done

Bytes transferred = 886140 (d857c hex)

008_uboot # bootm

## Booting image at 30008000 ...

Bad Magic Number

008_uboot # go 0x30008000

## Starting application at 0x30008000 ...

Uncompressing Linux.......................................................... done, booting the kernel.
回复

使用道具 举报

发表于 2006-11-20 11:20:02 | 显示全部楼层
遇到同样问题,
Uncompressing Linux.............................................................
. done, booting the kernel.
这句完了后就没反应,
请高人指点

[quote:19aa0c2f08="cefanty_qiu"]谢谢回复,但是接下来的问题是这样的::::

SMDK2410的板子不用修改,编译就能运行,看见启动信息了。我照坐,就是不行!!!
Copy linux kernel from 0x00030000 to 0x30008000, size = 0x001c0000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttySAC0 mac=00:0e:3a:aa:bb:cc"
MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux.............................................................
. done, booting the kernel.


在优龙的板子上跑2.6.11都没有问题。看他们的硬件和我们手头上的几乎是一样的
,在存储器配置和硬件地址分配上。SDRAM从0x30000000.
我追踪内核启动到arch\arm\kernel\head.S文件里.基本内容如下:

/*
* Kernel startup entry point.
* ---------------------------
*
* This is normally called from the decompressor code. The requirements
* are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
* r1 = machine nr.
*
* This code is mostly position independent, so if you link the kernel at
* 0xc0008000, you call this at __pa(0xc0008000).
*
* See linux/arch/arm/tools/mach-types for the complete list of machine
* numbers for r1.
*
* We're trying to keep crap to a minimum; DO NOT add any machine specific
* crap here - that's what the boot loader (or in extreme, well justified
* circumstances, zImage) is for.
*/
__INIT
.type stext, %function
ENTRY(stext)
msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ ensure svc mode
@ and irqs disabled
bl __lookup_processor_type @ r5=procinfo r9=cpuid
movs r10, r5 @ invalid processor (r5=0)?
moveq r0, #'p' @ yes, error 'p'
beq __error
bl __lookup_machine_type @ r5=machinfo
movs r8, r5 @ invalid machine (r5=0)?
moveq r0, #'a' @ yes, error 'a'
beq __error
bl __create_page_tables
/*
moveq r0, #'1'
bl printch
*/
/*
* The following calls CPU specific code in a position independent
* manner. See arch/arm/mm/proc-*.S for details. r10 = base of
* xxx_proc_info structure selected by __lookup_machine_type
* above. On return, the CPU will be ready for the MMU to be
* turned on, and r0 will hold the CPU control register value.
*/
ldr r13, __switch_data @ address to jump to after
@ mmu has been enabled
adr lr, __enable_mmu @ return (PIC) address
add pc, r10, #PROCINFO_INITFUNC



.type __switch_data, %object
__switch_data:
.long __mmap_switched
.long __data_loc @ r4
.long __data_start @ r5
.long __bss_start @ r6
.long _end @ r7
.long processor_id @ r4
.long __machine_arch_type @ r5
.long cr_alignment @ r6
.long init_thread_union+8192 @ sp

/*
* The following fragment of code is executed with the MMU on, and uses
* absolute addresses; this is not position independent.
*
* r0 = cp#15 control register
* r1 = machine ID
* r9 = processor ID
*/
.type __mmap_switched, %function
__mmap_switched:
adr r3, __switch_data + 4



ldmia r3!, {r4, r5, r6, r7}
cmp r4, r5 @ Copy data segment if needed
1: cmpne r5, r6
ldrne fp, [r4], #4
strne fp, [r5], #4
bne 1b

mov fp, #0 @ Clear BSS (and zero fp)
1: cmp r6, r7
strcc fp, [r6],#4
bcc 1b

ldmia r3, {r4, r5, r6, sp}
str r9, [r4] @ Save processor ID
str r1, [r5] @ Save machine type
bic r4, r0, #CR_A @ Clear 'A' bit
stmia r6, {r0, r4} @ Save control register values

b start_kernel
假如以上的代码执行无误,应该开始跳到C的入口start_kernel了。
我在这个之前插入打印
moveq r0, #'1'
bl printch
在b start_kernel前发现能执行到这里.输出"1"这个字符了。然后我移除这两条语句.

然后就应该执行/init/main.c里的start_kernel函数了





于是我跳到main.c的start_kernel函数,
/*
* Activate the first processor.
*/
/* we can deal with the case the UARTs are being run
* in FIFO mode, so that we don't hold up our execution
* waiting for tx to happen...
*/
asmlinkage void __init start_kernel(void)
{
char * command_line;
extern struct kernel_param __start___param[], __stop___param[];
/*
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
printk("kdjsfhskf\n");
mdelay(1000);
lock_kernel();
page_address_init();
printk(linux_banner);
setup_arch(&command_line);
setup_per_cpu_areas();

/*
* Mark the boot cpu "online" so that it can call console drivers in
* printk() and can access its per-cpu storage.
*/
smp_prepare_boot_cpu();

/*
* Set up the scheduler prior starting any interrupts (such as the
* timer interrupt). Full topology setup happens at smp_init()
* time - but meanwhile we still have a functioning scheduler.
*/
sched_init();
/*
* Disable preemption - early bootup scheduling is extremely
* fragile until we cpu_idle() for the first time.
*/
preempt_disable();
build_all_zonelists();
page_alloc_init();
printk("Kernel command line: %s\n", saved_command_line);
parse_early_param();
parse_args("Booting kernel", command_line, __start___param,
__stop___param - __start___param,
&unknown_bootoption);
sort_main_extable();
trap_init();
.....................

粗体的使我添加的。但是串口没有打印我插入的打印文字.......
难道,在head.S里没有正确跳转到start_kernel还是 printk()函数没有作用?????
继续研究哟!!![/quote]
回复

使用道具 举报

发表于 2006-12-2 13:38:06 | 显示全部楼层
请问为arm编译2.6内核大家都用什么版本的gcc编译器?为什么我用arm-linux-gcc.3.4.1时会出现cc1: error: invalid option `short-load-bytes'的错误,有网友建议这样改:
CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) –mshort-load-bytes –msoft-float –Wa,-mno-fpu -Uarm
AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
        替换为:
                CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -malignment-traps -msoft-float
                  AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float
这样改过之后编译确实通过了;但这样会不会造成什么功能损失?
也有网友说要用更高版本的gcc编译器,那么现在有什么版本的编译器可以解决这个问题?
期待各位高手教教小弟,感激不尽呀!
回复

使用道具 举报

发表于 2006-12-5 17:41:39 | 显示全部楼层

1

那时在printk函数中调用console_drivers->write失败。
我还在研究中。

[quote:4da61bb576="lemonade"]遇到同样问题,
Uncompressing Linux.............................................................
. done, booting the kernel.
这句完了后就没反应,
请高人指点

[quote:4da61bb576="cefanty_qiu"]谢谢回复,但是接下来的问题是这样的::::

SMDK2410的板子不用修改,编译就能运行,看见启动信息了。我照坐,就是不行!!!
Copy linux kernel from 0x00030000 to 0x30008000, size = 0x001c0000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock/3 init=/linuxrc console=ttySAC0 mac=00:0e:3a:aa:bb:cc"
MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux.............................................................
. done, booting the kernel.


在优龙的板子上跑2.6.11都没有问题。看他们的硬件和我们手头上的几乎是一样的
,在存储器配置和硬件地址分配上。SDRAM从0x30000000.
我追踪内核启动到arch\arm\kernel\head.S文件里.基本内容如下:

/*
* Kernel startup entry point.
* ---------------------------
*
* This is normally called from the decompressor code. The requirements
* are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
* r1 = machine nr.
*
* This code is mostly position independent, so if you link the kernel at
* 0xc0008000, you call this at __pa(0xc0008000).
*
* See linux/arch/arm/tools/mach-types for the complete list of machine
* numbers for r1.
*
* We're trying to keep crap to a minimum; DO NOT add any machine specific
* crap here - that's what the boot loader (or in extreme, well justified
* circumstances, zImage) is for.
*/
__INIT
.type stext, %function
ENTRY(stext)
msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ ensure svc mode
@ and irqs disabled
bl __lookup_processor_type @ r5=procinfo r9=cpuid
movs r10, r5 @ invalid processor (r5=0)?
moveq r0, #'p' @ yes, error 'p'
beq __error
bl __lookup_machine_type @ r5=machinfo
movs r8, r5 @ invalid machine (r5=0)?
moveq r0, #'a' @ yes, error 'a'
beq __error
bl __create_page_tables
/*
moveq r0, #'1'
bl printch
*/
/*
* The following calls CPU specific code in a position independent
* manner. See arch/arm/mm/proc-*.S for details. r10 = base of
* xxx_proc_info structure selected by __lookup_machine_type
* above. On return, the CPU will be ready for the MMU to be
* turned on, and r0 will hold the CPU control register value.
*/
ldr r13, __switch_data @ address to jump to after
@ mmu has been enabled
adr lr, __enable_mmu @ return (PIC) address
add pc, r10, #PROCINFO_INITFUNC



.type __switch_data, %object
__switch_data:
.long __mmap_switched
.long __data_loc @ r4
.long __data_start @ r5
.long __bss_start @ r6
.long _end @ r7
.long processor_id @ r4
.long __machine_arch_type @ r5
.long cr_alignment @ r6
.long init_thread_union+8192 @ sp

/*
* The following fragment of code is executed with the MMU on, and uses
* absolute addresses; this is not position independent.
*
* r0 = cp#15 control register
* r1 = machine ID
* r9 = processor ID
*/
.type __mmap_switched, %function
__mmap_switched:
adr r3, __switch_data + 4



ldmia r3!, {r4, r5, r6, r7}
cmp r4, r5 @ Copy data segment if needed
1: cmpne r5, r6
ldrne fp, [r4], #4
strne fp, [r5], #4
bne 1b

mov fp, #0 @ Clear BSS (and zero fp)
1: cmp r6, r7
strcc fp, [r6],#4
bcc 1b

ldmia r3, {r4, r5, r6, sp}
str r9, [r4] @ Save processor ID
str r1, [r5] @ Save machine type
bic r4, r0, #CR_A @ Clear 'A' bit
stmia r6, {r0, r4} @ Save control register values

b start_kernel
假如以上的代码执行无误,应该开始跳到C的入口start_kernel了。
我在这个之前插入打印
moveq r0, #'1'
bl printch
在b start_kernel前发现能执行到这里.输出"1"这个字符了。然后我移除这两条语句.

然后就应该执行/init/main.c里的start_kernel函数了





于是我跳到main.c的start_kernel函数,
/*
* Activate the first processor.
*/
/* we can deal with the case the UARTs are being run
* in FIFO mode, so that we don't hold up our execution
* waiting for tx to happen...
*/
asmlinkage void __init start_kernel(void)
{
char * command_line;
extern struct kernel_param __start___param[], __stop___param[];
/*
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
printk("kdjsfhskf\n");
mdelay(1000);
lock_kernel();
page_address_init();
printk(linux_banner);
setup_arch(&command_line);
setup_per_cpu_areas();

/*
* Mark the boot cpu "online" so that it can call console drivers in
* printk() and can access its per-cpu storage.
*/
smp_prepare_boot_cpu();

/*
* Set up the scheduler prior starting any interrupts (such as the
* timer interrupt). Full topology setup happens at smp_init()
* time - but meanwhile we still have a functioning scheduler.
*/
sched_init();
/*
* Disable preemption - early bootup scheduling is extremely
* fragile until we cpu_idle() for the first time.
*/
preempt_disable();
build_all_zonelists();
page_alloc_init();
printk("Kernel command line: %s\n", saved_command_line);
parse_early_param();
parse_args("Booting kernel", command_line, __start___param,
__stop___param - __start___param,
&unknown_bootoption);
sort_main_extable();
trap_init();
.....................

粗体的使我添加的。但是串口没有打印我插入的打印文字.......
难道,在head.S里没有正确跳转到start_kernel还是 printk()函数没有作用?????
继续研究哟!!![/quote][/quote]
回复

使用道具 举报

发表于 2006-12-15 13:40:25 | 显示全部楼层
刚学嵌入式,建了个群,欢迎大家来交流一下 34294740 ,
回复

使用道具 举报

发表于 2006-12-21 09:01:07 | 显示全部楼层
内核2.6.19,toolchain arm-linux-gcc-3.3.2, 使用ARM中的edb7211_defconfig这个默认的配制,我没有改动其中的设置。
结果出现了如下的错误,(按字面说好像是语法分析错误)请问怎么修正???
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arm-linux-ld:arch/arm/kernel/vmlinux.lds:1330: parse error
make: *** [.tmp_vmlinux1] 错误 1
回复

使用道具 举报

发表于 2006-12-21 09:02:23 | 显示全部楼层
内核2.6.19,toolchain arm-linux-gcc-3.3.2, 使用ARM中的lubbock_defconfig这个默认的配制,我没有改动其中的设置。
结果出现了如下的错误,(按字面说好像是语法分析错误)请问怎么修正???


  CC      fs/fat/file.o
  CC      fs/fat/inode.o
  CC      fs/fat/misc.o
  LD      fs/fat/fat.o
  LD      fs/fat/built-in.o
  CC      fs/jffs2/compr.o
In file included from fs/jffs2/compr.h:26,
                 from fs/jffs2/compr.c:16:
include/linux/jffs2_fs_i.h:44:24: #if with no expression
make[2]: *** [fs/jffs2/compr.o] 错误 1
make[1]: *** [fs/jffs2] 错误 2
make: *** [fs] 错误 2
[paul@localhost linux-2.6.16.19]$ vi include/linux/jffs2_fs_i.h

------------------------
我在下面一句中加了一对括号,如下,再编译
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2))
----------------------------------------------------------------

[paul@localhost linux-2.6.16.19]$ make
  CHK     include/linux/version.h
expr: syntax error
make[1]: “include/asm-arm/mach-types.h”是最新的。
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  CC      fs/jffs2/compr.o
  CC      fs/jffs2/dir.o
fs/jffs2/dir.c: In function `jffs2_lookup':
fs/jffs2/dir.c:81: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:81: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:81: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:81: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_readdir':
fs/jffs2/dir.c:124: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:124: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:124: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:124: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_create':
fs/jffs2/dir.c:203: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:203: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:203: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:203: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:204: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:204: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:204: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:204: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_unlink':
fs/jffs2/dir.c:232: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:232: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:232: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:232: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:233: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:233: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:233: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:233: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_link':
fs/jffs2/dir.c:251: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:251: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:251: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:251: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:252: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:252: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:252: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:252: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_symlink':
fs/jffs2/dir.c:331: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:331: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:331: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:331: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:390: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:390: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:390: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:390: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_mkdir':
fs/jffs2/dir.c:481: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:481: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:481: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:481: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:520: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:520: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:520: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:520: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_rmdir':
fs/jffs2/dir.c:567: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:567: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:567: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:567: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_mknod':
fs/jffs2/dir.c:632: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:632: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:632: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:632: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:676: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:676: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:676: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:676: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c: In function `jffs2_rename':
fs/jffs2/dir.c:739: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:739: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:739: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:739: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:766: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:766: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:766: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:766: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:791: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:791: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:791: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:791: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:798: error: structure has no member named `vfs_inode'
fs/jffs2/dir.c:798: warning: type defaults to `int' in declaration of `__mptr'
fs/jffs2/dir.c:798: warning: initialization from incompatible pointer type
fs/jffs2/dir.c:798: error: structure has no member named `vfs_inode'
make[2]: *** [fs/jffs2/dir.o] 错误 1
make[1]: *** [fs/jffs2] 错误 2
make: *** [fs] 错误 2

----------------------------
当用3.4.1来编译,就算加了括号,还是会有如下错误:
In file included from fs/jffs2/compr.h:26,
                 from fs/jffs2/compr.c:16:
include/linux/jffs2_fs_i.h:44:25: operator '>' has no left operand
make[2]: *** [fs/jffs2/compr.o] 错误 1
make[1]: *** [fs/jffs2] 错误 2
make: *** [fs] 错误 2

'>'明明已经有左操作数的,怎么会报错呢?搞不懂。
回复

使用道具 举报

发表于 2006-12-28 10:37:22 | 显示全部楼层
现在手头只有s3c4510B的开发板,也不知道有没有这个板子的patch,
要移植的话要做不少工作吧?
回复

使用道具 举报

发表于 2006-12-28 11:52:33 | 显示全部楼层

uda1341驱动问题:

请教:
       我用surperlp的uda1341程序在linux2.6.14.1上运行,为什么最后linux的内核启动信息里面没有uda初始化成功的信息输出,使用命令查找sound设备:ls -al /dev/sound/* ,显示信息:no that file or directory,好像是设备还是驱动根本没有挂上pci总线,哪里出了问题阿?各位高手,给小菜鸟一点提示阿,急!
       谢谢!
回复

使用道具 举报

发表于 2007-1-15 14:22:23 | 显示全部楼层
[quote:c2eac828fb="zcs008"][quote:c2eac828fb="91program"]console=ttyS0
应该改为:
console=ttySAC0

内核对串口的命名改变了。[/quote]


bootloader 是U-BOOT 怎么改?
我改了,但是还是一样,

U-Boot 1.1.2 (Nov 13 2006 - 13:59:4


U-Boot code: 33F80000 -> 33F9B26C  BSS: -> 33F9F368

RAM Configuration:

Bank #0: 30000000 64 MB

Flash:  1 MB

NAND:  64 MB

In:    serial

Out:   serial

Err:   serial

008_uboot # printenv

bootdelay=3

baudrate=115200

ethaddr=08:01:3e:26:8a:5b

filesize=d857c

fileaddr=30008000

netmask=255.255.255.0

ipaddr=192.168.0.188

serverip=192.168.0.35

bootargs=console=ttySAC0,115200

stdin=serial

stdout=serial

stderr=serial


Environment size: 225/65532 bytes

008_uboot # tftp 0x30008000 zImage

TFTP from server 192.168.0.35; our IP address is 192.168.0.188

Filename 'zImage'.

Load address: 0x30008000

Loading: #################################################################

         #################################################################

         ############################################

done

Bytes transferred = 886140 (d857c hex)

008_uboot # bootm

## Booting image at 30008000 ...

Bad Magic Number

008_uboot # go 0x30008000

## Starting application at 0x30008000 ...

Uncompressing Linux.......................................................... done, booting the kernel.[/quote]

U-BOOT可以使用setenv命令更改命令参数
setenv bootargs console=ttySAC0,115200

u-boot go命令不能传递命令行参数给内核,因此会在运行HEAD.S中检测CPU类型时错误而终止运行
另外,在U-BOOT配制文件(INCLUDE\CONFIGS\XXX.H)中需要定义下面宏,使能U-BOOT传递命令参数给内核
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_INITRD_TAG
#define CONFIG_CMDLINE_TAG

U-BOOT的BOOTM命令只能引导附加U-BOOT信息的内核,U-BOOT会在内核前加64个字节信息.
在U-BOOT目录下的TOOLS目录中有MKIMAGE工具制作U-BOOT能够引导内核
在U-BOOT README文件中有描述如下
Configuring the Linux kernel:
-----------------------------

No specific requirements for U-Boot. Make sure you have some root
device (initial ramdisk, NFS) for your target system.


Building a Linux Image:
-----------------------
...............

U-BOOT目录/tools/mkimage -A arm-O linux -T kernel -C none\
-a 30008000 -e 30008000  -n "Linux Kernel Image" -d zImage uImage
zImage 为LINUX压缩内核,这个在LINUX目录arch/arm/boot/makefile有介绍
quiet_cmd_uimage = UIMAGE  $@
      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
                   -C none -a $(ZRELADDR) -e $(ZRELADDR) \
                   -n 'Linux-$(KERNELRELEASE)' -d $< $@

由于U-BOOT在内核前添加64个字节,所以引导时应该考虑这个64个字节
tftp 30007fc0 uImage
bootm 30007fc0
nboot 30007fc0 0 40000
U-Boot 1.1.6 (Jan 15 2007 - 12:26:31)

DRAM:  64 MB
NAND:  64 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
#>> tftp 30007fc0 uImage

TFTP from server 192.168.1.10; our IP address is 192.168.1.20
Filename 'uImage'.
Load address: 0x30007fc0
Loading: #################################################################
         #################################################################
         #################################################################
         #######
done
Bytes transferred = 1029864 (fb6e8 hex)
Automatic boot of image at addr 0x30007fc0 ...
## Booting image at 30007fc0 ...
   Image Name:   Linux Kernel Image
   Created:      2007-01-12   5:48:00 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1029800 Bytes = 1005.7 kB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux....................................................................... done, booting the kernel.
Linux version 2.4.18-rmk7-pxa1 (root@lqmpc2) (gcc version 2.95.2 20000516 (release) [Rebel.com]) #265 二 3月 8 18:41:32 CST 2005
CPU: ARM/CIRRUS Arm920Tsid(wb) revision 0
Machine: Stone-2410
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,115200
TCNTB4 = 15843
Console: colour dummy device 80x30
Calibrating delay loop... 50.58 BogoMIPS
Memory: 64MB = 64MB total
Memory: 62100KB available (1718K code, 571K data, 76K init)
Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-1 22:30 , Processed in 0.066328 second(s), 12 queries .

© 2021 Powered by Discuz! X3.5.

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