Jump to content

Deoptim

Members
  • Posts

    10
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Deoptim got a reaction from Hqnicolas in Vontar KK MAX / HK1 RBOX R2 / R3 - RK3566 4GB/32GB(or 64GB)   
    Armbian 24.5.0 Bookworm images (linux-6.1/linux-6.6) for TVBoxes: Vontar KK MAX / HK1 RBOX R2 / HK1 RBOX R3
    (the same dts/dtb should work for these TVBoxes)
     
    Here is a dts and dtb files, working reworked for mainline:
    hk1-rbox-r3-profile-kernel-6.1-6.6.zip
     
    (original dts and dtb from TVBox rk-kernel-orig.zip)
     
    Checked the following:
    HDMI - works (need to check hot plugging) HDMI sound - works USB 2.0 - works USB 3.0 - works SPDIF - should work (I cannot to check) SD-Card booting and detection - works eMMC install on it (/sbin/nand-sata-install) and detection - works RKDevTool installing and loading images on/from eMMC - works GPU (bugs/frizzes on mainline are not canceled) - works Hardware video acceleration(except for browsers) - works Dualboot if you flash new bootloader (SD-Card boot high priority) - works  
    Here are the compiled Armbian images (Bookworm only) with integrated dtb:
    https://www.mediafire.com/file/4dwf7ce922x7obq/Armbian-unofficial_24.5.0-trunk_Hk1-rbox-r3_bookworm_current_6.1.87_cinnamon_desktop.img.xz/file
    https://www.mediafire.com/file/fjwtxb5gjzip341/Armbian-unofficial_24.5.0-trunk_Hk1-rbox-r3_bookworm_current_6.1.87_minimal.img.xz/file
    https://www.mediafire.com/file/iuz4uijgjh5ry1r/Armbian-unofficial_24.5.0-trunk_Hk1-rbox-r3_bookworm_current_6.6.28_cinnamon_desktop.img.xz/file
    https://www.mediafire.com/file/kofyqabr5k6qxm8/Armbian-unofficial_24.5.0-trunk_Hk1-rbox-r3_bookworm_current_6.6.28_minimal.img.xz/file
     
    The one of this box itself is HK1 RBOX R3, the photo shows the pins for short to go to the Maskrom bootloader and UART pins:
     
    A working bootloader(supports dualboot) on this hardware for RKDevTool tool just in case:
    Loader.zip
     
     
    Please note that RKDevTool flashing utility only needs to flash the .img file with the bootloader, i.e. you need to unpack the .xz archive somewhere first (for ex. you can use 7-zip).
     
    --
     
    Recommendations for installation on eMMC
     
    ----------------------------------------------------
    For those who want to build Armbian themselves, here are the instructions:
     
    UPD:
    Added to images "f2fs-tools" package, added loader to support dualboot without touching the original Android(or other OS) image on eMMC - priority is given to SD-Card.
    Boot will be from SD-Card if there is on boot partition exist folder and file \boot.scr or extlinux\extlinux.conf - uboot(both: original Android and compiled for Armbian) searches for this path and file if it found this file, it will load from device which contains this file. mmc1(SD-Card) - first, mmc0(eMMC) - second.
    For correct priority loading it is necessary to replace the main bootloader which is in the archive Loader.zip - if you have an Android it is enough to flash only this bootloader as Loader at 0x0 offset using RKDevTool utility, the rest of the eMMC part should not be touched if the OS and settings we need are there. U-boot on eMMC must be original or Armbian and preinstalled at offset 0x4000.
    Instructions:
    (remember, uboot must be on eMMC (even the original Android or Armbian, i.e. if you erase the eMMC - the boot will not work) and this is relevant if you have installed the original MiniLoaderAll.bin, which does not support booting from SD-Card, but only from eMMC. Some TVBoxes may already have a bootloader that supports SD-card booting.).
     
    Feel free to test...
  2. Like
    Deoptim got a reaction from Igor in Instruction on how to use wireless WoL (Wake on LAN) using RTL8189FS (RTL8189FTV) module   
    Instruction on how to use wireless WoL (Wake on LAN) using RTL8189FS example in Armbian 23.x Bookworm
    (This wireless WIFI adapter is installed in Oprange Pi Lite/Oprange Pi Plus(2E)/Orange Pi Zero Plus/Oprange Pi PC Plus/Oprange Pi 2/etc...)
     
    1. First of all we need to change the device tree configuration file dts file for our single board. The point is that for most WIFI drivers for SDIO interface there is a normal configuration of single board wake-up via interrupt and therefore there is no need to go into dts. In the driver for RTL8189FS (aka RTL8189FTV) there is NO such feature as "host-wake" interrupt and we will have to make small changes to wake up the single board when Magic packet (WoL) is detected through the "gpio-keys" button module.
    The same method will most likely work for the related RTL8189ES (aka RTL8189ETV) adapter, but keep in mind that here you will most likely need other settings in the dts file, since the gpios (for wifi_rst and wifi_wake) for your single-board adapter will be under a different number.
     
     
    2 The second step is to compile and install a new driver for RTL8189FS with WoL function enabled, I will do it on the single board itself. You can also do cross compilation (do it on your computer).
     
     
    3. How to use WoL.
     
     
    4. Additionally.
     
     
    wol-wakeup-for-rtl8189fs.dts.txt
    QuickStartGuideforWOW.399483868.pdf
    Link to original source
  3. Like
    Deoptim got a reaction from javi in How to install Home Assistant Supervised on Armbian 23.02 Jammy   
    How to install Home Assistant Supervised on Armbian 23.02 Jammy
    (plus minus, but quite installed on the previous release of Armbian, this is based on Debian 10)
     
    Performed exclusively without a graphical interface, from the console.
    Works stably on Orange Pi Lite , including a connected Bluetooth dongle via USB and sensors to it.

    1. The first installation of Armbian and the subsequent creation of a user and passwords, the next is required to install all updates via sudo apt update && sudo apt upgrade -y . Then you need to install the Firmware
    update through the armbian-config ->System utility as in the screenshot.
    (When prompted for reboot - reboot the system.)
     
    Separately for owners of Orange Pi Lite:
    2. Next, follow the instructions https://github.com/home-assistant/supervised-installer up to "Step 4"
    If we continue to install "Step 4", it will not allow installation and will write in red letters that the current system is not supported and the system must be Debian 11.
    3. In this case, it is necessary during the installation, to replace one variable in the system in the /etc/os-release file .
    It is necessary to replace in this file
    PRETTY_NAME="Armbian 23.02.2 Jammy" on
    PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" (from sudo rights, eg "sudo nano /etc/os-release" editor)
    4. And continue with "Step 4" in the instructions.
    In the installation type selection window, select "qemuarm" for armv7, this is important .
    5. After installation, the services for deploying the docker container will immediately load automatically. Note that it took me ~15 minutes ! The progress of the deployment can be monitored indirectly in htop (you can open a window in parallel in another ssh terminal).
    6. For autoload, you need to activate autoload services:
    sudo systemctl enable hassio-apparmor.service sudo systemctl enable hassio-supervisor.service For Bluetooth integration to work, you must install "sudo apt-get -y install bluez" into the system beforehand.
     
    Additionally:
    1. The main file(s) of the Home Assistant configuration ( for ex. like configuration.yaml ) on this system will be located along the path /usr/share/hassio/homeassistant/ , in the same folder, if necessary, you need to throw custom_components .
    2. If you want to use /dev/ttyUSB0 (or HC-05 ( /dev/rfcomm0 ) for example after auto connect via bluetoothctl ) on your Armbian and in conjunction with Home Assistant, then you need to add rights to your user:
    sudo gpasswd --add <user> dialout sudo newgrp dialout (Note that the brackets <> should be your data instead. Also, if you will use i2c in the same way as dialout, write i2c )
    Working with GPIO from userspace in Armbian
     
    Option 1 (classic)
    By default, the OS does not allow gpio to be controlled via sysfs (/sys/class/gpio/) to a non-root user, to fix this you need to do the following:

    1. Create a gpio group:
    sudo groupadd gpio  
    2. We give our user access to the gpio group:
    sudo usermod -aG gpio <user>
    3. Create a rule for udev when the system boots:
    sudo nano /etc/udev/rules.d/99-gpio.rules Paste in the file "/etc/udev/rules.d/99-gpio.rules" the following
    SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" SUBSYSTEM=="gpio", KERNEL=="gpio*", GROUP="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'"  
    4. Reboot:
    sudo reboot  
    For Allwinner H3 gpio, the following picture corresponds to the connector:
    (Where BCM corresponds to the GPIO number in Armbian, more details can be found here )
     
    It should now be possible to change (monitor) all these gpios non-root , i.e. when we do for example "echo 6 > /sys/class/gpio/export", then it will use the physical 7 pin of the connector as the folder "/sys/class/gpio/gpio6" etc...
     
    Option 2 (recommended)
    A new option without any sysfs is to use the built-in Armbian tools like gpiodetect, gpiofind, gpioget, gpioinfo, gpiomon, gpioset (Help).
     
    Additionally:
    For Home Assistant, in addition to the classic way, it is much easier to do the second option, for example:
    This is a binary_sensor in the form of a pressing to the button (input😞
    binary_sensor: - platform: command_line name: external_button_state command: "gpioget gpiochip0 6" payload_off: "0" payload_on: "1" scan_interval: 0.250 (same 7 pin on connector as GPIO6 on Armbian , scan_interval set to 0.250 in seconds - means 250ms)
     
    Or a switch like slide switch 😀 (output) :
    switch: - platform: command_line switches: something_change_value: friendly_name: Test Switch pulling GPIO output command_on: gpioset -B pull-up gpiochip0 64=1 command_off: gpioset -B pull-down gpiochip0 64=0 command_state: test $(gpioget gpiochip0 64) = 1 (where pin 19 is used on the connector that is GPIO64 on Armbian as an output signal, 0=low[0V] 1=high[3.3V], the test command tests the already set switch value and changes it almost in real time - this is necessary if let's say we have someone else who controls the signal, or it changes dynamically, or in general, another pin can be set for the status)
     
    -----------------
    That's all, successful projects for you!
    Original link
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines