主题 : mini2440 无法mount ext2文件系统的SD卡 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 8976
精华: 0
发帖: 5
金钱: 50 两
威望: 25 点
综合积分: 10 分
注册时间: 2009-09-13
最后登录: 2009-09-27
楼主  发表于: 2009-09-13 11:20

 mini2440 无法mount ext2文件系统的SD卡

1.为了支持ext2文件系统的SD卡,make menuconfig在file system里将ext2编译进去(非模块形式),然后用make zImage重新编译了内核.
2.这样mount -t ext2 /dev/sdcard /mnt/sdcard 可以执行成功,但查看mount的结果有error:
[root@FriendlyARM /]# mount
rootfs on / type rootfs (rw)
/dev/root on / type yaffs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /proc/bus/usb type usbfs (rw)
none on /dev type ramfs (rw)
none on /dev/pts type devpts (rw,mode=622)
tmpfs on /dev/shm type tmpfs (rw)
none on /tmp type ramfs (rw)
none on /var type ramfs (rw)
/dev/sdcard on /usr/local type ext2 (rw,errors=continue)

这样进入 /mnt/sdcard 可以ls列出文件,也可以访问文件,但太长的文件无法访问(超过11个字符时),是怎么回事?ext2文件系统是支持长文件名的哦,不解。谢谢。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-09-13 12:15
/dev/sdcard on /usr/local type ext2 (rw,errors=continue)

这里的error=continue并不是mount出错的意思,而是mount ext2文件系统的一个选项。
至于你说的无法访问太长文件名的问题,把错误和当时串口终端上的输出贴出来看看吧
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 8976
精华: 0
发帖: 5
金钱: 50 两
威望: 25 点
综合积分: 10 分
注册时间: 2009-09-13
最后登录: 2009-09-27
2楼  发表于: 2009-09-13 12:20
感谢。SD卡上有mysql目录,执行my_print_defaults会说找不到文件,而执行
mysqld_safe可以找到文件。。。。
[root@FriendlyARM local]# cd mysql
[root@FriendlyARM mysql]# ls
bin         include     libexec     share
data        lib         mysql-test  sql-bench
[root@FriendlyARM mysql]# cd bin
[root@FriendlyARM bin]# ls
innochecksum                mysql_zap
msql2mysql                  mysqlaccess
my_print_defaults           mysqladmin
myisam_ftdump               mysqlbinlog
myisamchk                   mysqlbug
myisamlog                   mysqlcheck
myisampack                  mysqld_multi
mysql                       mysqld_safe
mysql_client_test           mysqldump
mysql_client_test_embedded  mysqldumpslow
mysql_config                mysqlhotcopy
mysql_convert_table_format  mysqlimport
mysql_find_rows             mysqlshow
mysql_fix_extensions        mysqlslap
mysql_fix_privilege_tables  mysqltest
mysql_install_db            mysqltest_embedded
mysql_secure_installation   perror
mysql_setpermission         replace
mysql_tzinfo_to_sql         resolve_stack_dump
mysql_upgrade               resolveip
mysql_waitpid
[root@FriendlyARM bin]# ./my_print_defaults
-/bin/sh: ./my_print_defaults: not found
[root@FriendlyARM bin]#
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-09-13 14:07
把这个my_print_defaults和mysqld_safe传上来看看吧
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 8976
精华: 0
发帖: 5
金钱: 50 两
威望: 25 点
综合积分: 10 分
注册时间: 2009-09-13
最后登录: 2009-09-27
4楼  发表于: 2009-09-13 14:58
my_print_defaults
级别: 新手上路
UID: 8976
精华: 0
发帖: 5
金钱: 50 两
威望: 25 点
综合积分: 10 分
注册时间: 2009-09-13
最后登录: 2009-09-27
5楼  发表于: 2009-09-13 14:59
压缩后的附件
附件: bin.rar (211 K) 下载次数:6
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2009-09-13 21:30
my_print_defaults和mysqld_safe是不同类型的文件。前者是动态链接的ELF格式可执行文件而后者是Shell脚本。我想"-/bin/sh: ./my_print_defaults: not found"的出错信息多半是因为my_print_defaults的ABI类型和你所用的内核的不相匹配。你目前用的内核镜像和文件系统镜像是哪一个?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 8976
精华: 0
发帖: 5
金钱: 50 两
威望: 25 点
综合积分: 10 分
注册时间: 2009-09-13
最后登录: 2009-09-27
7楼  发表于: 2009-09-14 08:27
哦,应该是这个问题,内核和文件系统是光盘自带的最新版本(这几天刚买的),交叉编译工具是4.3.2的,而我们现有的程序是用3.4.1的交叉编译工具编译的,那就有两种方法:
1) 用3.4.1的交叉编译工具编译最新的内核(不要EABI选项),再编译文件系统,这样我们原有的程序可以直接执行,但在烧写内核和文件系统后,启动有如下问题:
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
init进程找不到是什么问题?
2)用4.3.2工具重新编译我们原有的程序。这个还没试。
谢谢版主的指导:)
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2009-09-14 10:52
如果你用光盘上的2.6.29的内核+文件系统镜像的话,必须用4.3.2的工具链重新编译mysql
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 8872
精华: 0
发帖: 11
金钱: 95 两
威望: 43 点
综合积分: 22 分
注册时间: 2009-09-09
最后登录: 2011-03-25
9楼  发表于: 2009-09-16 00:15
把mysql整到2440上了,