Table of Contents

CustomImage - image which is signed with “custom-key”. This key is created by operator without manufacturer.
Updating variants: Updates via HTTP or USB from portal on firmware versions that are signed by the same key (custom-key). Is used if there is a need in STB update from portal (HTTP or USB update method).
From Booloader menu can be updated on PublicImage or CustomImage (transitional version) via Multicast/USB with bootstrap/TFTP

CustomImage - image which is signed with custom key, further - “custom-key” (digital signature by manufacturer doesn't need). Generating and using custom-key is for firmware updating via НТТP and (USB without bootstrap) on versions which are different of manufacturer version. There is opportunity to update firmware in bootloader menu via multicast and (USB with bootstrap using).

Build order

  1. Prepare “custom-key”. You need to prepare “custom-key” and place it in rootfs in /usr/bin/ directory before image making.
  2. Make “transitional” image with necessary customizations Without operator logo!.
  3. Make “final” image with all necessary customizations including operator logo (if it is needed).
  4. Update STB in two stages:
    1. On the “transitional” image - update on firmware version 0.2.14-r8 and above only via Multicast or (USB&Bootstrap from Bootloader menu); - On firmware versions below 0.2.14-r8 using any update method.
    2. On the “final” image - Update to image which is signed by «Custom-key» possible only via HTTP or (USB without Bootstrap from portal system settings menu)

1. Prepeare custom-key

gpg --gen-key

Choose:

(5) RSA (sign only) 
What keysize do you want? (2048) 2048
Key is valid for? (0) 0
Is this correct? (y/N) y
Real name: Key ID

where: Key ID - random key name, which will be stored in GPG

gpg -o stb_custom.bin --export ID_Key

File stb_custom.bin should be used in all next image and firmware making (after 0.2.14-r8) .

2. "Transitional" image making

Make shure that stb_custom.bin file is in rootfs /usr/bin/ directory

gpg --import stb_secbin.key
export MAG200_OP_KEY=STB_PUBLIC
./kernel_sign_250.sh

“Transitional” image making. Attention!Without operators logo!
Comment the string export LOGOTYPE_PATH=./images/logo.bmp.gz in profile ./img_make.profile.mag250

./img_make.sh 216 "test_transitional" ../rootfs MAG250 ./img_make.profile.mag250
mv imageupdate imageupdate_trans

3. "Final" image making

export MAG200_OP_KEY=ID of custom-key 
./kernel_sign_250_custom.sh
export MAG200_OP_KEY=ID of custom-key
./img_make.sh 216 "test_final" ../rootfs MAG250 ./img_make.profile.mag250
mv imageupdate imageupdate_final

4. Update STB on "CustomImage" in two stages:

Transitional image should be installed in STB only once (to load on STB stb_custom.bin).

So there is no need to reinstall transitional on STB that has already your stb_custom.bin in rootfs. It will be enought to create only final version and update it on STB using HTTP or USB from portal.

File stb_custom.bin should be in rootfs, directory /usr/bin/ in both transitional and final images

Example of making CustomImage for MAG-254

Example of making CustomImage for MAG-254