一、文件路径
1、描述文件:
.\build\swupdate\sw-description-ab
2、镜像打包文件:
.\build\swupdate\sw-subimgs-ab.cfg
二、文件作用
1、sw-description-ab
用于描述版本信息和ab区中要打包的分区信息以及挂载点。
2、sw-subimgs-ab.cfg
用于列举编译后存在于out目录下的文件中,要参与swupdate打包时的ab区分区名称信息
三、文件内容
1、sw-description-ab
software =
{
version = "0.1.0";
description = "Firmware update for Tina Project";
stable = {
/* now in systemA, we need to upgrade systemB(bootB, rootfsB) */
now_A_next_B = {
images: (
/* {
filename = "kernel";
volume = "bootB";
},
{
filename = "rootfs";
volume = "rootfsB";
},*/
{
filename = "scu_b";
device = "/dev/mtdblock17";
}/*,
{
filename = "uboot";
type = "awuboot";
},
{
filename = "boot0";
type = "awboot0";
},
{
filename = "app";
device = "/dev/mtdblock12";
}, */
);
bootenv: (
{
name = "swu_mode";
value = "";
},
{
name = "scuAB";
value = "B";
}
/* {
name = "boot_partition";
value = "bootB";
},
{
name = "root_partition";
value = "rootfsB";
},
{
name = "systemAB_next";
value = "B";
},
{
name = "swu_version";
value = "2.0.0";
},
{
name = "swu_next";
value = "reboot";
}*/
);
};
/* now in systemB, we need to upgrade systemA(bootA, rootfsA) */
now_B_next_A = {
images: (
/*{
filename = "kernel";
volume = "bootA";
},=
{
filename = "rootfs";
volume = "rootfsA";
},*/
{
filename = "scu_a";
device = "/dev/mtdblock16";
}/*,
{
filename = "uboot";
type = "awuboot";
},
{
filename = "boot0";
type = "awboot0";
},
{
filename = "app";
device = "/dev/mtdblock12";
}, */
);
bootenv: (
{
name = "swu_mode";
value = "";
},
{
name = "scuAB";
value = "A";
}
/*{
name = "boot_partition";
value = "bootA";
},
{
name = "root_partition";
value = "rootfsA";
},
{
name = "systemAB_next";
value = "A";
},
{
name = "swu_version";
value = "2.0.0";
},
{
name = "swu_next";
value = "reboot";
}*/
);
};
};
/* when not call with -e xxx,xxx just clean */
bootenv: (
{
name = "swu_param";
value = "";
},
{
name = "swu_software";
value = "";
},
{
name = "swu_mode";
value = "";
},
{
name = "swu_version";
value = "";
}
);
}
2、sw-subimgs-ab.cfg
swota_file_list=(
build/swupdate/sw-description-ab:sw-description
# out/t113/evb1/openwrt/uboot.img:uboot
# out/t113/evb1/openwrt/boot0.img:boot0
# out/t113/evb1/openwrt/boot.img:kernel
# out/t113/evb1/openwrt/rootfs.img:rootfs
# out/t113/evb1/pack_out/user-resource.fex:user-res
# out/t113/evb1/pack_out/app.fex:app
# out/t113/evb1/pack_out/scu.fex:scu_b
out/t113/evb1/pack_out/scu.fex:scu_a
)