- Устанавливаем Linux (Armbian) на ТВ бокс
- Run ArchLinux on Amlogic S905x S912 S905w Android TV Box
- Things You Will Need
- Downloads and Flashing to MicroSD
- Configure MicroSD Card for ArchLinux
- Booting to ArchLinux for the First Time
- Share this:
- Installing Armbian on Amlogic S912 Android TV Box (Nexbox A95x A2)
- Things You Will Need
- Downloads and Flashing to MicroSD
- Configure MicroSD Card for Armbian
- Booting to Armbian for the First Time
- Share this:
Устанавливаем Linux (Armbian) на ТВ бокс
Если вести речь о энергоэффективных устройствах, то ARM64 архитектура себя отлично зарекомендовала. На рынке существует огромное предложение устройств на данной архитектуре. Но ценник при запросе определенных параметром стремительно растет вверх. Озвучим наши требования: ARM64, 1Gb ОЗУ и 8GB SSD или NAND. Естественно увеличение параметров в большую сторону приветствуется. Обратившись к рынку ТВ приставок — я вижу предложения от 1000р, что в 2-4 раза дешевле плат для разработчиков. Выбор пал на Х96 приставку
За 1000р я получил ужасный ТВ бокс, но отличный конструктор. Блок питания и клавиатура, а также HDMI кабель шли в комплекте. Прикладываю подтверждение, так как никто не поверит иначе.
Получив включил, посмотрел на тупящий андроид, выключил. Разобрал.
В профильной теме Armbian на ТВ бокс находим нужны йобраз и скачиваем. Я скачал Armbian_20.11_Arm-64_buster_current_5.9.9.img.xz
Заглянув по адресу https://www.debian.org/releases/ я вначале купился на bullseye релиз, не прочитав фразу:
This release started as a copy of buster, and is currently in a state called testing . This means that things should not break as badly as in unstable or experimental distributions, because packages are allowed to enter this distribution only after a certain period of time has passed, and when they don’t have any release-critical bugs filed against them. Please note that security updates for testing distribution are not yet managed by the security team. Hence, testing does not get security updates in a timely manner. You are encouraged to switch your sources.list entries from testing to buster for the time being if you need security support. See also the entry in the Security Team’s FAQ for the testing distribution.
Позже я поплотился за это и позже решил выделять отдельное время для игр с тестовыми образами. Для более менее стабильных систем я выбрал стабильный образ от debian. Позже мы устанавливаем образ на диск и читаем инструкцию:
How to run these images on the Amlogic platform .
Now all images Armbian and LE has all the files for activate the multi-boot. Anything addition to download and copy to media is not required.
1. Download the image for your device
2. Unpack
3. Burn the image on the medium
4. Configure in the file (uEnv.txt) launch parameters for the desired platform and model (uncomment the desired lines and comment out or delete unused ones)
If universal multi-upload has not yet been activated on this device, you need to activate it once. There are several options for activating multi-loading.
— Connect the prepared media to the device and turn on the power, boot into Android
— Open the app «Update&Backup»
— Click on «Select» local update and chose the file on the removable media aml_autoscript.zip
— Start «Update»
— System will reboot twice and start running the system from external media.
На последних образах изменились правила:
Pay attention. Starting from version 20.08 (20200814), the configuration order for the used DTB changes.
Please note that the algorithm for initial configuration of the system for startup has changed. Instead of a file «uEnv.txt», the file «/extlinux/extlinux.conf » is now used. The rules for editing a file remain the same.
All Amlogic models now need the «u-boot.ext» file.
Before launching on Amlogic, you must copy or rename one of the existing files «u-boot-*» to «u-boot.ext».
For s905 (not X) — used u-boot-s905
For s905x and s912 — used u-boot-s905x-s912
For s905x2 and s922 — used u-boot-s905x2-s922
— Теперь устанавливаем образ на SD карту.
— Открываем BOOT раздел на SD карте и переименовываем файл u-boot-s905x-s912 в файл u-boot.ext(на старых версиях этого делать не требовалось), затем в папке extlinux редактируем файл extlinux.conf (убираем ненужное и раскомментируем нужное). Для своей приставки я использововал meson-gxl-s905x-nexbox-a95x.dtb
— Вставляем SD карту в приставку.
-У меня загрузка начинается сразу, но я использую старый образ. Если загрузчик на приставке не обновлен, то заходим в обновление и выбираем обновление на флешке. После его установки первичная загрузка становится с флешки. Но в новых инструкциях рекомендуют зажать кнопку сброса, которая находится внутри разъема AV и включить питание приставки. После того, как на HDMI пойдет сигнал, отпустить кнопку сброса.
При желании можно установить Linux в приставку и затереть Android, что я успешно и сделал. Если что-то пошло не так, то:
Run ArchLinux on Amlogic S905x S912 S905w Android TV Box
This might be a roundabout way of getting ArchLinux up and running on Amlogic based TV boxes, but it worked for me. It builds upon the great work done by the Armbian development team. Arch provides a generic ARMv8 root filesystem download on their site. In this tutorial, we will be flashing Armbian to a SD card and then replacing the Debian filesystem with the downloaded ArchLinux root FS. The tutorial uses the dd command, which does not hold your hand or offer any warnings or confirmations. TAKE YOUR TIME AND PROCEED AT YOUR OWN RISK
Things You Will Need
Downloads and Flashing to MicroSD
- Download Armbian Download
- Download ArchLinux for ARM Download
- Insert the microSD card to write Armbian/Arch Linux to
- Run the following commands in a terminal window:
# install prerequisites
sudo apt install xz-utils -y
# extract downloaded armbian image
unxz ~/Downloads/Armbian_20.10_Arm-64_bullseye_current_5.9.0.img.xz
# list out disks
sudo fdisk -l
# run the following to restore the Armbian .img to the target device
# replace sdx with the correct source disk
# MAKE ABSOLUTELY CERTAIN THE OUTPUT TARGET IS CORRECT
# OR YOU COULD POTENTIALLY DAMAGE YOUR OS
# OR OTHER STORAGE DEVICES ATTACHED TO THE PC
# restore img
sudo dd if=~/Downloads/Armbian_20.10_Arm-64_bullseye_current_5.9.0.img of=/dev/sdx bs=4M status=progress
# after the dd completes, run the following to list mounted drives and partitions
df -h
# locate the ROOTFS partition on the SD card, using sdx from above
# delete the armbian OS filesystem, replace the path with the SD card ROOTFS partition
sudo rm /media/i12bretro/ROOTFS/* -r
# extract the archlinux rootfs to the SD card ROOTFS partition, replace the path with the SD card ROOTFS partition
sudo tar -xf ~/Downloads/ArchLinuxARM-aarch64-latest.tar.gz -C /media/i12bretro/ROOTFS
Configure MicroSD Card for ArchLinux
- Open the BOOT partition of the microSD card in a file browser
- Rename the appropriate file from below to u-boot.ext on the root of the SD card u-boot-s905 (for s905)
u-boot-s905x-s912 (for s905x and s912)
u-boot-s905x2-s922 (for s905x2 and s922) - Edit /extlinux/extlinux.conf in a text editor
- Comment out rk-3399 lines by adding #
- Uncomment aml s9xx FDT and APPEND lines by removing #
- Update the FDT line to point to a working .dtb file for your device
# aml s9xxx
FDT /dtb/amlogic/meson-gxl-s905w-tx3-mini.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=0Booting to ArchLinux for the First Time
- Plug the power adapter into the Android TV box
- If the device has never booted from external storage before the stock Android OS will load
- In Android, navigate to the application drawer > Run Update & Backup
- Select Local > Navigate to the microSD card > aml_autoscript.zip
- Select Update
- The system will reboot twice and should then begin booting ArchLinux from the microSD card
- You should see the ArchLinux terminal running startup scripts
- When prompted, login with username: root password: root
NOTE: the default user level account is username: alarm password: alarm - Run the following commands to install sudo and create a new sudo user
# change the root password
passwd
# delete the default alarm user
userdel -r alarm
# initialize pacman keyring
pacman-key –init
pacman-key –populate archlinuxarm
# update software repositories
pacman -Syu
# install sudo
pacman -S sudo
# create a new user account
# change i12bretro in all the commands below to the new username
useradd –create-home i12bretro
# set the new user’s password
passwd i12bretro
# add the user to the wheel group
usermod -aG wheel i12bretro
# add the user to the sudoers file
nano /etc/sudoers
# uncomment the following line by removing the # symbol
%wheel ALL=(ALL) ALLSpecial thanks to the developers and forum members over at Armbian.com and ArchLinuxARM.org for making this possible
Share this:
- Click to share on Twitter (Opens in new window)
- Click to share on Facebook (Opens in new window)
- Click to print (Opens in new window)
- Click to share on LinkedIn (Opens in new window)
- Click to share on Reddit (Opens in new window)
- Click to share on Tumblr (Opens in new window)
- Click to share on Pinterest (Opens in new window)
- Click to share on Pocket (Opens in new window)
- Click to share on Telegram (Opens in new window)
- Click to share on WhatsApp (Opens in new window)
- Click to email a link to a friend (Opens in new window)
Installing Armbian on Amlogic S912 Android TV Box (Nexbox A95x A2)
I love the idea of the Raspberry Pi, but there are some cheaper alternative single board computers that offer a similar experience for a fraction of the cost. While the community support isn’t quite what it is for the Pi, there are a ton of projects you can accomplish on the cheap with these little hidden gems. Keep an eye on AliExpress and Amazon and you can find SBC’s sporting quad core ARM process with 2-4 GB of RAM for under $30, including a power supply and IR remote control.
The box used in this video is a Nexbox A95x A2 I picked up used on eBay for $21 shipped. It sports an Octa Core Amlogic S912 @ 2GHz and 2 GB of DDR3 RAM.
https://www.gearbest.com/refurbished-product/pp_009840550154.html?wid=1433363Things You Will Need
Downloads and Flashing to MicroSD
- Download Armbian Download
- Download Balena Etcher Download
- Run Balena Etcher
- Burn Armbian image to microSD card
- Safely remove microSD and re-insert
- Ignore/close the Windows dialogs to format the inserted microSD card
Configure MicroSD Card for Armbian
- Open the readable partition of the microSD card in Explorer
- Rename the file u-boot-s905x-s912 to u-boot.ext
- Edit /extlinux/extlinuxuEnv.conf in a text editor
- Comment out rk-3399 lines by adding #
- Uncomment aml s9xx FDT and APPEND lines by removing #
- Update the FDT line to point to a working .dtb file for your device
# aml s9xxx
#FDT=/dtb/amlogic/meson-g12a-x96-max-no-cvbs.dtb
#FDT=/dtb/amlogic/meson-g12b-ugoos-am6-no-cvbs.dtb
#FDT=/dtb/amlogic/meson-g12b-odroid-n2.dtb
FDT=/dtb/amlogic/meson-gxm-q200.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=0Booting to Armbian for the First Time
- Plug the power adapter into the Android TV box
- If the device has never booted from external storage before the stock Android OS will load
- In Android, navigate to the application drawer > Run Update & Backup
- Select Local > Navigate to the microSD card > aml_autoscript.zip
- Select Update
- The system will reboot twice and should then begin booting Armbian from the microSD card
- You should see the Armbian terminal running startup scripts
- When prompted, input a new root password
- Confirm the new root password
- When prompted, input a username
- Input a password for the new user
- Confirm the password for the new user
- Follow any additional the prompts
- Armbian will boot into the desktop environment
Special thanks to the developers and forum members over at Armbian.com for making this possible
Share this:
- Click to share on Twitter (Opens in new window)
- Click to share on Facebook (Opens in new window)
- Click to print (Opens in new window)
- Click to share on LinkedIn (Opens in new window)
- Click to share on Reddit (Opens in new window)
- Click to share on Tumblr (Opens in new window)
- Click to share on Pinterest (Opens in new window)
- Click to share on Pocket (Opens in new window)
- Click to share on Telegram (Opens in new window)
- Click to share on WhatsApp (Opens in new window)
- Click to email a link to a friend (Opens in new window)