關於linux kernel及檔案系統在jz2440的移植

來源:互聯網
上載者:User

標籤:linux   記錄   網上   

結合網上及書上的講解,記錄下linux kernel及yaffs2檔案系統的移植過程及問題,以便以後查詢!



部分轉自:http://blog.sina.com.cn/s/blog_9d7f02120101gvnk.html


一,核心移植


修改晶振

修改arch/arm/mach-s3c2440/mach-smdk2440.c
    static void __init smdk2440_map_io(void)
{
    s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));
    s3c24xx_init_clocks(12000000);

    s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));
}

3、修改MTD分區:

修改檔案 /arch/arm/plat-s3c24xx/common-smdk.c

static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "kernel",
.offset = 0,
.size = SZ_2M,
},
[1] = {
.name = "jffs2",
.offset = MTDPART_OFS_APPEND,
.size = SZ_8M,
},

[2] = {
.name = "yaffs2",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
}
};

(註:本步驟為修改MTD分區,修改與書及原文有所不同,主要是由於後期是使用yaffs2檔案系統)


再修改s3c2410_platform_nand_smdk_nand_info smdk_nand_info = {
…
.tacls = 0,
.twrph0 = 30,
.twrph1=0,

(註:本步驟在書上並未介紹,未知及具體用途,猜測為nand flash的時序操作)

4、向核心打yaffs2補丁

  cd yaffs2

  ./patch-ker.sh c /linux-2.6.22.6


6、核心配置:

 進入核心目錄,

(cp /arch/arm/configs/s3c2410_defconfig .config 本步驟若下步可執行,就不大必要執行)

make s3c2410_defconfig(注意此處與書上不同,主要是不存在smdk2410_defconfig)

make menuconfig

(具體配置由於不大清楚用途,故可參考書上配置)

7、製作uImage

make uImage 即可


8.燒寫uImage

可用jz2440內建uboot的kernel uImage利用usb燒寫,注意若燒寫出現錯誤或結果多次不符,可先用erase或format擦除nand flash,這步比較重要!,如不用內建uboot。可用串口或tftp先傳檔案,然後nand write 檔案,如果這樣,注意燒寫位置英語內建uboot燒kernel位置一致,具體位置可觀察內建uboot燒寫位置,另外uImage與zImage以及vmlinux的關係可查資料 http://www.cnblogs.com/pigeon84/articles/2212404.html



本文出自 “文劍小調的隨筆記” 部落格,請務必保留此出處http://wenjianboy.blog.51cto.com/7389753/1622682

關於linux kernel及檔案系統在jz2440的移植

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.