1、硬件选择 rk nandflash支持列表有的芯片
2、配置uboot ,为二级loader模式: #define CONFIG_SECOND_LEVEL_BOOTLOADER
3、修改内核dts
&nandc0 {
status = "okay"; // used nand set "okay" ,used emmc set "disabled"
};
&nandc1 {
status = "disabled"; // used nand set "okay" ,used emmc set "disabled"
};
&emmc {
clock-frequency = <100000000>;
clock-freq-min-max = <400000 100000000="">;
supports-highspeed;
supports-emmc;
bootpart-no-access;
supports-DDR_MODE;
caps2-mmc-hs200;
ignore-pm-notify;
keep-power-in-suspend;
status = "disabled";
};
4、initrd使用
Rk30xxnand_ko.ko.3.10.0 使用 ,切换到相应版本
5、内核配置项:
CONFIG_ROCKCHIP_IOVMM 重要
否则会出现内核插入时错误:
Unable to handle kernel NULL pointer dereference at virtual address 00000014
[ 4.121128] pgd = ed9e8000
[ 4.123799] [00000014] *pgd=2da2e831, *pte=00000000, *ppte=00000000
[ 4.129999] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[ 4.135302] Modules linked in: rk30xxnand_ko(P+)
[ 4.139867] CPU: 1 PID: 127 Comm: insmod Tainted: P 3.10.0 #247
[ 4.146707] task: ed820f00 ti: eda50000 task.ti: eda50000
[ 4.152018] PC is at disk_alloc_events+0xc/0xd4
[ 4.156470] LR is at add_disk+0xb0/0x1d4
[ 4.160326] pc : [] lr : [] psr: 60000013
[ 4.160326] sp : eda51e98 ip : 00000000 fp : 00000000
[ 4.171601] r10: 00000008 r9 : 00000400 r8 : 00000001
[ 4.176735] r7 : bf0151a4 r6 : 00000000 r5 : eda18400 r4 : eda18400
[ 4.183147] r3 : 00000000 r2 : 0000001f r1 : eda18440 r0 : eda18400
[ 4.189561] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 4.196571] Control: 10c5387d Table: 2d9e806a DAC: 00000015
[ 4.202217]
阅读(2689) | 评论(0) | 转发(0) |