linux中的u32问题,Linux内核移植过程中遇到的问题

在移植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

阅读(2489) | 评论(0) | 转发(0) |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值