- 论坛徽章:
- 0
|
本帖最后由 zehn_w 于 2012-07-03 16:12 编辑
开发板是dm3730
想要给nand flash分区存放备份。
做法:
修改内核源码中 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,
- },
- };
复制代码 重新编译并烧写
设置uboot参数:- setenv mtdparts 'mtdparts=nand:512k(x-loader),1920k(u-boot),128k(u-boot-env),4m(kernel),64m(fs),-(fs2)'
复制代码 重新启动失败,错误提示:- [ 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)
复制代码 求指导! |
|