Search the Community

Showing results for tags 'tutorial'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Announcements & first aid
    • Announcements
    • Board doesn't start
  • Community forums
    • Common issues / peer to peer technical support
    • Reviews, Tutorials, Hardware hacks
    • Help wanted
    • Feature Requests
    • TV boxes
    • General chit chat
  • Bug tracker - supported boards and images only
    • Allwinner A20
    • Allwinner H2 & H3
    • Allwinner A64, H5, H6 and H616
    • Armada A388, A3700
    • Amlogic S905(x), S922X
    • NXP (Freescale)
    • Rockchip 3288 & 3328
    • Rockchip 3399
    • Other supported boards
  • Development
    • Development
  • TV Boxes's General Chat
  • TV Boxes's Reviews/Tutorials
  • TV Boxes's FAQ
  • TV Boxes's TV Boxes running Armbian
  • TV Boxes's Rockchip CPU Boxes
  • TV Boxes's Amlogic CPU Boxes
  • TV Boxes's Allwinner CPU Boxes
  • Android fanboys's Forums
  • Gaming on ARM's Reviews
  • Gaming on ARM's Issues
  • Kobol Forum's Helios4
  • Kobol Forum's Helios64

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Website URL






  1. Full root filesystem encryption on an Armbian/Orange Pi PC 2 system MMGen ( WARNING: This tutorial has been obsoleted by Full root filesystem encryption on an Armbian system. In addition, an automated script is available, which can be downloaded here or by cloning the following repository: git clone This tutorial provides detailed, step-by-step instructions for setting up full root filesystem encryption on an Armbian/Orange Pi PC2 system. With minor changes, it can be adapted to other Armbian-supported boards. The disk is unlocked remotely via ssh, permitting unattended bootup. Requirements: Linux host system One Orange Pi PC 2 Two blank Micro-SD cards (or a working Armbian system for your board + one blank SD card) USB Micro-SD card reader Ability to edit text files and do simple administrative tasks on the Linux command line Part 1 - Get, unpack and copy an Armbian image for your board Create your build directory: $ mkdir armbenc-build && cd armbenc-build Download and unpack an Armbian image for your board and place it in this directory. If you have two blank SD cards, the first will hold an ordinary unencrypted Armbian system used for the setup process, while the second will hold the target encrypted system. Alternatively, if you already have a working Armbian system for your board, you can use it for the setup process. In that case, your one blank SD card will be considered the “second” card, and you can ignore all instructions hereafter pertaining to the first card. Note that for the remainder of this section, the first SD card will be referred to as '/dev/sdX' and the second as '/dev/sdY'. You'll replace these with the SD cards' true device filenames. The device names can be discovered using the command 'dmesg' or 'lsblk'. If you remove the first card before inserting the second, it's possible (but not guaranteed) that the cards will have the same device name. Insert the first blank SD card and copy the image to it: $ sudo dd if=$(echo *.img) of=/dev/sdX bs=4M After the command exits, you may remove the first card. Now insert the second SD card, which will hold a small unencrypted boot partition plus your encrypted Armbian system. Copy the image's boot loader to it: $ sudo dd if=$(echo *.img) of=/dev/sdY bs=512 count=32768 Now partition the card: $ sudo fdisk /dev/sdY Within fdisk, create a new DOS disklabel with the 'o' command. Use the 'n' command to create a primary partition of size +200M beginning at sector 32768. Type 'p' to view the partition table. Note the end sector. Now create a second primary partition beginning one sector after the first partition's end sector and filling the remainder of the card. When you're finished, your partition table will look something like this: Device Boot Start End Sectors Size Id Type /dev/sdY1 32768 442367 409600 200M 83 Linux /dev/sdY2 442368 123596799 123154432 58.7G 83 Linux Double-check that the second partition begins one sector after the end of the first one. If you mess something up, use 'd' to delete partitions or 'q' to exit fdisk and try again. Once everything looks correct, type 'w' to write the partition table. Now you'll begin the process of copying the system to the second card. First you'll associate the image file with a loop device and mount the device: $ losetup -f # displays the name of the loop device; remember this $ sudo losetup -Pf *.img # associate image file with the above loop device $ mkdir mnt boot root $ sudo mount /dev/loopXp1 mnt # replace '/dev/loopX' with the above loop device Create a filesystem on the SD card's boot partition and copy the boot partition data from the image file to it: $ sudo mkfs.ext4 /dev/sdY1 $ sudo e2label /dev/sdY1 OPI_PC2_BOOT # don't omit this step! $ sudo mount /dev/sdY1 boot $ sudo cp -av mnt/boot/* boot $ (cd boot; sudo ln -s . boot) Create the encrypted root partition (for this the 'cryptsetup-bin' package must be installed on the host). You'll be prompted for a passphrase. It's recommended to choose an easy one like 'abc' for now. The passphrase can easily be changed later (consult the 'cryptsetup' man page for details): $ sudo cryptsetup --pbkdf argon2i --pbkdf-memory 600000 luksFormat /dev/sdY2 Note that the --pbkdf-memory argument must be less than the available free memory in kilobytes at bootup time. Otherwise you’ll get an out-of-memory error and your disk will fail to unlock. 600000 is a safe value for the Orange Pi PC2 with its 1GB of RAM. Activate the encrypted root partition, create a filesystem on it and mount it: $ sudo cryptsetup luksOpen /dev/sdY2 foo # enter your passphrase from above $ sudo mkfs.ext4 /dev/mapper/foo $ sudo mount /dev/mapper/foo root Copy the system to the encrypted root partition: $ (cd mnt && sudo rsync -av --exclude=boot * ../root) $ sync # be patient, this could take a while $ sudo mkdir root/boot $ sudo touch root/root/.no_rootfs_resize Unmount the mounted image and second SD card, and free the loop device and encrypted mapping: $ sudo umount mnt boot root $ sudo losetup -d /dev/loopX $ sudo cryptsetup luksClose foo From here on, all your work will be done on the Orange Pi. Part 2 - boot into the unencrypted Armbian system If applicable, insert the first (unencrypted) SD card into the Pi's Micro-SD card slot. Insert a USB card reader holding the second SD card into a USB port on the Pi. Boot the Pi. If applicable, log in as root with password '1234', follow the password update instructions, and stay logged in as root. The following steps will be performed from a root shell. Part 3 - set up the unencrypted Armbian system Update the APT package index and install cryptsetup: # apt-get update # apt-get install cryptsetup Part 4 - set up the encrypted Armbian system Prepare the encrypted system chroot: # BOOT_PART=($(lsblk -l -o NAME,LABEL | grep OPI_PC2_BOOT)) # ROOT_PART=${BOOT_PART%1}2 # cryptsetup luksOpen /dev/$ROOT_PART foo # mkdir /mnt/enc_root # mount /dev/mapper/foo /mnt/enc_root # mount /dev/$BOOT_PART /mnt/enc_root/boot # cd /mnt/enc_root # mount -o rbind /dev dev # mount -t proc proc proc # mount -t sysfs sys sys Copy some key files so you'll have a working Internet connection within the chroot: # cat /etc/resolv.conf > etc/resolv.conf # cat /etc/hosts > etc/hosts Now chroot into the encrypted system. From this point on, all work will be done inside the chroot: # chroot . # apt-get update # echo 'export CRYPTSETUP=y' > /etc/initramfs-tools/conf.d/cryptsetup # apt-get install cryptsetup-initramfs dropbear-initramfs # for focal and buster # apt-get install cryptsetup dropbear-initramfs # for bionic Check to see that the cryptsetup scripts are present in the initramfs (command should produce output): # gunzip -c /boot/initrd.img* | cpio --quiet -t | grep cryptsetup Edit '/etc/fstab' to look exactly like this: /dev/mapper/rootfs / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 /dev/mmcblk0p1 /boot ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 2 tmpfs /tmp tmpfs defaults,nosuid 0 0 Add the following lines to '/etc/initramfs-tools/initramfs.conf'. If the Orange Pi's IP address will be statically configured, substitute the correct static IP address after 'IP='. If it will be configured via DHCP, omit the IP line entirely: DEVICE=eth0 IP= Add the following parameters to the quoted bootargs line in '/boot/boot.cmd'. Note that the 'root' parameter replaces the existing one: root=/dev/mapper/rootfs cryptopts=source=/dev/mmcblk0p2,target=rootfs If you want to be able to unlock the disk from the virtual console (which you probably do) as well as via ssh, then comment out the following line: # if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "${consoleargs} console=ttyS0,115200"; fi In case you're wondering, 'setenv console "display"' doesn't work. Don't ask me why. Compile the boot menu: # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr Copy the SSH public key from the machine you'll be unlocking the disk from to the Armbian machine: # rsync yourusername@remote_machine:.ssh/id_*.pub /etc/dropbear-initramfs/authorized_keys If you'll be unlocking the disk from more than one host, then edit the authorized_keys file by hand and add the additional SSH public keys. Edit '/etc/dropbear-initramfs/config', adding the following lines: DROPBEAR_OPTIONS="-p 2222" DROPBEAR=y Reconfigure dropbear: # dpkg-reconfigure dropbear-initramfs Make sure everything was included in the initramfs (both commands should produce output): # gunzip -c /boot/initrd.img* | cpio --quiet -t | grep dropbear # gunzip -c /boot/initrd.img* | cpio --quiet -t | grep authorized_keys Your work is finished! Exit the chroot and shut down the Orange Pi: # exit # halt -p Swap the SD cards and restart the Pi. Unlock the disk by executing the following command on your remote machine. Substitute the Pi's correct static or DHCP-configured IP address for the one below. If necessary, also substitute the correct disk password in place of 'abc': $ ssh -p 2222 -x root@ 'echo -n abc > /lib/cryptsetup/passfifo' If you choose to unlock the disk from the tty, just enter your disk password and hit ENTER. If all went well, your root-filesystem encrypted Armbian system is now up and running!
  2. Hi all, Maybe there are a lot people who got this working but for me was today the day. I buyed a time a go a cheap but fast NVME SSD from Aliexpress. The smallest one a 128GB. I have also a 512GB in my laptop and for the price they are really good. But i needed also a USB-NVME external housing. That is the Ugreen NVME 10GBps to USB adapter. In very short but i will explain more in the future. 1. Flash a MicroSD card with your favourite Armbian to the MicroSD. Update with sudo apt-get update. Also with a SSH session not a problem. 2. Place the USB disk in a USB 3.0 port of the Orange Pi. By the OrangePi 4 it´s the blue one on the top. 3. run the command lsusb 4. Notice the dev id. In my situation it´s 174c:2362 5. Run the command with off course your dev id. Notice the :u at the end that must be added. echo "174c:2362:u" | sudo tee /sys/module/usb_storage/parameters/quirks 6. Replug the USB drive. I see the activity led on the drive short flashing. 7. Run the following command sudo nano /boot/armbianEnv.txt 8. Add the dev id after usbstoragequirks and close and save the file. By my system is the complete row: usbstoragequirks=174c:2362:u,0x2537:0x1066:u,0x2537:0x1068:u 7. Logout and in with your root account! This is very important. With sudo is this not possible. 8. Open armbian-config. Select System->Update Bootloader-> Boot from SD, root from NVME/eMMC etc. 9. The tool will ask you the directory to the disk. Most of time is this standard correct. You get a question about the filesystem. Select EXT4. You get a warning that the disk would be erased. Click on Ok. 10. Wait patiently to finish 11. And without failures you could click reboot and boot from USB/NVME! By my is the Orange:Pi a lot faster! Booting, updating copy files. Everything. I am really happy with this!
  3. Hi, This topic was a initially a question and become a tutorial to use push buttons on orange pi PC. This tutorial has been made with an Orange PI PC running on "Armbian_5.35_Orangepipc_Debian_jessie_default_3.4.113.img". With this example you will be able to launch 3 different scripts for each push button : /usr/local/bin/run<Wpi GPIO number> -> immediately launched when a button is pressed /usr/local/bin/run<Wpi GPIO number> -> launched after a long pression /usr/local/bin/run<Wpi GPIO number> -> launched when a button is released (but not after a long pression) I've made this image to know easily see the correspondence between WiringOP and physical Orange PI PC connector : Mhhh if you want to modify it, you'll find the excel source file here. Sources : -> excellent tutorial for beginners ! -> a modified WiringPi for OrangePiразработка_средств_аппаратного_управления_для_orange_pi_pc -> a very good example of program in C to use Orange PI GPIO with push buttons To install and compile the WiringOP library : mkdir downloads cd downloads git clone -b h3 cd WiringOP/ sudo ./build Make a test : gpio readall You should obtain something like that : +-----+-----+----------+------+---+-Orange Pi+---+---+------+---------+-----+--+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 12 | 8 | SDA.0 | ALT5 | 0 | 3 || 4 | | | 5V | | | | 11 | 9 | SCL.0 | ALT5 | 0 | 5 || 6 | | | 0v | | | | 6 | 7 | GPIO.7 | ALT3 | 0 | 7 || 8 | 0 | ALT3 | TxD3 | 15 | 13 | | | | 0v | | | 9 || 10 | 0 | ALT3 | RxD3 | 16 | 14 | | 1 | 0 | RxD2 | ALT3 | 0 | 11 || 12 | 0 | ALT3 | GPIO.1 | 1 | 110 | | 0 | 2 | TxD2 | ALT3 | 1 | 13 || 14 | | | 0v | | | | 3 | 3 | CTS2 | IN | 1 | 15 || 16 | 0 | ALT3 | GPIO.4 | 4 | 68 | | | | 3.3v | | | 17 || 18 | 0 | ALT3 | GPIO.5 | 5 | 71 | | 64 | 12 | MOSI | ALT4 | 0 | 19 || 20 | | | 0v | | | | 65 | 13 | MISO | ALT4 | 0 | 21 || 22 | 0 | ALT3 | RTS2 | 6 | 2 | | 66 | 14 | SCLK | ALT4 | 0 | 23 || 24 | 0 | ALT4 | CE0 | 10 | 67 | | | | 0v | | | 25 || 26 | 0 | ALT5 | GPIO.11 | 11 | 21 | | 19 | 30 | SDA.1 | ALT5 | 0 | 27 || 28 | 0 | ALT5 | SCL.1 | 31 | 18 | | 7 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | | | 8 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | ALT3 | RTS1 | 26 | 200 | | 9 | 23 | GPIO.23 | IN | 1 | 33 || 34 | | | 0v | | | | 10 | 24 | GPIO.24 | IN | 1 | 35 || 36 | 0 | ALT3 | CTS1 | 27 | 201 | | 20 | 25 | GPIO.25 | ALT5 | 0 | 37 || 38 | 0 | ALT3 | TxD1 | 28 | 198 | | | | 0v | | | 39 || 40 | 0 | ALT3 | RxD1 | 29 | 199 | +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+----------+------+---+-Orange Pi+---+------+----------+-----+-----+ Now we are going to write a program in C to detects pushes on buttons : nano pushbuttons.c The copy / paste the C program below : (you should modify the numbers of buttons that you use, the WiringOP pins that you use, you can create scripts later) OK now compile it and run it : gcc -lwiringPi -lwiringPiDev -o pushbuttons pushbuttons.c ./pushbuttons Press a button and you're done FYI : To use the native button on the motherboard of the orange PI PC you can use "acpid" to make working for reboot I hope it will be useful to some of you.
  4. In this tutorial we build a custom .config for OrangePiOnePlus board, eg: to remove blutooth, WiFi and or USB3.x support since the hardware is not onboard, alternatively you can adjust settings to your needs which is not in the default .config. The section mentions, if file " userpatches/linux-$KERNELFAMILY-$KERNELBRANCH.config " exists, it will be used instead of default one from " config ". This means for the OPiOnePlus : " linux-sunxi64-dev.config " should be created, but please note "dev" is just one of the three options available, which are: " current ", " legacy " and " dev " The default config files are located in : " /armbian/config/kernel " and thus also holds a "linux-sunxi64-dev.config " config file. # #If user-provided kernel .config file IS NOT present yet # cd ~ git clone --depth 1 armbian cd armbian ./ BRANCH=dev RELEASE=buster BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes EXTRAWIFI=no BOARD=orangepioneplus Yet rename ".config" and Save to " ~/userpatches/linux-sunxi64-dev.config " , find attached a screenshot # #If user-provided kernel .config file IS present # <script> cp -p ~/armbian/userpatches/linux-sunxi64-dev.config ~/ sudo rm -rf armbian git clone --depth 1 armbian mkdir ~/armbian/userpatches cp -p ~/linux-sunxi64-dev.config ~/armbian/userpatches/ </script> Above can be scripted so you do not need to worry if for some reason you need to remove and rebuild your " armbian " directory from scratch Rest would be ( assuming your kernel has been customised to your needs ): cd armbian ./ BRANCH=dev RELEASE=buster BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no EXTRAWIFI=no BOARD=orangepioneplus Hope this addition to user-provided-kernel-config explains the idea " in depth " . Happy configuring :-)
  5. Armbian implements some basic 'system logging' at every startup and shutdown and contains a little utility to provide this collected information combined with some more useful debug info from user installations. All that's needed is executing 'sudo armbianmonitor -u' (or armbian-config --> Software --> Diagnostics) and then all this support related information is uploaded to an online pasteboard service automagically (see example output) How to interpret this wall of text? The output is best read from bottom to top since the most important information is collected during upload: At the bottom /proc/interrupts contents to check for IRQ affinity problems (interrupt collissions on some CPU cores negatively affecting performance) Then last 250 lines dmesg output are included. Here you might find important information wrt the last (kernel) events that happened on the machine uptime output including average load statistics (1, 5 and 15 min) free output telling how much physical memory is available and how much swap and/or zram is used (you need to look directly above whether zram is active or not to interpret the 'Swap:' line) vmstat output contains virtual memory usage information since last reboot iostat output contains the same but allows for a 'per device' view since all devices are listed with individual statistics (so it's easy to spot IO bottlenecks by looking at these numbers and also looking at %iowait value) 'Current system health' displays what the system is actually doing while uploading the debug log (on systems where DC-IN monitoring is available also allowing for underpowering diagnosis -- if you read here numbers below 5.0V stop reading the log and tell the user to fix his underpowering issues first) In case the installation has been moved from SD card to other storage nand-sata-install.log will be included in the output 'Loaded modules' allow to look for module related problems If it's an Allwinner board running legacy kernel the whole script.bin contents are included 'Installed packages' shows version numbers of relevant Armbian packages 'Group membership of' should list all groups the user is member of. If this line is missing ignore the whole contents and ask the user to re-submit debug info, this time doing it correctly not as root but using 'sudo armbianmonitor -u' (group memberships are important to understand certain problems, eg. users not being member of audio group won't have success getting noise out of their devices) If the board is PCIe capable list of attached PCIe devices is included The lsusb output lists all connected USB devices and also information about speed (12M, 480M, 5000M) and protocol/connection details (mass-storage vs uas for example) If the user installed the lshw utility and verbosity is set to 4 or above in /boot/armbianEnv.txt some more disk related information will be included Important: The debug output also contains all collected support files that follow this naming scheme: /tmp/armbianmonitor_checks_* -- so if a user complains about 'transmission so slow' or 'latest files are always missing' ask him to run 'armbianmonitor -c /path/to/torrent-storage' and afterwards 'sudo armbianmonitor -u' without a reboot in between since then the checking results will also be contained. Everything above of this information at the output's bottom is result of regular logging at startup and shutdown (the contents of /var/log/armhwinfo.log). At startup the following items are logged: dmesg output, /etc/armbian-release and /boot/armbianEnv.txt contents, lsusb and lscpu output, /proc/cpuinfo and /proc/meminfo contents, network interface information, available partitions and filesystems, on Allwinner boards where /boot/script.bin points to, some metadata information for all MMC media connected to the host (eg. SD card and/or eMMC) and some system health information. At shutdown iostat, vmstat and free output are added to /var/log/armhwinfo.log as well as the last 100 lines from dmesg output. If these '### shutdown' entries are missing after reboots the system crashed while shutting down.
  6. tkaiser has built a new Kernel with i2s Modules. With this Kernel and some cheap DAC e.g. ( it is possible to get good quality sound out of the Orange Pis. After installing the Kernel Two Things have to be changed in the fex File: Change Directory to boot: cd /boot Turn the script.bin to a fex-File and open it in an Editor sudo bin2fex script.bin script.fex sudo nano script.fex Now change the following Entries: [twi1] twi_used = 1 to [twi1] twi_used = 0 and [pcm0] daudio_used = 0 to [pcm0] daudio_used = 1 Save your changes and do : sudo fex2bin script.fex script.bin After a reboot your done. I do not know for what the Section [twi1] is good for, i hope nothing serious.. This connections have to be made: 5V > Pin 2 Gnd > Pin6 BCK > Pin 27 LRCK > Pin 28 Data > Pin37 (according to the Picture "giachi" has posted on the diyaudio Forum see below) The second Picture is only for orientation on an Orangepi PC, the red Wire is 5V ! Be aware that the Header is rotated by 180°on the One! That´s all . Regards
  7. Hi there, i hope you can help me as i saw there are a few Wireguard Users here as well. I did setup Armbian 20.05.4 Buster on my Cubietruck and configured Wireguard. After a few mistakes the connection from outside (iOS Client) is stable but very slow. I went to the obvious roads and found the MTU setting on the client side could be an issue as well some PostUp command parameters can improve performance. But for any reason my wireguard doesn´t want to accept anything with PostUp, Safeconfig etc in my wg0.conf file: Parsing error. But without that been solved i assume i can´t work on the Performance improvement. Here a few lines of code showing the relevant config Files and the Error: root@cubietruck:/etc/wireguard# cat wg0.conf [Interface] ListenPort=40404 PrivateKey=blablablaServerKey PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; iptables -A FORWARD -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; iptables -D FORWARD -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT [Peer] PublicKey=blablabla Public Key AllowedIPs=,fd00:42::100 root@cubietruck:/etc/wireguard# cat clients/omasiphone.conf [Interface] PrivateKey=blablablaclientkey Address=,fd00:42::100/64 DNS=,2606:4700:4700::1111 MTU = 1412 PostUp = ip route add SERVER_PUBLIC_IP/32 via dev eth0; iptables -A FORWARD -i wg0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu PostDown = ip route del SERVER_PUBLIC_IP/32 via dev eth0; iptables -D FORWARD -i wg0 -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -D FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu [Peer] PublicKey=blablablaclientkey AllowedIPs=,::/0 root@cubietruck:/etc/wireguard# wg setconf wg0 /etc/wireguard/wg0.conf Line unrecognized: `PostUp=iptables-AFORWARD-iwg0-jACCEPT;iptables-tnat-APOSTROUTING-oeth0-jMASQUERADE;iptables-AFORWARD-ieth0-mstate--stateRELATED,ESTABLISHED-jACCEPT' Configuration parsing error Can you help me here a bit?
  8. Today I did compile the NeXT-Cube/Station Emulator Previous 2.2 ( ) on my NanoPi A64 (with installed Desktop-option for using SDL) Installing the dependencies and compiling Previous 2.2 has been done with the follwing commands ( while compiling there were MUCH warnings ) : apt install zlib1g zlib1g-dev libsdl2-2.0-0 libsdl2-dev libpng16-16 libpng-dev libpcap0.8 libpcap0.8-dev apt install g++ cmake subversion cd /home/guido old Previous v1.8 : ===================== svn checkout svn:// previous-code actual Previous v2.2: ===================== svn checkout previous-code cd previous-code ./configure make Run the program cd src ./Previous For booting the emulation you need a SCSI-HDD-dd-image of NeXTstep 3.3 You can get it at inside the file Nextstep 3.3 HD Image With Previous The NanoPi A64 gets only 50-100% emulation speed of an original NeXT A little bit more while using a 68030 CPU and less on the 68040 CPU emulation. PS: because the emulator is using SDL for gfx you need to start the emulator from a graphical terminal on the NanoPi...
  9. On some devices (mostly headless) like Pine A64 LTS and other SBCs with Allwinner SoCs is Lima blacklisted by default or not supported by distribution. For getting Lima work, you need to use distribution, which have already Mesa with Lima support (Mesa 20.1+) (or compile latest Mesa from sources, but this is not included in this tutorial). At the moment of writing, it's Ubuntu Focal and Debian Bullseye. I personally prefer Debian more, so in my case, download Debian Bullseye image for your SBC and burn it into the board. After booting into your board, find file named /etc/modprobe.d/blacklist-NAMEOFYOURSBC.conf (for me it's blacklist-pinea64-lts.conf), find line with: blacklist lima and comment it by adding # at begin of this line, so it will look like this: # blacklist lima Reboot the device and Lima should work finely. If you will have any questions or issues, let me know - gamiee
  10. I've used Zabbix professionally and at home to monitor servers, IoT, and IP devices. I've built scripts for the server and client to automate the install process including moving the MySQL database, so you can locate it to a NFS mount instead of serving the database from the slower SD card. The deb packages do not work for ARM, so you have to build it from source using my scripts. Install Zabbix
  11. If you know the movie "Wargames" then you may know the computer of "David Lightman" a IMSAI 8080 Udo Munk did create the software z80pack (last version from 2017 v1.36 at ) which does include - IMSAI 8080 - Altair - Cromemco Z1 and - cpmsim Emulation. Against the text based cpmsim emulation the other features a graphical frontpanel with "blinken lights" Yesterday I did try to compile/start my favourite IMSAI 8080. I did follow the instructions - which I collect and wrote for me - see attached to this message. But yesterdy I only got limited success (after many "bad" compiles with missing dependencies) in starting the IMSAI 8080 emulation. I did get the graphical frontend *yeah* - but after POWERON/RUN the computer I didnt get any terminal-output After MANY retries I did give up Today I did the same compile-session on a PC with Ubuntu MATE 20.04LTS and it did work in the first try At first I got no idea what wasnt working....but then I discovered that - when moving the graphical frontpanel - the terminal-output was written VERY SLOWLY to the terminal-screen *Aha* Because the garphical frontpanel seem to work perfectly (and did also compile very well) I searched inside the directorys of imsaisim and found in the "conf"-directory the file system.conf There in system.conf is a line where the FPS-rate of the frontpanel as default is configured to 60 FPS (Frames per second). While taking a look at htop the NanoPi A64 (where my armbian buster Desktop does run) the cpu-utilization is near 90% So my gut instinct did tell me thats to much and the NanoPi has to much work with the frontpanel than writing to the terminal. I changed the framerate in - for the IMSAI 8080: ~/z80pack-1.36/imsaisim/conf/systemconf - for the Altair: ~/z80pack-1.36/altairsim/conf/systemconf - for the Cromemco Z1: ~/z80pack-1.36/cromemcosim/conf/systemconf to # front panel framerate fp_fps 10 After that change all 3 emulators with graphical frontend did startup and give output on the terminal I contacted Udo Munk via email about this topic and he already knew it He wrote that he had implemented the FPS option, because some lower-spec systems had problems to achieve the power for producing a framerate of 60 FPS for the frontpanel. Here my write-up / documentation how I did compile / successfully start the IMSAI 8080 emulation: (many thanks to John Kennedy from the FB-Group Altair 8800 for double-checking my instructions!) ====================================================================== My normal evironment for compiling source: ====================================================================== apt install gcc libncurses5-dev liblua5.3-dev git make zip unzip -y ====================================================================== Getting z80pack-source: ====================================================================== cd ~ wget tar -xvf z80pack-1.36.tgz cd ~/z80pack-1.36/ ====================================================================== Dependencies named by z80pack: ====================================================================== libjpeg X11 OpenGL c++ compiler (g++) libpthread ====================================================================== Packages for the z80pack-dpendencies: ------------------------------------- apt install libjpeg-dev x11-common libpthread-stubs0-dev libxmu-dev apt install mesa-common-dev z80asm libglu1-mesa-dev freeglut3-dev ====================================================================== ==> <== ==> I built all packages of z80pack in the following order: <== ==> <== ==> ATTENTION: for some commands you may have to use sudo <== ====================================================================== 1.) FRONTPANEL ====================================================================== cd ~/z80pack-1.36/frontpanel/ make -f Makefile.linux NOTE: Be sure to copy to a shared library path! NOTE: cp ~/z80pack-1.36/frontpanel/ /usr/lib make -f Makefile.linux clean ====================================================================== 2.) CPMSIM ====================================================================== cd ~/z80pack-1.36/cpmsim/srcsim/ make -f Makefile.linux make -f Makefile.linux clean ====================================================================== 3.) CPMSIM-TOOLS ====================================================================== if you are user root: mkdir /root/bin if you are user pi: mkdir /home/pi/bin cd ~/z80pack-1.36/cpmsim/srctools make make install NOTE: (does install in /root/bin/) NOTE: Tools installed in /root/bin, make sure it is NOTE: included in the systems search PATH NOTE: export PATH=$PATH:/root/bin NOTE: or NOTE: export PATH=$PATH:/home/pi/bin make clean ====================================================================== 4.) ALTAIRSIM ====================================================================== cd ~/z80pack-1.36/altairsim/srcsim/ make -f Makefile.linux make -f Makefile.linux clean NOTE: change framerate to "fp_fps 10" in NOTE: ~/z80pack-1.36/altairsim/conf/system.conf ====================================================================== 5.) CROMEMCOSIM ====================================================================== cd ~/z80pack-1.36/cromemcosim/srcsim/ make -f Makefile.linux make -f Makefile.linux clean NOTE: change framerate to "fp_fps 10" in NOTE: ~/z80pack-1.36/cromemcosim/conf/system.conf ====================================================================== 6.) IMSAISIM ====================================================================== cd ~/z80pack-1.36/imsaisim/srcsim/ make -f Makefile.linux make -f Makefile.linux clean NOTE: change framerate to "fp_fps 10" in NOTE: ~/z80pack-1.36/imsaisim/conf/system.conf ====================================================================== PREPARE 1st start of imsaisim; ====================================================================== cp ~/z80pack-1.36/frontpanel/ /usr/lib cd ~/z80pack-1.36/imsaisim rm conf ln -s conf_2d conf export PATH=$PATH:/root/bin NOTE: maybe add the export-command to your ~/.bashrc ====================================================================== START of IMSAI 8080 CPM v2.2 from the x-terminal on the desktop (needs to be a "x-terminal) for connecting to the X-Server for creating the graphical frontpanel: ====================================================================== ./cpm22 NOTE: maybe root has to give access-rights: NOTE: chmod -R 666 ~/z80pack-1.36/imsaisim/disks NOTE: on the x-terminal root and the to the desktop logged in user can NOTE :start the application and connect to the X-server on a NOTE: SSH-terminal ONLY the to the desktop logged in user can start the NOTE: application and connect to the X-server to give root access to NOTE: the X-server from a SSH-terminal the he to the desktop logged NOTE: in user has to give root access via the xhost command: NOTE: xhost SI:localuser:root ====================================================================== POWER-UP the IMSAI 8080 in the graphical frontpanel ====================================================================== Press "POWER ON " upper part on the first switch on the right side (POWER ON / POWER OFF) Press "RUN" upper part of the third (red) switch (RUN/STOP) ====================================================================== Exit the IMSAI 8080 ====================================================================== Enter "bye" on the CP/M-commandline OR press "POWER OFF " lower part on the first switch on the right side (POWER ON / POWER OFF) OR close the graphical frontpanel with the close button X (Window-Manager-close) Pictures (screenshots are done with Mirage as you can see) of my "success"
  12. Yesterday i did install Armbian_5.86_Aml-s905_Debian_buster_default_5.1.0_20190514.img from @balbes150 on my Sunvell T95KPro (S912). While installing Pihole the Installation does break when trying to start lighttpd. After checking with journalctl -u lighttpd it turns out that the file /usr/share/lighttpd/ is missing, because in the newer lighttpd-version of debian buster the file has be renamed to /usr/share/lighttpd/ (see also ) Pihole doesnt know/use the new name with debian buster, so it fails to start the lighttpd So I did find 2 ways to resolve the problem. First (quick and dirty?) way: cp /usr/share/lighttpd/ /usr/share/lighttpd/ or ln -s /usr/share/lighttpd/ /usr/share/lighttpd/ read also: Pihole breaks lighttpd on Debian Buster #2557 the second way (found it at ) is to edit /etc/lighttpd/lighttpd.conf and search for the 2 following lines and comment them out (found the 2nd one at the end of the file): #include_shell "/usr/share/lighttpd/" #include_shell "cat external.conf 2>/dev/null" and add the follwoing line to the file: include_shell "/usr/share/lighttpd/" After saving the file you should be able to restart lighttpd via sudo /etc/init.d/lighttpd restart or sudo service lighttpd restart or sudo service lighttpd stop sudo service lighttpd start BUT second way does not work good with updating or repair-install of pihole, because I think this will set the config-file to the old state (also for server.error-handler-404) So maybe the first way will work better while pihole doenst know the new file-name - or you also can do both ways BTW: If you are experience a 400 Bad Request while only using the IP for getting to the Pihole-Webpage (and the redirect should ask you if you want to use the /admin page - but it doenst) then try the follwing small resolution - edit a line in the file /etc/lighttpd/lighttpd.conf from: server.error-handler-404 = "pihole/index.php" to: server.error-handler-404 = "/pihole/index.php" lighttpd.conf
  14. For "retro-reasons" I would like to SSH from my old Windows 98SE PC via putty 0.63 ( which is the last known to work under Windows98SE ) into armbian. This did work fine until armbian bullseye dev with kernel 5.6.8, because here we get the "new" openssh-serve 8.2p1: armbian bullseye kernel 5.6.8 openssh-server 1:8.2p1-4 arm64 secure shell (SSH) server, for secure access from remote machines before bullseye we had with armbian buster and so on the "older" open-ssh-server <=7.9p1 (where we didnt got this problem) armbian buster kernel 5.6.8 openssh-server 1:7.9p1-10+deb10u2 arm64 secure shell (SSH) server, for secure access from remote machines with open-ssh-server 8.2p1 there was a "little" change: OpenSSH 8.2/8.2p1 (2020-02-14) Potentially-incompatible changes ================================ * ssh(1), sshd(8): this release removes diffie-hellman-group14-sha1 from the default key exchange proposal for both the client and server. So the old putty 0.63 ( which is the last known to work under Windows 98 ) does produce the error-message: couldn't agree a key exchange algorithm After comparing many many configs and commands (also ssh -Q kex) the solution "only" was nano /etc/ssh/sshd_config # put at the end of /etc/sshd_config KexAlgorithms +diffie-hellman-group14-sha1 /etc/init.d/ssh restart Maybe this will help someone also using a older putty or other SSH-Client. With a newer version of putty on newer Windows there was no problem with that
  15. All, Don´t know if anybody else did it... but I got Bluetooth running by modifying the device tree and adding support for communication between the RTL8723BS and UART1 and loading the needed RTL8723B firmware. Distro: Armbian Buster Kernel version: 5.4.30-sunxi64 This is how I did it: 1) Create a patch (xx.patch) with the next content and place it in ~/build/userpatches/kernel/sunxi-current/ --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts 2020-04-06 12:37:45.584912094 +0200 +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts 2020-04-06 12:37:45.584912094 +0200 @@ -498,6 +498,21 @@ status = "okay"; }; +/* On Wifi/BT connector, with RTS/CTS */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */ + host-wake-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */ + reset-gpios = <&r_pio 1 4 GPIO_ACTIVE_LOW>; /* PM4 */ + post-power-on-delay-ms = <200>; + }; +}; + &usb2otg { dr_mode = "host"; status = "okay"; 2) Run sudo ./compile with your favorite config (Desktop/server/blablabla) 3) Flash the image to an SD card or eMMC module. 4) Start your Pine64 H64 model-B 4) Connect to a network and run the firmware update/upgrades (armbian-config) and install the Bluetooth tools. 5) DO NOT ENABLE SERIAL 1 !!!! in armbian-config 6) Download the next git repo to your board: 7) Unpack the archive, run make 8) Copy the next firmware files to /lib/firmwares/rtl_bt: sudo cp rtlbt_fw_new /lib/firmware/rtl_bt/rtl8723bs_fw.bin sudo cp rtlbt_config /lib/firmware/rtl_bt/rtl8723bs_config.bin 9) Reboot Expected dmesg output: [ 45.107273] Bluetooth: HCI UART driver ver 2.3 [ 45.107279] Bluetooth: HCI UART protocol H4 registered [ 45.107281] Bluetooth: HCI UART protocol BCSP registered [ 45.107329] Bluetooth: HCI UART protocol LL registered [ 45.107331] Bluetooth: HCI UART protocol ATH3K registered [ 45.107375] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 45.107509] Bluetooth: HCI UART protocol Intel registered [ 45.107592] Bluetooth: HCI UART protocol Broadcom registered [ 45.107614] Bluetooth: HCI UART protocol QCA registered [ 45.107616] Bluetooth: HCI UART protocol AG6XX registered [ 45.107642] Bluetooth: HCI UART protocol Marvell registered [ 45.845446] Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000b lmp_ver=06 lmp_subver=8723 [ 45.849521] Bluetooth: hci0: RTL: rom_version status=0 version=1 [ 45.849529] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723bs_fw.bin [ 46.055000] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723bs_config.bin [ 46.096579] Bluetooth: hci0: RTL: cfg_sz 55, total sz 23699 [ 46.929071] Bluetooth: hci0: RTL: fw version 0x373e6962 'hciconfig list' output: hci0: Type: Primary Bus: UART BD Address: 48:46:C1:3A:6B:5F ACL MTU: 820:8 SCO MTU: 255:16 UP RUNNING PSCAN ISCAN RX bytes:1982677 acl:3028 sco:0 events:491 errors:0 TX bytes:91688 acl:232 sco:0 commands:225 errors:0 File transfer from Pine to Samsung is working... haven't tested anything else.. Regards, __Dirk__
  16. Tested this on clearfog base, banana pi m64, banana pi m2+ ## Building and providing The elastic team doesn't provide deb packages for ARM devices. But together with docker, we're able to build the main executable for it. We will create a build directory which includes anything to install filebeat on a ARM device. So please stay inside the build directory the whole time you are using this tutorial. mkdir build && cd $_ ## Prepare source code First we will download, check and extract the source code of filebeat. Source: wget wget sha512sum filebeat-7.6.0-linux-x86.tar.gz Extract and prepare tar xfz filebeat-7.6.0-linux-x86.tar.gz --transform 's/filebeat-7.6.0-linux-x86/filebeat-latest/' ## Using docker Install docker on any machine you want. We use a host with Debian Buster installed. ### Install docker on a Debian Buster x64 machine sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common wget -q -O - | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] stretch stable apt update sudo apt install docker-ce Instantiate a go container for cross-compilation (Debian Buster x64) Using latest docker go image docker run -it --rm -v `pwd`:/build golang:1.14 /bin/bash Inside the "go" docker container create filebeat for arm modules.listand arm64 go get cd /go/src/ git checkout v7.6.0 GOARCH=arm go build cp filebeat /build/filebeat-arm GOARCH=arm64 go build cp filebeat /build/filebeat-arm64 exit You can find the filebeat executeable inside your build directory. Leave it there for the moment. ## Download installation scripts I wrote an install script and collected a few files from other filebeat installations and uploaded them to You can find any information on the github repository itself. So we will clone the repository to the build directory. git clone ## Filebeat configuration Now you have to copy the filebeat.yml so that that the we'll use later on can move it to the right place. cp filebeat-latest/filebeat.yml my-filebeat.yml and change it to your needs vi my-filebeat.yml ## Other configurations There are other configurations that might interests you. cp filebeat-latest/modules.d/YOUR_MODULE.yml.disabled my-YOUR_MODULE.yml Change this files too vi my-YOUR_MODULE.yml The install script will loop through all .yml files starting with my- and will copy them to the right direction ## Ready for installation The build directory is ready to use. You are able to upload the build directory to a ARM server of your choice and execute the there. rsync -av --exclude={".git","*.tar.gz","*.tar.gz.sha512"} ../build/ server-of-your-choice:/opt/build/ ssh server-of-your-choice cd /opt/build/ bash /opt/build/RT-Blog-elastic/ rm -rf /opt/build/ ## Modules You're able to enable modules with the installation script. Create a file called modules.list inside the build directory and write the modules separated by whitespaces like iptables system apache
  17. Maybe someone here knows the 8-Bit Guy and the project of his Dream-Computer - the Commander X16 You could see the actual state of the real hardware at YT-Video from the 8-Bit Guy: (Building my Dream Computer - Part 2) Since the hardware isnt ready/completed yet there is a Emulator which uses SDL2 and can be compiled now (since r30) also on Linux ARM Github-page of the emulator: Source: or Linux-Binary for PC including the 2 ROMs: libsdl2-dev hasnt to be compiled from source for armbian, because we have already a installable package and the runtime libsdl2-2.0-0 is already installed in the desktop image. For compiling the Emulator I used on my NanoPi K1 Plus a fresh compiled (with armbian-build-system) dev-image: Armbian_5.97_Nanopik1plus_Debian_buster_dev_5.3.0-rc8_desktop For to have all programs for compiling the application I did use sudo apt install gcc git make libsdl2-dev zip unzip -y Then we do create a directory and download the source and extract it: mkdir x16 cd x16 wget tar -xvf r30.tar.gz Now we change in the newly created directory and do compile with make: cd x16-emulator-r30/ make For running the emulator we do need the 2 ROMs chargen.bin and rom.bin out of the archive in the same directory as the compile x16emu binary. Now we can run the emulator (here with german keymap): ./x16emu -keymap de Unfortunately the emulator doesnt run very fast, do use only one CPU-core and hasnt idle-support - so the CPU will get really fast very hot (70 Degree). A AMD Phenom II X4 with 4x3GHz max. is about 2 times more faster (100%+200%=300%) than the X16 on the NanoPi K1 Plus
  18. Hi all. I wrote a small guide on enabling pps-gpio by modifying the device tree. With a PPS signal it's possible to setup your board as a Stratum 1 time server for your local network or the NTP pool. I used this method on a Rock64 but it should be applicable on most board. PPS-GPIO on Rock64 with Armbian legacy (4.4.X) kernel Cheers.
  19. Had a bit of a success with HDMI audio and also video acceleration on OrangePi 3. What was needed was to apply some patches from LibreELEC, namely ones from projects/Allwinner/patches/linux/ . For HDMI audio to work you need 0004-sun4i-i2s-improvements.patch , which contains support for I2S on H6. When done right you should see in dmesg: asoc-simple-card sound: i2s-hifi <-> 5091000.i2s mapping ok Also what helped was an IRC chat that Jernej had with mirko some time ago: For video acceleration you need 0005-cedrus-improvements.patch and compile Cedrus driver. When done right you should see in dmesg: cedrus Device registered as /dev/video0 For a good measure I applied other patches in that directory as well, some needed modifications to apply to 5.5 kernel (LibreELEC uses 5.4) . Then FFMPEG needs to be compiled with v4l2_request to actually do the acceleration To get Kodi GUI acceleration working you need to compile mesa 20.0.0-devel from Mesa GIT. Kodi then needs to be compiled as GBM version. I also applied patches that LibreELEC has for Kodi into my Kodi tree. @jernej sounds the above about right?
  20. So this guy made a simple yet brilliant inquiry into his thoughts on how to hack the at&t restrictions. I hope theres a status update soon cause, Id love to know how his progress has gone so far.
  21. I've posted in the Armbian forums in the past about video surveillance software. For some reasons it was (at the time) not always that easy or impossible to compile or get it up and running. But: Times have changed (for the good this time!) and I've tried it again on a H3 1GB memory OrangePi plus with kernel 5.4 using a *FRESH and CLEAN* Ubuntu Bionic Server image. I was able to get the Kerberos software 2.8.0 up and running straight away, just by *EXACT* following the instructions on the website of (Generic installation Instructions page). It takes some time to compile ffmpeg and the machinery module, but it is certainly worth the effort! Go grab a drink, or do something else that's useful. Performance is ok, even though I think the hardware acceleration is not working. Just lower the FPS and/or resolution a bit. Performance is still great for everyday video surveillance with this excellent piece of software. I've tested successfully two different Logitech USB cams and two el-cheapo Chinese IP cameras using the RTSP stream. Other information can also be found on the website to get the software up and running. Please take care of defining exact camera type and resolution!
  22. There have been several disjointed tutorials on making a raspberrypi or orangepi into a surveillance camera. So I threw this together to maybe help someone out there with any issues. I used the orangepipc+ but any orangepi board should work as long as it has the basics, internet connectivity, storage, and a camera. (I highly suggest heatsinks as well) any feedback or enhancements to this tutorial are greatly appreciated. ------------------------------------------------------------------ ORANGEPI IPCAMERA ------------------------------------------------------------------ su root apt-get update apt-get upgrade apt-get install wget dpkg -i ffmpeg_3.1.1-1_armhf.deb apt-get remove libavcodec-extra-56 libavformat56 libavresample2 libavutil54 apt-get install python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5 wget dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb pip install motioneye mkdir -p /etc/motioneye cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf mkdir -p /var/lib/motioneye cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service systemctl daemon-reload systemctl enable motioneye systemctl start motioneye sudo modprobe gc2035 sudo modprobe vfe_v4l2 systemctl restart motioneye Accessing The Frontend After having successfully followed the installation instructions, the motionEye server should be running on your system and listening on port 8765. Fire up your favorite web browser and visit the following URL (replacing [your_ip] with... well, your system's IP address): http://[your_ip]:8765/ Use admin with empty password when prompted for credentials. For further details on how to configure motionEye, see Configuration. ------------------------------------------------------------------ FOR UPDATES; ------------------------------------------------------------------ pip install motioneye --upgrade systemctl restart motioneye sudo nano /etc/motioneye/motioneye.conf ctrl+x then y (nano) Modifiy the motion.config file to turnoff localhost; stream_localhost off change the port to 80 from 8765 if desired by; systemctl enable motion systemctl start motion Tutorial sources; (some resources for motion) OLD) WIP tutorial, I want to add a version with facial recognition using openface and a version using ALPR (automatic license plate recognition, as the orangepi systems can have 2GB of ram) Update 1 09/30/16; seems there is a issue with motioneye and being unable to find the csi camera. I'm trying to find a work around, any help is appreciated. Update 2 11/05/2016 Updated motioneye installation added information on motion and basic setup (incomplete) the editor seems to be breaking my wget addresses I forgot to add the login information and frontend... *DOH*
  23. Lately, I started writing a few articles on the OrangePi Zero, as I am trying to use it as part of a conference recording tool and to reference what I know about this board on the OrangePi Community docs website. Of course, I have to show my command lines, and their results. I used to post my commands on gist, then use Carbon to generate an image with the commands and their outputs… But that’s quite a lot of boring work… I then discovered asciinema and the recording that can be transformed into a GIF file thanks to asciicast2gif. It worked pretty well under Ubuntu for my previous projects, but it was not really practical to launch it, issue an ssh command, and then exit twice before having the recording… and modifying it to get rid of the SSH command. Furthermore, GIF are not usable for visually impaired people, so using something like SVG where they could copy and paste would be better in my opinion… Unfortunately, SVG is not handled by medium, so it will have to be used on other media, like my Ghost instance (not available yet). Enters termtosvg. That’s a wonderful tool aimed at producing animated SVG after recording terminal sessions. It compiled like a breeze (well, a strong, smelly and cold breeze) on the Zero, so I used it quite intensively (before discovering it could not be used on Medium). I then searched for tools able to transform an animated SVG to GIF, so that I would not have to redo all my terminal recordings… and was not able to do so. There is one library called librsvg that could be used by ffmpeg, but I have not been able to compile it on the Zero, and it’s just an hypothesis, there is no guarantee at all that it could be used to produce GIF files from animated SVG files. termtosvg can produce files than can be used by asciinema and then asciicast2gif to produce gif files, but the process is cumbersome and does not work on the Zero. I had to use a X86 Linux machine to do it. Anyway, with this post, you won’t be able to produce GIF images starting from a terminal recording if you’re using exclusively a Zero, but beautiful animated SVG that you will be able to use on your blog, or anywhere else where animated SVG is supported. If you’re brave enough to also use an X86 machine, go to the end of this post, and take time to get old before getting your first GIF file. TermToSVG installation TL;DR git config --global http.proxy http://proxy-machine:proxy-port sudo fallocate -l 1G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile sudo nano /etc/fstab git clone sudo apt-get install python3-setuptools libxml2-dev libxslt-dev python3-dev python3-pip cd termtosvg echo "Let's modify the Makefile so that we use python3 and pip3 as I can't get rid of Python2.7.x on this machine..." echo "See at" make build pip3 install dist/termtosvg-0.9.0-py3-none-any.whl The real installation process Let’s try to install termtosvg on the Zero. First of all, let’s configure the proxy if needed and then get the source code: poddingue@orangepizero:~$ git clone Cloning into 'termtosvg'... remote: Enumerating objects: 99, done. remote: Counting objects: 100% (99/99), done. remote: Compressing objects: 100% (59/59), done. remote: Total 1592 (delta 59), reused 68 (delta 40), pack-reused 1493 Receiving objects: 100% (1592/1592), 1.37 MiB | 2.08 MiB/s, done. Resolving deltas: 100% (930/930), done. poddingue@orangepizero:~$ cd termtosvg/ poddingue@orangepizero:~/termtosvg$ make build rm -rf dist && \ python sdist bdist_wheel usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: --help [cmd1 cmd2 ...] or: --help-commands or: cmd --help error: invalid command 'bdist_wheel' make: *** [Makefile:31: build] Error 1 Of course, the setuptools module can’t be found. I have not installed/configured Python2 setup tools. But as I had already done if for Python3, I modified the Makefile so that python is now python3, and pip is now pip3: PIP=pip3 PYTHON=python3 If I had not done it yet, it would have looked that way: poddingue@orangepizero:~/termtosvg$ sudo apt-get install python3-setuptools Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: python-setuptools-doc The following NEW packages will be installed: python3-setuptools 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 306 kB of archives. After this operation, 1,353 kB of additional disk space will be used. Get:1 buster/main armhf python3-setuptools all 40.8.0-1 [306 kB] Fetched 306 kB in 0s (1,225 kB/s) Selecting previously unselected package python3-setuptools. (Reading database ... 66711 files and directories currently installed.) Preparing to unpack .../python3-setuptools_40.8.0-1_all.deb ... Unpacking python3-setuptools (40.8.0-1) ... Setting up python3-setuptools (40.8.0-1) ... Now that Python setup tools are installed, let’s try it again: poddingue@orangepizero:~/termtosvg$ make build rm -rf dist && \ python3 sdist bdist_wheel usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: --help [cmd1 cmd2 ...] or: --help-commands or: cmd --help error: invalid command 'bdist_wheel' make: *** [Makefile:31: build] Error 1 Ok, fair enough, I’ll install wheel thanks to pip. pip3 install wheel Collecting wheel Using cached Installing collected packages: wheel The script wheel is installed in '/home/poddingue/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed wheel-0.33.6 And then, as gently suggested by pip3: export PATH=/home/poddingue/.local/bin:$PATH Ok, let’s try it again: poddingue@orangepizero:~/termtosvg$ make build rm -rf dist && \ python3 sdist bdist_wheel running sdist running egg_info creating termtosvg.egg-info writing termtosvg.egg-info/PKG-INFO writing dependency_links to termtosvg.egg-info/dependency_links.txt writing requirements to termtosvg.egg-info/requires.txt writing top-level names to termtosvg.egg-info/top_level.txt writing manifest file 'termtosvg.egg-info/SOURCES.txt' reading manifest file 'termtosvg.egg-info/SOURCES.txt' reading manifest template '' warning: no previously-included files matching '__pycache__' found anywhere in distribution warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no files found matching 'man/*.man.?' writing manifest file 'termtosvg.egg-info/SOURCES.txt' running check [...] Creating tar archive removing 'termtosvg-1.0.0' (and everything under it) [...] running build_scripts [...] installing to build/bdist.linux-armv7l/wheel running install running install_lib [...] Copying termtosvg.egg-info to build/bdist.linux-armv7l/wheel/termtosvg-1.0.0-py3.7.egg-info [...] adding 'termtosvg-1.0.0.dist-info/RECORD' removing build/bdist.linux-armv7l/wheel Happy? Not really… poddingue@orangepizero:~/termtosvg$ pip3 install dist/termtosvg-1.0.0-py3-none-any.whl Processing ./dist/termtosvg-1.0.0-py3-none-any.whl Collecting pyte (from termtosvg==1.0.0) Downloading (50kB) 100% |████████████████████████████████| 51kB 768kB/s Collecting lxml (from termtosvg==1.0.0) Downloading (2.6MB) 100% |████████████████████████████████| 2.6MB 74kB/s Collecting wcwidth (from termtosvg==1.0.0) Downloading Building wheels for collected packages: pyte, lxml Running bdist_wheel for pyte ... done Stored in directory: /home/poddingue/.cache/pip/wheels/c0/dd/4a/d0ec26b9d07a3b48e25ba3456dc9bcab875686af6da9e23fcd Running bdist_wheel for lxml ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-4whala87/lxml/';f=getattr(tokenize, 'open', open)(__file__);'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-w27wrikj --python-tag cp37: Building lxml version 4.4.2. Building without Cython. ERROR: b'/bin/sh: 1: xslt-config: not found\n' ** make sure the development packages of libxml2 and libxslt are installed ** Using build configuration of libxslt running bdist_wheel running build running build_py [...] arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/include/python3.7m -c src/lxml/etree.c -o build/temp.linux-armv7l-3.7/src/lxml/etree.o -w In file included from src/lxml/etree.c:692: src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory #include "libxml/xmlversion.h" ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 creating tmp cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitp1a2wq_x.c -o tmp/xmlXPathInitp1a2wq_x.o /tmp/xmlXPathInitp1a2wq_x.c:1:10: fatal error: libxml/xpath.h: No such file or directory #include "libxml/xpath.h" ^~~~~~~~~~~~~~~~ compilation terminated. ********************************************************************************* Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? ********************************************************************************* error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 [...] Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-4whala87/lxml/';f=getattr(tokenize, 'open', open)(__file__);'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5dypr5tk/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-4whala87/lxml/ Damn! poddingue@orangepizero:~/termtosvg$ sudo apt install libxml2-dev libxslt-dev python3-dev Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libxslt1-dev' instead of 'libxslt-dev' python3-dev is already the newest version (3.7.3-1). The following additional packages will be installed: icu-devtools libicu-dev libxslt1.1 Suggested packages: icu-doc The following NEW packages will be installed: icu-devtools libicu-dev libxml2-dev libxslt1-dev libxslt1.1 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 10.5 MB of archives. After this operation, 44.6 MB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 buster/main armhf icu-devtools armhf 63.1-6 [168 kB] Get:2 buster/main armhf libicu-dev armhf 63.1-6 [8,934 kB] Get:3 buster/main armhf libxml2-dev armhf 2.9.4+dfsg1-7+b3 [718 kB] Get:4 buster/main armhf libxslt1.1 armhf 1.1.32-2.2~deb10u1 [217 kB] Get:5 buster/main armhf libxslt1-dev armhf 1.1.32-2.2~deb10u1 [507 kB] Fetched 10.5 MB in 5s (2,318 kB/s) Selecting previously unselected package icu-devtools. (Reading database ... 66802 files and directories currently installed.) Preparing to unpack .../icu-devtools_63.1-6_armhf.deb ... Unpacking icu-devtools (63.1-6) ... Selecting previously unselected package libicu-dev:armhf. Preparing to unpack .../libicu-dev_63.1-6_armhf.deb ... Unpacking libicu-dev:armhf (63.1-6) ... Selecting previously unselected package libxml2-dev:armhf. Preparing to unpack .../libxml2-dev_2.9.4+dfsg1-7+b3_armhf.deb ... Unpacking libxml2-dev:armhf (2.9.4+dfsg1-7+b3) ... Selecting previously unselected package libxslt1.1:armhf. Preparing to unpack .../libxslt1.1_1.1.32-2.2~deb10u1_armhf.deb ... Unpacking libxslt1.1:armhf (1.1.32-2.2~deb10u1) ... Selecting previously unselected package libxslt1-dev:armhf. Preparing to unpack .../libxslt1-dev_1.1.32-2.2~deb10u1_armhf.deb ... Unpacking libxslt1-dev:armhf (1.1.32-2.2~deb10u1) ... Setting up icu-devtools (63.1-6) ... Setting up libxslt1.1:armhf (1.1.32-2.2~deb10u1) ... Setting up libicu-dev:armhf (63.1-6) ... Setting up libxml2-dev:armhf (2.9.4+dfsg1-7+b3) ... Setting up libxslt1-dev:armhf (1.1.32-2.2~deb10u1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-10) ... All set? Not so sure… Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9lgddbtt/lxml/';f=getattr(tokenize, 'open', open)(__file__);'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ghyj96g8/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-9lgddbtt/lxml/ The error may have happened because of low memory. Let’s this machine breathe a little better by giving it more swap: sudo fallocate -l 1G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile sudo nano /etc/fstab Now, let’s add this line in /etc/fstab. /swapfile swap swap defaults 0 0 Let’s try to install it once again. Go and have a coffee, or go for a walk… You could maybe even take time to marry and start a family before the build finishes. Anyway, after some time, you’ll have your beautiful termtosvg package ready to rock! pip3 install dist/termtosvg-1.0.0-py3-none-any.whl Processing ./dist/termtosvg-1.0.0-py3-none-any.whl Collecting lxml (from termtosvg==1.0.0) Using cached Requirement already satisfied: pyte in /home/poddingue/.local/lib/python3.7/site-packages (from termtosvg==1.0.0) (0.8.0) Requirement already satisfied: wcwidth in /home/poddingue/.local/lib/python3.7/site-packages (from termtosvg==1.0.0) (0.1.8) Building wheels for collected packages: lxml Running bdist_wheel for lxml ... - done Stored in directory: /home/poddingue/.cache/pip/wheels/73/52/7c/5cd696851d3e5e31a05023dd402b04659a6ec695ecc566c9d3 Successfully built lxml Installing collected packages: lxml, termtosvg Successfully installed lxml-4.4.2 termtosvg-1.0.0 This time, it looks like our installation has been successful. Let’s try it for real now. Testing Just enter termtosvg, do your stuff, and then do exit. You will have a message that will tell you where your newly created file lies. That’s cool, but can we do any better? The man page tells us we can record a terminal session with a specific screen geometry: termtosvg -g 80x24 animation.svg Recording started, enter "exit" command or Control-D to end poddingue@orangepizero:~$ echo "Hello, World!" Hello, World! poddingue@orangepizero:~$ exit Rendering ended, SVG animation is animation.svg Pretty handy! I am recording my casts with a 200x60 geometry, exporting them in the SVG format. The first step is to record them: termtosvg record -g 200x60 whatever-name-I-choose.cast I then ask termtosvg to render the cast as SVG, so that I can use them in websites that can handle them: termtosvg render whatever-name-I-choose.cast whatever-name-I-choose.svg Rendering started Rendering ended, SVG animation is whatever-name-I-choose.svg Want more? You’re GIF hungry? Ok I resign myself to give you my process, which is not pretty, and requires an X86 machine. As we have seen before, we can record a terminal session in asciicast v2 format. The cast file we have produced during the previous step to generate SVG, can then be used by asciinema (using phantomjs in the background) to produce a GIF file. docker pull asciinema/asciicast2gif alias asciicast2gif='docker run --rm -v $PWD:/data asciinema/asciicast2gif' asciicast2gif -s 2 -t solarized-dark whatever-name-I-choose.cast demo.gif And here is the final result (see attachment or here). And in GIF for the CMS that can’t display properly SVG. whatever-name-I-choose[1].svg
  24. Hi all. For a new video I've made a list with my most used/useful terminal commands. Please let me know what I've missed, or which commands you use most. Useful Linux commands for Ubuntu/Debian --------------------------------------- Update/Install -------------- sudo apt update Update repolists sudo apt upgrade Upgrade system/programs sudo apt autoremove Remove obsolete programs sudo apt install programName Install program sudo apt remove programName Remove program sudo aptitude install When having issue's with apt, aptitude can help to solve this sudo apt update && sudo apt upgrade Update and upgrade together/You can run multiple commands with && sudo dpkg -i packageName.deb Install .deb file Root user --------- sudo passwd Change root password su Super User/Enter root user Debug/Monitor ------------- dmesg Shows debug messages uname -a Shows basic system information env Shows the environment information htop Hardware monitor Switch terminal --------------- ctrl + ALT + F4 (F1 - F6) Open new terminal 4 ctrl + ALT + F1 Go back to terminal 1 ctrl + ALT + F7 Go back to desktop Reboot/Shutdown --------------- sudo reboot Reboot sudo shutdown now Shutdown CPU Tools --------- cpufreq-set -g performance Set governor to performance cpufreq-set -u 2Ghz Set max frequency for all cores cpufreq-set -c 0-1 -u 1.8Ghz Set max frequency for specific cores lscpu | grep MHz Show cpu frequency taskset -c 3 programName Use a specific core for an application Files/Directories ----------------- nano /home/fileToRemove.txt Create a txt file with Nano. You could use any other texteditor. touch filename Create an empty file, no matter what kind cat /home/fileToRemove.txt Shows the content of a file cp /home/fileToRemove.txt /home/copy.txt Copy file find /home/ -iname "*.txt" Search files that end with .txt comm /home/fileToRemove.txt /home/copy.txt Compare files rm /home/fileToRemove.txt Remove file mv /home/copy.txt ~/Documents/ Move file mkdir /home/directoryToGoTo/ Create directory cd /home/directoryToGoTo/ Go to directory ls List directory ls -l Gives more information about every file/directory ls -l filename.txt Gives file information pwd Show current working directory cd .. Go to the above directory rmdir /home/directoryToGoTo/ Remove directory wget Download file Zip/Tar/GunZip -------------- zip myzip file1 file2 file3 Create zip file unzip Unzip file tar xvf filename.tar gunzip filename_tar.gz Mount drives/USB Devices ------------ lsusb List USB devices lsblb List attached drives mount /mount/mountedDisk /dev/sda2 Mount drive sudo chmod -R 777 /mount/mountedDisk Give user read/write permissions df -a List all filesystems Swap file/ZRam -------------- sudo apt install zram-config Install zram script sudo fallocate -l 8G /swapfile Allocate 8GB for swapfile sudo chmod 600 /swapfile Give the correct rights for the swapfile sudo mkswap /swapfile Make it a swapfile sudo swapon /swapfile Turn on the swapfile sudo nano /etc/fstab Open fstab and add the line ... |_ /swapfile swap swap defaults 0 0 Wifi ---- sudo nano /etc/network/interfaces and write: auto wlan0 iface wlan0 inet dhcp wpa-ssid {ssid} wpa-psk {password} OR nmcli device wifi rescan Scan for available wifi networks nmcli device wifi list Show available wifi networks nmcli device wifi connect SSID-Name password wireless-password Connect wifi ip a Show ip ifconfig iwconfig Change Keyboard Layout ---------------------- sudo dpkg-reconfigure keyboard-configuration Set keyboard layout Add display resolution ---------------------- cvt 2560 1440 60 Select the display resolution you want # 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz Modeline "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync xrandr --newmode "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync Add resolution, everything after Modeline from cvt is copied after newmode xrandr --addmode HDMI-1 2560x1440_60.00 Add the new resolution to your display xrandr --newmode "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync && xrandr --addmode HDMI-1 2560x1440_60.00 Others ------ reset Clear terminal shift + page up Scroll up shift + page down Scroll down tab Autocomplete ctrl + c Quit for many programs date Show date/time cal Show calender Funny commands -------------- sl First need to install "sudo apt install sl", then try it out. It's great :) sl -alF cmatrix fortune/fortune-mod cowsay figlet toilet ponysay inxi cat /dev/urandom :(){ :|:& };: Endless loop (useful to test CPU maximized temperatures) Armbian ------- sudo armbianmonitor -m sudo armbian-config change cpu settings sudo nano /etc/default/cpufrequtils Made by NicoD
  25. For now there's one downloadable Armbian Buster image for the M4V2 from pask. Also the patch needed to prepare your own image : Yon build or download any other M4 image and apply the patch from pask For wifi use this patch from MartinAyotte Download both files Copy these to /lib/firmware/brcm/ Reboot. That's it. Official Armbian for M4V2 comming soon.