在移植Linux内核和yaffs2文件系统时,可能会出现这样的情况:
......
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
Partially written block 34 detected
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 164K
init started: BusyBox v1.7.0 (2011-03-04 15:32:30 CST)
starting pid 901, tty '': '/etc/init.d/rcS'
ifconfig: SIOCSIFADDR: No such device
Please press Enter to activate this console.
starting pid 906, tty '/dev/ttySAC0': '/bin/sh'
/ #
/ #
/ #
这样,虽然可以进入到linux系统,但是如前一样,会出现很多的提示,Partially written block ** detected,
用MINI2440模拟U盘
参考在mini2440上使用USB Gadget功能,修改file_storage.c与s3c2410_udc.c:
1----------------------------------------------------------------------------------
--- a/drivers/usb/gadget/file_storage.c 2008-09-01 11:13:03.000000000 -0400
+++ b/drivers/usb/gadget/file_storage.c 2008-09-01 11:16:41.000000000 -0400
@@ -1463,7 +1463,8 @@
if (rc >= 0 && rc != DELAYED_STATUS) {
rc = min(rc, w_length);
fsg->ep0req->length = rc;
- fsg->ep0req->zero = rc < w_length;
+ fsg->ep0req->zero = rc < w_length
+ && (rc % gadget->ep0->maxpacket) == 0;
fsg->ep0req_name = (ctrl->bRequestType & USB_DIR_IN ?
"ep0-in" : "ep0-out");
rc = ep0_queue(fsg);
2------------------------------------------------------------------------
Index: linux-2.6.28.8/drivers/usb/gadget/s3c2410_udc.c
===================================================================
--- linux-2.6.28.8.orig/drivers/usb/gadget/s3c2410_udc.c 2009-03-17 21:14:28.000000000 +0100
+++ linux-2.6.28.8/drivers/usb/gadget/s3c2410_udc.c 2009-03-17 21:14:46.000000000 +0100
@@ -843,6 +843,7 @@
u32 ep_csr1;
u32 idx;
+handle_ep_again:
if (likely (!list_empty(&ep->queue)))
req = list_entry(ep->queue.next,
struct s3c2410_request, queue);
@@ -882,6 +883,8 @@
if ((ep_csr1 & S3C2410_UDC_OCSR1_PKTRDY) && req) {
s3c2410_udc_read_fifo(ep,req);
+ if (s3c2410_udc_fifo_count_out())
+ goto handle_ep_again;
}
}
}
http://blog.csdn.net/hongtao_liu/archive/2009/09/15/4555645.aspx
挂载U盘时,不能显示U盘里的中文,解决方法如下:
有mount的时候加入-o iocharset=GB18030或-o iocharset=GBK,比如mount -o iocharset=GB18030 -t msdos /dev/sda1 /mnt/c 这样在中文环境就可以正确显示中文文件名了。
不过如果分区类型是fat32,用种方法就会报错。我们就可以用加 -o iocharset=cp936,codepage=936来处理。比如 mount -o iocharset=cp936,codepage=936 -t vfat /dev/sda2 /mnt/d
阅读(3295) | 评论(0) | 转发(0) |