【linux】全志Tina配置swupdate工具进行分区打包

一、文件路径

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
)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值