天嵌 ARM开发社区

 找回密码
 注册
查看: 1300|回复: 1

今天编写第一个hello的模块,遇到的小问题

[复制链接]
wang12zhedi 发表于 2012-9-7 17:42:40 | 显示全部楼层 |阅读模式
今天编写HELLO的模块时有一个疑惑,我是在虚拟机安装的ubuntu10.04,移植linux-2.6.30.4
第一次按照《天嵌科技出品-Linux移植之Step By Step_V4.5_20100605.pdf》一步一步移植内核 构建文件系统,编写hello模块,但烧写到板子时出错:


block 1229 is bad
block 1243 is bad
block 1679 is bad
block 1805 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 116K
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
[<c002b700>] (unwind_backtrace+0x0/0xdc) from [<c0290b98>] (panic+0x40/0x110)
[<c0290b98>] (panic+0x40/0x110) from [<c00254c0>] (init_post+0xcc/0xf4)
[<c00254c0>] (init_post+0xcc/0xf4) from [<c000859c>] (kernel_init+0xb8/0xe0)
[<c000859c>] (kernel_init+0xb8/0xe0) from [<c004714c>] (do_exit+0x0/0x578)
[<c004714c>] (do_exit+0x0/0x578) from [<00000001>] (0x1)
烧写文件系统时信息如下
[r] Reboot u-boot
[t] Test Linux Image (zImage)
[q] quit from menu
Enter your selection: 6
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:30000000h,TOTAL:11290762]
RECEIVED FILE SIZE:11290762 (648KB/S, 17S)

NAND erase: device 0 offset 0x500000, size 0xfb00000
Skipping bad block at  0x00d80000                                            
Skipping bad block at  0x05160000                                            
Skipping bad block at  0x066e0000                                            
Skipping bad block at  0x09e80000                                            
Skipping bad block at  0x0a040000                                            
Skipping bad block at  0x0d6c0000                                            
Skipping bad block at  0x0e680000                                          
Erasing at 0xffe0000 -- 100% complete.
OK
经过检查后第二次没有做cp -f rb rx rz sb sx sz /opi/EmbedSky/……这一步,也就是教程添加内容的最后一步,烧写文件系统时信息
[q] quit from menu
Enter your selection: 6
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:30000000h,TOTAL:12990922]
RECEIVED FILE SIZE:12990922 (634KB/S, 20S)

NAND erase: device 0 offset 0x500000, size 0xfb00000
Skipping bad block at  0x00d80000                                            
Skipping bad block at  0x05160000                                            
Skipping bad block at  0x066e0000                                            
Skipping bad block at  0x09e80000                                            
Skipping bad block at  0x0a040000                                            
Skipping bad block at  0x0d6c0000                                            
Skipping bad block at  0x0e680000                                            
Erasing at 0xffe0000 -- 100% complete.
OK

NAND write: device 0 offset 0x500000, size 0xc639c0

Bad block at 0xd80000 in erase block from 0xd80000 will be skipped
Writing data at 0x1143000 -- 100% complete.
12990912 bytes written: OK
烧写完成后能进入控制台,并且把.ko文件放在文件系统的lib目录运行正确
block 1805 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 116K
/etc/rc.d/init.d/httpd: line 17: /sbin/boa: not found

Please press Enter to activate this console.
[root@myself /]#
[root@myself /]#
[root@myself /]#cd lib/
[root@myself /lib]#insmod EmbedSky_hello.ko

     Hello,EmbedSky!

This is first driver program.

[root@myself /lib]#rmmod EmbedSky_hello.ko

     Exit!

Goodbye EmbedSky!

[root@myself /lib]#
但无法通过rz命令将.ko文件复制到开发板
提示没有rz命令,

这是怎么回事


问题1:请注意 第一次烧写时文件系统大小为
Now, Downloading [ADDRESS:30000000h,TOTAL:11290762]
RECEIVED FILE SIZE:11290762 (648KB/S, 17S)
第二次烧写时文件系统大小为
Now, Downloading [ADDRESS:30000000h,TOTAL:12990922]
RECEIVED FILE SIZE:12990922 (634KB/S, 20S)
为什么在usr/bin里复制 rz rx rb sz sx sb 后文件系统反而变小啦


问题二
为什么没有复制rb rx rz sb sx sz 却能进入控制台,复制后却出现上边的错误


TQ-lkp 发表于 2012-9-10 11:22:21 | 显示全部楼层
rz只能在secureCRT中用啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-7-1 18:29 , Processed in 1.031250 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表