Skip navigation

PublicImage - STB software image which is signed with Public key (default operator key) - STB_PUBLIC.
Updating variants of PublicImage:
From the Embedded portal (by HTTP or USB), it can be updated only to Factory image versions.
From the Bootloader or System Recovery menu, it can be updated only to PublicImage versions.

The manufacturer's version of PublicImage is put in each STB model release (see the imageupdate file in the root directory).

Image-making steps

1. Prepare required files according to items 1, 2, 3 of Creation of software image. Key points section as follows:

1.1 Preparation of environment variables.
1.2 Profile preparation.
1.3 Copying the kernel source file from the STB release to the working directory of Operator Utilities.

2. Perform export key from the GPG. To create PublicImage the Public key is used which is provided with Operator Utilities:

gpg --import stb_secbin.key
export MAG200_OP_KEY=STB_PUBLIC

3. Sign the kernel with the Public key. Perform the following:

./kernel_sign_254.sh

Note. More detailed description see in item 4 of Creation of software image. Key points section.

4. Create imageupdate :

./img_make.sh 218 "Test_test" ../../rootfs MAG254 ./img_make.profile.mag254

Note. More detailed description see in item 5 of the Creation of software image. Key points section.

5. After successful imageupdate creation, it is put in the root directory of Operator Utilities.

Created in such a way imageupdate file, comprised PublicImage, can be installed/updated into STB from the Bootloader (MAG250/254/270) or System Recovery Utility (MAG-256/3xx/4xx) menus.

Example of making PublicImage

Tip. To scroll the code text left-right, hover over the code display field, hold Shift key and use the mouse wheel.

  Example of making PublicImage for MAG-254
 root@localhost:~/218-r7-test/operators_utils_new_mag200_mag250_mag254# cat /etc/issue
 Ubuntu 14.04.1 LTS \n \l
 
 root@localhost:~/218-r7-test/operators_utils_new_mag200_mag250_mag254# uname -a
 Linux localhost 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:31:23 UTC 2014 i686 i686 i686 GNU/Linux
 
 root@localhost:~/218-r7-test# wget http://wiki.iptv.infomir.com/pub/operators_utils_new_mag200_mag250_mag254.tar.gz
 Saving to: ‘operators_utils_new_mag200_mag250_mag254.tar.gz’
 
 root@localhost:~/218-r7-test# wget http://soft.infomir.com/mag254/release/0.2.18-r7/vmlinux.bin.mag254
 Saving to: ‘vmlinux.bin.mag254’
 
 root@localhost:~/218-r7-test# wget http://soft.infomir.com/mag254/release/0.2.18-r7/rootfs-0.2.18r7.tar.gz
 Saving to: ‘rootfs-0.2.18r7.tar.gz’
 
 root@localhost:~/218-r7-test# tar -zxf rootfs-0.2.18r7.tar.gz 
 
 root@localhost:~/218-r7-test# tar -zxf operators_utils_new_mag200_mag250_mag254.tar.gz 
 
 root@localhost:~/218-r7-test# mv vmlinux.bin.mag254 operators_utils_new_mag200_mag250_mag254/images/
 
 root@localhost:~/218-r7-test# cd operators_utils_new_mag200_mag250_mag254/
 
 root@localhost:~/218-r7-test/operators_utils_new_mag200_mag250_mag254# cat img_make.profile.mag254
 #    Kernel's file system
 export KERNEL_PATH=./uImzlib_mag254.img
 #    File name for enviroment variable
 export ENV_VARIABLE_PATH=./images/env_mag254.txt
 #    Userfs
 export USERFS_VERSION=1
 export USERFS_PATH=./images/userfs.img
 #    File name for SecondBoot
 export SECONDBOOT_PATH=./images/SbootIm_mag254
 #    File name for Logotype
 export LOGOTYPE_PATH=./images/logo.bmp.gz
 export MAG200_OP_KEY=STB_PUBLIC
 
 root@localhost:~/218-r7-test/operators_utils_new_mag200_mag250_mag254# gpg --import stb_secbin.key
 gpg: key 6BEED1ED: secret key imported
 gpg: key 6BEED1ED: public key "STB_PUBLIC (Public key!!)" imported
 gpg: Total number processed: 1
 gpg:               imported: 1  (RSA: 1)
 gpg:       secret keys read: 1
 gpg:   secret keys imported: 1
 
 root@localhost:~/218-r7-test/operators_utils_new_mag200_mag250_mag254# export MAG200_OP_KEY=STB_PUBLIC
 
 root@localhost:~/218-r7-test/operators_utils_new_mag200_mag250_mag254# ./kernel_sign_254.sh
 File vmlinux.sign create - successfully!!!
 Image Name:   MAG254 SH4 Kernel Linux 2.6.17
 Created:      Fri Nov  7 10:39:35 2014
 Image Type:   SuperH Linux Kernel Image (gzip compressed)
 Data Size:    3244259 Bytes = 3168.22 kB = 3.09 MB
 Load Address: 0x80800000
 Entry Point:  0x80801000
 File uImzlib_mag254.img create - successfully!!!
 
 root@localhost:~/218-r7-test/operators_utils_new_mag200_mag250_mag254# ./img_make.sh 218 "test" ../rootfs-0.2.18r7 MAG254 ./img_make.profile.mag254
 Make rootfs image ../rootfs-0.2.18r7
 Append digital signature MAG200_OP_KEY=STB_PUBLIC
 File ./sumsubfsnone.img.sign create - successfully!!!
 gpg (GnuPG) 1.4.16
 Copyright (C) 2013 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law. 
 Home: ~/.gnupg
 Supported algorithms:
 Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
 Cypher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
      CAMELLIA128, CAMELLIA192, CAMELLIA256
 Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
 Compression: Uncompressed, ZIP, ZLIB, BZIP2
 File result:./imageupdate
 Create section "Kernel size:" and append file ./uImzlib_mag254.img.
 Create section "Image  size:" and append file ./sumsubfsnone.img.sign.
 Create section "Env size:" and append file ./images/env_mag254.txt.
 Create section "Userfs size:" and append file ./images/userfs.img.
 Create section "Logotype  size:" and append file ./images/logo.bmp.gz.
 File ./imageupdate create - successfully!!!
Need Help

Dave is an expert on the MAG STB and the author of this article.

Was this article helpful?

Yes No

Sorry to hear that.
How can we improve this article?

We use cookies in order to optimise our website, provide you with the best possible user experience and help us promote our products. Please read our Cookie Policy to find out how we use cookies and how you can control cookies.
By using this website or closing this message, you acknowledge our Privacy Policy and agree to our use of cookies as described in our Cookie Policy.