日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

嵌入式系统系统升级内核双备份的实现方式

發布時間:2023/12/10 windows 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 嵌入式系统系统升级内核双备份的实现方式 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.nand flash MTD分區

? ? ? ? kernels/linux-2.6.31.1-cavm1/drivers/mtd/maps/xxxxx-flash.c?

? ? ? ??/* MTD partitions: From CNW5602 32MB
? ? ? ? ?* mtd0: 0x000C0000 00020000 "bootloader"
? ? ? ? ?* mtd1: 0x00040000 00020000 "factory_config"
? ? ? ? ?* mtd2: 0x00100000 00020000 "sysconfig"
? ? ? ? ?* mtd3: 0x00DE0000 00020000 "kernel_and_fs"
? ? ? ? ?* mtd4: 0x00020000 00020000 "bootloader_env"
? ? ? ? ?* mtd5: 0x00DE0000 00020000 "kernel_and_fs_backup"
? ? ? ? * mtd6: 0x001E0000 00020000 "syslog"
? ? ? ? * mtd7: 0x00020000 00020000 "transconfig"
? ? ? ? * mtd8: 0x00020000 00020000 "factoryconfig"
*/
static struct mtd_partition xxx_flash_partitions[] = {
{
.name = "bootloader", /* u-boot 6 sector (768KB), 0x20000-0xC0000: Reserved Space */
.size = 0x000C0000, /* 0x00000000 .. 0x000BFFFF */
.offset = 0,
.mask_flags = MTD_WRITEABLE, /* force read-only */
}, {
.name = "factory_config", /* Static Configuration from factory, (256KB = 128KB used + 128KB reserved) */
.size = 0x00040000, /* 0x000C0000 .. 0x000FFFFF */
.offset = MTDPART_OFS_APPEND,
.mask_flags = MTD_WRITEABLE, /* force read-only */
}, {
.name = "sysconfig", /* sysconfig 8 sector (1024KB) */
.size = 0x00100000, /* 0x00100000 .. 0x001FFFFF */
.offset = MTDPART_OFS_APPEND,
}, {
.name = "kernel_and_fs", /* Linux Kernel and File System (bootpImage) (14208KB) */
.size = 0x00DE0000, /* 0x00200000 .. 0x00FDFFFF */
.offset = MTDPART_OFS_APPEND,
}, {
.name = "bootloader_env", /* bottom 1 sector (128KB) for u-boot env variables */
.size = 0x00020000, /* 0x00FE0000 .. 0x00FFFFFF */
.offset = MTDPART_OFS_APPEND,
}, {
.name = "kernel_and_fs_backup", /* Linux Kernel and File System (bootpImage) (14208KB) */
.size = 0x00DE0000, /* 0x01000000 .. 0x01DDFFFF */
.offset = MTDPART_OFS_APPEND,
}, {
.name = "syslog", /* syslog 15 sector (1920KB) */
.size = 0x001E0000, /* 0x01DE0000 .. 0x01FBFFFF */
.offset = MTDPART_OFS_APPEND,
}, {
.name = "transconfig", /* transconfig 1 sector (128KB) */
.size = 0x00020000, /* 0x01FC0000 .. 0x01FDFFFF */
.offset = MTDPART_OFS_APPEND,
}, {
.name = "factoryconfig", /* factoryconfig 1 sector (128KB) */
.size = MTDPART_SIZ_FULL, /* 0x01FE0000 .. 0x01FFFFFF */ /* MTDPART_SIZ_FULL= 0x00020000 */
.offset = MTDPART_OFS_APPEND,
}
};
2.在應用層讀寫open("/dev/mtd3", O_RDWR);

總結

以上是生活随笔為你收集整理的嵌入式系统系统升级内核双备份的实现方式的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。