- 論壇徽章:
- 0
|
本帖最后由 zehn_w 于 2012-07-03 16:12 編輯
開(kāi)發(fā)板是dm3730
想要給nand flash分區(qū)存放備份。
做法:
修改內(nèi)核源碼中 arch/arm/mach-omap2/borad-omap3stalker.c- /*nand
- **------------------------------------------------------------------------------
- */
- static struct mtd_partition omap3stalker_nand_partitions[] = {
- /* All the partition sizes are listed in terms of NAND block size */
- {
- .name = "X-Loader",
- .offset = 0,
- .size = 4*(SZ_128K),
- .mask_flags = MTD_WRITEABLE
- },
- {
- .name = "U-Boot",
- .offset = MTDPART_OFS_APPEND,
- .size = 15*(SZ_128K),
- .mask_flags = MTD_WRITEABLE
- },
- {
- .name = "U-Boot Env",
- .offset = MTDPART_OFS_APPEND,
- .size = 1*(SZ_128K)
- },
- {
- .name = "Kernel",
- .offset = MTDPART_OFS_APPEND,
- .size = 32*(SZ_128K)
- },
- {
- .name = "File System",
- .offset = MTDPART_OFS_APPEND,
- .size = 1*(SZ_64M),
- },
- /* 添加部分 */
- {
- .name = "Backup File System",
- .offset = MTDPART_OFS_APPEND,
- .size = MTDPART_SIZ_FULL,
- },
- };
復(fù)制代碼 重新編譯并燒寫(xiě)
設(shè)置uboot參數(shù):- setenv mtdparts 'mtdparts=nand:512k(x-loader),1920k(u-boot),128k(u-boot-env),4m(kernel),64m(fs),-(fs2)'
復(fù)制代碼 重新啟動(dòng)失敗,錯(cuò)誤提示:- [ 12.645446] UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs", error -19
- [ 12.653228] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
- [ 12.660339] Please append a correct "root=" boot option; here are the available partitions:
- [ 12.668823] 1f00 512 mtdblock0 (driver?)
- [ 12.673828] 1f01 1920 mtdblock1 (driver?)
- [ 12.678863] 1f02 128 mtdblock2 (driver?)
- [ 12.683837] 1f03 4096 mtdblock3 (driver?)
- [ 12.688873] 1f04 65536 mtdblock4 (driver?)
- [ 12.693847] 1f05 189952 mtdblock5 (driver?)
- [ 12.698883] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
復(fù)制代碼 求指導(dǎo)! |
|