Install Linux Kernel,installkernel
二、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,}};