制作升级包:
一、整包升级包制作
以tina4.0 A133 b3版型为例
在/target/allwinner/a133-b6/swupdate或者
target/allwinner/generic/swupdate/目录添加如下文件
1.非安全固件
sw-subimgs-ab.cfg
swota_file_list=(
target/allwinner/generic/swupdate/sw-description-ab:sw-description
out/${TARGET_BOARD}/uboot.img:uboot
out/${TARGET_BOARD}/boot0.img:boot0
out/${TARGET_BOARD}/boot.img:kernel
out/${TARGET_BOARD}/rootfs.img:rootfs
)
升级指令:swupdate_pack_swu -ab
2.安全固件
sw-subimgs-ab-secure.cfg
swota_file_list=(
target/allwinner/generic/swupdate/sw-description-ab:sw-description
out/${TARGET_BOARD}/image/rootfs.fex:rootfs
out/${TARGET_BOARD}/image/toc1.fex:uboot
out/${TARGET_BOARD}/image/toc0.fex:boot0
out/${TARGET_BOARD}/image/boot.fex:kernel
)
升级指令:swupdate_pack_swu -ab-secure
制作成功log:
~/Tina$:swupdate_pack_swu -ab-secure
记录了128+0 的读入
记录了128+0 的写出
65536 bytes (66 kB, 64 KiB) copied, 0.00795961 s, 8.2 MB/s
记录了2048+0 的读入
记录了2048+0 的写出
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0114947 s, 91.2 MB/s
####/home/**/Tina/target/allwinner/a133-b6/swupdate/sw-subimgs-ab-secure.cfg####
target/allwinner/generic/swupdate/sw-description-ab:sw-description
out/a133-b6/image/rootfs.fex:rootfs
out/a133-b6/image/toc1.fex:uboot
out/a133-b6/image/toc0.fex:boot0
out/a133-b6/image/boot.fex:kernel
-------------------- config --------------------
subimgs config by: /home/**/Tina/target/allwinner/a133-b6/swupdate/sw-subimgs-ab-secure.cfg
out dir: /home/**/Tina/out/a133-b6/swupdate
-------------------- do copy --------------------
-------------------- do sha256 --------------------
-------------------- do sign --------------------
-------------------- do md5sum --------------------
6f6c07549e1a85a1d7fc4ef676f63186 sw-description
68a2c0f6952487732e2d7f03743b870e rootfs
8e9be0b89b1188c2141d334ec1ab33bd uboot
cfee1d1698e9de3aead374bf01bf8805 boot0
b8641a699c88b35b3629c53d6a033c5d kernel
-------------------- do cpio --------------------
sw-description
rootfs
uboot
boot0
kernel
cpio_item_md5
120241 块
-------------------- out file in --------------------
Tina/out/a133-b6/swupdate/tina-a133-b6-ab-secure.swu
59M /home/**/Tina/out/a133-b6/swupdate/tina-a133-b6-ab-secure.swu
3.注意制作失败案例
swupdate_pack_swu -ab
###storage type error###
###cannot choose boot0, please config storage_type in sys_config ###
记录了2048+0 的读入
记录了2048+0 的写出
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0196256 s, 53.4 MB/s
说明sys_config.fex没指定具体的storage_type
sys_config.fex文件改 storage_type = 1即可
二、差分包升级包制作
.fw_printenv命令
root@TinaLinux:/# fw_printenv
bootdelay=0
bootcmd=run setargs_nand boot_normal
earlyprintk=sunxi-uart,0x05000000
initcall_debug=0
console=ttyS0,1500000
nand_root=/dev/nandd
mmc_root=/dev/mmcblk0p6
init=/sbin/init
rdinit=/rdinit
loglevel=8
cma=32M
mac=
wifi_mac=
bt_mac=
specialstr=
keybox_list=rpmb_key,dm_crypt_key
trace_buf_size=64M
trace_event=sched_wakeup,sched_switch,sched_blocked_reason,sched_cpu_hotplug,block,ext4
trace_enable=0
setargs_nand=setenv bootargs console=${console} root=${nand_root} rootwait init=${init} rdinit=${rdinit} loglevel=${loglevel} earlyprintk=${earlyprintk} initcall_debug=${initcall_debug} loglevel=${logleve
l} partitions=${partitions} cma=${cma} gpt=1 rootfstype=ext4
setargs_mmc=setenv bootargs console=${console} root=${mmc_root} rootwait init=${init} rdinit=${rdinit} loglevel=${loglevel} earlyprintk=${earlyprintk} initcall_debug=${initcall_debug} loglevel=${loglevel} p
artitions=${partitions} cma=${cma} gpt=1 rootfstype=ext4
boot_normal=sunxi_flash read 45000000 ${boot_partition};bootm 45000000
boot_recovery=sunxi_flash read 45000000 recovery;bootm 45000000
boot_fastboot=fastboot
boot_partition=bootB
root_partition=rootfsB
systemAB_next=B
swu_next=reboot
手动切换到B系统
fw_setenv boot_partition bootB
fw_setenv root_partition rootfsB