Install Linux on the X96 Max & X96 Max+

 

The X96 Max tv box is notable for being cheap, containing a gigabit Ethernet port (4GB RAM model), DDR4 memory, and an S905X2 processor. 

The X96 Max+ (X96 Max Plus) tv box is notable for being cheap, containing a gigabit Ethernet port (4GB RAM model), and an S905X3 processor. 

Depending on your needs it might be the perfect mini-server if a Raspberry Pi 4 is too expensive for you.

Armbian Linux installation:

1. Join in a moment of silence to honor balbes150 who makes this all possible :)

2. Download your desired Armbian image (I used Armbian_20.10_Arm-64_buster_current_5.9.0.img.xz) and load it onto a microSD card using Etcher

3. Eject and re-insert microSD card.

4. In the BOOT drive, rename u-boot-s905x2-s922 to u-boot.ext

5a. IF using the X96 Max:

In the BOOT drive open the extlinux folder and edit extlinux.conf to replace all the file contents with this and save and close:

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
FDT /dtb/amlogic/meson-g12a-x96-max.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

5b. IF using the X96 Max+ (Plus):

Download hk1box-bootloader.img.xz (source: flippyand extract hk1box-bootloader.img

In the ROOTFS drive open the root folder (requires admin rights) and copy hk1box-bootloader.img into it.

In the BOOT drive open the dtb folder and then the amlogic folder and then download meson-sm1-x96-max-plus-100m.dtb and meson-sm1-x96-max-plus.dtb into it (source: flippy)

In the BOOT drive open the extlinux folder and edit extlinux.conf to replace all the file contents with this and save and close:

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
FDT /dtb/amlogic/meson-sm1-x96-max-plus-100m.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

6. Eject the microSD card and load into the X96 device (card inserts upside down)

7. Plug an Ethernet cable into the device

8. Insert a dull toothpick into the AV hole to push and hold the embedded reset button:

9. With the reset button pressed, use other hand to connect the power supply and wait 3 seconds and then remove the toothpick from the AV hole.

10. Wait about a minute and then SSH into the device with username root and password 1234 (you can check your router to look for the new IP device or tools like an IP scanner or nmap).

***************

If you don't see an SSH login after a couple minutes, unplug and retry the toothpick method again. If you still don't see an SSH login after a few tries you'll likely need to reflash the stock firmware:

If you don't have one, buy a USB-to-USB data cable.

Unplug the unit, disconnect the Ethernet cable, and remove the microSD card.

On a Windows machine install the USB Burning Tool and reboot.

Next, download the firmware for the X96 Max (you must use the older Android 8 firmware; 9+ doesn't work) or X96 Max+

Follow this guide to install the firmware.

Repeat steps 6-10 to get an SSH prompt.

***************

11a. IF using the X96 Max:

After Armbian is configured, run /root/install-aml.sh to install Armbian to the internal eMMC chip.

11b. IF using the X96 Max+ (Plus):

After Armbian is configured, run these commands:

dd if=/root/hk1box-bootloader.img of=/dev/mmcblk2 bs=1 count=442
dd if=/root/hk1box-bootloader.img of=/dev/mmcblk2 bs=512 skip=1 seek=1
sync
shutdown now

Unplug the power, remove the microSD card, and insert into computer.

In the BOOT drive open the extlinux folder and edit extlinux.conf to replace all the file contents with this and save and close:

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
FDT /dtb/amlogic/meson-sm1-x96-max-plus.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

Insert the microSD card into the X96 device and plug in the power. Wait about a minute for it to boot and SSH into it.

Run /root/install-aml.sh to install Armbian to the internal eMMC chip.

12. Once the script indicates the copy is complete run shutdown now then unplug, remove the SD card, and plug in device. The device should now boot into Armbian directly from the internal eMMC chip.

Success!


As a bonus, you can install DietPi for a faster system:

apt-get update; apt-get install -y gpg systemd-sysv ca-certificates sudo wget locales --reinstall
wget https://raw.githubusercontent.com/MichaIng/DietPi/master/.build/images/dietpi-installer
chmod +x dietpi-installer
./dietpi-installer

___________

Performance compared to Raspberry Pi 4:

Raspberry Pi 4 Model B (2GB LPDDR4 RAM) 32-bit:

  • CPU Performance: Duration = 8.80 seconds (lower is faster)
  • CPU Temp: Idle = 38'c | Full load = 48'c
  • RootFS: Write = 18 MiB/s | Read = 41 MiB/s
  • RAM: Write = 339 MiB/s | Read = 606 MiB/s

Raspberry Pi 4 Model B (2GB LPDDR4 RAM) 64-bit:

  • CPU Performance: Duration = 7.27 seconds (lower is faster)
  • CPU Temp: Idle = 45'c | Full load = 52'c
  • RootFS: Write = 18 MiB/s | Read = 22 MiB/s
  • RAM: Write = 448 MiB/s | Read = 1163 MiB/s

X96 Max (4GB DDR4 RAM):

  • CPU Performance: Duration = 10.39 seconds (lower is faster)
  • CPU Temp: Idle = 36'c | Full load = 44'c
  • RootFS: Write = 35 MiB/s | Read = 43 MiB/s
  • RAM: Write = 555 MiB/s | Read = 978 MiB/s

X96 Max+ (4GB DDR3 RAM):

  • CPU Performance: Duration = 10.78 seconds (lower is faster)
  • CPU Temp: Idle = 36'c | Full load = 50'c
  • RootFS: Write = 53 MiB/s | Read = 154 MiB/s
  • RAM: Write = 507 MiB/s | Read = 868 MiB/s

___________

P.S. if you get stuck you can always restore your OEM stock image back to the device using a Windows machine and the USB Burning Tool (version 2.1.7.3 worked best for me rather than newer versions). You can use it to flash the original firmware for the X96 Max or X96 Max+

Comments

Popular Posts