Custom armbian for Xiegu X6100
 
 
Go to file
Links 8dc6589ade
ignore .vscode-ctags
2022-04-14 14:02:15 +02:00
docs uboot boot select via Button press 2022-04-08 20:13:41 +02:00
userpatches add framebuffer-vncserver 2022-04-14 14:01:49 +02:00
.gitignore ignore .vscode-ctags 2022-04-14 14:02:15 +02:00
README.md update to debian sid and install bluez-alsa-utils 2022-04-14 10:55:14 +02:00

README.md

x6100-armbian

tools and scripts to build armbian for the x6100

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

armbian on x6100

requirements

  • SD card updade image
  • access to the x6100 (or a way to extract files form the update image)

Bootup OS selection

the Image build by this repo has multible boot options, based on which button is pressed on startup powerup of the Device. currently the buttons under the screen are used.

  • no Button: Boot internal storage (X6100 orginal OS)
  • 1 Button: stock Kernel + Armbian with X6100 APP on screen
  • 2 Button: stock Kernel + Armbian with xfce on screen
  • 3 Button: Armbian Kernel + boot to console

Notes:

  • you can release the button as soon the button backlight LED come on.
  • Armbian Kernel currently has no support for the screen

VNC

after armbian init setup, a VNC server will be running on port 5900 powerd by lightdm.

Note: the bad build in WiFi Antenna can make a VNC connection Instable very fast.

WiFi / Network config

on the comand line use nmtui or use the Network Manager UI after login.

Audio via Network

with armbian booted the X6100 will open a TCP server on port 7000 to allow access to the RX audio stream.

getting RX audio steam (Linux)

this will create a X6100_RX.monitor pulse device and connect in to the X6100

pactl load-module module-null-sink sink_name=X6100_RX sink_properties=device.description=X6100_RX
gst-launch-1.0 tcpclientsrc port=7000 host=<IP of the x6100> ! audio/x-raw,rate=16000,channels=2,format=S16LE ! pulsesink device=X6100_RX client-name=X6100

build steps

extract uboot:

dd if=X6100-sdcard-20220219.img of=uboot_sdcard.bin bs=1024 skip=8 count=512 seek=0

extract kernel and kernel modules

we need:

  • zImage
  • sun8i-r16-x6100.dtb
  • kernel moduels found in /lib/modules/5.8.9

put the files to /userpatches/overlay/extracted

example:

└── userpatches
    └── overlay
...
        ├── extracted
        │   ├── modules
        │   │   └── 5.8.9
        │   │       ├── kernel
        ...........
        │   │       ├── modules.alias
        │   │       ├── modules.alias.bin
        │   │       ├── modules.builtin
        │   │       ├── modules.builtin.bin
        │   │       ├── modules.builtin.modinfo
        │   │       ├── modules.dep
        │   │       ├── modules.dep.bin
        │   │       ├── modules.devname
        │   │       ├── modules.order
        │   │       ├── modules.softdep
        │   │       ├── modules.symbols
        │   │       └── modules.symbols.bin
        │   ├── sun8i-r16-x6100.dtb
        │   └── zImage

build armbian:

git clone https://github.com/armbian/build --depth=1
cp -r userpatches/ build/

cd build
./compile.sh docker BOARD=lime-a33 BSPFREEZE=yes BRANCH=current RELEASE=sid BUILD_MINIMAL=no BUILD_DESKTOP=yes KERNEL_ONLY=no KERNEL_CONFIGURE=no DESKTOP_ENVIRONMENT=xfce DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base DESKTOP_APPGROUPS_SELECTED="3dsupport browsers" COMPRESS_OUTPUTIMAGE=sha,gpg,img

install on sdcard

install armbian:

dd if=output/images/Armbian_22.05.0-trunk_Lime-a33_buster_current_5.15.32_xfce_desktop.img of=/dev/<SDCARD>

install uboot:

dd if=uboot_sdcard.bin of=/dev/<SDCARD> bs=1024 seek=8

booting armbian kernel

Note: currently the screen driver src is not public, resulting in no screen output. (kernel/drivers/gpu/drm/panel/panel-jlt4013a-pss.ko)

change: /userpatches/overlay/boot.cmd

from:

load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}/zImage_org

to:

load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}/zImage

if changed live on the x6100 rebuild:

mkimage -C none -A arm -T script -d boot.cmd boot.scr

starting radio UI

Using ssh or serial:

/etc/init.d/lightdm stop
/root/chroot_onboard.sh
/etc/init.d/S99userappstart start

working with the device tree

dtc -I dtb -O dts sun8i-r16-x6100.dtb > sun8i-r16-x6100.dts

dtc -I dts -O dtb sun8i-r16-x6100.dts > sun8i-r16-x6100.dtb

uboot

get all gpio

gpio status -a

get button state

this code checks the buttons below the screen. number 1 is the left most.

#set matrix row
gpio clear PG6

if gpio input PE16 ; then
echo 1
elif gpio input PE17 ; then
echo 2
elif gpio input PE11 ; then
echo 3
else
echo none
fi

#reset matrix
gpio input PG6