编译drives/net/eeprom100.c出错

7 views
Skip to first unread message

duwenyong

unread,
Jun 9, 2009, 10:17:55 PM6/9/09
to tmlinux
 
编译drives/net/eeprom100.c出错
 
  CC      drivers/net/eepro100.o
"drivers/net/eepro100.c", line 383: error: type containing an unknown-size array is not allowed
     struct descriptor frame ;
                       ^
1 error detected in the compilation of "drivers/net/eepro100.cil.c".
tmcc: tmcfe command failed
make[2]: *** [drivers/net/eepro100.o] 错误 1
 
/////////////////////////////////////////////////////
原因是struct descriptor结构中的params数组总数为0
struct descriptor {     /* A generic descriptor. */
volatile s32 cmd_status; /* All command and status fields. */
u32 link;     /* struct descriptor *  */
unsigned char params[0];
};

duwenyong
2009-06-10

duwenyong

unread,
Jun 10, 2009, 2:01:44 AM6/10/09
to tmlinux, camelguo
为了不想每次启动后都手动去mount,我在export/etc/创建了fstab文件,内容如下:

#
# /etc/fstab
#
/dev/hda1               /mnt/hda1               ext2    defaults        1 1
proc                    /proc                   proc    defaults        0 0
#
 
但是启动后仍然没有mount,还是要手动去mount?
 

Guo Hongruan

unread,
Jun 10, 2009, 3:51:36 AM6/10/09
to tml...@googlegroups.com
Hi Duwenyong,
This problem is very simple. Please do the following checking:

1. First check your root file system context, like below:
cd $your_target_directory/etc/
ls -la
And then the results should be like below:
guohr@ghr-notebook-02:~/workdir/tmlinux/export/etc> ls -la
total 56
drwxr-xr-x 4 guohr users 4096 2009-06-10 15:21 .
drwxrwxrwx 14 guohr users 16384 2009-06-10 15:21 ..
-rw-r--r-- 1 guohr users 1168 2009-06-04 16:53 fstab
-rw-r--r-- 1 guohr users 487 2009-06-04 16:53 group
-r-------- 1 root root 420 2009-06-04 16:53 gshadow
-rw-r--r-- 1 guohr users 8 2009-06-04 16:53 hostname
drwxr-xr-x 3 guohr users 4096 2009-06-10 15:22 init.d
-rw-r--r-- 1 guohr users 330 2009-06-04 16:53 inittab
-rw-r--r-- 1 guohr users 1224 2009-06-04 16:53 passwd
-r-------- 1 root root 814 2009-06-04 16:53 shadow
Do you have the above files or directories?
2. Then when you boot up trimedia board using tmlinux, please check
whether or not the following message printed:
"Welcome to tmlinux"

please tell me the result as soon as possible.

Thanks a lot.

On Wed, 10 Jun 2009 14:01:44 +0800, duwenyong <duwe...@foxmail.com>
wrote:
--
Guo Hongruan, Embedded Linux Consultant
Mobile: +86-0-13484056007
Skype: camelguo
http://www.gulessoft.com

Guo Hongruan

unread,
Jun 10, 2009, 3:51:39 AM6/10/09
to tml...@googlegroups.com
CIL can not translate zero-size array, like below. You should have to
modified struct decriptor and the references manually. Please see:

struct ip_options in include/linux/ip.h and all references of struct
ip_options.

Thanks a lot!


On Wed, 10 Jun 2009 10:17:55 +0800, duwenyong <duwe...@foxmail.com>
wrote:
> duwenyong
> 2009-06-10

duwenyong

unread,
Jun 10, 2009, 9:15:23 PM6/10/09
to tmlinux
OK了,谢谢!
没有去更新filesystem。其实就是把filesystem/fs/etc copy到export/etc。
 
另外个问题,mount nfs会出现错误
执行命令:
mount -t nfs 192.168.7.70:/home/tmlinux/export  /mnt/nfs
结果:
mount: Mounting 192.168.7.70:/home/tmlinux/export/ on /mnt/nfs failed: Invalid argument
 
参数有错吗?在Fedora Core上都可以这样mount的。
但如果从NFS加载root启动以可以正常启动
CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.7.70:/home/tmlinux/export/ ip=192.168.7.25:192.168.7.1:192.168.7.1:255.255.255.0:tmlinux:eth0:off"
 
 
 

duwenyong
2009-06-11

发件人: Guo Hongruan
发送时间: 2009-06-10 16:00:52
收件人: tmlinux
抄送:
主题: [tmlinux] Re: /etc/fstab无效

Guo Hongruan

unread,
Jun 11, 2009, 4:20:58 AM6/11/09
to tml...@googlegroups.com
busybox中的mount是一个精简的mount,里面有许多功能都去掉了,这点使得它更加适合嵌入式应用。
你现确认一下busybox中的mount是否支持nfs。

On Thu, 11 Jun 2009 09:15:23 +0800, duwenyong <duwe...@foxmail.com>
wrote:

> OK了,谢谢!
> 没有去更新filesystem。其实就是把filesystem/fs/etc copy到export/etc。
>
> 另外个问题,mount nfs会出现错误
> 执行命令:
> mount -t nfs 192.168.7.70:/home/tmlinux/export /mnt/nfs
> 结果:
> mount: Mounting 192.168.7.70:/home/tmlinux/export/ on /mnt/nfs failed:
> Invalid argument
>
> 参数有错吗?在Fedora Core上都可以这样mount的。
> 但如果从NFS加载root启动以可以正常启动
> CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs rw
> nfsroot=192.168.7.70:/home/tmlinux/export/
> ip=192.168.7.25:192.168.7.1:192.168.7.1:255.255.255.0:tmlinux:eth0:off"
>
>
>
>
>
>

> duwenyong
> 2009-06-11

Reply all
Reply to author
Forward
0 new messages