我的mini2440 linux2.9.32 移植问题记录
2010-09-28 22:32
295 查看
1.总是出现MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing Linux...................................................................................... done, booting the kernel.
停止的情况
下面的是tools/mach-types中关于体系的参数定义
s3c2440 ARCH_S3C2440 S3C2440 362
mini2440 MACH_MINI2440 MINI2440 1999
解决方法:将第一行改成 s3c2440 ARCH_S3C2440 S3C2440 1999
2.内核的配置
1..[*] Enable loadable module support
--->
[*] Module
unloading
2. System Type ---->
[*] S3C2410 DMA
support [*] Support ARM920T processor
S3C2440
Machines --->
[*] SMDK2440
[*] SMDK2440 with S3C2440 CPU moduleq
其他的比如2410,2443相关的全部去掉
3.Boot options --->
将
(root=/dev/hda1 ro init=/bin/bash console=ttySAC0)
Default kernel command string
改成
(noinitrd root=/dev/mtdblock2
init=/linuxrc console=ttySAC0
)
其中
mtdblock2
表示
MTD
分区的第二个分区存文件系统;
Linuxrc
为启动的首个脚本。
4关掉nand ecc
.因为bootload中已经有ecc校验算法
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
[*] MTD partitioning support
<*> NAND Device Support --->
<*> NAND Flash support for S3C2410/S3C2440 SoC
[ ] S3C2410 NAND Hardware ECC //
这个要去掉
3.添加nand flash驱动(可参考arm/plat-s3c24xx/common-smdk.c)
在arm/mach-mini2440.c
中添加static struct mtd_partition mini2440_default_nand_part[] = {
[0] = {
.name = "supervivi",
.size = 0x00040000,//dev/mdkbloack0
.offset = 0,
},
[1] = {
.name = "param",
.offset = 0x00040000,
.size = 0x00020000,
},
[2] = {
.name = "Kernel",
.offset = 0x00560000,
.size =1024 * 1024 * 1024,
},
[3] = {
.name = "nand",
.offset = 0x00000000,
.size = 1024 * 1024 * 1024,
},
};
static struct s3c2410_nand_set mini2440_nand_sets[] = {
[0] = {
.name = "NAND",
.nr_chips = 1,
.nr_partitions = ARRAY_SIZE(mini2440_default_nand_part),
.partitions =mini2440_default_nand_part,
},
};
static struct s3c2410_platform_nand mini2440_nand_info = {
.tacls = 20,
.twrph0 = 60,
.twrph1 = 20,
.nr_sets = ARRAY_SIZE(mini2440_nand_sets),
.sets = mini2440_nand_sets,
.ignore_unset_ecc = 1,
};
更改下列函数:
static void __init mini2440_machine_init(void)
{
s3c24xx_fb_set_platdata(&mini2440_fb_info);
s3c_i2c0_set_platdata(NULL);
s3c_device_nand.dev.platform_data = &mini2440_nand_info; //添加内容
platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices));
//smdk_machine_init();
}
static struct platform_device
*mini2440_devices[] __initdata = {
&s3c_device_usb,
&s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&s3c_device_nand,
//
把
nand flash
设备添加
到开发板的设备列表结构
};
更改drivers/mtd/nand/s3c2410.c关闭ecc校验
chip->ecc.mode = NAND_ECC_SOFT;
改为:chip->ecc.mode = NAND_ECC_NONE;
注意:否则将会出现很多问题Unable to handle kernel NULL pointer dereference at virtual address 00000018
pgd = c0004000
[00000018] *pgd=00000000
Internal error: Oops: 5 [#1]
make zIamge下载后报错
出现一大堆错误:
arch/arm/mach-s3c2440/mach-mini2440.c:84: error: array type has incomplete element type
arch/arm/mach-s3c2440/mach-mini2440.c:85: error: array index in non-array initializer
arch/arm/mach-s3c2440/mach-mini2440.c:85: error: (near initialization for 'mini2440_nand_sets')
arch/arm/mach-s3c2440/mach-mini2440.c:86: error: field name not in record or union initializer
arch/arm/mach-s3c2440/mach-mini2440.c:86: error: (near initialization for 'mini2440_nand_sets')
arch/arm/mach-s3c2440/mach-mini2440.c:87: error: field name not in record or union initializer
在macn-mini2440中添加头文件
#include <plat/common-smdk.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
#include <plat/nand.h>//这个也不能少的哦
编译后下载:
affs: dev is 32505858 name is
"mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 128K
Kernel panic - not syncing: Attempted to kill init
解决办法:
这个时候懵了,哪里错呢~ 没办法,只能对照着友善的配置一个个大模块对着来改
当改到Kernel Features的时候错误消失了,原来需要选上
Use the ARM EABI to compile the kernel
Allow old ABI binaries to run with thie Kernel
为什么呢?~ Google了一下,原来友善的根文件系统在编译的时候也启用了EABI特性,内核和文件系统需要对上
文件系统用了EABI 内核也要用EABI 内核不用EABI 也只能读取不用EABI的文件系统
NOW, Booting Linux......
Uncompressing Linux...................................................................................... done, booting the kernel.
停止的情况
下面的是tools/mach-types中关于体系的参数定义
s3c2440 ARCH_S3C2440 S3C2440 362
mini2440 MACH_MINI2440 MINI2440 1999
解决方法:将第一行改成 s3c2440 ARCH_S3C2440 S3C2440 1999
2.内核的配置
1..[*] Enable loadable module support
--->
[*] Module
unloading
2. System Type ---->
[*] S3C2410 DMA
support [*] Support ARM920T processor
S3C2440
Machines --->
[*] SMDK2440
[*] SMDK2440 with S3C2440 CPU moduleq
其他的比如2410,2443相关的全部去掉
3.Boot options --->
将
(root=/dev/hda1 ro init=/bin/bash console=ttySAC0)
Default kernel command string
改成
(noinitrd root=/dev/mtdblock2
init=/linuxrc console=ttySAC0
)
其中
mtdblock2
表示
MTD
分区的第二个分区存文件系统;
Linuxrc
为启动的首个脚本。
4关掉nand ecc
.因为bootload中已经有ecc校验算法
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
[*] MTD partitioning support
<*> NAND Device Support --->
<*> NAND Flash support for S3C2410/S3C2440 SoC
[ ] S3C2410 NAND Hardware ECC //
这个要去掉
3.添加nand flash驱动(可参考arm/plat-s3c24xx/common-smdk.c)
在arm/mach-mini2440.c
中添加static struct mtd_partition mini2440_default_nand_part[] = {
[0] = {
.name = "supervivi",
.size = 0x00040000,//dev/mdkbloack0
.offset = 0,
},
[1] = {
.name = "param",
.offset = 0x00040000,
.size = 0x00020000,
},
[2] = {
.name = "Kernel",
.offset = 0x00560000,
.size =1024 * 1024 * 1024,
},
[3] = {
.name = "nand",
.offset = 0x00000000,
.size = 1024 * 1024 * 1024,
},
};
static struct s3c2410_nand_set mini2440_nand_sets[] = {
[0] = {
.name = "NAND",
.nr_chips = 1,
.nr_partitions = ARRAY_SIZE(mini2440_default_nand_part),
.partitions =mini2440_default_nand_part,
},
};
static struct s3c2410_platform_nand mini2440_nand_info = {
.tacls = 20,
.twrph0 = 60,
.twrph1 = 20,
.nr_sets = ARRAY_SIZE(mini2440_nand_sets),
.sets = mini2440_nand_sets,
.ignore_unset_ecc = 1,
};
更改下列函数:
static void __init mini2440_machine_init(void)
{
s3c24xx_fb_set_platdata(&mini2440_fb_info);
s3c_i2c0_set_platdata(NULL);
s3c_device_nand.dev.platform_data = &mini2440_nand_info; //添加内容
platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices));
//smdk_machine_init();
}
static struct platform_device
*mini2440_devices[] __initdata = {
&s3c_device_usb,
&s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&s3c_device_nand,
//
把
nand flash
设备添加
到开发板的设备列表结构
};
更改drivers/mtd/nand/s3c2410.c关闭ecc校验
chip->ecc.mode = NAND_ECC_SOFT;
改为:chip->ecc.mode = NAND_ECC_NONE;
注意:否则将会出现很多问题Unable to handle kernel NULL pointer dereference at virtual address 00000018
pgd = c0004000
[00000018] *pgd=00000000
Internal error: Oops: 5 [#1]
make zIamge下载后报错
出现一大堆错误:
arch/arm/mach-s3c2440/mach-mini2440.c:84: error: array type has incomplete element type
arch/arm/mach-s3c2440/mach-mini2440.c:85: error: array index in non-array initializer
arch/arm/mach-s3c2440/mach-mini2440.c:85: error: (near initialization for 'mini2440_nand_sets')
arch/arm/mach-s3c2440/mach-mini2440.c:86: error: field name not in record or union initializer
arch/arm/mach-s3c2440/mach-mini2440.c:86: error: (near initialization for 'mini2440_nand_sets')
arch/arm/mach-s3c2440/mach-mini2440.c:87: error: field name not in record or union initializer
在macn-mini2440中添加头文件
#include <plat/common-smdk.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
#include <plat/nand.h>//这个也不能少的哦
编译后下载:
affs: dev is 32505858 name is
"mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 128K
Kernel panic - not syncing: Attempted to kill init
解决办法:
这个时候懵了,哪里错呢~ 没办法,只能对照着友善的配置一个个大模块对着来改
当改到Kernel Features的时候错误消失了,原来需要选上
Use the ARM EABI to compile the kernel
Allow old ABI binaries to run with thie Kernel
为什么呢?~ Google了一下,原来友善的根文件系统在编译的时候也启用了EABI特性,内核和文件系统需要对上
文件系统用了EABI 内核也要用EABI 内核不用EABI 也只能读取不用EABI的文件系统
相关文章推荐
- 尚观6410开发板移植linux 3.6.6问题记录及经验小结
- mini2440 linux-3.7移植记录(一)
- #嵌入式Linux最小系统移植# mini2440内核4.0.8移植记录
- 友善官方<<Mini2440 Linux移植开发实战指南>>问题总结
- 移植linux2.6.38.8内核到Mini2440 ---- 记录
- mini2440 linux-3.7移植记录(二)
- linux 2.6.36.2移植问题点记录
- mini2440 nand flash驱动移植--问题解决记录
- Linux-2.6.32.2在mini2440移植时常见问题
- 友善官方<<Mini2440 Linux移植开发实战指南>>问题勘误录
- mini2440 linux-3.7移植记录(三)
- mini2440 nand flash驱动移植--问题解决记录
- 【原创分享】嵌入式linux应用之内核移植定制篇-后篇(修复部分问题)(linux-3.8.12 mini2440)
- [置顶] 【原创分享】嵌入式linux应用之内核移植定制篇-后篇(修复部分问题)(linux-3.8.12 mini2440)
- 友善官方<<Mini2440 Linux移植开发实战指南>>问题总结
- 基于2440 linux2.6.30 移植问题记录
- 移植较新(Linux3.19)内核至mini2440开发板(一)
- linux+ramdisk移植的时候遇到的某些问题及解决方法
- Linux-2.6.32.2内核在mini2440上的移植(十)---配置USB外设
- Linux-2.6.32.2内核在mini2440上的移植(五)---添加LCD背光驱动