reason:gcc 版本不兼容,更换新版试试
reason:开发板上的NFS 版本与你PC机上的不兼容,挂载时加个OPTION nfsvers=版本号(4,3,2)
man 5 nfs 查看了下nfsvers=n 的说明如下:
nfsvers=n The NFS protocol version number used to
contact the server's NFS service. If the
server does not support the requested ver‐
sion, the mount request fails. If this
option is not specified, the client negoti‐
ates a suitable version with the server,
trying version 4 first, version 3 second,
and version 2 last.
List of all partitions:
1f00 1024 mtdblock0 (driver?)
1f01 3840 mtdblock1 (driver?)
1f02 3072 mtdblock2 (driver?)
1f03 61440 mtdblock3 (driver?)
1f04 61440 mtdblock4 (driver?)
No filesystem could mount root, tried: ext3 ext2 cramfs vfat msdos iso9660 romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
reason:内核没有添加对YAFFS2的支持,添加。。后来看了看自己的配置其实是添加了的,但还是有问题,我就直接保存成.config 再编译。ok
综上所述得知更改的配置并没有保存在.config中(我是用make s3c2410_defconf 加载的默认配置改的,改好自己保存成一个配置文件 ,后面是用LOAD加载进来的,改后直接 保存了就make zImage,结果怎么都不成功。不知道什么BUG)
reason:'\'符号后面多了空格,删除空格就OK
drivers/net/cs8900.c: In function `cs8900_probe':
drivers/net/cs8900.c:461: error: `S3C2410_GPGCON' undeclared (first use in this function)
drivers/net/cs8900.c:461: error: (Each undeclared identifier is reported only once
drivers/net/cs8900.c:461: error: for each function it appears in.)
drivers/net/cs8900.c:462: error: `S3C2410_EXTINT1' undeclared (first use in this function)
drivers/net/cs8900.c:463: error: `S3C2410_BWSCON' undeclared (first use in this function)
drivers/net/cs8900.c:464: error: `S3C2410_BANKCON3' undeclared (first use in this function)
drivers/net/cs8900.c:461: warning: statement with no effect
drivers/net/cs8900.c:462: warning: statement with no effect
drivers/net/cs8900.c:463: warning: statement with no effect
drivers/net/cs8900.c:464: warning: statement with no effect
make[2]: *** [drivers/net/cs8900.o] Error 1
make[1]: *** [drivers/net] Error 2
reason:S3C2410的宏没定义,检查发现编译2440内核时需要选中system type->s3c2410 machines->SMDK2410/A9M2410
todo:make menuconfig
Device Drivers --->Character devices ---> (256)Maximum number of legacy PTY in use 将256改小 我此处改为64
同样到上面处,在选 Serial drivers ---> (4) Maximum number of non-legacy 8250/16550 serial ports 可改tty
# Warning: could not register server usb 1-1.2: new full speed USB device using s3c2410-ohci and address 3 usb 1-1.2: configuration #1 chosen from 1 choice scsi0 : SCSI emulation for USB Mass Storage devices usb 1-1.2: New USB device found, idVendor=0781, idProduct=5567 usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1.2: Product: Firebird USB Flash Drive usb 1-1.2: Manufacturer: SanDisk usb 1-1.2: SerialNumber: 4C532000051130122550 QDir::readDirEntries: Cannot read the directory: /usr/lib/ipkg/externinfo scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.26 PQ: 0 ANSI: 5 sd 0:0:0:0: [sda] 15633408 512-byte hardware sectors: (8.00 GB/7.45 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] 15633408 512-byte hardware sectors: (8.00 GB/7.45 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Assuming drive cache: write through sda:<7>usb-storage: queuecommand called sda1 sd 0:0:0:0: [sda] Attached SCSI removable disk sd 0:0:0:0: Attached scsi generic sg0 type 0
如下命令查询 # cat /proc/partitions major minor #blocks name 31 0 1024 mtdblock0 31 1 3840 mtdblock1 31 2 3072 mtdblock2 31 3 61440 mtdblock3 31 4 61440 mtdblock4 8 0 7816704 sda 8 1 7816688 sda1 # ls /dev/sda ls: /dev/sda: No such file or directory dev/下没有sda设备。。
直接手动mknod 如下:
# mknod /dev/sda b 8 0
# mknod /dev/sda1 b 8 1
# mount /dev/sda1 /mnt ok
Capability Informations: driver: uvcvideo card: USB2.0 PC Camera bus_info: usb-0000:02:03.0-1 version: 3.5.7 capabilities: 04000001 VIDIOC_S_FMT failed (-1)在开发板上运行camera程序时总是出现VIDIOC_S_FMT failed (-1)错误,查看源码发现是在 ret = ioctl(fd, VIDIOC_S_FMT, &fmt);时出错,用源码在PC机上调试运行却没问题,可以通过此条语句,goolgle也没查到什么有用的信息。后来在PC机上调试时发现在有一个调试程序的情况下再对该程序重启一个进程调试也出现这个问题,怀疑出现这个问题的原因是video0设备被别的程序占用了,所以无法再次设置FMT,
对比相同大小和位色的图片发现在类型属性后面总是多出两字节,正常的BMP格式头部信息应该是14+40=54个字节,结果此处却是56,追查发现是
sizeof(BITMAPFILEHEADER)=16 但
typedef unsigned short int WORD;
typedef unsigned long int DWORD;
typedef long int LONG;
/* Header of the bitmap file */
typedef struct {
WORD bfType;
DWORD bfSize;
WORD bfReserved1;
WORD bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER;
读出sizeof(WORD)=2,sizeof(DWORD)=4 那此处 sizeof(BITMAPFILEHEADER)=14 才应该是对的,可无论怎样都是16
MSDN:When applied to a structure type or variable, sizeof returns the actual size, which may include padding bytes inserted for alignment.
多出来的是padding bytes,为了对齐出现的,如何解决?
#pragma pack(push,1)
typedef struct {
WORD bfType;
DWORD bfSize;
WORD bfReserved1;
WORD bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER;
#pragma pack(pop)
struct my_align_struct {
uint32 u0:8;
uint32 u1:8;
uint32 u2:8;
uint32 u3:16;
}__attribute__((packed, aligned(1)))
下载最新版源码git clonegit://www.aleph1.co.uk/yaffs2,打补丁,刚开始时打补丁用的命令是:
./patch-ker.sh c s /root/linux-test/linux-2.6.32.2,后来出错建议我s 改用m,内核版本太低只能用m,改正好OK,之后配置编译时却出了一堆问题:
fs/yaffs2/yaffs_vfs.c:66:26: error: yaffs_mtdif1.h: No such file or directory
fs/yaffs2/yaffs_vfs.c:67:26: error: yaffs_mtdif2.h: No such file or directory
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_link':
fs/yaffs2/yaffs_vfs.c:309: error: implicit declaration of function 'set_nlink'
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_setattr':
处理方法,删除原来的yaffs2文件,重新打补丁./patch-ker.sh c m /root/linux-test/linux-2.6.32.2,
错误原因:第一次打补丁时用的s参数,后来虽然改了m,但先前的文件却是保留下来了。
百度查询得知:要想自动创建设备结点,不仅要驱动中利用udev(mdev)来实现设备文件的自动创建,还要文件系统支持udev(mdev)才行,坑爹的飞凌板子里的文件系统不支持,所以一直不能自动创建 ,还以为是我UVC驱动移植错了。。对busybox配置加入mdev机制,编译自己的文件系统。
经验证直接用飞凌现有的文件系统更改下 /linuxrc 文件重启后就可以了。
#!/bin/sh
#echo "mount /etc as ramfs"
#/bin/mount -n -t ramfs ramfs /etc
#/bin/cp -a /mnt/etc/* /etc
#/bin/mount -n -t ramfs ramfs /var/state/dhcp
#/bin/mount -n -t ramfs ramfs /var/log/boa
#/bin/mount -n -t ramfs ramfs /usr/Setting
#/bin/cp -a /mnt/Setting/* /usr/Setting
#/bin/mount -n -t ramfs ramfs /tmp
#/bin/cp -a /mnt/etc/* /etc
/bin/mount -t proc proc /proc
/bin/mount -t sysfs sysfs /sys
/bin/mount -t tmpfs tmpfs /dev
mkdir /dev/pts
mkdir /dev/shm
/bin/echo /sbin/mdev > /proc/sys/kernel/hotplug
/sbin/mdev -s
exec /sbin/init
可参考:http://blog.csdn.net/geekcome/article/details/6570072
查看了下VIDIOCSPICT的定义原来只能在V4L1中支持,在V4L2中是不支持这个定义的原文说明“V4L2 has no equivalent of theVIDIOCGPICT
andVIDIOCSPICT
ioctl and structvideo_picture”,https://linuxtv.org/downloads/v4l-dvb-apis/compat.html#id-1.4.10.3.13
在驱动中选中兼容v4l1也不行,搜了一堆也没用,只能改servfox的代码,工程太大对于我们这种菜鸟来说就放弃吧,
工作还是要继续的,天不负苦心人呀,找个Mjpg-stream是可以的。mjpg-stream移植请见http://www.embedu.org/column/Column331.htm
正解是:ln -sfn 目标 待更新的旧链接 ,n的意思自己man ln看吧
/libtool: line 950: arm-none-linux-gnueabi-ranlib: command not found
make[1]: *** [install-libLTLIBRARIES] Error 127
寻找arm-none-linux-gnueabi-ranlib是存在的,如果改变下prefix的路径到有权限的目录下,这时使用make install是正常的,使用sudo make install却不正常,那说明在root用户中的编译器是没有这个的命令的,需要配置下root用户下的交叉编译连接,sudo su转到root用户查看arm-linux-gcc -v果然是command not found,查看/etc/profile又是正常的有arm的交叉路径,source一下后正常了,在此root用户空间make install正常了,但切回usr的用户后sudo make install仍出这个问题。。只能通过su命令切换到root用户下,配置好交叉环境后make install,或者在usr用户下,指定的prefix目录有操作权限。如果有其它办法请告知。