您的位置:首页 > 运维架构 > Linux

Install Linux Kernel - AT91SAM9260EK

2015-03-19 00:19 344 查看

二、AT91SAM9260EK

2.1 下载

介绍页:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/LegacyLinuxKernel
下载页:

a)ftp://www.at91.com/pub/linux/2.6.30-at91/

b)http://maxim.org.za/at91_26.html

(1)Kernel

V2.6.30

(2) maintainer – patch

V2.6.30(23/06/2009)

(3) experimental -- patch

V2.6.30

(4) board – cfg

At91sam9260ek_defconfig(V2.6.30)

2.2 部署

解压缩并打补丁

拷贝所有补丁到linux-2.6.30(执行完kernel步,后有此文件夹)目录下。

(1) kernel

$tarjxvf linux-2.6.30.tar.bz2

(2) SoC - patch

$zcat 2.6.30-at91.patch.gz | patch -p1

(3) board - patch

$tar zxvf 2.6.30-at91-exp.5.tar.gz

$for p in 2.6.30-at91-exp.5/*; do patch -p1 < $p ; done

(4) board - cfg

$cp ../at91sam9260ek_defconfig .config

2.3 修改file

2.3.1 Makefile

请参照《1.1 –
修改Makefile》

2.3.2 NAND分区

NAND分1个区,

修改board-sam9260ek.c中“NAND flash”部分,详见附录“nandpartition

2.4 配置驱动

$make oldconfig

$make menuconfig

关于make oldconfig

1、如果.config不存在,运行make config/menuconfig时的缺省设置由固化在各个Kconfig文件中各项目的缺省值决定。
2. 如果.config存在,运行make config/menuconfig时的缺省设置即是当前.config的设置,若对设置进行了修改,.config将被更新。
3. arch/arm/defconfig是一个缺省的配置文件,make defconfig时会根据这个文件生成当前的.config。
4. arch/arm/configs文件夹中有许多命名为xxx_defconfig的配置文件,如果运行make xxx_defconfig,当前.config文件会由xxx_defconfig文件生成。
5. make oldconfig的作用是备份当前.config文件为.config.old,如若make config/menuconfig设置不当可用于恢复先前的.config


2.5. 生成uImage

$make uImage

--------------------------------------------------------------------全文end-----xiaobin----------

参考文章《4-Install
Linux Kernel

nand partition

(linux-2.6.30/arch/arm/mach-at91/board-sam9260ek.c)


/*
* NAND flash
*/
static struct mtd_partition __initdata ek_nand_partition[] = {
{
.name	= "Partition 1",
.offset	= 0,
.size	= SZ_256K,
},
{
.name	= "Partition 2",
.offset	= MTDPART_OFS_NXTBLK,
.size	= MTDPART_SIZ_FULL,
},
};

修改为:

/*
* NAND flash
*/
static struct mtd_partition __initdata ek_nand_partition[] = {
/*
{
.name	= "Partition 1",
.offset	= 0,
.size	= SZ_256K,
},
{
.name	= "Partition 2",
.offset	= MTDPART_OFS_NXTBLK,
.size	= MTDPART_SIZ_FULL,
},
*/
{
.name = "AT91 NAND my_P1",
.offset = 0,
.size = MTDPART_SIZ_FULL,//2*SZ_1M,
}
};
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: