如果直接使用mount -t vfat -o iocharset=cp936 /dev/mtdblock3 /mnt挂载文件系统,那么会提示:
"mount: mounting /dev/mtdblock3 on /mnt failed: Invalid argument"
nls_cp936.ko包含cp936和gb2312这2种字符集.
luther@gliethttp:/vobs/works/linux-2.6.30.4$ make menuconfig
File systems --->
-*- Native language support --->
Simplified Chinese charset (CP936, GB2312) // 当然也可以直接buit-in进内核
luther@gliethttp:/vobs/works/linux-2.6.30.4$ make modules
Building modules, stage 2.
MODPOST 2 modules
CC drivers/scsi/scsi_wait_scan.mod.o
LD [M] drivers/scsi/scsi_wait_scan.ko
CC fs/nls/nls_cp936.mod.o
LD [M] fs/nls/nls_cp936.ko
luther@gliethttp:/vobs/works/linux-2.6.30.4$ cp fs/nls/nls_cp936.ko /vobs/nfs
luther@gliethttp:/vobs/works/linux-2.6.30.4$ arm-linux-strip -s /vobs/nfs/nls_cp936.ko
# mount -t vfat /dev/mtdblock3 /mnt/
# ls /mnt/
busybox iso_????????
# umount /mnt/
# insmod /nfs/nls_cp936.ko
# mount -t vfat -o iocharset=cp936 /dev/mtdblock3 /mnt/
或者
# mount -t vfat -o iocharset=gb2312 /dev/mtdblock3 /mnt/
# ls /mnt/
busybox iso_开发板光盘
#
阅读(3352) | 评论(2) | 转发(0) |