vivi和内核分区的一致性

上传人:gao****ang 文档编号:140710338 上传时间:2022-08-23 格式:DOCX 页数:7 大小:14.43KB
收藏 版权申诉 举报 下载
vivi和内核分区的一致性_第1页
第1页 / 共7页
vivi和内核分区的一致性_第2页
第2页 / 共7页
vivi和内核分区的一致性_第3页
第3页 / 共7页
资源描述:

《vivi和内核分区的一致性》由会员分享,可在线阅读,更多相关《vivi和内核分区的一致性(7页珍藏版)》请在装配图网上搜索。

1、vivi和内核分区的一致性(vivi引导失败)linux技术2009-10-16 13:39:41阅读260评论0 字号:大中小订阅自己在内核移植过程中,忽然想到了引导程序中的分区和内核中分区信息应该一致才对。所以寻求一个解决方案。本处找了一些案例来作为参考。分为两部分,前一部分引用了一个移植,来知道一致性处理。后一部分是一致性的必要性证实,因为他处理中出错了黑色部分为第一部分,源自于:参考嵌入式Linux应用开发完全手册移植了 UBOOT1.1.6和内核Linux2.6.22由于我用的是阿南的AN2410SSB,没有norflash,只能把uboot烧进nand。刚开始不能saveenv保存

2、环境变量,因为原始版本是保存在nor的,在打了补丁后问题解决,可以把环境变量保存在nand上了,但是修改部分的代码还有待研究。接着配置编译内核,通过tftp下载到sdram执行,打印如下的错误信息:usb usb1: configuration #1 chosen from 1 choicehub 1-0:1.0: USB hub foundhub 1-0:1.0: 2 ports detectedInitializing USB Mass Storage driver.hub 1-0:1.0:Cannot enableport 1.Maybe theUSB cable is bad?hub

3、1-0:1.0:Cannot enableport 1.Maybe theUSB cable is bad?hub 1-0:1.0:Cannot enableport 1.Maybe theUSB cable is bad?hub 1-0:1.0:Cannot enableport 1.Maybe theUSB cable is bad?hub 1-0:1.0:Cannot enableport 2.Maybe theUSB cable is bad?hub 1-0:1.0:Cannot enableport 2.Maybe theUSB cable is bad?hub 1-0:1.0:Ca

4、nnot enableport 2.Maybe theUSB cable is bad?hub 1-0:1.0:Cannot enableport 2.Maybe theUSB cable is bad?hub 1-0:1.0:Cannot enableport 1.Maybe theUSB cable is bad?hub 1-0:1.0:Cannot enableport 1.Maybe theUSB cable is bad?并且不断重复,我想应该是板子没有把USB设备引出的缘故,暂时不管,应该不会影响到后面文件系统的移植。但是还有一个问题,就是nand的分区问题,内核把nand分成了三

5、个区:kernel ; jffs2; yaffs,打印信息如下:NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64M iB 3,3V 8-bit)Scanning device for bad blocksBad eraseblock 3917 at 0x03d34000Creating 3 MTD partitions on NAND 64M iB 3,3V 8-bit:0x00000000-0x00200000 : kernel0x00200000-0x00a00000 : jffs20x00a00000-0

6、x04000000 : yaffs有坏块,没办法有点郁闷。该内核没有给在nand上给uboot留一个分区。因为他针对的是有nor的班子,没办法,要自己在0地址多加一个uboot分区用来保存uboot。网上有的说bios分区要和内核分区一致,有的则说不要紧,至此没搞清楚。目标:mtdblock0 0x000000000x0100000 1Mubootmtdblock1 0x001000000x0600000 5Mkernelmtdblock2 0x006000000x1E00000 24Mrootmtdblock3 0x01E000000x04000000 34M user具体实现如下:首先修改

7、BIOS里面的分区,在nand.cstatic struct Partition NandPart=(0,0x0100000, uboot,(0x00100000, 0x0600000, kernel,(0x00600000, 0x1E00000, root,(0x01E00000, 0x04000000, user,;再修改linux内核中的分区信息linux-2.6.22在driver/mtd/nand中s3c2410_nand.c中修改分区信息应该与BIOS中的分区信息相对照.#define NUM_PARTITIONS 4 /nand 的分区数目#define KERNEL_SIZE

8、SZ_1M*5 /内核分区空间大小#define ROOT_SIZE SZ_1M*24 /根文件系统分区大小#define USER_SIZE SZ_1M*34 /用户空间分区大小static struct mtd_partition partition_info = ( .name = U-boot,.offset = 0,.size = UBOOT_SIZE, .name = linux 2.6.16 kernel,.offset = UBOOT_SIZE,.size = KERNEL_SIZE, .name = root,.offset = UBOOT_SIZE+KERNEL_SIZE,

9、.size = ROOT_SIZE, .name = user,.offset = UBOOT_SIZE+KERNEL_SIZE+ROOT_SIZE,.size = USER_SIZE;这样就完成了。重新编译下载内核,OK一下是第二部分,从错误中修改出来源自:vivi bootCopy linux kernel from 0x00040000 to 0x30008000, size = 0x001c0000 . donezImage magic = 0x016f2818Setup linux parameters at 0x30000100linux command line is: noin

10、itrd root=/dev/mtdblock/2 console=ttySAC0,115200mac=00:01:5d:68:7a:0fMACH_TYPE = 193NOW, Booting Linuxdone, booting theUncompressing Linuxkernel.找到原因了:内核分区表和VIVI分区表不一致吃完饭继续!内核里面的MTD分区表static struct mtd_partition yc2410_nand_part = (0 = .name = vivi,.size = 0x00020000,#128K.offset = 0,1 = .name = par

11、am,.offset = 0x00020000,.size = 0x00010000,#64K,2 = .name = kernel,.offset = 0x00030000,.size = 0x002D0000,#2M+832K,3 = .name = root,.offset = 0x00300000,.size = 0x00C10000,#12M+64K,4 = .name = usr,.offset = 0x00F10000,.size = 0x030EC000,#48M+944k,;VIVI定义的分区表:mtdpart info. (4 partitions)name offset

12、size flagvivi : 0x00000000 0x000200000 128kparam : 0x00020000 0x000100000 64kkernel : 0x00040000 0x001c00000 1M+768kroot : 0x00200000 0x03cf8000 16 60M+992k=2008.8.24=早上重新配置和编译了一次内核修改了下面两个地方1. 内核的Default kernel command stringnoinitrd root=/dev/mtdblock3 console=ttySAC0,115200 init=/linuxrc我顺便把EABI也选

13、上了(因为觉得这样要好些)2. VIVI 的noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0以下是引导信息!Linux version 2.6.22.1 (rootlocalhost.localdomain) (gcc version 4.2.1) #73 Sun Aug 24 14:45:00CST 2008CPU: ARM920T 41129200 revision 0 (ARMv4T), cr=c0007177Machine: SMDK2410ATAG_INITRD is deprecated; please updat

14、e your bootloader.Memory policy: ECC disabled, Data cache writebackCPU S3C2410A (id 0x32410002)S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHzS3C24XX Clocks, (c) 2004 Simtec ElectronicsCLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL onCPU0: D VIVT write-back cacheCPU0: I cache

15、: 16384 bytes, associativity 64, 32 byte lines, 8 setsCPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 setsBuilt 1 zonelists. Total pages: 16256Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0irq: clearing subpending status 00000007irq: clearing subpendin

16、g status 00000002PID hash table entries: 256 (order: 8, 1024 bytes)timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8Console: colour dummy device 80x30Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)Memory: 6

17、4MB = 64MB totalMemory: 61696KB available (2752K code, 311K data, 132K init)Mount-cache hash table entries: 512CPU: Testing write buffer coherency: okNET: Registered protocol family 16S3C2410 Power Management, (c) 2004 Simtec ElectronicsS3C2410: Initialising architectureS3C24XX DMA Driver, (c) 2003-

18、2004,2006 Simtec ElectronicsDMA channel 0 at c4800000, irq 33DMA channel 1 at c4800040, irq 34DMA channel 2 at c4800080, irq 35DMA channel 3 at c48000c0, irq 36usbcore: registered new interface driver usbfsusbcore: registered new interface driver hubusbcore: registered new device driver usbNET: Regi

19、stered protocol family 2IP route cache hash table entries: 1024 (order: 0, 4096 bytes)TCP established hash table entries: 2048 (order: 2, 16384 bytes)TCP bind hash table entries: 2048 (order: 1, 8192 bytes)TCP: Hash tables configured (established 2048 bind 2048)TCP reno registeredNetWinder Floating

20、Point Emulator V0.97 (double precision)JFFS2 version 2.2. (NAND)漏 2001-2006 Red Hat, Inc.io scheduler noop registeredio scheduler anticipatory registered (default)io scheduler deadline registeredio scheduler cfq registereds3c2410-lcd s3c2410-lcd: no platform data for lcd, cannot attachs3c2410-lcd: p

21、robe of s3c2410-lcd failed with error -22lp: driver loaded but no devices foundppdev: user-space parallel port driverS3C2410 Watchdog Timer, (c) 2004 Simtec ElectronicsSerial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enableds3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70

22、) is a S3C2410s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizeloop: module loadeddm9000 Ethernet DriverUniform Multi-Platform E-IDE

23、 driver Revision: 7.00alpha2ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xxBAST NOR-Flash Driver, (c) 2004 Simtec ElectronicsS3C24XX NAND Driver, (c) 2004 Simtec Electronicss3c2410-nand s3c2410-nand: Tacls=3, 30ns Twrph0=7 70ns, Twrph1=3 30nsNAND device: Manufacturer ID:

24、0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)NAND_ECC_NONE selected by board driver. This is not recommended !Scanning device for bad blocksBad eraseblock 2372 at 0x02510000Creating 8 MTD partitions on NAND 64MiB 3,3V 8-bit:0x00000000-0x00004000 : Boot Agent0x00000000-0x00200000 : S3C2410 flas

25、h partition 10x00400000-0x00800000 : S3C2410 flash partition 20x00800000-0x00a00000 : S3C2410 flash partition 30x00a00000-0x00e00000 : S3C2410 flash partition 40x00e00000-0x01800000 : S3C2410 flash partition 50x01800000-0x03000000 : S3C2410 flash partition 60x03000000-0x04000000 : S3C2410 flash part

26、ition 7usbmon: debugfs is not availables3c2410-ohci s3c2410-ohci: S3C24XX OHCIs3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000usb usb1: configuration #1 chosen from 1 choicehub 1-0:1.0: USB hub foundhub 1-0:1.0: 2 ports dete

27、ctedmice: PS/2 mouse device common for all miceS3C24XX RTC, (c) 2004,2006 Simtec Electronicss3c2410-i2c s3c2410-i2c: slave address 0x10s3c2410-i2c s3c2410-i2c: bus frequency set to 390 KHzs3c2410-i2c s3c2410-i2c: i2c-0: S3C I2C adapterTCP cubic registeredNET: Registered protocol family 1drivers/rtc/

28、hctosys.c: unable to open rtc device (rtc0)List of all partitions:1f0016 mtdblock0 (driver?)1f012048 mtdblock1 (driver?)1f024096 mtdblock2 (driver?)1f032048 mtdblock3 (driver?)1f044096 mtdblock4 (driver?)1f0510240 mtdblock5 (driver?)1f0624576 mtdblock6 (driver?)1f0716384 mtdblock7 (driver?)No filesystem could mount root, tried: ext3 ext2 cramfs msdos vfat romfsKernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!