Run ArchLinux on Amlogic S905x S912 S905w Android TV Box

Channel:
Subscribers:
14,500
Published on ● Video Link: https://www.youtube.com/watch?v=wZ-xww-IbFY



Category:
Vlog
Duration: 4:45
9,209 views
86


#Arch #Linux #AmlogicS905x

Full steps can be found at https://i12bretro.github.io/tutorials/0527.html

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
   - A microSD card at least 8 GB  https://amzn.to/36CpShC |  https://amzn.to/3CXJngt |  https://amzn.to/3JqyxSP
 
Downloads and Flashing to MicroSD
   01. Download Armbian  https://users.armbian.com/balbes150/arm-64/Armbian_20.10_Arm-64_bullseye_current_5.9.0.img.xz
   02. Download ArchLinux for ARM  http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
   03. Insert the microSD card to write Armbian/Arch Linux to
   04. 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
   01. Open the BOOT partition of the microSD card in a file browser
   02. 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)
   03. Edit /extlinux/extlinux.conf in a text editor     
      a. Comment out rk-3399 lines by adding #
      b. Uncomment aml s9xx FDT and APPEND lines by removing #
      c. 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=0
      d. Save
      e. Close     
   09. Safely eject the microSD
   10. Insert microSD card to Android TV box
 
Booting to ArchLinux for the First Time
   01. Plug the power adapter into the Android TV box
   02. If the device has never booted from external storage before the stock Android OS will load
   03. In Android, navigate to the application drawer ≫ Run Update & Backup
   04. Select Local ≫ Navigate to the microSD card ≫ aml_autoscript.zip
   05. Select Update
   06. The system will reboot twice and should then begin booting ArchLinux from the microSD card
   07. You should see the ArchLinux terminal running startup scripts
   08. When prompted, login with username: root password: root
    NOTE: the default user level account is username: alarm password: alarm
   09. 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


....Full steps can be found on GitHub [link at the top]


### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro







Tags:
Amlogic
Arch
ArchLinux
Armbian
How To
Linux
Raspberry Pi Alternative
S905w
S905x
S912
SBC
Single Board Computer
Sunvell T95x
Tanix
Tutorial
i12bretro