第一范文网 - 专业文章范例文档资料分享平台

linux-2.6.30.4移植至2440开发板

来源:用户分享 时间:2025/5/29 4:57:14 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

174 depends on MTD 175 help

176 Set 64MB Nand parts 177

178 config 128MB_NAND

179 boolean \ 180 depends on MTD 181 help

182 Set 128MB Nand parts 183

184 config more_than_256MB_NAND

185 boolean \ 186 depends on MTD 187 help

188 Set 256MB~1GB Nand parts 189

190 endchoice

注:如果在make menuconfig中选中64MB_NAND,则在.config表现形式如下: CONFIG _64MB_NAND=y

这实际是给C源文件提供预编译变量,如#if defined(CONFIG_64MB_NAND)....... 这个过程就是实现了内核的定制,比如新增Nand驱动、或者去除wireless驱动。。。

十、移植yaffs2文件系统 1、获取yaffs2源码

http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/

2、在内核中添加对yaffs2的支持

在刚下载的yaffs2源码中,执行:

./patch-ker.sh c ../linux-2.6.30.4 (两个文件夹放一起)

此时在内核fs目录下,新增“yaffs2”目录,同时fs/目录下面的Makefile文件和Kconfig文件也添加了yaffs2的配置和编译条件。

3、在配置单中添加对yaffs2的支持

$make menuconfig File systems --->

[*] Miscellaneous filesystems ---> <*> YAFFS2 file system support

注意:假如在内核中没有添加对yaffs2的支持,则出现找不到或者挂载文件系统是失败的提示:

List of all partitions:

0100 4096 ram0 (driver?) 0101 4096 ram1 (driver?) 0102 4096 ram2 (driver?) 0103 4096 ram3 (driver?) 0104 4096 ram4 (driver?) 0105 4096 ram5 (driver?) 0106 4096 ram6 (driver?) 0107 4096 ram7 (driver?) 0108 4096 ram8 (driver?) 0109 4096 ram9 (driver?) 010a 4096 ram10 (driver?) 010b 4096 ram11 (driver?) 010c 4096 ram12 (driver?) 010d 4096 ram13 (driver?) 010e 4096 ram14 (driver?) 010f 4096 ram15 (driver?) 1f00 256 mtdblock0 (driver?) 1f01 2048 mtdblock1 (driver?)

1f02 63168 mtdblock2 (driver?)

No filesystem could mount root, tried: ext3 ext2 cramfs msdos vfat romfs

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2) 4、yaffs2移植完成,重新编译内核

十一、在内核中添加tmpfs支持

如果不添加tmpfs支持,那么将会出现那/tmp挂载失败的提示。关于tmpfs的作用待研究。 mount: mounting tmpfs on /tmp failed: Invalid argume 文件系统配置:

[root@ /]#cat /etc/fstab proc /proc proc defaults 0 0 tmpfs /tmp tmpfs defaults 0 0 sysfs /sys sysfs defaults 0 0 tmpfs /dev tmpfs defaults 0 0 var /dev tmpfs defaults 0 0 File systems --->

Pseudo filesystems --->

[*] Virtual memory file system support (former shm fs) [*] Tmpfs POSIX Access Control Lists

十二遇到的问题及解决方案

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

1. 内核配置选项

--- Real Time Clock [*] Set system time from RTC on startup and resume

(rtc0) RTC used to set the system time [ ] RTC debug support *** RTC interfaces *** [*] /sys/class/rtc/rtcN (sysfs) [*] /dev/rtcN (character devices) [ ] RTC UIE emulation on dev interface

*** on-CPU RTC drivers *** <*> Samsung S3C series SoC RTC

2. linux kernel 中 已经支持S3C2410的RTC,但是并没有添加到平台设备初始化数组中,所以系统启动时并不会初始化这一部分,需要修改文件mach-smdk.c

static struct platform_device *smdk2410_devices[] __initdata = { &s3c_device_ohci, &s3c_device_lcd, &s3c_device_wdt, &s3c_device_i2c0, &s3c_device_iis,

&s3c_device_rtc, //新增代码 };

3. 创建设备节点,在文件系统/dev目录下执行: sudo mknod rtc c 10 135 4. 重新编译内核,查看启动信息

s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0 这里说明rtc驱动起来可以正常工作了

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 2 EXT3-fs: unable to read superblock

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 2 EXT2-fs: unable to read superblock

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 0 Buffer I/O error on device mtdblock2, logical block 0

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 0 Buffer I/O error on device mtdblock2, logical block 0

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 8 Buffer I/O error on device mtdblock2, logical block 1

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 8 Buffer I/O error on device mtdblock2, logical block 1

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 16 Buffer I/O error on device mtdblock2, logical block 2

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 16 Buffer I/O error on device mtdblock2, logical block 2

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 24 Buffer I/O error on device mtdblock2, logical block 3

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 24 Buffer I/O error on device mtdblock2, logical block 3

uncorrectable error : <3>end_request: I/O error, dev mtdblock2, sector 0 FAT: unable to read boot sector

VFS: Cannot open root device \Please append a correct \1f00 256 mtdblock0 (driver?) 1f01 2048 mtdblock1 (driver?) 1f02 257536 mtdblock2 (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2) MTD分区与bootloader不匹配

#elif defined(CONFIG_more_than_256MB_NAND) [0] = { .name = \

.offset = 0x00000000, .size = 0x00080000,

},

[1] = {

.name = \ .offset = 0x00240000, .size = 0x00200000,

},

[2] = {

.name

= \

.offset = 0x00440000,

.size = 0x0FB40000, }

*******************************************************************************

*******************************************************************************

[0]和[1]分区不连贯的表面原因 中间的部分存放uboot的参数以及开机画面??? 环境变量

uboot分区信息:

0x0 到0x40000 为uboot的分区,256K, 0x40000 到0x4c000 为parameters分区,48K, 0x50000 到0x70000 为eboot分区,128K, 0x70000 到0x1F0000 为logo分区,1536K, 0x1F0000 到0x3F0000 为kernel分区,2M, 0x3F0000 到0x3FF8000 为root分区,60.03125M

nand分区信息:

static struct mtd_partition smdk_default_nand_part[] = { [0] = {

.name = \ .size = 0x00040000, .offset = 0x00000000, },

[1] = {

.name = \ .offset = 0x0004C000, .size = 0x00200000, },

[2] = {

.name = \ .offset = 0x0024C000, .size = 0x03DB0000, }

};

uboot的分区和文件系统的分区,没有联系的。唯一的联系就是uboot引导启动的时候,命令要根据文件系统的分区信息来引导。比如要从mtdblock2启动,那么bootcmd中的命令bootm 0xXXXXXXX就要和mtdblock2的首地址一样。。。。

搜索更多关于: linux-2.6.30.4移植至2440开发板 的文档
linux-2.6.30.4移植至2440开发板.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c1tfxo8hpxp68ub00wpmh_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top