s5pc100开发板Nand flash移植
相关软件下载地址:http://pan.baidu.com/s/16yo8Y
fsc100开发板
交叉编译工具:arm-cortex_a8-linux-gnueabi-gcc
添加针对我们平台的Nand flash驱动
拷贝s3c_nand.c到drivers/mtd/nand下
拷贝regs-nand.h到arch/arm/mach-s5pc100/include/mach下
针对平台上的nand flash设备,修改drivers/mtd/nand/nand_base.c第2812行
for (i = 0; i < 5; i++)
- 添加内核配置选项
修改drivers/mtd/nand/Kconfig,在if mtd_nand下面添加如下内容:
config MTD_NAND_S3C
tristate "NAND Flash support for S3C SoC"
depends on (ARCH_S3C64XX || ARCH_S5P64XX || ARCH_S5PC1XX || ARCH_S5PC100) && MTD_NAND
help
This enables the NAND flash controller on the S3C.
No board specfic support is done by this driver, each board
must advertise a platform_device for the driver to attach.
config MTD_NAND_S3C_DEBUG
bool "S3C NAND driver debug"
depends on MTD_NAND_S3C
help
Enable debugging of the S3C NAND driver
config MTD_NAND_S3C_HWECC
bool "S3C NAND Hardware ECC"
depends on MTD_NAND_S3C
help
Enable the use of the S3C's internal ECC generator when
using NAND. Early versions of the chip have had problems with
incorrect ECC generation, and if using these, the default of
software ECC is preferable.
If you lay down a device with the hardware ECC, then you will
currently not be able to switch to software, as there is no
implementation for ECC method used by the S3C
修改drivers/mtd/nand/Makefile添加如下内容:
obj-$(CONFIG_MTD_NAND_S3C) += s3c_nand.o
- 修改平台代码
修改arch/arm/mach-s5pc100/mach-smdkc100.c添加如下内容:
- 添加头文件
#if defined (CONFIG_MTD_NAND_S3C)
#include <linux/mtd/partitions.h>
#include <linux/mtd/mtd.h>
#include <plat/nand.h>
#endif
- 添加平台设备
#if defined(CONFIG_MTD_NAND_S3C)
/* Nand Flash Support */
static struct mtd_partition s5pc100_nand_part[] = {
[0] = {
.name = "bootloader",
.size = SZ_1M,
.offset = 0,
},
[1] = {
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = SZ_1M*3,
},
[2] = {
.name = "rootfs",
.offset = MTDPART_OFS_APPEND,
.size = SZ_4M,
},
[3] = {
.name = "usrfs",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
},
};
struct s3c_nand_mtd_info s5pc100_nand_mtd_part_info = {
.chip_nr = 1,
.mtd_part_nr = ARRAY_SIZE(s5pc100_nand_part),
.partition = s5pc100_nand_part,
};
static struct resource s5pc100_nand_resource[] = {
[0] = {
.start = 0xE7200000,
.end = 0xE7200000 + SZ_1M,
.flags = IORESOURCE_MEM,
}
};
struct platform_device s5pc100_device_nand = {
.name = "s5pc100-nand",
.id = -1,
.num_resources = ARRAY_SIZE(s5pc100_nand_resource),
.resource = s5pc100_nand_resource,
.dev = {
.platform_data = &s5pc100_nand_mtd_part_info,
}
};
#endif
- 添加平台设备列表
在smdkc100_device[]结构体数组中添加如下内容:
#if defined(CONFIG_MTD_NAND_S3C)
&s5pc100_device_nand,
#endif
- 修改arch/arm/plat-samsung/include/plat/nand.h添加如下内容:
struct s3c_nand_mtd_info {
uint chip_nr;
uint mtd_part_nr;
struct mtd_partition *partition;
};
- 配置内核
$ make menuconfig
Device Drivers --->
<*> Memory Technology Device (MTD) support --->
[*] MTD partitioning support
<*> Caching block device access to MTD devices
<*> NAND Device Support --->
<*> NAND Flash support for S3C SoC
[*] S3C NAND Hardware ECC
File Systems --->
Partition Types --->
[*] Advanced partition selection
[*] PC BIOS (MSDOS partition tables) support
[*] BSD disklabel (FreeBSD partition tables) support
- 编译内核并拷贝到tftpboot下
$ make zImage
$ cp arch/arm/boot/zImage /tftpboot
- 测试
启动目标板,在目标板上完成如下操作:
# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "bootloader"
mtd1: 00300000 00020000 "kernel"
mtd2: 00400000 00020000 "rootfs"
mtd3: 0f800000 00020000 "usrfs"
s5pc100开发板Nand flash移植的更多相关文章
- s5pc100开发板linux内核移植
相关软件下载地址:http://pan.baidu.com/s/16yo8Y 应用于FSC100开发板 交叉编译工具:arm-cortex_a8-linux-gnueabi-gcc linux-2.6 ...
- s5pc100开发板uboot移植
相关软件下载地址:http://pan.baidu.com/s/16yo8Y 适用于fsc100开发板 交叉编译器arm-cortex_a8-linux-gnueabi-gcc u-boot-2010 ...
- s5pc100开发板网卡驱动的移植
相关软件下载地址:http://pan.baidu.com/s/16yo8Y fsc100开发板 交叉编译工具:arm-cortex_a8-linux-gnueabi-gcc 平台代码修改 vim ...
- 小白自制Linux开发板 二. u-boot移植
上一篇:小白自制Linux开发板 一. 瞎抄原理图与乱画PCB 中我们做了一个小型而没用的开发板,用的是Licheepi Nano的镜像,那从本篇开始我们开始自己构建它的灵魂吧. 我们都知道,PC在 ...
- [资料分享]迅为iTOP4412开发板-SDIO WiFi移植文档
本文转自迅为:http://www.topeetboard.com 概述 近期需要把WiFi无线网络功能移植到iTOP-4412 开发平台,查阅了相关资料,经过一段时间的研究.调试,终于成功的将WiF ...
- 2440开发板linux系统移植3G拨号上网收发短信(三)
一.用text查看模式 下面的“发”是指我敲的命令,“收”是指回车后显示的信息包括其他接收的信息. ~ >: microcom -s 115200 /dev/ttyUSB1 发:at 收:OK ...
- [正在学习开发板]分享--- iTOP-4412移植CAN
首先拷贝迅为提供的 libcanjni.tar.gz 压缩包到 android 源代码的"iTop4412_ICS/device/samsung/common"文件夹以下,然后使用 ...
- 痞子衡嵌入式:把玩i.MXRT1062 TencentOS Tiny EVB_AIoT开发板(2) - 在Flash调试及离线启动
大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是i.MXRT1062 TencentOS Tiny EVB_AIoT开发板在Flash调试与离线启动. 腾讯 TencentOS 团队于 ...
- linux2.6.30.4内核移植(2)——Nand Flash驱动移植
内核源码:linux2.6.30.4 交叉编译工具:3.4.5 移植linux内核至:TQ2440 工作基础:http://www.cnblogs.com/nufangrensheng/p/36696 ...
随机推荐
- [swscaler @ ...] deprecated pixel format used, make sure you did set range correctly
我自己在使用如下函数进行转换时报的错 int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[], const int sr ...
- 移动端一像素边框解决方案[css scale]
新建一个border.css的文件,然后将代码复制粘贴,然后引用border.css样式文件,然后给需要添加边框的元素,加相应的类样式. tips: border-bottom[一像素下边框]:bor ...
- requests---requests封装请求类型
我们在做自动化的时候,肯定是代码越简洁越好,代码重复量越少越好,这里呢,我们可以通过把requests的请求类型都封装起来,这样编写用例的时候可以直接进行请求 requests方法封装 我们通常用的最 ...
- delphi中的pansichar和pchar等类型的区别
varc: Char; {Char 类型的取值范围是: #0..#255, 用十六进制表示是: #$0..#$FF}begin{用十进制方式赋值:}c := #65;ShowMessage(c); { ...
- 在centos7中安装MySQL5.7
1.下载mysql源安装包 wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 2.安装mysql源 yu ...
- PHP pclzip.php 解压中文乱码
修改 pclzip中方法privExtractFile 代码 if ($p_path != '') { $p_entry['filename'] = $p_path."/".$p_ ...
- importlib 与__import__的区别
importlib 与__import__的区别 importlib import importlib name = "lib.test" # lib.test指的是lib路劲下的 ...
- Mybatis+Spring的整合练习
一.建立数据库.建表 二.新建maven项目 三.添加依赖 <dependencies> <dependency> <groupId>junit</group ...
- scikitlearn库中调用k-近邻算法的操作步骤
1.k近邻算法可以说是唯一一个没有训练过程的机器学习算法,它含有训练基础数据集,但是是一种没有模型的算法,为了将其和其他算法进行统一,我们把它的训练数据集当做它的模型本身.2.在scikitlearn ...
- 一 Mybatis概述&与Hibernate的区别&CRUD
Mybatis是类似Hibernate的ORM持久层框架 为什么学习Mybatis? 是目前国内主流的持久层框架,面向sql(相较于Hibernate,Mybatis一定要用sql) Hibernat ...