### Run Post-Installation Script Source: https://github.com/sicxnull/onn4k-tv-box-armbian/blob/main/README.md Execute the post-build script to copy required files to the boot partition. ```bash $ cd .. $ sudo ./postscript.sh ``` -------------------------------- ### Execute Boot Command Source: https://context7.com/sicxnull/onn4k-tv-box-armbian/llms.txt This command is used to initiate the boot process. ```bash run bootcmd ``` -------------------------------- ### Onn 4K TV-Box Armbian First Boot Procedure Source: https://context7.com/sicxnull/onn4k-tv-box-armbian/llms.txt Follow these steps to boot the Onn 4K TV-Box from a USB drive for the first time. Ensure all hardware requirements are met before proceeding. ```bash # Hardware requirements: # - OTG Cable (required for USB boot) # - USB Hub (recommended for keyboard/mouse) # - USB to Ethernet adapter (recommended for network setup) # First boot procedure: # 1. Insert USB drive with Armbian image into OTG cable # 2. Connect OTG cable to Onn 4K TV-Box USB port # 3. Hold the reset button (pinhole on device) # 4. While holding reset, plug in power cable # 5. Release reset button after 3-5 seconds # 6. Device will boot from USB into Armbian # Subsequent boots: # Simply power on with USB drive connected - no reset button needed ``` -------------------------------- ### Build Armbian Image with MATE Desktop (Ubuntu Jammy) Source: https://context7.com/sicxnull/onn4k-tv-box-armbian/llms.txt Compile a full desktop Armbian image for the Onn 4K TV-Box using Ubuntu Jammy and the MATE desktop environment. Ensure you are in the 'armbian-build' directory. ```bash cd armbian-build ./compile.sh build \ BOARD=onn4k \ BRANCH=current \ BUILD_DESKTOP=yes \ BUILD_MINIMAL=no \ DESKTOP_ENVIRONMENT=mate \ DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base \ EXPERT=yes \ KERNEL_CONFIGURE=no \ KERNEL_GIT=shallow \ RELEASE=jammy ``` -------------------------------- ### Run Post-Build Script to Prepare Boot Partition Source: https://context7.com/sicxnull/onn4k-tv-box-armbian/llms.txt Execute the postscript.sh to copy necessary boot files (U-Boot, autoscript) into the generated Armbian image's boot partition. This script requires root privileges. ```bash cd .. sudo ./postscript.sh ``` -------------------------------- ### Build Armbian Image with MATE Desktop (Debian Bookworm) Source: https://context7.com/sicxnull/onn4k-tv-box-armbian/llms.txt Compile a full desktop Armbian image for the Onn 4K TV-Box using Debian Bookworm and the MATE desktop environment. Ensure you are in the 'armbian-build' directory. ```bash cd armbian-build ./compile.sh build \ BOARD=onn4k \ BRANCH=current \ BUILD_DESKTOP=yes \ BUILD_MINIMAL=no \ DESKTOP_APPGROUPS_SELECTED= \ DESKTOP_ENVIRONMENT=mate \ DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base \ EXPERT=yes \ KERNEL_CONFIGURE=no \ KERNEL_GIT=shallow \ RELEASE=bookworm ``` -------------------------------- ### Compile Armbian Image Source: https://github.com/sicxnull/onn4k-tv-box-armbian/blob/main/README.md Execute the build script with specific board and environment configurations. ```bash $ cd armbian-build $ ./compile.sh build BOARD=onn4k BRANCH=current BUILD_DESKTOP=yes BUILD_MINIMAL=no DESKTOP_APPGROUPS_SELECTED= DESKTOP_ENVIRONMENT=mate DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base EXPERT=yes KERNEL_CONFIGURE=no KERNEL_GIT=shallow RELEASE=bookworm ``` -------------------------------- ### Clone and Patch Armbian Build Source: https://github.com/sicxnull/onn4k-tv-box-armbian/blob/main/README.md Download the Armbian build repository and apply the necessary patches for the Onn 4K TV-Box. ```bash $ git clone --depth=1 https://github.com/armbian/build armbian-build $ cp -R armbian-patch/* armbian-build/ ``` -------------------------------- ### U-Boot Autoscript Configuration for Amlogic Source: https://context7.com/sicxnull/onn4k-tv-box-armbian/llms.txt This script configures the Amlogic U-Boot to boot from USB and load the custom U-Boot binary. It resets the environment, sets the boot command, and saves the changes. ```bash # File: boot/aml_autoscript.cmd # Recompile with: # mkimage -C none -A arm -T script -d /boot/aml_autoscript.cmd /boot/aml_autoscript # Reset environment to defaults defenv # Set boot command to load U-Boot from USB setenv bootcmd "usb start && if fatload usb 0:1 0x1000000 u-boot/onn-uhd.uboot; then go 0x1000000; else run storeboot; fi" # Save environment changes saveenv ``` -------------------------------- ### Armbian Board Configuration for Onn 4K TV-Box Source: https://context7.com/sicxnull/onn4k-tv-box-armbian/llms.txt This file defines hardware-specific settings for the Onn 4K TV-Box within the Armbian build system, including SoC family, maintainer, U-Boot configuration, and kernel branches. ```bash # File: armbian-patch/config/boards/onn4k.tvb # Board configuration for Onn 4K TV-Box BOARD_NAME="Onn4k TV Box" # Display name for the board BOARDFAMILY="meson-g12a" # Amlogic G12A SoC family BOARD_MAINTAINER="sicXnull" # Board maintainer BOOTCONFIG="onn-uhd_defconfig" # U-Boot configuration file BOOT_FDT_FILE="amlogic/meson-g12a-onn-uhd.dtb" # Device tree blob KERNEL_TARGET="current,edge" # Supported kernel branches MODULES_BLACKLIST="simpledrm" # SimpleDRM conflicts with Panfrost GPU FULL_DESKTOP="yes" # Enable full desktop support BOOT_LOGO="desktop" # Boot logo type BOOTBRANCH_BOARD="tag:v2023.07.02" # U-Boot version tag BOOTPATCHDIR="v2023.07.02" # U-Boot patch directory BOOT_SCENARIO="spl-blobs" # Boot scenario using SPL blobs BOOTFS_TYPE="fat" # Boot filesystem type ``` -------------------------------- ### Write Image to USB Source: https://github.com/sicxnull/onn4k-tv-box-armbian/blob/main/README.md Flash the generated image to a USB drive using the dd command. Ensure the device path and filename are correct for your environment. ```bash cd armbian-build/output/images sudo dd if=Armbian-unofficial_24.11.0-trunk_Onn4k_bookworm_current_6.6.48_mate_desktop.img of=/dev/sdb bs=4M status=progress ``` -------------------------------- ### Write Armbian Image to USB Drive Source: https://context7.com/sicxnull/onn4k-tv-box-armbian/llms.txt Use the 'dd' command to write the compiled Armbian image to a USB drive. Ensure you replace '/dev/sdb' with the correct device path for your USB drive to prevent data loss. The 'sync' command ensures all data is written. ```bash cd armbian-build/output/images ls -la Armbian-unofficial_*.img sudo dd if=Armbian-unofficial_24.11.0-trunk_Onn4k_bookworm_current_6.6.48_mate_desktop.img \ of=/dev/sdb \ bs=4M \ status=progress sync ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.