Jump to content

Search the Community

Showing results for tags 'tutorial'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Armbian
    • Armbian project administration
  • Community
    • Announcements
    • SBC News
    • Framework and userspace feature requests
    • Off-topic
  • Using Armbian
    • Beginners
    • Software, Applications, Userspace
    • Advanced users - Development
  • Standard support
    • Amlogic meson
    • Allwinner sunxi
    • Rockchip
    • Other families
  • Community maintained / Staging
    • TV boxes
    • Amlogic meson
    • Allwinner sunxi
    • Marvell mvebu
    • Rockchip
    • Other families
  • Support

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Matrix


Mastodon


IRC


Website URL


XMPP/Jabber


Skype


Github


Discord


Location


Interests

  1. Step 1 - Install the Armbian PGP key and update your APT sources Install armbian.gpg to /usr/share/keyrings/armbian.gpg (mode 644) You can use a copy from another one of your SBCs, or... ... you can download and install like below (thanks @BrewNinja for the example) touch /usr/share/keyrings/armbian.gpg chmod 644 /usr/share/keyrings/armbian.gpg wget https://apt.armbian.com/armbian.key -O - | gpg --dearmor >/usr/share/keyrings/armbian.gpg Edit /etc/apt/sources.list Replace all instances of bullseye with bookworm Edit /etc/apt/sources.list.d/armbian.list deb [signed-by=/usr/share/keyrings/armbian.gpg] http://apt.armbian.com bookworm main bookworm-utils bookworm-desktop Edit any other files in /etc/apt/sources.list.d as appropriate, to replace bullseye with bookworm Step 2 apt update Step 3 NOTE - WHEN RUNNING THE BELOW COMMANDS, DO NOT ACCEPT ANY INTERACTIVE PROMPTS FOR CHANGING /etc/initramfs-tools/initramfs.conf The default is not to accept the changes anyway - but I am noting this here to be extra careful I've checked - the changes may differ from what armbian has in the latest images apt upgrade --no-new-pkgs apt full-upgrade apt dist-upgrade
  2. Hello, this quick tutorial is to introduce an experimental Debian and Ubuntu APT repository to install ffmpeg and mpv compiled with v4l2request and v4l2drmprime patches developed by Linux kernel, LIbreELEC and Kodi folks to allow hardware video decoding on stateless decoders like those implemented in Rockchip and Allwinner SoCs for h.264, h.265, vp8 and vp9 codecs. The repository introduces a new package ffmpeg-v4l2request that integrates and substitues the base ffmpeg package and its related packages. Also provides mpv 0.35.1 for Ubuntu Jammy, which has an overrall better support for hardware video decoders. Preconditions: Kernel should be 6.1 or more recent armhf or arm64 architecture Supported operating systems are Debian Bookworm and Ubuntu Jammy Rockchip and Allwinner have already been tested, but this should work on other platforms with stateless decoders supported in kernel APT REPOSITORY SETUP To install the repository, just copy and paste the lines for your operating system in a terminal For Debian Bookworm: $ sudo wget http://apt.undo.it:7241/apt.undo.it.asc -O /etc/apt/trusted.gpg.d/apt.undo.it.asc $ echo "deb http://apt.undo.it:7241/debian bookworm main" | sudo tee /etc/apt/sources.list.d/apt.undo.it.list For Ubuntu Jammy: $ sudo wget http://apt.undo.it:7241/apt.undo.it.asc -O /etc/apt/trusted.gpg.d/apt.undo.it.asc $ echo "deb http://apt.undo.it:7241/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/apt.undo.it.list INSTALL FFMPEG AND MPV PACKAGES $ sudo apt update $ sudo apt install ffmpeg-v4l2request mpv SETUP MPV CONFIG FILE $ sudo mkdir -p /etc/mpv $ echo -e "hwdec=drm\ndrm-drmprime-video-plane=primary\ndrm-draw-plane=overlay" | sudo tee /etc/mpv/mpv.conf You can now play your videos using mpv and they should run with hardware decoding if supported, either in virtual terminals or in X11/Wayland windows! Enjoy! Notes: your mileage may vary a lot: the more recent is the kernel version, the better is support (you may need edge kernel) bug: when rendered in X11/Wayland window, video may show scattered tiles during frames bug: Lima driver (Mali 400/450) shows a red/pink tint when video is played in X11/Wayland (see https://github.com/mpv-player/mpv/issues/12968) (workaround below: https://forum.armbian.com/topic/32449-repository-for-v4l2request-hardware-video-decoding-rockchip-allwinner/?do=findComment&comment=177968) Panfrost driver should work flawlessy 10 bit HEVC are generally supported on all Rockchip devices (rk322x, rk3288, rk33x8, rk3399), but Allwinner H3 have no hardware support for that
  3. Building Armbian using Ubuntu (jammy) in a systemd-nspawn container https://gist.github.com/ag88/05245121cce37cb8f029424a20752e35 Special thanks goes to @Gunjan Gupta for the tip on PREFER_DOCKER=no
  4. Full root filesystem encryption on an Armbian system (new, fully rewritten, replaces my earlier tutorial on this topic) MMGen (https://github.com/mmgen) This tutorial provides detailed, step-by-step instructions for setting up full root filesystem encryption on an Armbian system. The disk can be unlocked remotely via SSH or the serial console, permitting unattended bootup. An automated script that performs the same steps, saving you much time and effort, can be found at https://github.com/mmgen/mmgen-geek-tools Note that unlike my earlier tutorial all steps are performed within a running Armbian system. The tutorial is known to work with the following board/image combinations: Orange Pi PC2 Debian Buster mainline / Ubuntu Bionic and Focal legacy RockPi 4 Debian Buster mainline / Ubuntu Bionic and Focal legacy RockPro 64 Ubuntu Focal mainline Odroid HC4 Debian Buster mainline / Ubuntu Focal mainline You may have success with other boards/images too. If so, please post the details below (or open an issue in the mmgen-geek-tools Github repository), and I’ll add your board to the list. Requirements: A SoC with a running, upgradeable and Internet-connected Armbian system A blank Micro-SD card and USB card reader, or, alternatively, a blank eMMC installed on the board The ability to edit text files and do simple administrative tasks on the Linux command line Step 1 - Preliminaries All steps in this tutorial are performed as root user on a running Armbian system (the “host”). The encrypted system (the “target”) will be created on a blank micro-SD card. If your board has an eMMC not currently in use, the system can be created on it instead. Architecture of host and target (e.g. 64-bit or 32-bit ARM) must be the same. For best results, the host and target hardware should also be identical or similar. Building on a host with more memory than the target, for example, may lead to disk unlocking failure on the target. If you’re building the target system for the currently running board and with the currently running image, which is the recommended approach, the two preceding points will be a non-issue. Packages will be installed using APT, so the host machine must be Internet-connected and its clock correctly set. Step 2 - Upgrade your system and install the cryptsetup-bin package # apt update && apt upgrade # apt install cryptsetup-bin Step 3 - Get and unpack the latest Armbian image for your board Create your build directory: # mkdir armbenc-build && cd armbenc-build Download the Armbian image of your choice for your board, place it in this directory and unpack: # xz -dv *.img.xz Step 4 - Create mount directories and set up the loop mount Create the mount directories: # mkdir -p mnt boot root Determine your first free loop device: # losetup -f Associate the image file with the loop device name displayed by the previous command. This will be '/dev/loop0' in most cases, but if your output was different, substitute that for '/dev/loop0' in the following steps. # losetup -P /dev/loop0 *.img Examine the disk image using fdisk on the loop device: # fdisk -l /dev/loop0 The output should look something like this: Device Boot Start End Sectors Size Id Type /dev/loop0p1 32768 3489791 3457024 1.7G 83 Linux Make a note of the start sector (32768 in this case). You’ll need this value in the steps below. Now mount the loop device: # mount /dev/loop0p1 mnt Step 5 - Copy the boot loader to the SD card Insert the blank micro-SD card and card reader into a USB port. Determine the SD card’s device name using 'dmesg' or 'lsblk'. We’ll assume it to be '/dev/sda', since that’s the most likely case. If your device name is different, substitute it for '/dev/sda' in the the following steps. For an eMMC, the device name will probably be '/dev/mmcblk1'. WARNING: if '/dev/sda' refers to some other storage device, running the following commands unchanged will destroy data on that device, so always remember to substitute the correct device name!!! The best way to eliminate this danger is to disconnect all unused storage devices on the board before proceeding further. Copy the image’s boot loader to the SD card, using the Start sector value from Step 4 as the argument for 'count': # dd if=$(echo *.img) of=/dev/sda bs=512 count=32768 Step 6 - Partition the SD card # fdisk /dev/sda At the fdisk prompt, create a new DOS disk label with the 'o' command. Use the 'n' command to create a primary partition of size +200M beginning at the same Start sector as the disk image. Type 'p' to view the partition table, which should now look something like this: Device Boot Start End Sectors Size Id Type /dev/sda1 32768 442367 409600 200M 83 Linux Use 'n' again to create another primary partition beginning one sector after the first partition’s end sector and filling the remainder of the card. Type 'p' once more to view the partition table: Device Boot Start End Sectors Size Id Type /dev/sda1 32768 442367 409600 200M 83 Linux /dev/sda2 442368 30636031 30193664 14.4G 83 Linux Ensure that the first partition’s Start sector matches that of the disk image (32768 in this example) and that the second partition’s Start sector is one greater than the End sector of the first (442368 and 442367, respectively, in this example). If you’ve made a mistake, use 'd' to delete a partition and start again. Once everything looks correct, type 'w' to write the partition table to disk. Step 7 - Copy the system to the SD card The following commands will create a filesystem on the SD card’s boot partition and copy the boot partition data from the image file to it. Don’t forget to substitute the correct device name if necessary. If you’re building the system on an eMMC, the boot partition device is likely to be '/dev/mmcblk1p1' instead of '/dev/sda1'. # mkfs.ext4 /dev/sda1 # or '/dev/mmcblk1p1', for an eMMC target # e2label /dev/sda1 CRYPTO_BOOT # mount /dev/sda1 boot # cp -av mnt/boot/* boot # (cd boot; ln -s . boot) Create the encrypted root partition. When prompted for a passphrase, it’s advisable to choose an easy one like 'abc' for now. The passphrase can be changed later with the 'cryptsetup luksChangeKey' command (type 'man cryptsetup' for details) once your encrypted system is up and running. # cryptsetup luksFormat /dev/sda2 # or '/dev/mmcblk1p2', for an eMMC target Activate the encrypted root partition and create a filesystem on it: # cryptsetup luksOpen /dev/sda2 rootfs # enter your passphrase from above # mkfs.ext4 /dev/mapper/rootfs Mount the encrypted root partition and copy the system to it: # mount /dev/mapper/rootfs root # (cd mnt && rsync -a --info=progress2 --exclude=boot * ../root) # sync # be patient, this could take a while # mkdir root/boot # touch root/root/.no_rootfs_resize Unmount the boot partition and image and free the loop device: # umount mnt boot # losetup -d /dev/loop0 Step 8 - Prepare the target system chroot # BOOT_PART=($(lsblk -l -o NAME,LABEL | grep CRYPTO_BOOT)) # ROOT_PART=${BOOT_PART%1}2 # ROOT_UUID="$(lsblk --nodeps --noheadings --output=UUID /dev/$ROOT_PART)" # BOOT_UUID="$(lsblk --noheadings --output=UUID /dev/$BOOT_PART)" # cd root # mount /dev/$BOOT_PART boot # mount -o rbind /dev dev # mount -t proc proc proc # mount -t sysfs sys sys Copy '/etc/resolv.conf' and '/etc/hosts' so you’ll have a working Internet connection within the chroot: # cat /etc/resolv.conf > etc/resolv.conf # cat /etc/hosts > etc/hosts If you’re using non-default APT repositories, you may need to copy their configuration files as well so that 'apt update' and 'apt install' will use them inside the chroot. Note that you can only do this if the host and target systems have the same distro/version. If that’s not the case, you’ll have to edit the target files by hand. # cat /etc/apt/sources.list > etc/apt/sources.list # cat /etc/apt/sources.list.d/armbian.list > etc/apt/sources.list.d/armbian.list If you’re using an apt proxy, then copy its configuration file too: # cp /etc/apt/apt.conf.d/*proxy etc/apt/apt.conf.d/ Step 9 - Edit or create required configuration files in the target system Perform the editing steps below using a text editor of your choice: Edit 'boot/armbianEnv.txt' so that the 'rootdev', 'console' and 'bootlogo' lines read as follows. If you’ll be unlocking the disk via the serial console, then use 'console=serial' instead of 'console=display'. Note that enabling the serial console will make it impossible to unlock the disk from the keyboard and monitor, though unlocking via SSH will still work: rootdev=/dev/mapper/rootfs console=display bootlogo=false Edit 'etc/initramfs-tools/initramfs.conf'. If your board will have a statically configured IP, add the following line to the end of the file, substituting the correct IP in place of 192.168.0.88: IP=192.168.0.88:::255.255.255.0::eth0:off If the board will be configured via DHCP, then edit the DEVICE line as follows: DEVICE=eth0 If host and target systems are both Debian buster, you may wish add some key modules to the initramfs to avoid a blank display at bootup time. The easiest way to do this is to add all currently loaded modules as follows: # lsmod | cut -d ' ' -f1 | tail -n+2 > etc/initramfs-tools/modules Retrieve the SSH public key from the remote unlocking host and copy it to the target: # mkdir -p etc/dropbear-initramfs # rsync yourusername@remote_machine:.ssh/id_*.pub etc/dropbear-initramfs/authorized_keys If you want to unlock the disk from more than one host, then edit the authorized_keys file by hand, adding the required additional keys. Create 'etc/crypttab': # echo "rootfs UUID=$ROOT_UUID none initramfs,luks" > etc/crypttab Create 'etc/fstab': # echo '/dev/mapper/rootfs / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1' > etc/fstab # echo "UUID=$BOOT_UUID /boot ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 2" >> etc/fstab # echo 'tmpfs /tmp tmpfs defaults,nosuid 0 0' >> etc/fstab Create the dropbear configuration file: # echo 'DROPBEAR_OPTIONS="-p 2222"' > etc/dropbear-initramfs/config # echo 'DROPBEAR=y' >> etc/dropbear-initramfs/config If the target is Ubuntu bionic, then a deprecated environment variable must be set as follows: # echo 'export CRYPTSETUP=y' > etc/initramfs-tools/conf.d/cryptsetup Set up automatic disk unlock prompt. Performing this optional step will cause the disk password prompt to appear automatically when you log in remotely via SSH to unlock the disk. Using your text editor, create the file 'etc/initramfs-tools/hooks/cryptroot-unlock.sh' with the following contents: #!/bin/sh if [ "$1" = 'prereqs' ]; then echo 'dropbear-initramfs'; exit 0; fi . /usr/share/initramfs-tools/hook-functions source='/tmp/cryptroot-unlock-profile' root_home=$(echo $DESTDIR/root-*) root_home=${root_home#$DESTDIR} echo 'if [ "$SSH_CLIENT" ]; then /usr/bin/cryptroot-unlock; fi' > $source copy_file ssh_login_profile $source $root_home/.profile exit 0 Save the file and execute the command: chmod 755 'etc/initramfs-tools/hooks/cryptroot-unlock.sh' Step 10 - Chroot into the target system, install packages and configure Now chroot into the encrypted system. All remaining steps will be performed inside the chroot: # chroot . Install the cryptsetup package and the dropbear SSH server: # apt update # echo 'force-confdef' > /root/.dpkg.cfg # apt --yes install cryptsetup-initramfs dropbear-initramfs # for a buster or focal image # apt --yes install cryptsetup dropbear-initramfs # for a bionic image # rm /root/.dpkg.cfg Make sure everything was included in the initramfs (all three commands should produce output): # lsinitramfs /boot/initrd.img* | grep 'usr.*cryptsetup' # lsinitramfs /boot/initrd.img* | grep dropbear # lsinitramfs /boot/initrd.img* | grep authorized_keys Your work is finished! Exit the chroot and shut down the board: # exit # halt -p Insert your freshly written SD card into the board’s main SD slot (or, if the target is an eMMC, just remove the SD card from that slot) and reboot. Unlock the disk by executing the following command on your remote unlocking machine, substituting the correct IP address if necessary: $ ssh -p 2222 root@192.168.0.88 If you performed step 9.10 above, the disk password prompt should appear automatically after login. If not, you must enter the command 'cryptroot-unlock'. You may also unlock the disk from the target board’s console if you wish. Note, however, that certain disk images (RockPi 4 buster mainline, for example) might give you a blank display at startup, so you’ll have to enter your disk password “blindly”. This bug will hopefully be fixed in the future. If all went well, your root-filesystem encrypted Armbian system is now up and running!
  5. Sharing is caring. Did finally manage to get this working. So lets make it simple clever. Actually i did this on a 64bit raspian light kernel 6.1 but it must be the same on Armbian 10 jan 24 Sharing the Raspberry Pi's WiFi over the ethernet port sudo apt get update && sudo apt install dnsmasq iptables iptables-persistent dhcpcd5 sudo vim /etc/dhcpcd.conf interface eth0 static ip_address=192.168.4.1/24 ------- sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.bk sudo nano /etc/dnsmasq.conf - interface=eth0 dhcp-range=192.168.4.8,192.168.4.250,255.255.255.0,12h server=8.8.8.8 bogus-priv ------ sudo systemctl restart dnsmasq.service ------ sudo vim /etc/sysctl.conf net.ipv4.ip_forward=1 ------- sudo systemctl start dnsmasq ------- sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" ------- sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT ------- sudo iptables -L -n -v ---------- sudo sh -c "iptables-save > /etc/iptables.ipv4.nat" --------- sudo vim /etc/rc.local iptables-restore < /etc/iptables.ipv4.nat exit0 --------- sudo reboot -------- Did get a perfect internet connection on odroid n2+ through eth0 - so the rpi4b is now supplying wifi for that board and providing petitboot with netbooting images through netboot_default after exit to shell.
  6. !! DEPRECATED !! Instructions in this thread are oudated and superseded by the new experimental APT repository for hardware video decoding ffmpeg. Please refer to this thread from now on! Hello, recent upgrades to armbian are regarding kernel 5.15. I noticed that many v4l2 fixes and enhancements went into this release, so I decided to compile ffmpeg using LibreELEC patched version and mpv over it. mpv turns out to be statically linked with ffmpeg, so I propose it here for people who is interested in cutting edge kernel and wants to do some tests. This has been tested on Debian Bullseye and Ubuntu Hirsute on following platforms: Rockchip RK3228/9 (kernel 5.10, 5.14) Rockchip RK3288 (kernel 5.14) Rockchip RK3318/28 (kernel 5.15) It should work on allwinner platforms too, but I didn't test it there. Binaries are built by me on developing boards. The binary for armhf is available here The binary for arm64 is available here Copy the binary into /usr/local/bin directory of your system (mpv-armhf for 32 bit systems, mpv-arm64 for 64 bit systems): sudo cp mpv-armhf /usr/local/bin/mpv Install dependencies for Debian Bullseye and Ubuntu Hirsute: apt install libass9 libbluray2 librubberband2 libsdl2-2.0-0 libva-drm2 libva-wayland2 libva-x11-2 libva2 libvdpau1 libx264-160 libx265-192 libxss1 libxv1 libfdk-aac2 I have had issues with dependencies on Debian Buster/Ubuntu Focal, in particular libx264-160 and libx265-192 are not available there. I Solved the issue downloading the packages from Debian Bullseye web page and manually installing them. There may be the need for some other dependency depending upon your actual installation. Run mpv in a virtual terminal (videos up to 4K) with this CLI: mpv --vo=gpu --hwdec=drm --gpu-hwdec-interop=drmprime-drm --drm-draw-plane=overlay --drm-drmprime-video-plane=primary <video.mp4> Mpv can be run in X11 with this other CLI, but due to buffer copying it requires a good CPU - rk3228 and rk3328 won't even play 720p, rk3288 do 720p fine: mpv --vo=gpu --hwdec=auto-copy --gpu-context=x11egl --gpu-hwdec-interop=drmprime-drm <video.mp4> This is an experiment and your mileage may vary a lot: H.264 codec should be well supported around the boards; H.265 has more limited support VP8 should be generally supported VP9 seems to still require some work.
  7. Hi all. I've done a lot of tests with different desktop environments on Armbian. I wanted an as light as possible desktop environment so I'd have enough ram left to do video rendering with the NanoPi M4(2GB) I had to try a lot of things to get things working fine. So I wanted to save others that hassle. Setting up Display Manager First we need a Display Manager. NODM is installed by default. I tried lightdm but couldn't get it to work. So I went for LXDM. With NODM installed I had problems, so I also removed NODM. To be sure lxdm is configured right, I also manually configure it. sudo apt install lxdm sudo apt remove nodm sudo dpkg-reconfigure lxdm Install LXDE Desktop Next step is to install the desktop environment you want. There is a problem with some Desktop Environments and LXDM what makes you can't login to some DE's out of the box. That we will resolve later. Easiest is to install lxdm first to be able to configure the others well. And reboot. sudo apt install lxde sudo reboot Once booted you should be greeted by the Login screen. Here you can choose your different Desktop Environment. Choose LXDE and login. If you'd try xfce4, then you'd see it doesn't work. To fix this we need to change the file /usr/share/xsessions/xfce.desktop. Use your favorite text editor. I use geany. sudo geany /usr/share/xsessions/xfce.desktop Somewhere at the top of the file you'll see "Name=Xfce Session". Replace that space with a hyphen to "Name=Xfce-Session" and save the file. Now you can also login to the default XFCE4 Desktop. With other desktops this can be the same. Go the the same directory and open the file with the desktop name that doesn't work. Again replace the space with a hyphen Installing different Desktop Environments. For the Mate desktop I also needed to install the applets, else I got errors at login because of these missing applets sudo apt install mate-desktop-environment mate-applets For KDE-Plasma sudo apt install kde-full For Gnome. Modify the file sudo geany /usr/share/xsessions/gnome... sudo apt install gnome-session sudo update-alternatives --config gdm3.css I also tried LXQT. But this one didn't work. You can try others too. Remove Desktop Environment To remove a desktop environment you don't want anymore you do the remove instead of install. sudo apt remove kde-full sudo apt remove mate-desktop-environment . . . Please let me know if there's mistakes made, or if you've got advice. Source for changing the name to make them work @IgorS : Greetings, NicoD
  8. Hereby a tutorial to connect an MCP2515 based CAN bus interface to an OrangePi 3 running successfull with Buster minimal nightly with 5.3 kernel. It uses the attached user overlay only and doesn’t need any other overlay. Connections CAN module OPi3 26 pin header Raspberry CAN interface 40 pin header Vcc 3.3 CON12-P01 1 Gnd CON12-P06 6 MOSI CON12-P19 19 MISO CON12-P21 21 CLK CON12-P23 23 CS CON12-P24 24 INT CON12-P26 22 Optional 5V for Transceiver on cheap Chinese modules CON12-P02 Not used when equiped with a 3.3V transceiver Add the attached overlay with the command: sudo armbian-add-overlay spi-h6-mcp2515.dts The file /boot/armbianEnv.txt now contains a line: user_overlays=spi-h6-mcp2515 Reboot the OrangePi 3 Check if the MCP2515 is recognized: pi@orangepi3:~$ dmesg | grep mcp If properly connected it should return a line containing: mcp251x spi1.0 can0: MCP2515 successfully initialized. As stated a can0 interface should be generated check it with: pi@orangepi3:~$ sudo ifconfig -a Bring up the network: sudo ip link set can0 up type can bitrate 250000 Check if the interrupt is hooked: cat /proc/interrupts should return a line like this 46: 1 0 0 0 sunxi_pio_edge 8 Edge mcp251x Check for traffic on the CAN bus with candump from can-utils (sudo apt-get install can-utils) candump can0 spi-h6-mcp2515.dts
  9. I did that on a NanoPi Neo with the FriendlyARM PCM5102A Hat ( https://www.friendlyarm.com/index.php?route=product/product&amp;product_id=169 ) using kernel 4.14.87-sunxi and armbian 5.67 (or later would be only 5.65?) (before that I did use legacy kernel 3.4.x with the PCM510A) and the armbian-BuildSystem plus (THANKS to) informations in threads from @dony71 , @Christos, @Valery Rezvyakov and the the Reference-Threads you could find above ---------------------------------------------------------------------------------------------------------------------------------- BACKUP DTB (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- cp /boot/dtb/sun8i-h3-nanopi-neo.dtb /boot/dtb/sun8i-h3-nanopi-neo.dtb_org ---------------------------------------------------------------------------------------------------------------------------------- CONVERT dtb to dts (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- dtc -I dtb -O dts /boot/dtb/sun8i-h3-nanopi-neo.dtb -o /boot/dtb/sun8i-h3-nanopi-neo.dts ---------------------------------------------------------------------------------------------------------------------------------- EDIT /boot/dtb/sun8i-h3-nanopi-neo.dts ---------------------------------------------------------------------------------------------------------------------------------- nano /boot/dtb/sun8i-h3-nanopi-neo.dts - change: status from "disabled" to "okay" ---------------------------------------------------------------------------------------------------------------------------------- FROM i2s@1c22000 { #sound-dai-cells = <0x0>; compatible = "allwinner,sun8i-h3-i2s"; reg = <0x1c22000 0x400>; interrupts = <0x0 0xd 0x4>; clocks = <0x3 0x38 0x3 0x54>; clock-names = "apb", "mod"; dmas = <0x13 0x3 0x13 0x3>; resets = <0x3 0x2b>; dma-names = "rx", "tx"; status = "disabled"; phandle = <0x4e>; }; TO i2s@1c22000 { #sound-dai-cells = <0x0>; compatible = "allwinner,sun8i-h3-i2s"; reg = <0x1c22000 0x400>; interrupts = <0x0 0xd 0x4>; clocks = <0x3 0x38 0x3 0x54>; clock-names = "apb", "mod"; dmas = <0x13 0x3 0x13 0x3>; resets = <0x3 0x2b>; dma-names = "rx", "tx"; status = "okay"; phandle = <0x4e>; }; ---------------------------------------------------------------------------------------------------------------------------------- CONVERT (BACK) dts to dtb (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- dtc -I dts -O dtb /boot/dtb/sun8i-h3-nanopi-neo.dts -o /boot/dtb/sun8i-h3-nanopi-neo.dtb_I2S_okay ---------------------------------------------------------------------------------------------------------------------------------- COPY new dtb over dtb (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- cp /boot/dtb/sun8i-h3-nanopi-neo.dtb_I2S_okay /boot/dtb/sun8i-h3-nanopi-neo.dtb ---------------------------------------------------------------------------------------------------------------------------------- COPY sun8i-h3-I2S-out.dts to home (working directory on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- copy sun8i-h3-I2S-out.dts --> /home/guido/ ---------------------------------------------------------------------------------------------------------------------------------- armbian-add-overlay (on NanoPi Neo) does only work if you got the kernel-headers installed for your actual kernel-version (at this time the lastest kernel-header are (via armbian-config -> Software -> Install Headers) Linux kernel headers for 4.14.84-sunxi on armhf - so NOT for kernel 4.19.y) ---------------------------------------------------------------------------------------------------------------------------------- root@npi-neo(192.168.6.24):/home/guido# armbian-add-overlay ./sun8i-h3-I2S-out.dts Compiling the overlay Copying the compiled overlay file to /boot/overlay-user/ Reboot is required to apply the changes ---------------------------------------------------------------------------------------------------------------------------------- dtbo is created (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- root@npi-neo(192.168.6.24):/home/guido# ls -l /boot/overlay-user/ insgesamt 4 -rw-r--r-- 1 root root 1323 Dez 7 19:34 sun8i-h3-I2S-out.dtbo ---------------------------------------------------------------------------------------------------------------------------------- user-overlay is created in /boot/armbianEnv.txt (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=usbhost1 usbhost2 rootdev=UUID=33ca90d6-130b-4d5f-a8f4-95b3b97ef5c0 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u user_overlays=sun8i-h3-I2S-out ---------------------------------------------------------------------------------------------------------------------------------- now REBOOT (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- root@npi-neo(192.168.6.24):~# lsmod|grep i2s sun4i_i2s 16384 0 snd_soc_core 118784 2 sun4i_i2s,sun8i_codec_analog snd_pcm 69632 3 sun4i_i2s,snd_pcm_dmaengine,snd_soc_core ---------------------------------------------------------------------------------------------------------------------------------- EDIT config-default.conf (on armbian-BuildSystem) ---------------------------------------------------------------------------------------------------------------------------------- cd /home/guido/build nano ./config-default.conf replace content /home/guido/build/config-default.conf with attached config-default.conf_nanopineo ./compile -> With this conf, script compilation will stop to overwrite kernel source to build patch -> At that time, overwrite original Kconfig with the one you modified above (at "Make changes to U-Boot" press ENTER to proceed) wait for "Make your changes to /home/guido/build/cache/sources/linux-mainline/linux-4.14.y then press ENTER" BUT DONT PRESS ENTER YET ---------------------------------------------------------------------------------------------------------------------------------- EDIT/SAVE Kconfig in a 2nd shell-Window (on armbian-BuildSystem) ---------------------------------------------------------------------------------------------------------------------------------- nano /home/guido/build/cache/sources/linux-mainline/linux-4.14.y/sound/soc/codecs/Kconfig the part FROM config SND_SOC_PCM5102A tristate TO config SND_SOC_PCM5102A tristate "Texas Instruments PCM5102A CODEC - I2S" ---------------------------------------------------------------------------------------------------------------------------------- NOW PRESS ENTER in the 1st shell-Windows (.compile.sh) (on armbian-BuildSystem) ---------------------------------------------------------------------------------------------------------------------------------- -> Then script compilation will stop again to ask whether you want to add pcm5102a to compile -> Default is N, so you need to enter m for module compilation Texas Instruments PCM5102A CODEC - I2S (SND_SOC_PCM5102A) [N/m/?] (NEW) m = m for module compilation After compile is complete ---------------------------------------------------------------------------------------------------------------------------------- copy (via SCP/FTP?) the .deb's from /home/guido/build/output/debs (on armbian-BuildSystem) to /home/guido/ (on the NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------- INSTALL the .deb's (here only header and image - because it was already 5.67 (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- cd /home/guido dpkg -i ./linux-headers-next-sunxi_5.67_armhf.deb dpkg -i ./linux-image-next-sunxi_5.67_armhf.deb (image did include the .ko module for the pcm5102a) ---------------------------------------------------------------------------------------------------------------------------------- now REBOOT (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- ===================================================================================== ===================================================================================== !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ATTENTION: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! After reboot my NanoPi Neo show the following armbian-version: ARMBIAN 5.65 stable Debian GNU/Linux 9 (stretch) 4.14.84-sunxi and 2 upgrades for headers&image (without the PCM5102A support) please keep in mind to freeze the kernel-updates in armbian-config for not to loose the support (module) for the PCM5120A! armbian-config -> system -> Freeze Disable kernel upgrades ===================================================================================== ===================================================================================== ---------------------------------------------------------------------------------------------------------------------------------- BE HAPPY about a successful i2s mapping in dmesg (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- root@npi-neo(192.168.6.24):~# dmesg|grep -i i2s [ 6.911751] asoc-simple-card sound_i2s: pcm5102a-hifi <-> 1c22000.i2s mapping ok ---------------------------------------------------------------------------------------------------------------------------------- I enabled also ananlog-Codec (on NanoPi Neo) ---------------------------------------------------------------------------------------------------------------------------------- root@npi-neo(192.168.6.24):/home/guido# aplay -l **** Liste der Hardware-Geräte (PLAYBACK) **** Karte 0: Codec [H3 Audio Codec], Gerät 0: CDC PCM Codec-0 [] Sub-Geräte: 1/1 Sub-Gerät #0: subdevice #0 Karte 1: I2Smaster [I2S-master], Gerät 0: 1c22000.i2s-pcm5102a-hifi pcm5102a-hifi-0 [] Sub-Geräte: 1/1 Sub-Gerät #0: subdevice #0 ---------------------------------------------------------------------------------------------------------------------------------- /etc/asound.conf (on NanoPi Neo) - later I2S did switch automatically to card 0 ---------------------------------------------------------------------------------------------------------------------------------- pcm.!default { type hw card 1 device 0 } ctl.!default { type hw card 1 } ---------------------------------------------------------------------------------------------------------------------------------- Reference-Threads ---------------------------------------------------------------------------------------------------------------------------------- config-default.conf.mod_nanopineo sun8i-h3-I2S-out.dts
  10. Hi all. I made a new video on how to build Armbian images. These days you can use your ARM64 SBC to do this. For Windows users there's WSL2 you can use. Here my video about that. Greetings, NicoD
  11. Hello everyone! Is there anyone who tried to run Docker on armbian? Ok, let's start from the beginning: I am from the Hypriot Team (we made Docker available on ARM) and recently saw some guys successfully playing with Docker on armbian. Meanwhile, we know, that our Docker runs at least on the Cubietrack and Lamobo R1/BananaPi R1 on top of armbian! This is awesome because, you know, IoT is coming, and Docker on ARM helps get a grip on many challenges induced by IoT. However, we were only able to support Docker on Raspberry Pis so far... Imagine if Docker would run on more than just a few ARM boards! Armbian seems an awesome platform to extend the family of Docker compatible boards. So, I wonder if there is anyone who tried to run Docker on armbian? If you are now curious about this topic and wanna get started, please see this blog post of how to install Docker on ARM within no time: http://blog.hypriot.com/post/family_arm_hardware_for_docker_more_children/ Looking forward to get in touch with you guys!
  12. Hi, after having a hard time getting the ILI9341 touchscreen working with the NanoPi Neo (Allwinner H3) it seems to work now. To have more GPIOs available for other stuff the touch and display need to share SPI0 I would like to upload it to github because there is basically nothing out of the box available but I'm a total noob with NanoPi, Armbian and overlays so maybe someone could look at it. root@nanopineo:~# uname -a Linux nanopineo 5.15.93-sunxi #23.02.2 SMP Fri Feb 17 00:00:00 UTC 2023 armv7l armv7l armv7l GNU/Linux This is the wiring between ILI9341 and NanoPi Neo: /* 3.3v <--> VCC & LED GND <--> GND PC2 <--> SCK & T_CLK PC1 <--> SDO<MISO> & T_DO PC0 <--> SDI<MOSI> & T_DIN PA1 <--> DC PG8 <--> RESET PC3 <--> CS PA3 <--> T_CS PG9 <--> T_IRG */ This is the overlay: /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target = <&pio>; __overlay__ { spi0_cs1: spi0_cs1 { pins = "PC3"; function = "gpio_out"; output-high; }; spi1_cs1: spi1_cs1 { pins = "PA3"; function = "gpio_out"; output-high; }; opiz_display_pins: opiz_display_pins { pins = "PA1", "PG8", "PA6"; function = "gpio_out"; }; ads7846_pins: ads7846_pins { pins = "PG9"; function = "irq"; }; }; }; fragment@1 { target = <&spi1>; __overlay__ { pinctrl-names = "default", "default"; pinctrl-1 = <&spi1_cs1>; cs-gpios = <0>, <&pio 0 3 0>; /* PA3 */ }; }; fragment@2 { target = <&spi0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; pinctrl-names = "default", "default"; cs-gpios= <&pio 2 3 0>, <&pio 0 3 1>; opizdisplay: opiz-display@0 { pinctrl-1 = <&spi0_cs1>; reg = <0>; /* Chip Select 0 */ compatible = "ilitek,ili9341"; spi-max-frequency = <1000000>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&opiz_display_pins>; rotate = <90>; bgr = <0>; fps = <33>; buswidth = <8>; dc-gpios = <&pio 0 1 0>; /* PIN_22 GPIOA1 > */ reset-gpios = <&pio 6 8 1 >; /* GPIOG8> */ /*led-gpios=<&pio 0 6 0>; PIN_12 GPIOA6 > */ debug=<4>; }; ads7846: ads7846@1 { reg = <1>; /* Chip Select 1 */ compatible = "ti,ads7846"; spi-max-frequency = <1000000>; status = "okay"; pinctrl-2=<&spi1_cs1 &spi1_cs1>; pinctrl-names = "default"; pinctrl-3 = <&ads7846_pins>; interrupt-parent = <&pio>; interrupts = <6 9 2>; /* PG9 IRQ_TYPE_EDGE_FALLING */ pendown-gpio = <&pio 6 9 0>; /* PG9 */ /* driver defaults, optional */ ti,x-min = /bits/ 16 <0>; ti,y-min = /bits/ 16 <0>; ti,x-max = /bits/ 16 <0x0FFF>; ti,y-max = /bits/ 16 <0x0FFF>; ti,pressure-min = /bits/ 16 <0>; ti,pressure-max = /bits/ 16 <0xFFFF>; ti,x-plate-ohms = /bits/ 16 <400>; }; }; }; }; This is the /boot/armbianEnv.txt verbosity=1 bootlogo=false console=serial disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=usbhost1 usbhost2 spi0 param_spidev_spi_bus=0 param_spidev_spi_cs=1 param_spidev_spi_cs=0 rootdev=UUID=XYZ-LONG-UUID-IS-LONG rootfstype=ext4 user_overlays=ili-touch-spi usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u After connecting via ssh and starting evtest it shows this when touched ( not sure if it shows the correct coordinates yet ) Event: time 1682020476.763295, -------------- SYN_REPORT ------------ Event: time 1682020476.775286, type 3 (EV_ABS), code 0 (ABS_X), value 535 Event: time 1682020476.775286, type 3 (EV_ABS), code 1 (ABS_Y), value 3553 Event: time 1682020476.775286, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65169 So it looks like everything is working but to be on the safe side I would like to wait until some pro reviewed the overlay. Thanks.
  13. Hi, I've been running Octoprint on armbian for several months with good results of a couple of printers with good performance no relevant problems. Installation process is not complex but I decided to build a simple a plug&play meta-distribution like OctoPi for Rpi boards but based on armbian so it can be used potentially in any of the supported boards. I started with the popular Opi Zero as it is really cheap and the four cores of the H2+ processor handle perfectly a 3d printer load and is 3 times cheaper than a typical RPI3B that octoPi requires. You can find it here: https://github.com/ludiazv/octocitrico Built-in features are: Core (installed and enabled): Optimized armbian Debian buster. Latest stable octoprint version. Selection of top octoprint plugins. HAProxy with self signed keys for ssl access. Avahi service: Bonjur addvertisement (this enable to acces with host-name.local via ssh or http/s) SSH console access. USB OTG console access (if available in the board) Enabled i2c-dev,spidev (if available on the board) 3D printer related software (installed but disabled): Klipper PlatformIo core for building 3D printer firmware. Marlin 1.1.x & Marlin 2.x.x firmware (bugfix versions) Extras (installed but disabled): MPGStreamer USB camera support (experimental) SMB shares to remote edit configuration files from a remote PC. Feedback and contributions are welcome. Thanks armbian guys for the awesome work you do.
  14. Hi all. I just made a video where I show how to build your own Armbian images on Windows. It used to be that you needed a virtualMachine running Linux but these days you can use WSL2. Here the video : Greetings, NicoD
  15. If you want to do a complete headless install of Armbian OS on an Orange Pi 5, and connect with Windows Remote Desktop, I put together what has worked for me. I pieced this tutorial together using an Orange Pi 5, installing Armbian 23.02 Jammy Gnome Desktop, and connecting via a Windows 11 PC using Windows Remote Desktop client. Keep in mind, your Orange Pi OS needs to be a full Desktop edition, otherwise, if you're using CLI editions, you will not have a Graphical User Interface installed, which Windows Remote Desktop needs to connect. ArmbianOS Download Link Putty Download Link Start PUTTY and enter your Orange Pi's IP address or host name (orangepi5) into PUTTY's Host Name field, hit enter. Accept any certificate popup screens. Login with Armbian's default user and pass. USER(logon): root PASSWORD: 1234 You'll be prompted with your Orange Pi's IP address. Take note of that, you might want to use it to remote connect, though you can also use the Orange Pi default hostname (orangepi5). Next, you'll be prompted to complete the following...create a root password, select bash or zsh, create a user and user password, enter real name, select timezone, and select locale. Take note of the User Name and Password you created since you will use that to logon with the Windows Remote Desktop Client. After completing account setup, you should be at a blank command prompt. DO NOT RUN ANY UPDATE COMMANDS enter the following commands... sudo apt install xrdp xorgxrdp sudo systemctl enable xrdp sudo systemctl status xrdp After entering the systemctl status xrdp command , you should see a listing showing "Active: active (running)". If Active shows "failed" then you will not be capable of connecting via Remote Desktop. **See below to try and resolve this issue. If you get a successful status list then, press the Ctrl key and C key simultaneously to get back to the command prompt. Reboot your Orange Pi by entering sudo reboot You should now be capable of accessing your OrangePi remotely by using Windows Remote Desktop. Open your Windows Remote Desktop client. You can adjust the size of the Remote Desktop screen session by clicking the "Show Options" located at the lower left corner of the Remote Desktop logon windows, then click the "Display" tab to set your preferred screen size, among other options. In the Computer field, enter your Orange Pi's IP address or host name (orangepi5), hit Connect. You should now be prompted with an XRDP logon screen. Enter the username and password you created when setting up Armbian during the PUTYY session. **INSTRUCTION TO ATTEMPT TO RESOLVE A FAILED SYSTEMCTL STATUS. If you haven't rebooted, and need to get back to the command prompt, then press the Ctrl key and C key simultaneously to get back to the command prompt. Enter the following commands to uninstall xrdp... sudo apt remove xrdp sudo apt purge xrdp Reinstall xrdp by following the same instructions at the start of this tutorial. Check the status again by entering the following command... sudo systemctl status xrdp Hopefully, this time it will show as "Active: active (running)". Hope this helps.
  16. EDIT: 04.01.2020 - Fixed patches to work with latest armbian sources. (references have changed) Hi everybody, Here is a tutorial to enable the Lemaker 7" Touchscreen on BananaPi Pro with Debian Buster and Mainline-Kernel 5.XX.XX. Kernel: Mainline 5.4.6 / Buster Board: BananaPi Pro WebLinks: • https://forum.armbian.com/topic/1905-enabling-lcd-in-u-boot-kernel-472/ • https://forum.armbian.com/topic/1849-touch-driver-banana-pi/ • http://www.atakansarioglu.com/getting-started-bananapi-linux/ • http://forum.lemaker.org/thread-15482-1-1.html • http://linux-sunxi.org/LCD To make the 7"LCD and the Touchscreen working with BananaPi Pro we need to patch some files and change the kernel config to build the driver for the touchscreen. To do this we need a working setup of the Armbian build tool chain (https://docs.armbian.com/Developer-Guide_Build-Preparation/) /home/<USER>/build/cache/sources/u-boot/v201X.XX/configs/Bananapro_defconfig /home/<USER>/build/cache/sources/u-boot/v201X.XX/arch/arm/dts/sun7i-a20-bananapro.dts /home/<USER>/build/cache/sources/linux-mainline/linux-4.XX.y/arch/arm/boot/dts/sun7i-a20-bananapro.dts 1. U-Boot ( u-boot version that supports the LCD - must be compiled) Start the build process with ./compile.sh CREATE_PATCHES=yes When asked for: [ warn ] Applying existing u-boot patch [ /home/[USER]/build/output/patch/u-boot-sunxi-current.patch ] [ warn ] Make your changes in this directory: [ /home/[USER]/build/cache/sources/u-boot/v201X.XX ] [ warn ] Press <Enter> after you are done [ waiting ] a) edit /home/<USER>/build/cache/sources/u-boot/v201X.XX/configs/Bananapro_defconfig add the following: #7" LVDS LCD CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:24,pclk_khz:55000,le:100,ri:170,up:10,lo:15,hs:50,vs:10,sync:3,vmode:0" CONFIG_VIDEO_LCD_PANEL_LVDS=y CONFIG_VIDEO_LCD_POWER="PH12" CONFIG_VIDEO_LCD_BL_EN="PH8" CONFIG_VIDEO_LCD_BL_PWM="PB2" b) edit /home/<user>/build/cache/sources/u-boot/v201X.XX/arch/arm/dts/sun7i-a20-bananapro.dts add after: &i2c2 { ... }; the following: &i2c3 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c3_pins>; edt: edt-ft5x06@38 { compatible = "edt,edt-ft5x06", "edt,edt-ft5206"; reg = <0x38>; pinctrl-names = "default"; pinctrl-0 = <&edt_ft5x06_pins_a &edt_ft5x06_pins_b>; interrupt-parent = <&pio>; interrupts = <7 9 IRQ_TYPE_EDGE_FALLING>; touchscreen-size-x = <1024>; touchscreen-size-y = <600>; }; }; Add these two new sections to the end of the file: &pio { edt_ft5x06_pins_a: ft5@0 { pins = "PH9"; function = "irq"; drive-strength = <20>; bias-pull-up; }; edt_ft5x06_pins_b: ft5@1 { pins = "PH7"; function = "gpio_out"; drive-strength = <20>; bias-pull-up; output-high; }; }; &pwm { pinctrl-names = "default"; pinctrl-0 = <&pwm0_pin>, <&pwm1_pin>; status = "okay"; }; Then save and press <Enter> to continue. 2. Kernel patches - DTB (Device Tree Blob) file that fits to your Kernel and supports pwm When asked for: [ warn ] Applying existing kernel patch [ /home/<USER>/build/output/patch/kernel-sunxi-current.patch ] [ warn ] Make your changes in this directory: [ /home/<USER>/build/cache/sources/linux-mainline/orange-pi-5.XX ] [ warn ] Press <Enter> after you are done [ waiting ] c) edit /home/<USER>/build/cache/sources/linux-mainline/orange-pi-5.XX/arch/arm/boot/dts/sun7i-a20-bananapro.dts add the same lines like section b) Then save and press <Enter> to continue. 3. Compile Touchdriver menuconfig > Device Drivers > Input Device Support > Touchscreens > EDT FocalTech FT5x06 I2C Touchscreen support Exit and save the Kernel configuration. This is the outcome. You probably have a newer version than 19.11.4: Now you can flash the image to a SD-Card or you have to install the new DEBs. dpkg -i linux-u-boot-current-bananapipro_19.11.4_armhf.deb dpkg -i linux-dtb-current-sunxi_19.11.4_armhf.deb dpkg -i linux-image-current-sunxi_19.11.4_armhf.deb reboot The result: The LCD and the touchscreen are working. Attention! There is still the problem with the shutdown. When the patches were made for the LCD, the board did not shut down completely during a shutdown (LCD still had voltage and the red LED on the board did not go out). Workaround: We need to disable the LCD before the shutdown is finished. Therfore we have to create a script in the folder /lib/systemd/system-shutdown e.g. (as root) touch /lib/systemd/system-shutdown/lcd_off.sh chmod +x /lib/systemd/system-shutdown/lcd_off.sh nano /lib/systemd/system-shutdown/lcd_off.sh add these lines: #!/bin/bash # LCD Power PH12 H=8 (8-1)*32+12 = 236 # Backlight enable PH8 H=8 (8-1)*32+8 = 232 # Backlight PWM PB2 B=2 (2-1)*32+2 = 34 if [ ! -d "/sys/class/gpio/gpio34" ] then sudo sh -c 'echo "34" > /sys/class/gpio/export' sudo sh -c 'echo "out" > /sys/class/gpio/gpio34/direction' sudo sh -c 'echo "1" > /sys/class/gpio/gpio34/value' fi if [ ! -d "/sys/class/gpio/gpio232" ] then sudo sh -c 'echo "232" > /sys/class/gpio/export' sudo sh -c 'echo "out" > /sys/class/gpio/gpio232/direction' sudo sh -c 'echo "1" > /sys/class/gpio/gpio232/value' fi if [ ! -d "/sys/class/gpio/gpio236" ] then sudo sh -c 'echo "236" > /sys/class/gpio/export' sudo sh -c 'echo "out" > /sys/class/gpio/gpio236/direction' sudo sh -c 'echo "1" > /sys/class/gpio/gpio236/value' fi # LCD on/off sudo sh -c 'echo "0" > /sys/class/gpio/gpio34/value' sudo sh -c 'echo "0" > /sys/class/gpio/gpio232/value' sudo sh -c 'echo "0" > /sys/class/gpio/gpio236/value' The script will be executed right before the board powers off. Measured power consumption: PowerON (booting / lcd still off) = 0.4A - 0.5A LCD turns on (still booting) = 0.85A - 1.05A Boot process ended (LCD on) = 0.75A Board on, LCD off = 0.35A - 0.45A ( -> LCD needs around 0.4A power ) shutdown -h now = 0.00A 4. Control the Power of the Backlight: The backlight PWM is on PIN CON2 PB2. Following the instructions on http://linux-sunxi.org/GPIO#Accessing_the_GPIO_pins_through_sysfs_with_mainline_kernel http://forum.lemaker.org/thread-10852-1-1.html we have to export GPIO-PIN 34. (position of letter in alphabet - 1) * 32 + pin number position of letter in alphabet: B = 2 pin number: 2 ( 2 - 1 ) * 32 + 2 = 34 echo 34 > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio34/direction Power on the Backlight: echo "1" > /sys/class/gpio/gpio34/value Power off the Backlight: echo "0" > /sys/class/gpio/gpio34/value Now we could use a switch connected to a GPIO-IN to control the backlight. Steffen
  17. Hi, There's been a few guides around on how to get RDP working with Armbian so you can login from your Windows or other PC. Some solutions mentioned in various threads here were: Install tightvncserver instead + x2go bloat (i.e. use VNC) Only login as root - didn't seem to make any difference for me Change some permissions of a log file in your home directory. Well, this is what I did on my Orange PI PC running Buster desktop with Kernel 5.4, as of April 2020. sudo apt install xrdp xorgxrdp sudo systemctl enable xrdp sudo reboot ... and that was it. The missing piece of the puzzel appeared to be the install of xorgxrdp, this isn't installed automatically by 'xrdp' package, and it's useless without it. Update June 2020: Also works with RetroOrangePi 4.3 super quickly (given this is based on Armbian Bionic 18.04). Can RDP in and use Armbian Desktop whilst Kodi plays a 4k movie on the TV from the same device... Awesome!
  18. Access to a console can be mandatory when you SBC doesn't work as expected (e.g Network or HDMI output doesn't work). When SSH/Display access isn't possible access to console via UART is the best way to get a clue where your SBC hangs. This short tutorial should give you an introduction how this works. For some boards, armbian implements an USB gadget mode (a 'fake' serial console over microUSB) describen below. As a reminder an USB-UART bridge is always prefered over USB gadget mode whenever possible (UART get's initialized before the gadget driver and also before HDMI, means even if you don't get a proper output from HDMI or gadget mode console, it is possible that UART will give you the needed information). Prerequisites: We need an Terminal program to access the console. If you use Linux on your host system I prefer picocom (something like minicom will also do the job) which can be installed: on debian a like systems: sudo apt-get install picocom from arch community repo: https://www.archlinux.org/packages/community/x86_64/picocom/ on fedora systems: yum install picocom on Mac OS X: brew install picocom on Widows we use PuTTY: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html UART USB Adapter: There are various USB-UART bridges e.g FT232 (and fakes of them, cause FDTI is expensive ), CH340/1,PL2303 or CP2102 Normally it doesn't matter which one you use. I prefer the (probably fake) FDTI on the right side, but the CH341 does also a good job: The only thing which is needed is that the signal-level matches with your SBCs needs (this is mostly 3.3V expect some Odroids e.g HC1 which has only 1.8V!). Most of these USB-UART bridges have jumpers for 5V and 3.3V, make sure that you use the 3.3V. You've to figure out which pins on your SBC are debug UART (they've mostly a own 3 pin header, sometimes it's on the large pin header e.g. Tinkerboard) and then connect: GND --> GND RX --> TX TX --> RX You've to check dmesg (linux) or run devmgmt.msc (windows) to know which device you use. Linux: [256597.311207] usb 3-2: Product: USB2.0-Serial [256597.402283] usbcore: registered new interface driver ch341 [256597.402341] usbserial: USB Serial support registered for ch341-uart [256597.402392] ch341 3-2:1.0: ch341-uart converter detected [256597.404012] usb 3-2: ch341-uart converter now attached to ttyUSB0 --> Device will be /dev/ttyUSB0 Windows: for windows 10 (https://www.google.ch/search?client=opera&amp;q=find+arduino+port+windows+10&amp;sourceid=opera&amp;ie=UTF-8&amp;oe=UTF-8) Something like the picture in USB Gadget Mode part of the tutorial should show up) Armbians default settings are (expect some RK devices): For Picocom: picocom -b 115200 -r -l /dev/ttyUSB0 and for some RK devices: picocom -b 1500000 -r -l /dev/ttyUSB0 For PuTTY: You've to set configuration in 'Serial'. COM11 is just an example and needs to be checked first, Speed (baud) needs to be changed when you deal with the few RK boards which need 1500000. OS X: TBD should be similar to Linux whereas the naming differs a bit. See: https://forum.odroid.com/viewtopic.php?f=53&amp;t=841 as an example with minicom. Normally you connect the USB-UART bridge to your host computer (and the SBC) and start picocom/putty before you power the board to ensure you get the full bootlog and not only parts of it. USB Gadget Mode Several board (see list) for which official armbian images exist (or csc images can be built) have no HDMI display. On those boards there's USB gadget mode driver activated so that you can have console access to them via USB connection. The following short tutorial describes how you can access to console from Linux (don't have a windows machine here at the moment, I may check it later): install picocom connect your board via USB to your host computer (it should be one which is able to power an SBC via its USB port) check dmesg for the device showing up: [184372.603816] usb 3-2: Product: Gadget Serial v2.4 [184372.603818] usb 3-2: Manufacturer: Linux 4.14.65-sunxi with musb-hdrc [184372.660041] cdc_acm 3-2:2.0: ttyACM0: USB ACM device [184372.660402] usbcore: registered new interface driver cdc_acm [184372.660403] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters connect to it via picocom (in this case 'picocom /dev/ttyACM0'): chwe@chwe-acer:~$ picocom /dev/ttyACM0 picocom v2.2 port is : /dev/ttyACM0 flowcontrol : none baudrate is : 9600 parity is : none databits are : 8 stopbits are : 1 escape is : C-a local echo is : no noinit is : no noreset is : no nolock is : no send_cmd is : sz -vv receive_cmd is : rz -vv -E imap is : omap is : emap is : crcrlf,delbs, Type [C-a] [C-h] to see available commands Terminal ready Debian GNU/Linux 9 orangepizero ttyGS0 orangepizero login: root Password: You are required to change your password immediately (root enforced) Changing password for root. (current) UNIX password: I assume if you use the same settings in something like putty on windows and you check which 'serial' device shows up in *where windows shows connected devices - I forgot it* you should be able to access it from windows (someone motivated may confirm this). For Windows: run devmgmt.msc and search for the serial device (in this case COM3) and connect to it via PuTTY (thanks to @hjc): for windows 10 (https://www.google.ch/search?client=opera&amp;q=find+arduino+port+windows+10&amp;sourceid=opera&amp;ie=UTF-8&amp;oe=UTF-8): (even the tutorial is for arduinos, it should be similar for every 'COM device') Currently boards with USB gadget mode: bananapim2plus bananapim2zero nanopifire3 nanopim3 nanopineo2 nanopineocore2 nanopineoplus2 orangepizeroplus nanopiair nanopiduo nanopineo olimex-som204-a20 orangepilite orangepi-r1 orangepizero orangepizeroplus2-h3 orangepizeroplus2-h5 tritium-h3 The silly approach For those, who want to save 1$ for an USB-UART bridge, you can spend 10$ for an OrangePi Zero and use its spare UARTs to log into an other SBC... SSH --> opi, ttl --> Tinkerboard For those loving text more than videos: SSH to your SBC sudo armbian-config --> system --> hardware to activate an spare UART (in this case it was UART2, will give you ttyS2) reboot picocom -b 115200 -r -l /dev/ttyS2 See: https://asciinema.org/a/B87EOGhc0gx9oikMAGEG94lXR
  19. Hello im new and im Italian so i hope you will not hate me if i write not perfectly (Who said Google Translate?? No No No) This Guide is for a "client to client" setup of the box, we will internally switch Wifi to Eth, so a working computer can access internet from its eth port even if the router signal source is wireless. Router AP -----> ARM BOX [WIFI internal or usb dongle] ===>> internal eth0 ------> ethernet cable --> client eth port Make sure WiFi in arm box is connected using nmtui command FROM NOW ON <WIFI CARD> is the wifi adapter name es: replace "<WIFI CARD>" with "wlx0013eff301ee" Execute: sudo apt-get update && sudo apt-get install dnsmasq iptables iptables-persistent -y say no to save actual iptables rules (we dont have any yet) Edit /etc/network/interfaces comment if exist the part of eth0 "iface eth0" to "#iface eth0" add those lines allow-hotplug eth0 iface eth0 inet static address 172.24.1.1 netmask 255.255.255.0 network 172.24.1.0 broadcast 172.24.1.255 dns-nameservers 1.1.1.1 1.0.0.1 #########{Static}########### up ip addr add 172.24.0.1/24 dev eth0 execute those commands REMEMBER TO REPLACE <WIFI CARD> ip addr add 172.24.0.1/24 dev eth0 iptables -A FORWARD -o <WIFI CARD> -i eth0 -s 172.24.0.0/24 -m conntrack --ctstate NEW -j ACCEPT iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT iptables -t nat -F POSTROUTING iptables -t nat -A POSTROUTING -o <WIFI CARD> -j MASQUERADE sh -c "iptables-save > /etc/iptables.ipv4.nat" sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" /etc/init.d/dnsmasq stop cp /etc/dnsmasq.conf /etc/dnsmasq.conf-backup Edit /etc/dnsmasq.conf inserting interface=eth0 listen-address=172.24.1.1 bind-interfaces server=1.1.1.1 domain-needed bogus-priv dhcp-range=172.24.0.100,172.24.0.250,72h Edit /etc/sysctl.conf inserting net.ipv4.conf.default.forwarding=1 net.ipv4.conf.all.forwarding=1 Edit /etc/rc.local inserting before "exit 0" iptables-restore < /etc/iptables.ipv4.nat execute those commands systemctl enable dnsmasq systemctl enable iptables Explainations: We set static net to eht0 then we set routing in iptables [forward and back] wlan<->eth then we make this setup persistent so that will persist after reboot. Working on my RK3318 Armbian bullseye 5.15 minimal and USB3 dongle RTL8814AU (also tested with a 8812au)
  20. I have written a shell script that can make your Armbian installation run on a ZFS root. It has not been tested enough for my liking. Use at your own risk. Before running this script, please make a full backup of all your mission-critical files. URL: https://www.dropbox.com/s/ya3expllg1bqgfg/fructify.20211011.sh.gz To install the script, please run these commands:- # sudo wget https://www.dropbox.com/s/ya3expllg1bqgfg/fructify.20211011.sh.gz -O /usr/local/bin/fructify.sh.gz # sudo gunzip /usr/local/bin/fructify.sh.gz # sudo chmod +x /usr/local/bin/fructify.sh Oh, and install ZFS on your own OS installation. To use the script, either download an existing Armbian image or use your own system as the basis for the new installation. Next, please make sure (i) there is a blank micro-SD card in an adapter, (ii) the adapter is plugged into a USB port, and (iii) you know which /dev entry refers to that adapter’s USB port. It will probably be /dev/sda; please do not assume so. In the below commands, replace sdX with sda (or whatever). Method 1: Download and use an existing Armbian image # wget https://mirrors.netix.net/armbian/dl/nanopineo3/archive/Armbian_21.08.1_Nanopineo3_focal_current_5.10.60.img.xz -O /root/npneo3_focal.img.xz # xz -d /root/npneo3_focal.img.xz # fructify.sh /root/npneo3_focal.img.xz zfs /root/out.img # dd status=progress bs=1024k if=/root/out.img of=/dev/sdX Method 2: Use your existing filesystem as the basis # fructify.sh / zfs /dev/sdX In either case, please take care not to write the image to the wrong device. This script can also work with btrfs, ext4, or xfs. The script assumes that you have only one partition on your boot drive. That drive is usually /dev/mmcblk0; the boot/root partition is expected to be /dev/mmcblk0p1. It may be that the script also works if the boot drive is /dev/mmcblk1 and the boot/root partition is /dev/mmcblk1p1; I do not know. In any case, the script shrinks partition #1 (for boot) and allocates approximately 4GB to a newly created partition #2 (for root). If you create a ready-to-install Armbian image and boot it on a micro-SD card, the OS will expand partition #2 to fill the remainder of the micro-SD card. If you create a ZFS-ified (or whatever) copy of your existing installation, the SD card’s second partition will already have been expanded by the script itself. All feedback is welcome. I am new at this. Thank you.
  21. Orange Pi Zero NTP Stratum 1 PPS GPS Server with Armbian OS. Link to the Tutorial - http://schwartzel.eu3.org/ntp-stratum1.html This tutorial uses a 3.3V capable GPS module with PPS output - TOPGNSS GN-701 (u-blox 7) but other similar modules should work. This tutorial is for the Orange Pi Zero, but will probably work for other boards. I couldn't easily do a comprehensive hardware and software tutorial on this forum, so I've published it on my web server and linked from here and attached a PDF. Link to the Tutorial - http://schwartzel.eu3.org/ntp-stratum1.html Tutorial PDF ntp-stratum1.pdf If you spot any typo's or errors please let me know.
  22. Hi all. In this video I show how to install Open Media Vault on your SBC with Armbian Buster. I've used the Odroid HC4, this is the same for any board you'd like to use. Here my video. Greetings. NicoD
  23. Canon provides source code for cups driver, but with some proprietary binary libs. This libs available only for x86. No way for direct compiling cnijfilter for ARM (and other architectures). But we have qemu! We can transparently run x86 executables on any other host architectures. Easy steps to run cnijfilter on ARM (or any other arch): - Build https://github.com/endlessm/cnijfilter-common for x86 - Copy all needed x86 libs using recursive ldd. And copy it to /usr/lib/bjlib/ - Patch all executables: set interpreter to /usr/lib/bjlib/x86/ld-linux.so.2 and rpath to /usr/lib/bjlib/ - Install these patched packages to ARM system - Install qemu-user and qemu-user-binfmt (or qemu-arm-static) You do not need to do this manually. I have implemented an automated build system: https://github.com/Azq2/cnijfilter-arm-build All you need is any x86 machine to do the build. How to use 1. On any x86 machine: # Install dependencies sudo apt install debootstrap git util-linux # Get build system git clone https://github.com/Azq2/cnijfilter-arm-build # Start building cd cnijfilter-arm-build sudo ./build.sh build # Get .deb packages ls -lah ./result/full ls -lah ./result/light After build we have two variants of packages: full and light Item Full Light PPD files + + CUPS filters + + CUPS backends + - lgmon + - canon-maintenance + - cngpij + - cngpijmnt + - cnijlgmon2 + - cnijnetprn + - cnijnpr + - docs + - In most cases, a light package is completely sufficient: - We don't need canon usb backend, because cups have builtin USB support - We don't need canon network backend, because cups have builtin BJNP support (package cups-backend-bjnp) - Other canon maintenance utils are useless (in my opinion) 2. Copy .deb from result/light or result/full to your ARM machine. 3. On your ARM machine: # Install dependencies sudo apt install qemu-user qemu-user-binfmt # or sudo apt install qemu-user-static # Install common for all printers package sudo dpkg -i cnijfilter-common.deb # Install printer-specific package # Choose right package for your printer! e400series only for reference! sudo dpkg -i cnijfilter-e400series.deb 4. Done. You can now configure CUPS. Security with apparmor (optional) CUPS filters don't need any specific permissions. Create file /etc/apparmor.d/cnijfilter-filters with contents: #include <tunables/global> /usr/bin/bjfilter* { #include <abstractions/base> @{PROC}/sys/vm/mmap_min_addr r, } /usr/bin/cif[a-z]*[0-9d]* { #include <abstractions/base> @{PROC}/sys/vm/mmap_min_addr r, } /usr/lib/cups/filter/{cmdtocanonij,pstocanonbj,pstocanonij} { #include <abstractions/base> @{PROC}/sys/vm/mmap_min_addr r, } Then restart apparmor: sudo systemctl reload apparmor sudo aa-enforce cnijfilter-filters Note: this minimal file full coverage all executables in light package. For full package you need write additional rules by yourself.
  24. Hello Everyone This is my first topic here. To help myself in the future I did a guide to adjust armbian configuration and settings. This guide contains topics like: Maintaining the board updated Adjusting personal settings (keyboard, timezone, locale) Setting the sound output (default sound output to HDMI) Disable the desktop environment Setting the numlock to "ON" at start up Dealing with 4k video resolution It was based on my experience dealing with Orangepi PC (H3), but many things could be reused to others boards. I hope this guide may be helpful: https://github.com/lbmendes/armbian-settings/blob/main/README.md
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines