Jump to content

Videostrong KII Pro (videostrong-kii-pro): Difference between revisions

From postmarketOS Wiki
Exkc (talk | contribs)
Halamix2 (talk | contribs)
mNo edit summary
 
(25 intermediate revisions by 4 users not shown)
Line 3: Line 3:
| name = KII Pro
| name = KII Pro
| codename = videostrong-kii-pro
| codename = videostrong-kii-pro
| genericdevice=Amlogic Generic TV Box (amlogic-tvbox)
| image = File:Videostrong-kii-pro-in-all-its-glory.png
| image = File:Videostrong-kii-pro-in-all-its-glory.png
| imagecaption = Videostrong KII Pro
| imagecaption = Videostrong KII Pro
Line 15: Line 16:
| memory = 2 GB
| memory = 2 GB
| architecture = aarch64
| architecture = aarch64
| pmoskernel = 6.1.10
| pmoskernel = 6.3.3
<!-- the following status_* questions should be answered with Y for yes, P for partial, N for no, - for N/A or unavailable, or left blank for untested or unknown -->
<!-- the following status_* questions should be answered with Y for yes, P for partial, N for no, - for N/A or unavailable, or left blank for untested or unknown -->
| status_usbnet = - <!-- Can't use a USB port for networking in userspace -->
| status_usbnet = N
| status_flashing = N <!-- No support for Amlogic's protocol. Not needed -->
| status_flashing = - <!-- No support for Amlogic's protocol. Not needed -->
| status_touch = -  
| status_touch = -  
| status_screen = -  
| status_screen = -  
Line 57: Line 58:
| status_fossbootloader = Y
| status_fossbootloader = Y
| status_uart = Y
| status_uart = Y
| status_uboot = v2020.07 works. Newer versions require more effort to work properly but can boot postmarketOS.
| status_uboot = Chainloading v2020.07 works. Booting Mainline U-Boot as BL33 instead of the vendor U-Boot works as well, at your own risk!
| status_uboot_primary = Y
| status_uboot_primary = Y
| status_uboot_secondary = Y
| status_uboot_secondary = Y
Line 69: Line 70:
| status_uboot_buttons = -
| status_uboot_buttons = -
| booting = yes  
| booting = yes  
| type=set-top box
}}
}}
{{Based on SoC|Amlogic_S905(-H)|Amlogic S905}}
{{Based on SoC|Amlogic_S905(-H)|Amlogic S905}}
The KII Pro is a set-top box made by Videostrong, using an Amlogic S905 SoC, and running a custom
The KII Pro is a set-top box made by Videostrong, using an Amlogic S905 SoC, and running a custom
(proprietary) fork of AOSP. It also comes with DVB inputs and an infrared TV remote.
(proprietary) fork of AOSP based on Amlogic's reference build. It also comes with DVB inputs and  
an infrared TV remote.


== Other pages ==
This page only documents info specific to this box. For installation instructions, look at the generic port's wiki page instead.
* [[Videostrong KII Pro (videostrong-kii-pro)/DVB|DVB]]
* [[Videostrong KII Pro (videostrong-kii-pro)/U-Boot as primary bootloader|Running mainline U-Boot as the primary bootloader]]


== Beaware of different versions ==
== Beaware of different versions ==
Line 90: Line 91:
It may work by using the right DTB file though but that's untested since [[User:F|F]] doesn't own a Mecool KII Pro.
It may work by using the right DTB file though but that's untested since [[User:F|F]] doesn't own a Mecool KII Pro.


== How to enter flash mode ==
== How to enter USB mode ==
{{note|This isn't needed to boot up postmarketOS. It's only really used if you bricked your set-top box.}}
You need a USB Type-A to USB Type-A cable.
You need a USB Type-A to USB Type-A cable.


* Unplug everything from your set-top box
* Unplug everything from your set-top box
* Plug your USB cable to the USB port at the top left (other USB ports won't work)
* Plug your USB cable to the USB port at the top left (other USB ports won't work)
<source lang=text>
<pret>
     this one
     this one
_______ \/ ____________
_______ \/ ____________
Line 102: Line 104:
   __  |__| |__|    ||  \
   __  |__| |__|    ||  \
__________________________\
__________________________\
</source>
</pre>
* Press and hold the reset button
* Press and hold the reset button
<source lang=text>
<pre>
  _||_||____________
  _||_||____________
|                  |
|                  |
Line 114: Line 116:
| O              O |
| O              O |
|__________________|
|__________________|
</source>
</pre>
* While holding the reset button, plug the USB cable to your computer
* While holding the reset button, plug the USB cable to your computer
* After 5 seconds or so, release the reset button
* After 5 seconds or so, release the reset button
* Run <code>lsusb</code>, you should see something like this:
* Run <code>lsusb</code>, you should see something like this:
<source lang=shell-session>
<syntaxhighlight lang=shell-session>
$ lsusb
$ lsusb
[...]
[...]
Bus 003 Device 004: ID 1b8e:c003 Amlogic, Inc.  
Bus 003 Device 004: ID 1b8e:c003 Amlogic, Inc.  
[...]
[...]
</source>
</syntaxhighlight>
 
You'd also need a computer running Microsoft Windows with the Amlogic USB Burner or Amlogic Update if you wish to use '''GNU'''+Linux. Both software are  
But that's not really needed unless you bricked your set-top box (which is very unlikely as postmarketOS doesn't touch
the internal eMMC yet, unless, of course, you wiped the eMMC from postmarketOS). You'd also need a computer running  
Microsoft Windows with the Amlogic USB Burner or Amlogic Update if you wish to use '''GNU'''+Linux. Both software are  
proprietary.
proprietary.
{{Note|If the eMMC and SD card are not bootable, the set-top box will likely boot into the flash mode. Again, untested.}}
{{Note|If the eMMC and SD card are not bootable or you inserted an Amlogic HDMI dongle (see [[Amlogic]]), the set-top box will boot into flash mode.}}


== How to enter recovery mode ==
== How to enter recovery mode ==
Line 135: Line 134:
be possible to flash postmarketOS, but this is untested.
be possible to flash postmarketOS, but this is untested.


== Installation ==
== Booting up (stock U-Boot) ==
Only installing to an SD card works currently.
 
Use [[pmbootstrap]] to build your own image, like so:
 
<source lang="shell-session">
$ pmbootstrap init
installing to an SD card. change 'mmcblkX' with the path of your SD card.
THIS WILL ERASE ALL DATA IN YOUR SD CARD
$ pmbootstrap install --sdcard=/dev/mmcblkX
</source>
 
What you need to do, basically is:
 
# Select the correct release channel (this device is currently only supported by edge)
# Select the right manufacturer (videostrong)
# Select the right device codename (kii-pro)
# Choose if you want nonfree firmware or not (required for working Wi-Fi and bluetooth)
# Answer all the other questions as you wish
 
Then:


# Put the SD card you installed postmarketOS on in the SD card slot
# Put the SD card you installed postmarketOS on in the SD card slot
Line 170: Line 149:


=== UART ===
=== UART ===
 
<gallery>
[[File:KIIPro-UART-PinOut.png|229px|left|Click to enlarge]]
File:KIIPro-UART-PinOut.png|thumb|left|Pinout
</gallery>
UART works, but is disabled by default when booting postmarketOS. You can enable UART in postmarketOS by editing the  
UART works, but is disabled by default when booting postmarketOS. You can enable UART in postmarketOS by editing the  
<code>extlinux/extlinux.conf</code> file located in the boot partition.
<code>extlinux/extlinux.conf</code> file located in the boot partition.


Find this line:
Find this line:
<source lang=plain>
<pre>
   append console=null PMOS_NO_OUTPUT_REDIRECT
   append console=null
</source>
</pre>


And change it to:
And change it to:
<source lang=plain>
<pre>
   append console=ttyAML0,115200 PMOS_NO_OUTPUT_REDIRECT
   append console=ttyAML0,115200
</source>
</pre>


Then connect RX, TX, and Ground to your USB-to-TTL, according to the pinout shown. '''DO NOT CONNECT THE 3V3 PAD'''  
Then connect RX, TX, and Ground to your USB-to-TTL, according to the pinout shown above. '''DO NOT CONNECT THE 3V3 PAD'''  


Afterwards, you can now run:
Afterwards, you can now run:
<source lang=shell-session>
<syntaxhighlight lang=shell-session>
# microcom -s 115200 /dev/ttyUSB0 # replace /dev/ttyUSB0 with the path of your USB-to-TTL device
# microcom -s 115200 /dev/ttyUSB0 # replace /dev/ttyUSB0 with the path of your USB-to-TTL device
</source>
</syntaxhighlight>
 


=== LEDs ===
=== LEDs ===
Line 198: Line 177:
Use <code>/sys/class/leds/red:status</code> to control the LEDs, like this for example:
Use <code>/sys/class/leds/red:status</code> to control the LEDs, like this for example:


<source lang="shell-session">
<syntaxhighlight lang="shell-session">
# echo 1 > /sys/class/leds/red:status/brightness # red: on, blue: off
# echo 1 > /sys/class/leds/red:status/brightness # red: on, blue: off
# echo 0 > /sys/class/leds/red:status/brightness # red: off, blue: on
# echo 0 > /sys/class/leds/red:status/brightness # red: off, blue: on
</source>
</syntaxhighlight>


=== DVB hardware ===
=== DVB hardware ===
See [[Videostrong KII Pro (videostrong-kii-pro)/DVB]].
See [[Videostrong KII Pro (videostrong-kii-pro)/DVB]].
=== IR Receiver ===
Works! No setup is needed apart from using an interface that's optimized for remote controls.


=== Wi-Fi and Ethernet ===
=== Wi-Fi and Ethernet ===
Wi-Fi works, but requires a nonfree firmware. It also doesn't seem to work properly sometimes. This issue also happens on the [[Xiaomi POCO F1 (xiaomi-beryllium)]]. Doesn't happen on LibreELEC, which doesn't use NetworkManager, so it may be a problem with NetworkManager after all.
Wi-Fi works, but requires a nonfree firmware. It also doesn't seem to work properly sometimes. This issue also happens on the [[Xiaomi POCO F1 (xiaomi-beryllium)]]. Doesn't happen on LibreELEC, which doesn't use NetworkManager, so it may be a problem with NetworkManager after all.


The TV box has an 8P8C port used for connecting to the internet (so-called 'Ethernet port') which works fine on postmarketOS as long as you boot it using a mainline U-Boot chainloaded from the vendor U-Boot. This weird quirk has to do with the device tree.
The TV box has an ethernet port which works fine on postmarketOS as long as you boot it using a mainline U-Boot chainloaded from the vendor U-Boot. This weird quirk has to do with the device tree.


=== Bluetooth ===
=== Bluetooth ===
Bluetooth works, but requires nonfree firmware. It also requires a DTS patch which has been sent [https://patchwork.kernel.org/project/linux-amlogic/patch/20230210170721.1285914-3-christianshewitt@gmail.com/ upstream].
Bluetooth works, but requires nonfree firmware. It also requires a DTS patch which has been sent [https://patchwork.kernel.org/project/linux-amlogic/patch/20230210170721.1285914-3-christianshewitt@gmail.com/ upstream].


=== FOSS bootloader ===
The KII Pro uses U-Boot as its primary bootloader.
U-Boot v2020.07 (with some minor modifications) works on the TV box. Newer versions also work, although HDMI output (until postmarketOS boots) and ethernet are broken.
=== Audio ===
Works. Needs a DTS kernel patch, which has been sent [https://patchwork.kernel.org/project/linux-amlogic/patch/20230210170721.1285914-4-christianshewitt@gmail.com/ upstream]. There are no ALSA UCM configs, so you may need to tinker around a little bit with <code>alsamixer</code> for HDMI audio to work, which is fairly straightforward. And when you're done, you can save your configuration with this command:
<source lang="shell-session">
# alsactl store
</source>
{{todo|ALSA UCM}}
=== Hardware acceleration ===
Seems to work! Weston and Plasma, as well as Plasma Bigscreen run fine on the device and the postmarketOS demos work fine too.
Video encoding/decoding doesn't work however.
=== X11 ===
Works fine. A custom configuration file is needed else it crashes (included).
=== HDMI-CEC ===
Sort of works. The TV detects a CEC device, but you cannot use the TV's remote to control the set-top box (at least, on Plasma Bigscreen).
Seems like <code>libcec</code> does detect which button in the remote is pressed.
=== UIs ===
Most UIs are expected to work, although you may want to use one suited for televisions (such as Plasma Bigscreen).
(This list isn't in any particular order)
{| class="wikitable feature-colors"
! Name
! Display server
! Notes
|-
  | Phosh
  | Wayland
  | Works.
|-
  | KDE Plasma Desktop
  | Wayland
  | Works. A little unstable.
|-
  | KDE Plasma Mobile
  | Wayland
  | Doesn't work. After the lockscreen it's completly unusable.
|-
  | KDE Plasma Bigscreen
  | Wayland
  | Works.
|-
  | Weston
  | Wayland
  | Works. The cursor disappears sometimes when using an XWayland app. A little unstable (less than Plasma Desktop)
|-
  | LXQt
  | X11
  | Works.
|-
  | Kodi on framebuffer
  | -
  | Works.
|-
  | GNOME and GNOME Classic
  | Wayland
  | Works. A little laggy.
|-
  | SXMO
  | X11
  | Works.
|-
  | SXMO
  | Wayland
  | Works.
|-
  | MATE
  | X11
  | Works.
|-
  | XFCE4
  | X11
  | Works.
|}
== Disassembly guide ==
{{todo|Good disassembly guide.}}
* Flip your set-top box and unscrew the following screws:
<source lang=text>
        | | | |
      __| |_| |_______________________________
      |                                        |
      |  ( )                          ( )    |
      |                                        |
      |                                        |
      |                                        |
      |                                        |
      |                                        |
      |                                        |
      |                                        |
this >  (o)                        o  ( )    |
      |                            /\        |
      |_________________________ and this  ____|
</source>
* Unscrew the nut in the DVB-S2 port
* Pry the top casing


== Pictures ==
== Pictures ==
Line 330: Line 200:
File:Videostrong-kii-pro-tty.jpeg|300px|thumb|left|On a TTY. Running neofetch to look cool.
File:Videostrong-kii-pro-tty.jpeg|300px|thumb|left|On a TTY. Running neofetch to look cool.
</gallery>
</gallery>
== Boot process ==
(Useful for porting other OSes to it)
<source lang="text">
                    if emmc  +------+
                  +---------->| emmc |---------------+
                  |          +------+              |
+---------+      | else if sd card  +---------+    |
| bootrom |------+------------------>| sd card |    |
+---------+      |                  +---------+    |
                  +-----[...]                        |
                                                    |
        +--------------------------------------------+
        |     
        |                                          +---------+    +-------------------+    +-----------------+
        v                                    +---->| sd card |---->| 's905_autoscript' |---->| v2020.07 u-boot |
+---------------+  if sd and multiboot mode |    +---------+    +-------------------+    +-----------------+
| vendor u-boot |---------------------------+                                                        |
+---------------+              else if emmc |    +------+    +-----------------------------+      v
                                            +---->| emmc |---->| vendor's android 5.1.1 fork |  +----------+
                                                  +------+    +-----------------------------+  | extlinux |
                                                                                                  +----------+
                                                                                                      |
                                                                                                      v
                                                                                                +--------------+
                                                                                                | postmarketOS |
                                                                                                +--------------+
</source>


== Replace the vendor U-Boot ==
== Replace the vendor U-Boot ==
Line 367: Line 206:
== Community info ==
== Community info ==
=== Maintainers ===
=== Maintainers ===
* [[User:F|F]] (<code>f_</code> on OFTC and Libera, <code>@notrealvitali64:matrix.org</code> on Matrix (NOT USED. PLEASE USE IRC))
* [[User:FerassElHafidi|FerassElHafidi]] (<code>f_</code> on IRC)


=== Contributors ===
=== Contributors ===
* [[User:exkc|exkc]] ( <code>@root:exkc.moe</code>/<code>@exxxxkc:yatrix.org</code>/<code>@exxxxkc:matrix.org</code>/<code>@af2e02839bcfb0aae789a9ea66f63afff6bc14a5c1685be36c6db57fcf2cdc6f78176afe0ffab58e82d82df2457744c693593ebc9ac063e65a1e6260503ef373:the-apothecary.club</code>/<code>@exxxxkc:cuteworld.space</code> on Matrix)


=== Users owning this device ===
=== Users owning this device ===

Latest revision as of 11:25, 1 February 2025

Note This device is supported as part of a generic port. Refer to Amlogic Generic TV Box (amlogic-tvbox) for installation instructions and more information.
Videostrong KII Pro
Videostrong KII Pro
Videostrong KII Pro
Manufacturer Videostrong
Name KII Pro
Codename videostrong-kii-pro
Released 2016
Type set-top box
Hardware
Chipset Amlogic S905
CPU 2.0 GHz Quad core
GPU Mali 450
Storage 16 GB eMMC
Memory 2 GB
Architecture aarch64
Software
Original software Android
Original version 5.1.1 (+ preinstalled KII Pro software and a different launcher)
FOSS bootloader yes
postmarketOS
Category testing
Pre-built images no
Mainline yes
postmarketOS kernel 6.3.3
Generic port Amlogic Generic TV Box (amlogic-tvbox)
Features
USB Networking
Broken
Internal storage
No data
SD card
No data
Multimedia
3D Acceleration
Works
Built-in DVB
Broken
Audio
Works
IR RX
Works
Connectivity
WiFi
Works
Bluetooth
Works
Ethernet
Works
Miscellaneous
FDE
No data
USB-A
Works
SATA/eSATA
No data
HDMI/DP
Works
U-Boot
Primary Bootloader
Works
Secondary Bootloader
Works
Mainline
Partial
Internal Storage
No data
SD card
Works
USB Host
No data
Display
Works
Keyboard
Broken

The KII Pro is a set-top box made by Videostrong, using an Amlogic S905 SoC, and running a custom (proprietary) fork of AOSP based on Amlogic's reference build. It also comes with DVB inputs and an infrared TV remote.

This page only documents info specific to this box. For installation instructions, look at the generic port's wiki page instead.

Beaware of different versions

There were different versions of this TV box, all made by the same manufacturer.

Videostrong just happens to (re)sell some of their products under the Mecool brand, with different hardware.

The 2 known versions of the KII Pro are the "original" KII Pro (the version this port is made for), which uses the Amlogic S905 SoC, and the newer Mecool KII Pro, which uses the Amlogic S905D SoC instead. They both look the same except the newer one most likely has a Mecool logo on the front, and the Mecool KII Pro seems to use Android 7.1.1 instead of Android 5.1.1. If you own the Mecool KII Pro then this port won't work there without some changes. It may work by using the right DTB file though but that's untested since F doesn't own a Mecool KII Pro.

How to enter USB mode

Note This isn't needed to boot up postmarketOS. It's only really used if you bricked your set-top box.

You need a USB Type-A to USB Type-A cable.

  • Unplug everything from your set-top box
  • Plug your USB cable to the USB port at the top left (other USB ports won't work)

<pret>

    this one

_______ \/ ____________

       __   __     || \
      |__| |__|    ||  \
  __  |__| |__|    ||   \

__________________________\

  • Press and hold the reset button
 _||_||____________
|                  |
| O              O |
|   ------------   |
|   ------------. < here
|   ------------   |
|   ------------   |
| O              O |
|__________________|
  • While holding the reset button, plug the USB cable to your computer
  • After 5 seconds or so, release the reset button
  • Run lsusb, you should see something like this:
$ lsusb
[...]
Bus 003 Device 004: ID 1b8e:c003 Amlogic, Inc. 
[...]

You'd also need a computer running Microsoft Windows with the Amlogic USB Burner or Amlogic Update if you wish to use GNU+Linux. Both software are proprietary.

Note If the eMMC and SD card are not bootable or you inserted an Amlogic HDMI dongle (see Amlogic), the set-top box will boot into flash mode.

How to enter recovery mode

Also not needed. Press the reset button once while booting. You'll be booted to an Android recovery, where it may be possible to flash postmarketOS, but this is untested.

Booting up (stock U-Boot)

  1. Put the SD card you installed postmarketOS on in the SD card slot
  2. The steps below need to be done only once (unless you format the internal eMMC)
    1. Unplug the power supply
    2. Press and hold the reset button below your TV box
    3. While holding the reset button, plug in your power supply back
    4. Keep holding the reset button until your screen gets a signal

A mainline U-Boot should load, and postmarketOS should boot up.

What works

See the device status at the top (mobile) or at the right (desktop).

UART

UART works, but is disabled by default when booting postmarketOS. You can enable UART in postmarketOS by editing the extlinux/extlinux.conf file located in the boot partition.

Find this line:

  append console=null

And change it to:

  append console=ttyAML0,115200

Then connect RX, TX, and Ground to your USB-to-TTL, according to the pinout shown above. DO NOT CONNECT THE 3V3 PAD

Afterwards, you can now run:

# microcom -s 115200 /dev/ttyUSB0 # replace /dev/ttyUSB0 with the path of your USB-to-TTL device

LEDs

The 2 LEDs the device has are functionnal.

Use /sys/class/leds/red:status to control the LEDs, like this for example:

# echo 1 > /sys/class/leds/red:status/brightness # red: on, blue: off
# echo 0 > /sys/class/leds/red:status/brightness # red: off, blue: on

DVB hardware

See Videostrong KII Pro (videostrong-kii-pro)/DVB.

Wi-Fi and Ethernet

Wi-Fi works, but requires a nonfree firmware. It also doesn't seem to work properly sometimes. This issue also happens on the Xiaomi POCO F1 (xiaomi-beryllium). Doesn't happen on LibreELEC, which doesn't use NetworkManager, so it may be a problem with NetworkManager after all.

The TV box has an ethernet port which works fine on postmarketOS as long as you boot it using a mainline U-Boot chainloaded from the vendor U-Boot. This weird quirk has to do with the device tree.

Bluetooth

Bluetooth works, but requires nonfree firmware. It also requires a DTS patch which has been sent upstream.


Pictures

Replace the vendor U-Boot

See Running mainline U-Boot as the primary bootloader

Community info

Maintainers

Contributors

Users owning this device

  • FerassElHafidi (Notes: Wiped eMMC. Amlogic secureboot not enabled. Now only boots Amlogic firmware from an SD card. pmOS installed on SD.)


See also