Tizen OS Upgrade Package Generation Guide

From Tizen Wiki
Jump to: navigation, search

※ Caution : This guide is based on rpi4

Prerequisite

  1. Install below packages with apt-get
    • sudo apt-get install cmake, pkg-config, attr, tar, python, python-apt, p7zip, p7zip-full
  2. Install right 3 librariers : lzma-sdk libdivsurfsort libtota
    1. Clone repository
      • git clone (repository)
    2. Change branch to tizen
      • cd (repository)
      • git checkout -t remotes/origin/tizen
    3. Build and load library
      • sudo ./local_build.sh
Tizen:~/Update/lzma-sdk$ sudo ./local_build.sh 

-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jsh/Update/lzma-sdk/local_build
Scanning dependencies of target lzma-tool-object
[  4%] Building C object CMakeFiles/lzma-tool-object.dir/C/7zAlloc.c.o
[  8%] Building C object CMakeFiles/lzma-tool-object.dir/C/7zBuf2.c.o

...

[ 95%] Linking C shared library liblzma-tool.so
[ 95%] Built target lzma-tool
Scanning dependencies of target lzma-tool-static
[100%] Linking C static library liblzma-tool-static.a
[100%] Built target lzma-tool-static
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/pkgconfig/liblzma-tool.pc
-- Installing: /usr/local/include/lzma-tool/Types.h
-- Installing: /usr/local/include/lzma-tool/Alloc.h
-- Installing: /usr/local/include/lzma-tool/7zFile.h
-- Installing: /usr/local/include/lzma-tool/7zVersion.h
-- Installing: /usr/local/include/lzma-tool/LzmaDec.h
-- Installing: /usr/local/include/lzma-tool/LzmaEnc.h
-- Installing: /usr/local/lib/liblzma-tool.so.0.0.0
-- Up-to-date: /usr/local/lib/liblzma-tool.so
-- Installing: /usr/local/lib/liblzma-tool-static.a
  • sudo ldconfig /usr/local/lib
3. Check library installed successfully
  • ss_bsdiff
Tizen:~$ ss_bsdiff

ss_bsdiff: ss_bsdiff Version 5.0
Usage: ss_bsdiff oldfile newfile patchfile
  • ss_bspatch
Tizen:~$ ss_bspatch

ss_bspatch: ss_bspatch Version 1.0
Usage: ss_bspatch oldfile newfile patchfile

Generate Upgrade Package

※ If you want to sign upgrade package, please refer Upgrade package signing guide

  1. Download upgrade package generator : tota-upg
    1. Clone repository
      • git clone (repository)
    2. Change branch to tizen
      • cd tota-upg
      • git checkout -t remotes/origin/tizen
  2. Download old/new image in tota-upg
    ※ You must have only one image per directory. multiple image in directory cause unintentional behavior.
    • Old image path : tota-upg/mk_delta/rpi3/data/old_tar
    • New image path : tota-upg/mk_delta/rpi3/data/new_tar
  3. Generate Upgrade Package
    • tota-upg/scripts/delta-generation.sh (tota-upg path) rpi3
    ※ Upgrade package generation need root permission, you should enter the root password while in progress
Tizen:~/Update/tota-upg$ ./scripts/delta-generation.sh . rpi3

MONDATE = 0723_1
Make FW_DELTA Delta file
*******************************************************************
[old] tizen-unified_20200713.1_iot-headed-3parts-armv7l-rpi.tar.gz contains rootfs.img
[new] tizen-unified_20200714.2_iot-headed-3parts-armv7l-rpi.tar.gz contains rootfs.img
===== Start writing image versions =====

...

tar result directory
Making delta binary is End!! (FW_DELTA)
/home/jsh/Update/tota-upg/mk_delta/rpi3
OVERALL TIMESTAMP : [START] 11:04:12 ~ [END] 11:11:29
  • Check result : tota-upg/mk_delta/rpi3/result/(date)/FW_DELTA/delta.tar
  • e.g) date : 2020-06-10, result : tota-upg/mk_delta/rpi3/result/0610_1/delta.tar