Install Linux Kernel - AT91SAM9260EK


两、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,
	}
};



版权声明:本文博主原创文章,博客,未经同意不得转载。

posted @ 2015-10-23 16:39  blfshiye  阅读(453)  评论(0编辑  收藏  举报