Installing Armbian (bookworm) on a Real Fake TX9 Pro
a Somewhat Underwhelming Amlogic S912 TV Box
When I "broke" the Alfawise S92 TV Box by accidentally overwriting Android on its eMMC flash memory, I scrambled to purchase another TV box. I settled on another Amlogic S192 based box that seemed equivalent to the Alfawise, but much cheaper. The old adage is true, you get what you pay for... or less. A rebadged Kodi was preinstalled and it did work. Maybe I could log into my Amazon Prime account, but Netflix would definitely not run at a resolution of 1080p; perhaps not all, I don't remember. The fact is, the cheap Android TV Box experience is too frustrating and the new box was hardly ever used. Nevertheless, two weeks ago I purchased a third, newer generation, TV Box which meant that conversion of the second box into a Linux appliance could be attempted.
This will be the first of two parts describing how to install Armbian on this device. In this first version, an image from the Armbian TV Boxes community is installed. In the projected second post, an image from the Armbian for Amlogic TV Boxes repository by ophub will be installed. This may illustrate the difference between these two versions of Armbian.
Table of Content
- Know Thy TV Box
- Installing Armbian
- Serial Debug Port
- First Boot
- Next
The Android TV box market is a jungle. It is not always clear what is being sold. Over the years, numerous producers have offered many models of TV boxes of varying quality. To complicate things even more, it does seem as if counterfeit products are being offered by less than scrupulous companies, although it is hard to decide if the blame is to be put on the manufacturer, the retailer, or both. The TV box which is the subject of this post is a case in point. The seller, a store on Aliexpress, is still in operation, but it no longer offers Amlogic S912 TV boxes. However a short description of the device was preserved in my AliExpress history.
Order placed on: Dec 13, 2019
Amlogic S912 Android 9.0 TV BOX 3D 4K 2.4G&5.8G Wifi Bluetooth Google Voice Assistant Media player Free Apps Very Fast top Box
2G16G, US Plug, China
C$36.99
As we shall see that description is not accurate. Less some think that things have improved, here is a photograph of my device alongside the image of a box with the same logo currently offered by a wholesaler on Alibaba. The table contains the complete description of the device provided by the seller.
Key attributes |
Processor Core | Quad Core |
Support Resolution | 4k |
WiFi | 802.11n 2.4G/5GHz |
Other attributes |
Model Number | TX9 pro |
Operation System | Android 7.1 |
Features | android tv box |
Processor | Amlogic S905W |
Ethernet | 1 × 10/100MBps |
Product Name | TX9pro Android Smart Tv Box |
Processor | Amlogic S912 |
RAM | 2GB |
ROM | 16GB |
CPU | S912 Octa-core cortex-A53 |
Warranty | 3 years |
Apparently the firm can deliver 10,000 or more units at $US 17.22 per unit. So perhaps the TX95 Pro is still being sold, but what is in the box? Does it have a quad-core Amlogic S905W processor or an octo-core S912? By the way, even if the currently available device from this wholesaler is based on the S912, it is not exactly the same as my TX95 box. If the manufacturer's image can be trusted, the LED indicator is quite different. It looks very much as if I purchased a "knockoff" of the discontinued Tanix TX9 Pro in terms of the appearance of the box. The only visible external difference is the top logo which is TX9 Pro instead of Tanix. What's inside the boxes differs considerably. The seller's description of the machine corresponds much more to the no longer available Tanix, while in truth the (fake) TX9 has a WiFi radio that only operates at 2.8 GHz, the Ethernet runs at 100 Mb/s and there is no Bluetooth capability. Here are some more details.
Model | TX9 PRO (or TX9PRO-P per label on the underside of motherboard) |
Motherboard | CS_912_TX92_B8_V1.1 20190801 |
CPU | Amlogic S912X | info |
RAM | 2 Gbyte with 4 × 512 Mbyte DDR3 K4B4G0846E-BYK0 | info |
eMMC | Rayson RSE16TAA-16G | info |
Wi-Fi | Realtek RTL8189ETV 802.11bgn 2.4GHz | info |
Power | RT9045GSP | info |
LED driver | FD628 | |
Here is some more info obtained with the Android app AIDA64 (I am preserving Android in the "ROM" with care for the time being).
AIDA64 for Android v1.98 Report
<<< System >>>
Device Model: Tanix TX9 Pro
Device Type: TV Box
Manufacturer: Amlogic
Model: TX9 Pro
Brand: Amlogic
Board: q201
Device: q201
Hardware: amlogic
Platform: gxm
Product: q201
Installed RAM: 2 GB
Total Memory: 1768 MB
Available Memory: 573 MB
Internal Storage Total Space: 11.24 GB
Internal Storage Free Space: 6101 MB
<<< CPU >>>
SoC Model: AMLogic S912
Core Architecture: 8x ARM Cortex-A53 @ 1000 MHz
Manufacturing Process: 28 nm
Instruction Set: 64-bit ARMv8-A (32-bit Mode)
CPU Revision: r0p4
CPU Cores: 8
CPU Clock Range: 100 - 1512 MHz
Core 1 Clock: 1200 MHz
Core 2 Clock: 1200 MHz
Core 3 Clock: 1200 MHz
Core 4 Clock: 1512 MHz
Core 5 Clock: 1000 MHz
Core 6 Clock: 1000 MHz
Core 7 Clock: 1000 MHz
Core 8 Clock: 1000 MHz
CPU Utilization: 14 %
L2 Cache: 512 KB
Scaling Governor: interactive
Supported ABIs: armeabi-v7a, armeabi
Supported 32-bit ABIs: armeabi-v7a, armeabi
AES: Supported
ASIMD/NEON: Supported
PMULL: Supported
SHA1: Supported
SHA2: Supported
<<< Display >>>
Screen Resolution: 1920 × 1080
xdpi / ydpi: 30 / 30 dpi
GPU Vendor: ARM
GPU Renderer: Mali-T820
GPU Cores: 3
Refresh Rate: 60 Hz
Default Orientation: Landscape
OpenGL ES Version: 3.0
GPU Version: OpenGL ES 3.0 r16p0-00rel0.7fb0319.5cd653ef10a8dffb3fe634024e9eda82
OpenGL ES Extensions: GL_EXT_debug_marker
GL_ARM_rgba8
GL_ARM_mali_shader_binary
GL_OES_depth24
GL_OES_depth_texture
GL_OES_depth_texture_cube_map
GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8
GL_EXT_read_format_bgra
GL_OES_compressed_paletted_texture
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_standard_derivatives
GL_OES_EGL_image
GL_OES_EGL_image_external
GL_OES_EGL_image_external_essl3
GL_OES_EGL_sync
GL_OES_texture_npot
GL_OES_vertex_half_float
GL_OES_required_internalformat
GL_OES_vertex_array_object
GL_OES_mapbuffer
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_rg
GL_EXT_texture_type_2_10_10_10_REV
GL_OES_fbo_render_mipmap
GL_OES_element_index_uint
GL_EXT_shadow_samplers
GL_OES_texture_compression_astc
GL_KHR_texture_compression_astc_ldr
GL_KHR_texture_compression_astc_hdr
GL_KHR_texture_compression_astc_sliced_3d
GL_KHR_debug
GL_EXT_occlusion_query_boolean
GL_EXT_disjoint_timer_query
GL_EXT_blend_minmax
GL_EXT_discard_framebuffer
GL_OES_get_program_binary
GL_OES_texture_3D
GL_EXT_texture_storage
GL_EXT_multisampled_render_to_texture
GL_OES_surfaceless_context
GL_OES_texture_stencil8
GL_EXT_shader_pixel_local_storage
GL_ARM_shader_framebuffer_fetch
GL_ARM_shader_framebuffer_fetch_depth_stencil
GL_ARM_mali_program_binary
GL_EXT_sRGB
GL_EXT_sRGB_write_control
GL_EXT_texture_sRGB_decode
GL_EXT_texture_sRGB_R8
GL_EXT_texture_sRGB_RG8
GL_KHR_blend_equation_advanced
GL_KHR_blend_equation_advanced_coherent
GL_OES_texture_storage_multisample_2d_array
GL_OES_shader_image_atomic
GL_EXT_robustness
GL_EXT_draw_buffers_indexed
GL_OES_draw_buffers_indexed
GL_EXT_texture_border_clamp
GL_OES_texture_border_clamp
GL_EXT_texture_cube_map_array
GL_OES_texture_cube_map_array
GL_OES_sample_variables
GL_OES_sample_shading
GL_OES_shader_multisample_interpolation
GL_EXT_shader_io_blocks
GL_OES_shader_io_blocks
GL_EXT_tessellation_shader
GL_OES_tessellation_shader
GL_EXT_primitive_bounding_box
GL_OES_primitive_bounding_box
GL_EXT_geometry_shader
GL_OES_geometry_shader
GL_ANDROID_extension_pack_es31a
GL_EXT_gpu_shader5
GL_OES_gpu_shader5
GL_EXT_texture_buffer
GL_OES_texture_buffer
GL_EXT_copy_image
GL_OES_copy_image
GL_EXT_color_buffer_half_float
GL_EXT_color_buffer_float
GL_EXT_YUV_target
GL_OVR_multiview
GL_OVR_multiview2
GL_OVR_multiview_multisampled_render_to_texture
GL_KHR_robustness
GL_KHR_robust_buffer_access_behavior
GL_EXT_draw_elements_base_vertex
GL_OES_draw_elements_base_vertex
<<< Wi-Fi >>>
State: Enabled
SSID: xxxxxxxxxxxxxxxx
BSSID: xxxxxxxxxxxxxxxxxxx
Hidden SSID: No
IPv4 Address: xxx.xxx.xxx.xxx
IPv6 Address: fexx::xxxx:xxxx:xxxx:xxxx
Signal Strength: -46 dBm (Excellent)
Link Speed: 150 Mbps
Frequency: 2437 MHz
Network ID: 0
Gateway: xxx.xxx.xxx.xxx
Netmask: xxx.xxx.xxx.xxx
DNS1: xxx.xxx.xxx.xxx
DHCP Lease Duration: 72 hours
5 GHz Band: Not Supported
Wi-Fi Aware: Not Supported
Wi-Fi Direct: Supported
<<< Android >>>
Android Version: 7.1.2 (Nougat)
API Level: 25
Android Security Patch Level: 2017-12-01
Rooted Device: Yes
Android ID: da86578e09f0ac2c
Build ID: q201-userdebug 7.1.2 NHG47L 20190923 test-keys
Codename: REL
Fingerprint: Amlogic/q201/q201:7.1.2/NHG47L/20190923:userdebug/test-keys
ID: NHG47L
Incremental: 20190923
Much of that data was gathered after Armbian was installed, but it would have been better to have done it before hand.
Follow the Installation Instructions for TV Boxes with Amlogic CPUs and if one is lucky, everything will work fine. Actually, getting the above information about the TV box was more work than installing Armbian. Basically, the steps involved are as follows.
- Download the correct Armbian image.
- Burn the image file onto a good µSD card.
- Mount the
armbi_boot
partition
- Modify a configuration file and create a boot loader file as per the instructions.
- Place the µSD card in the TV Box SD reader and boot into Armbian
2.1 Getting the Armbian Image
Get the latest stable built from the community archive. In December 2023, that was a compressed file named Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.xz
. Note that this is a "server" image which is the equivalent to the "Lite" edition of Raspberry Pi OS. There are desktop versions, but I am not interested in running a desktop on such a puny system. Interestingly, there is an even smaller minimal version (Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63_minimal.img.xz
) which I have not looked into.
The repository also contains a text file (Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.txt
) which reproduces the GPL licence and provides additional information.
---------------------------------------------------------------------------
Generated with Armbian(tm) build framework https://github.com/armbian/build
---------------------------------------------------------------------------
Vendor: Armbian
Revision: 23.11.1
Board: Aml-s9xx-box
Kernel: Linux 6.1.63 (current)
Build date: 30.11.2023
Sources: https://github.com/armbian/build
Sources rev: d69350a88
Authors: https://www.armbian.com/authors
Maintainer: Armbian Linux
Support: https://forum.armbian.com
---------------------------------------------------------------------------
Partitioning configuration: msdos offset: 4
Boot partition type: fat (512 MB)
Root partition type: ext4
CPU configuration: 500000 - 1536000 with ondemand
---------------------------------------------------------------------------
Verify GPG signature:
gpg --verify Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.xz.asc
Verify image file integrity:
sha256sum --check Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.xz.sha
Prepare SD card (four methods):
xzcat Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.xz | pv | dd of=/dev/mmcblkX bs=1M
dd if=Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img of=/dev/mmcblkX bs=1M
balena-etcher Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img.xz -d /dev/mmcblkX
balena-etcher Armbian_23.11.1_Aml-s9xx-box_bookworm_current_6.1.63.img -d /dev/mmcblkX
---------------------------------------------------------------------------
As explained there are two other files that should be used to verify the integrity of the downloaded compressed image file.
2.2 Burn the Image File on to a Micro SD Card
I used Etcher from balena to copy the image file onto a good quality µSD card. There are plenty of tutorials on the Web on how to do this. There's probably more than one on my own site, but I would not dare classify them as better than any other.
It can't be stressed enough that the SD card must be of good quality. I have certainly learned my lesson and will no longer waste time with iffy cards. With that said, I did use a no-name 8 GByte µSD card for this exercise without problems.
2.3 Mount the Boot Partition
The additional information showed that the image contains two partitions. The first one is a "boot" partition of type FAT which can be read and altered with most if not all operating systems. This is the same configuration found on Raspberry Pi OS images. The Linux OS on my desktop mounted the two partitions created on the SD card as soon as Etcher complete its task. Check with the file browser to see if it is the case. On my system the partitions are named armbi_boot
and armbi_root
. I suspect that on Windows systems, only the boot partition would be mounted because it does not handle EXT4 partitions.
To continue it is necessary to modify files in the boot partition. If the boot partition is not mounted, try removing the SD card and then reinserting it in the SD card reader of the desktop machine.
2.4 Configure the Image
First thing to do is to select the correct devicetree blob (dtb) which is a binary representation of the devicetree describing the system hardware. Think of it as the BIOS of the system, minus the pretty GUI to modify the settings. The file extlinux/extlinux.conf
has a line specifying the name of the dtb to be used. This is the default file.
LABEL Armbian
LINUX /Image
INITRD /uInitrd
#FDT /dtb/amlogic/meson-gxbb-p200.dtb
#FDT /dtb/amlogic/meson-gxl-s905x-p212.dtb
FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb
#FDT /dtb/amlogic/meson-gxm-q200.dtb
#FDT /dtb/amlogic/meson-g12a-x96-max.dtb
#FDT /dtb/amlogic/meson-g12b-odroid-n2.dtb
append root=UUID=a6cf29bd-49ae-4d3b-bf22-800408ae1fba rootflags=data=writeback console=ttyAML0,115200n8 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
It contains the wrong file. The correct dtb file for my fake TX95 is meson-gxm-q201.dtb
. So this how I modified the file with a text editor (Geany, but it could be anything else, even nano
).
LABEL Armbian
LINUX /Image
INITRD /uInitrd
#FDT /dtb/amlogic/meson-gxbb-p200.dtb
#FDT /dtb/amlogic/meson-gxl-s905x-p212.dtb
#FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.dtb
#FDT /dtb/amlogic/meson-gxm-q200.dtb
FDT /dtb/amlogic/meson-gxm-q201.dtb
#FDT /dtb/amlogic/meson-g12a-x96-max.dtb
#FDT /dtb/amlogic/meson-g12b-odroid-n2.dtb
append root=UUID=a6cf29bd-49ae-4d3b-bf22-800408ae1fba rootflags=data=writeback console=ttyAML0,115200n8 console=tty0 rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 splash plymouth.ignore-serial-consoles
The other thing was to set up the correct boot loader. I did this from a terminal.
michel@hp:~$ cd /media/michel/armbi_boot
michel@hp:/media/michel/armbi_boot$ cp u-boot-s905x-s912 u-boot.ext
Of course the boot partition could be mounted elsewhere in your system. If you are using a different Amlogic CPU, then another bootloader may be needed. Again SteeMan is your guide. He has an exhaustive list of which one of three boot loaders to use depending on the CPU.
2.5 Boot into Armbian via the "toothpick" method
It is always best to unmount the partitions on the SD card before removing the card from the desktop machine. I can do this from a terminal. First find out where the partitions are mounted and then unmount each using its device location or its mount point.
michel@hp:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931,5G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
└─sda2 8:2 0 931G 0 part /
...
sde 8:64 1 7,5G 0 disk
├─sde1 8:65 1 512M 0 part /media/michel/armbi_boot
└─sde2 8:66 1 6,8G 0 part /media/michel/armbi_root
michel@hp:~$ sudo umount /dev/sde1
michel@hp:~$ sudo umount /media/michel/armbi_root
This can be easily and quickly done from the file browser in Linux Mint MATE by clicking on a couple of icons.
Now insert the µSD into the TV box SD reader. There is a small hole between SPDIF
connector and the stacked USB-2 connectors. This is where a toothpick must be inserted in order to depress a boot button on the motherboard.
With the boot button depressed, power up the TV Box. Keep the boot button depressed for a few seconds. Before doing that, it is best to have the box connected to the local network with an Ethernet cable and probably easier to connect a monitor or TV with an HDMI cable to see what is happening. Also connecting a USB keyboard will help, but a mouse is not needed. If all goes well, the TV box will boot into Linux off the SD card. After a considerable amount of time, while the file system is expanded to take all available space on the µSD card, the following screen should appear.
Welcome to Armbian!
Documentation: https://docs.armbian.com | Community support: https://forum.armbian.com
IP address: 192.168.32.229
Create root password:
Of course, you might not be so lucky. Perhaps an error was made during the configuration, perhaps different components were used or an entirely different motherboard is in the enclosure. This is where running a utility such as AIDA64 in Android beforehand is a good idea. The µSD card can be retrieved from the TV box and reinserted into the SD reader of the desktop. It should be possible to check that extlinux.conf
is correctly configured and to check that the correct boot loader is used. Presumably, you could change the FDT value in extlinux.conf
to point to another DTB file and try booting again. This gets old very quickly if you are having problems so I suggest connecting to the serial debug port.
In theory, if the instructions are followed to the letter and if the correct configuration is created in step 4, then there is no need to open up the TV Box. You could always give it a try and if that fails and you don't know what to do next, then it will be a good idea to open the box in order to connect to the debug serial port. With that connection, it will be possible to see what is going on while the box boots and it will be possible to open a session even if the Wi-Fi and Ethernet interfaces are not working.
The physical constraint in my home makes it much more convenient to use the serial debug port, because I don't have a free HDMI monitor, older DVI monitors will not work (strange because they do work with the Raspberry Pi) and I am too lazy to disconnect one of my two desktop monitors. On the other hand, if the TV box is connected to the TV, there is no Ethernet available unless I run a long cable across the room which is not appreciated by all. Once, I connected the TV box HDMI out signal to a USB port on a portable computer via a USB HDMI capture dongle and I could see the TV box video output with VLC on the portable. But it is so much simpler to use the serial debug port, if it's available. As it happens it is present on the two S192 based TV boxes that I happen to possess.
Opening the TV box can be a bit difficult. There is a YouTube video entitled TANIX TX3 Mini and TX9 Pro Opening Android TV BOX Amlogic S905W and S912 which shows how to do it in detail. There are four screws under the corner rubber feet. The segment about the TX9 Pro starts at 2m50s mark into the 13-minute video.
Once the bottom is removed, the serial port is easily identified in the corner between the SD card reader and the SPDIF connector. The TX and RX signals are identified with upside down labels, but the electrons still flow in the correct direction as well known YouTubers would say. Use a USB to TTL converter to connect to the port. As usual for serial UART ports, the motherboard TX signal must be connected to the adapter's RX line and the motherboard RX signal goes to the TX pin on the USB-serial adapter. DO NOT CONNECT the USB-serial adapter Vcc output to the 3.3V pin on the motherboard, but DO CONNECT the grounds together. The spacing and size of the holes is perfect for a 3 pin Dupont male connector. There is no need to solder anything and it is not necessary to remove the circuit board from the case. Plug in the USB serial adapter to the desktop and find the tty
device created and open a terminal to connect to it.
michel@hp:~$ ls /dev/ttyU*
/dev/ttyUSB0
michel@hp:~$ cu -l /dev/ttyUSB0 -s 115200
Connected.
Many other programs such as miniterm
, minicom
, or screen
could be used instead of cu which is admittedly rather old and rarely used now.
The first boot of Armbian is unusual. The root
password must be set and a user account must be created. That first session is reproduced next, but be aware that if this is done through the serial debug port, the system will display its messages to the port regardless of what the user may be entering. It can be disconcerting if it happens when entering a password or a user name. Such messages have been expunged below.
Welcome to Armbian!
Documentation: https://docs.armbian.com | Community support: https://forum.armbian.com
IP address: 192.168.32.229
Create root password: ********
Repeat root password: ********
Support status: community support (looking for a dedicated maintainer)
Choose default system command shell:
1) bash
2) zsh
1
Shell: BASH
Creating a new user account. Press to abort
Please provide a username (eg. your first name): jeeves
Create user (jeeves) password: ********
Repeat user (jeeves) password: ********
Please provide your real name: Jeeves
Dear Jeeves, your account jeeves has been created and is sudo enabled.
Please use this account for your daily work from now on.
Detected timezone: America/Halifax
Set user language based on your location? [Y/n] n
Of course, you will probably want a different user name and the detected time zone will in all likelihood not be the same as mine. Eventhough English is not the language of my desktop machine and my keyboard does not have a QWERTY layout, my headless servers are not localized, but you may decide otherwise of course.
At your location, more locales are possible:
1) aa_DJ.UTF-8 78) et_EE.UTF-8
2) af_ZA.UTF-8 79) eu_ES.UTF-8
3) an_ES.UTF-8 80) eu_FR.UTF-8
4) ar_AE.UTF-8 81) fi_FI.UTF-8
5) ar_BH.UTF-8 82) fo_FO.UTF-8
6) ar_DZ.UTF-8 83) fr_BE.UTF-8
7) ar_EG.UTF-8 84) fr_CA.UTF-8
8) ar_IQ.UTF-8 85) fr_CH.UTF-8
9) ar_JO.UTF-8 86) fr_FR.UTF-8
10) ar_KW.UTF-8 87) fr_LU.UTF-8
11) ar_LB.UTF-8 88) ga_IE.UTF-8
12) ar_LY.UTF-8 89) gd_GB.UTF-8
13) ar_MA.UTF-8 90) gl_ES.UTF-8
14) ar_OM.UTF-8 91) gv_GB.UTF-8
15) ar_QA.UTF-8 92) he_IL.UTF-8
16) ar_SA.UTF-8 93) hr_HR.UTF-8
17) ar_SD.UTF-8 94) hsb_DE.UTF-8
18) ar_SY.UTF-8 95) hu_HU.UTF-8
19) ar_TN.UTF-8 96) id_ID.UTF-8
20) ar_YE.UTF-8 97) is_IS.UTF-8
21) ast_ES.UTF-8 98) it_CH.UTF-8
22) be_BY.UTF-8 99) it_IT.UTF-8
23) bg_BG.UTF-8 100) ja_JP.UTF-8
24) bhb_IN.UTF-8 101) ka_GE.UTF-8
25) br_FR.UTF-8 102) kk_KZ.UTF-8
26) bs_BA.UTF-8 103) kl_GL.UTF-8
27) ca_AD.UTF-8 104) ko_KR.UTF-8
28) ca_ES.UTF-8 105) ko_KR.UTF-8
29) ca_FR.UTF-8 106) ku_TR.UTF-8
30) ca_IT.UTF-8 107) kw_GB.UTF-8
31) cs_CZ.UTF-8 108) lg_UG.UTF-8
32) cy_GB.UTF-8 109) lt_LT.UTF-8
33) da_DK.UTF-8 110) lv_LV.UTF-8
34) de_AT.UTF-8 111) mg_MG.UTF-8
35) de_BE.UTF-8 112) mi_NZ.UTF-8
36) de_CH.UTF-8 113) mk_MK.UTF-8
37) de_DE.UTF-8 114) ms_MY.UTF-8
38) de_IT.UTF-8 115) mt_MT.UTF-8
39) de_LI.UTF-8 116) nb_NO.UTF-8
40) de_LU.UTF-8 117) nl_BE.UTF-8
41) el_CY.UTF-8 118) nl_NL.UTF-8
42) el_GR.UTF-8 119) nn_NO.UTF-8
43) en_AU.UTF-8 120) oc_FR.UTF-8
44) en_BW.UTF-8 121) om_KE.UTF-8
45) en_CA.UTF-8 122) pl_PL.UTF-8
46) en_DK.UTF-8 123) pt_BR.UTF-8
47) en_GB.UTF-8 124) pt_PT.UTF-8
48) en_HK.UTF-8 125) ro_RO.UTF-8
49) en_IE.UTF-8 126) ru_RU.UTF-8
50) en_NZ.UTF-8 127) ru_UA.UTF-8
51) en_PH.UTF-8 128) sk_SK.UTF-8
52) en_SC.UTF-8 129) sl_SI.UTF-8
53) en_SG.UTF-8 130) so_DJ.UTF-8
54) en_US.UTF-8 131) so_KE.UTF-8
55) en_ZA.UTF-8 132) so_SO.UTF-8
56) en_ZW.UTF-8 133) sq_AL.UTF-8
57) es_AR.UTF-8 134) st_ZA.UTF-8
58) es_BO.UTF-8 135) sv_FI.UTF-8
59) es_CL.UTF-8 136) sv_SE.UTF-8
60) es_CO.UTF-8 137) tcy_IN.UTF-8
61) es_CR.UTF-8 138) tg_TJ.UTF-8
62) es_DO.UTF-8 139) th_TH.UTF-8
63) es_EC.UTF-8 140) tl_PH.UTF-8
64) es_ES.UTF-8 141) tr_CY.UTF-8
65) es_GT.UTF-8 142) tr_TR.UTF-8
66) es_HN.UTF-8 143) uk_UA.UTF-8
67) es_MX.UTF-8 144) uz_UZ.UTF-8
68) es_NI.UTF-8 145) wa_BE.UTF-8
69) es_PA.UTF-8 146) xh_ZA.UTF-8
70) es_PE.UTF-8 147) yi_US.UTF-8
71) es_PR.UTF-8 148) zh_CN.UTF-8
72) es_PY.UTF-8 149) zh_HK.UTF-8
73) es_SV.UTF-8 150) zh_SG.UTF-8
74) es_US.UTF-8 151) zh_TW.UTF-8
75) es_UY.UTF-8 152) zu_ZA.UTF-8
76) es_VE.UTF-8 153) Skip generating locales
77) et_EE.UTF-8
Please enter your choice:153
Let's check the state of the system.
root@aml-s9xx-box:~# systemctl | grep failed
● smartmontools.service loaded failed failed Self Monitoring and Reporting Technology (SMART) Daemon
root@aml-s9xx-box:~# journalctl | grep smart
Nov 30 01:10:17 aml-s9xx-box systemd[1]: Starting smartmontools.service - Self Monitoring and Reporting Technology (SMART) Daemon...
Nov 30 01:10:17 aml-s9xx-box smartd[2122]: smartd 7.3 2022-02-28 r5338 [aarch64-linux-6.1.63-current-meson64] (local build)
Nov 30 01:10:17 aml-s9xx-box smartd[2122]: Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
Nov 30 01:10:17 aml-s9xx-box smartd[2122]: Opened configuration file /etc/smartd.conf
Nov 30 01:10:17 aml-s9xx-box smartd[2122]: Drive: DEVICESCAN, implied '-a' Directive on line 21 of file /etc/smartd.conf
Nov 30 01:10:17 aml-s9xx-box smartd[2122]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Nov 30 01:10:17 aml-s9xx-box smartd[2122]: In the system's table of devices NO devices found to scan
Nov 30 01:10:17 aml-s9xx-box smartd[2122]: Unable to monitor any SMART enabled devices. Try debug (-d) option. Exiting...
Nov 30 01:10:17 aml-s9xx-box systemd[1]: smartmontools.service: Main process exited, code=exited, status=17/n/a
Nov 30 01:10:17 aml-s9xx-box systemd[1]: smartmontools.service: Failed with result 'exit-code'.
Nov 30 01:10:17 aml-s9xx-box systemd[1]: Failed to start smartmontools.service - Self Monitoring and Reporting Technology (SMART) Daemon.
The status=17 exit code means that there's no devices to monitor. Makes sense as there is no drive on the system. If none will ever be connected, then the service could just be disabled.
root@aml-s9xx-box:~# systemctl disable smartmontools.service
However it may be better to change the configuration just in case a spinning or solid state drive is ever added to the system.
My solution, based on two bug reports (Debian Bug report logs - #1006630 and Bug#1029210: smartmontools.service fails since bookworm), was to revert to the old Debian behaviour until the next release of smartmontools
,
root@aml-s9xx-box:~# sudo nano /lib/systemd/system/smartmontools.service
Adding the -q never
parameter to the ExecStart
line was all that was needed.
ExecStart=/usr/sbin/smartd -n -q never $smartd_opts
On rebooting the system, I opened an SSH session as user jeeves
. If the TV box connects to the local network, recourse to the serial debug port should not be necessary from this point on.
michel@hp:~$ ssh jeeves@192.168.32.229
jeeves@192.168.32.229's password: yyyyyyy
_ ___ _
__ _ _ __ ___ | | ___ / _ \__ ____ __ | |__ _____ __
/ _` | '_ ` _ \| |_____/ __| (_) \ \/ /\ \/ /____| '_ \ / _ \ \/ /
| (_| | | | | | | |_____\__ \\__, |> < > <_____| |_) | (_) > <
\__,_|_| |_| |_|_| |___/ /_//_/\_\/_/\_\ |_.__/ \___/_/\_
Welcome to Armbian 23.11.1 Bookworm with Linux 6.1.63-current-meson64
No end-user support: community creations
System load: 26% Up time: 0 min
Memory usage: 9% of 1.88G IP: 192.168.32.229
CPU temp: 46°C Usage of /: 26% of 6.7G
RX today: 179.5 KiB
Last login: Mon Dec 18 03:36:55 2023 from 192.168.32.198
jeeves@aml-s9xx-box:~$ systemctl | grep failed
jeeves@aml-s9xx-box:~$ systemctl status smartmontools
● smartmontools.service - Self Monitoring and Reporting Technology (SMART) Daemon
Loaded: loaded (/lib/systemd/system/smartmontools.service; enabled; preset: enabled)
Active: active (running) since Mon 2023-12-18 03:42:11 UTC; 1min 8s ago
Docs: man:smartd(8)
man:smartd.conf(5)
Main PID: 1304 (smartd)
Status: "Next check of 0 devices will start at 04:12:11"
Tasks: 1 (limit: 1978)
Memory: 3.5M
CPU: 139ms
CGroup: /system.slice/smartmontools.service
└─1304 /usr/sbin/smartd -n -q never
Dec 18 03:42:10 aml-s9xx-box systemd[1]: Starting smartmontools.service - Self Monitoring and Reporting Technology (SMART) Daemon...
Dec 18 03:42:11 aml-s9xx-box smartd[1304]: smartd 7.3 2022-02-28 r5338 [aarch64-linux-6.1.63-current-meson64] (local build)
Dec 18 03:42:11 aml-s9xx-box smartd[1304]: Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
Dec 18 03:42:11 aml-s9xx-box smartd[1304]: Opened configuration file /etc/smartd.conf
Dec 18 03:42:11 aml-s9xx-box smartd[1304]: Drive: DEVICESCAN, implied '-a' Directive on line 21 of file /etc/smartd.conf
Dec 18 03:42:11 aml-s9xx-box smartd[1304]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Dec 18 03:42:11 aml-s9xx-box smartd[1304]: In the system's table of devices NO devices found to scan
Dec 18 03:42:11 aml-s9xx-box smartd[1304]: Monitoring 0 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
Dec 18 03:42:11 aml-s9xx-box systemd[1]: Started smartmontools.service - Self Monitoring and Reporting Technology (SMART) Daemon.
jeeves@aml-s9xx-box:~$
This does seem to indicate that there will be a useless check of 0 devices at four hour intervals. So it may be better to just disable the service.
I recall that the Ubuntu image (Armbian_23.11.1_Aml-s9xx-box_jammy_current_6.1.63.img) does not require this adjustment of the service file because jammy
contains an older version smartmontools
compared to the version in bookworm
.
So systemd
is happy, all services work and checking on the network interfaces shows that both the ethernet and Wi-Fi are available, although only the Ethernet interface is up.
jeeves@aml-s9xx-box:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 6a:b7:fc:4f:8e:8e brd ff:ff:ff:ff:ff:ff
altname end0
inet 192.168.32.229/24 brd 192.168.32.255 scope global dynamic noprefixroute eth0
valid_lft 258961sec preferred_lft 258961sec
inet6 fe80::5576:9de5:67b0:1987/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether f0:03:8c:19:d7:37 brd ff:ff:ff:ff:ff:ff
Use the nmtui
tool to define and enable a wireless connection if desired. I did that and it does work.
Now the first thing to do should be to update the system.
jeeves@aml-s9xx-box:~# sudo apt update && sudo apt upgrade -y
This may take a long time. A good proportion of that time is explained by the difference between a 1 Gb/s interface on the Alfawise S92 and a 100 Mb/s on the TX9 Pro. Again one gets what one pays for.
It does appear that the TV Box can function as a Linux appliance/server because the major peripherals do seem to work. There is one annoying exception; the front LED display is stuck at boot
. The linux_openvfd project by Arthur Liberman can handle the onboard FD628 LED driver, but it is not clear to me how to integrate it into the system short of adding it to the source code and building the Armbian image. That is beyond my pay scale. However, amlogic-s9xxx-armbian does integrate openvfd
. That flavour of Armbian (specifically Armbian 23.11.0-trunk Lunar with Linux 6.1.60-ophub) is running on my Alfawise S92 where I could enable the LED display.
jeeves@domo:~$ armbian-openvfd
┌────────[ Enable LED ]─────────┐
│ │
│ 11. x96max (s905x2) │
│ 12. x96maxplus (s905x3) │
│ 13. x96air (s905x3) │
│ 14. h96max-x3 (s905x3) │
│ 15. hk1-x3 (s905x3) │
│ 16. hk1box (s905x3) │
│ 17. tx3 (s905x3) │
│ 18. tx3-mini (s905w) │
│ 19. t95 (s905x) │
│ 20. t95z-plus (s912) │
│ 21. tx9-pro (s912) │
│ 22. x92 (s912) │
│ 23. whale (s905x3) │
| 24. x88pro-x3 (s905x3) |
│ 99. diy │
│ │
├──────[ Other Operations ]─────┤
│ │
│ -u. update │
│ 0. stop │
│ 1. quit │
│ │
└───────────────────────────────┘
[ OPTIONS ] Please Input ID:
Too bad that there's no LED display on the old Alfawise TV Box. Obviously, the next step is to install that version of Armbian on the TX9 Pro to see if the LED display can be turned into a clock. In the meantime, a piece of black electrical tape will solve the problem nicely. There was already Kapton tape over the display that was much too bright otherwise.