Search the Community

Showing results for tags 'tutorial'.

More search options

  • 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
    • Feature Requests
    • TV boxes
    • General chit chat
  • Bug tracker
    • Allwinner A20
    • Allwinner H2 & H3
    • Allwinner H5 & A64
    • Armada A388, A3700
    • Amlogic S905(x)
    • NXP (Freescale)
    • Rockchip 3288 & 3328
    • Other supported boards
  • Development
    • Allwinner H6
    • Rockchip 3399
    • Development

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 42 results

  1. Hello dear experts at Armbian well the mysql_connect_error-script is a great help: It returns a string description of the last connect error ( see more infos here: ). The mysqli_connect_error() function returns the error description from the last connection error, if there is any error-note. the return value are the following ones: a. A string that describes the error. b. an empty string if no error occurred. at least this goes for the Version: PHP 5, PHP 7 well - if we run the code below we can get the info bout the option to connect to the db. What if we run this as a mysql-test-script, and what if we will want to convert it to use mysqli? Can this be done by changing mysql _query($sql); to mysqli _query($sql); ? <?PHP // the test-script that we are running. $DB["dbName"] = "emails"; $DB["host"] = "localhost"; $DB["user"] = "root"; $DB["pass"] = ""; $link = mysql_connect($DB['host'], $DB['user'], $DB['pass']) or die("<center>Howdy - be aware; There a thing happenede - An Internal Error has Occured. Please report following error to the webmaster shot him a mail now.<br><br>".mysql_error()."'</center>"); mysql_select_db($DB['dbName']); // end header connection part // function from a functions file that I run a mysql query through in any page. function executeQuery($sql) { $result = mysql_query($sql); if (mysql_error()) { $error = '<BR><center><font size="+1" face="arial" color="red">An Internal Error has Occured.<BR> The error has been recorded for review</font></center><br>'; if ($_SESSION['auto_id'] == 1) { $sql_formatted = highlight_string(stripslashes($sql), true); $error .= '<b>The MySQL Syntax Used</b><br>' . $sql_formatted . '<br><br><b>The MySQL Error Returned</b><br>' . mysql_error(); } die($error); } return $result; } // example query ran on anypage of the site using executeQuery function $sql='SELECT auto_id FROM friend_reg_user WHERE auto_id=' .$info['auto_id']; $result_member=executequery($sql); if($line_member=mysql_fetch_array($result_member)){ extract($line_member); } else { header("location: index.php"); exit; } ?> If we do replace mysql_* with mysqli_* then we will have to bear in mind that a whole load of mysqli_* functions need the database link to be passed. E.g.: the following ones. mysql_query($query) becomes mysqli_query($link, $query) I.e., lots of checking required. on the other hand side: is it suffice if we replace every mysql_* function call with its equivalent mysqli_*, when we will use the procedural API (note: there is some code based on the MySQL API, which is a procedural one - at least afaik), To help with that, the The MySQLi Extension Function Summary-manual is definitely something that will prove helpful. We can do the following: we have the following options to do that: - mysql_connect will be replaced by mysqli_connect - mysql_error will be replaced by mysqli_error and/or mysqli_connect_error, depending on the context - mysql_query will be replaced by mysqli_query ,,,, and so on and so forth. Note: For some functions, we may need to check the parameters very very carefully: Maybe there are some differences here and there -- but not that many differences. Belive me. Both mysql and mysqli-codes are based on the same library ( the great and powerful libmysql ; at least for PHP-version <= 5.2) Usage - for instance: with mysql, we have to use the mysql_select_db once connected, to indicate on which database we want to do our queries mysqli, on the other side, allows us to specify that database name as the fourth parameter to mysqli_connect.
  2. 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/ 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 404 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
  3. Hello reader I will report here about my experience to watch Netflix as written in the title. To do so, I got a current LE image from @balbes150 (thank you). You may be asking the same question as I do (did), why using the image from balbes and not the official one from the download page ? It is actually quite simple, balbes integrates the latest Kernel for his LE builds. While on a x86 system the kernel isn't so interesting, it is on ARM systems, because a lot of the development happens 1 or 2 year later of the release of the SoC. I have asked him about the different versions he offers for Le Potato: All versions of libreElec (LE) use the common core of aarch64 (64 bits). There is only one 32-bit library (arm) for Netflix. Therefore, I am releasing two versions of LE. ARM version = core of aarch64 + the whole ARM system. aarch64 = core aarch64 + whole system aarch64, this version runs 20-30 % faster than ARM. By the way, it would be interesting to check if Netflix works on Armbian, it may be possible to run it in the environment aarch64 + 32 bit library. So I chose this image: LibreELEC-AMLGX.arm-9.1-devel-20190604084103-a41fdf1-lepotato After writing the image on the SDcard I had to walk through the basic configuration of LE (by the way no SSH - you must use a Display and Keyboard) you find more information here: YouTube A german screenshot film, that guides you through the process of installing the Netflix addon from libdev + jojo + asciidisco Netflix addons; the Kodinerds repository is already part of LE, that saves you some time, update this first. The update and install of the Netflix addon (libdev + jojo + asciidisco), which has some dependencies, is tricky. I had repeated this process several times and a reboot once, because it would only install a few, but not all of the 9 dependencies at once. After 4 or 5 times it confirmed: installed. Now, keep following the YouTube film mentioned above. Adding your credtials to get access to Netflix. WideVine for digital rights mgmnt (DRM), is extracted from ChromeOS - this will download 2Gb Load on the hardware Press the "O" key on the keyboard when playing the video and the service information about the video will be displayed on the screen. It is Software-Decoding for Netflix. 2 cores were running at around 50% and 2 cores were idle (1280 x 720). Testing it on my TV it switched to FullHD at which point it got useless audio and picture were no longer insync. SSH (Secure Shell) During configuration you will see the SSH menu item. You can turn on SSH and you should then change the password!! However, reading the Wiki I got the feeling that this implementation is a bit weird... that said, I would turn it of if you don't need it. WiFi For to me unkown reason the binaries for the USB-WiFi Sticks were removed in 2017: , luckily it is easy to add the driver. cd /storage/.config/ and here you do: mkdir -p firmware and now cd firmware/ unplug your USB-WiFi Stick, plug it in again and do: dmesg | tail -7 you can now see your stick and which binary is missing. Search the binary on this website and complete the line with your binary link: wget reboot no APT There is no working 'apt-get'. TIP: use XBMC's addon browser to enhance your LibreELEC system to be continued
  4. Hello All After a lot of hours and sleepless nights I was able to get this 5" LCD to work with the BPI-M64 module. 1. Correct resolution setup + environment. A. In /Boot/armbianEnv.txt set the following: Make sure to enter overlays= spi-add-cs1 spi-spidev (this is for the touch panel to work) B. for 180 rotation: extraargs=fbcon=rotate:2 drm_kms_helper.edid_firmware=HDMI-A-1:edid/800x480.bin video=HDMI-A-1:800x480-24@60 No rotation: extraargs= drm_kms_helper.edid_firmware=HDMI-A-1:edid/800x480.bin video=HDMI-A-1:800x480-24@60 C. this info came from: by the way if you dont want to see the console messages during boot you can add this to the armbianEnv.txt: console=serial D. Save and close. E. Create a directory where the .desktop file will be contained: sudo mkdir -p /etc/xdg/autostart F. Create the .desktop file and make it executable: Let's call this file custom-screen-resolution.desktop: sudo nano /etc/xdg/autostart/custom-screen-resolution.desktop The content of the file custom-screen-resolution.desktop should look as: [Desktop Entry] Name=Custom Screen Resolution Exec=sh -c 'xrandr --newmode "800x480_60.00" 29.50 800 824 896 992 480 483 493 500 -hsync +vsync; xrandr --addmode HDMI-1 800x480_60.00; xrandr --output HDMI-1 --mode 800x480_60.00' Terminal=false Type=Application Categories=Application G. reboot H. After O/S is loaded go to settings => display and you be able to select the 800x480 resolution. 2. With the Touch Panel I lost some hair on my head since there were many issues to overcome. A. I had to solder the LCD TP_IRQ Pin (22) to unused Pin (13) since Pin 22 on the BPI-M64 didnt support GPIO to IRQ... and diving into the sources took a lot of time to figure out why, so the easiest way is to change the Pin. (please have a look at the attached picture. B. Also there were wrong settings in the sun50i-a64-spi-add-cs1.dtbo overly, it seems that CS1 were going to the wrong Pin ( not as the BPI_M64 page shows, it should have been going to Pin 26 - PC2 but in the overlay it did go to Pin 35- PB6) I really dont know why so I had to change the DTS file to: /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-a64"; fragment@0 { target = <&pio>; __overlay__ { spi0_cs1: spi0_cs1 { pins = "PD0"; function = "gpio_out"; output-high; }; spi1_cs1: spi1_cs1 { pins = "PC2"; function = "gpio_out"; output-high; }; }; }; fragment@1 { target = <&spi0>; __overlay__ { pinctrl-names = "default", "default"; pinctrl-1 = <&spi0_cs1>; cs-gpios = <0>, <&pio 3 0 0>; /* PD0 */ }; }; fragment@2 { target = <&spi1>; __overlay__ { pinctrl-names = "default", "default"; pinctrl-1 = <&spi1_cs1>; cs-gpios = <0>, <&pio 2 2 0>; /* PC2 */ }; }; }; The sun50i-a64-spi-add-cs1.dts & the sun50i-a64-spi-add-cs1.dtbo are also attached. Just replace the sun50i-a64-spi-add-cs1.dtbo located at /boot/dtb/allwinner/overlay with file that I have attached here. C. The next settings I have found at post here I just copy and paste so you will have all the info in one page: D) Download ads7846? touch driver (compatible with xpt2046) mkdir ds7846 cd ds7846 wget mv ads7846.c?format=raw ads7846.c E) Create a makefile (Take note that it is TABS instead of spaces before the $(MAKE)) nano Makefile Insert the below in without the ----- -------------------------------- obj-m := ads7846.o KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) all: $(MAKE) -C $(KDIR) M=$(PWD) modules clean: $(MAKE) -C $(KDIR) M=$(PWD) clean install: $(MAKE) -C $(KDIR) M=$(PWD) modules_install -------------------------------- F) Exit nano and run the following cd /usr/src/linux-headers-4.19.38-sunxi64 make scripts make modules_prepare sudo make sudo make install sudo depmod G) Download and compile and install ads7846_device cd .. git clone cd fbtft_tools/ads7846_device make sudo make install sudo depmod H) Load ads7846 and ads7846_device on boot sudo nano /etc/modules-load.d/ads7846.conf ads7846 ads7846_device I) Load ads7846_device options nano /etc/modprobe.d/ads7846_device.conf options ads7846_device model=7846 cs=1 gpio_pendown=234 keep_vref_on=1 swap_xy=0 pressure_max=255 x_plate_ohms=150 x_min=3900 x_max=200 y_min=3900 y_max=200 busnum=1 Note: GPIO_PENDOWN relate to the GPIO of the actual Pin number 13, With my board it is 234, If you are using other module (not BPI_M64) it could be other number, check with your module documents or do "gpio printall" in your board to see the correct Pin number. Since I use the screen in inverted mode those settings fits my needs. if you will use it in normal mode you might have to switch those parameters : swap_xy=0 or 1 x_min=3900 x_max=200 y_min=3900 y_max=200 or x_min=200 x_max=3900y_min=200 y_max=3900 I didnt really need it but you can install sudo apt-get install xinput-calibrator for fine tunning. (follow the instructions) I hope that I didnt forget anything. By the way the kernel I use is: 4.19.38-sunxi64 sun50i-a64-spi-add-cs1.dtbo sun50i-a64-spi-add-cs1.dts
  5. For enabling - to use stockfish/armfish-chess-engine - as a TCP service we need to configure (add the lines at the end of the file) /etc/inetd.conf #:OTHER: Other services stockfish08 stream tcp nowait guido /usr/games/stockfish stockfish10 stream tcp nowait guido /usr/games/stockfish_10_64 armfish stream tcp nowait guido /usr/games/armfish_aarch64 and add the TCP-Port - we want to use - to the /etc/services (for optical reasons after pop3s port 995/tcp) pop3s 995/tcp # POP-3 over SSL # # stockfish08 1024/tcp # stockfish 8 chess engine stockfish10 1025/tcp # stockfish 10 chess engine armfish 1026/tcp # armfish chess engine at the end we have to restart inetd (or reboot) systemctl restart inetd Additional (important?) informations: - guido is a local user on my system - you need to change the name for the /etc/inetd.conf to a local user of your system - /usr/games/stockfish is the stockfish-binary installes by apt install stockfish - the stockfish-binary we compiled for stockfish v10 64Bit in another thread from ./Stockfish-master/src/stockfish (directory of the cloned github-repository) to /usr/games/stockfish_10_64 - /usr/games/armfish_aarch64 is the (on a 64Bit PC-Linux compiled with fasmg) assembler-version of stockfish which could run twice as fast see precompiled aarch64-binary as attachment (think about the chmod 755 armfish_aarch64 after the transfer ) Binary-Overview in /usr/games/ root@t95k-pro( ls -l insgesamt 644 -rwxr-xr-x 1 root root 128050 Mär 14 22:08 armfish_aarch64 -rwxr-xr-x 1 root root 216216 Nov 12 2016 stockfish -rwxr-xr-x 1 root root 308896 Mär 14 13:57 stockfish_10_64 armfish_aarch64
  6. This weekend I was revising and testing the OV5640 for some A64 boards. To enable the Camera (OV5640) on NanoPi A64 for the mainline kernel you have to update the following: * DT * GPIO-I2C Here is the excerpt : Kernel config: CONFIG_I2C_GPIO=m CONFIG_VIDEO_OV5640=m CONFIG_VIDEO_SUN6I_CSI=m
  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. I need a suggestion for a samba server (guess that is what it is called). I have an 8 TB external powered HD, and need a device that I can attach it to, so I can "see" it on the network. I had it attached to the USB 3 port on my Asus router, but it had issues, because the router did not support the 8 TB HD. I now have it connected to one of my microPCs (Tronsmart Ara X5) USB 3 ports, but I am only gettting a max of 12 MBs speed. I would like an inexpensive board that will support that drive and is easy to set up as a samba server..... thanks.
  9. Full root filesystem encryption on an Armbian/Orange Pi PC 2 system MMGen ( 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 the latest Armbian image for the Orange Pi PC 2 $ mkdir ~/opi-build; cd ~/opi-build # For a server image: $ curl -L -O # For a desktop image: $ curl -L -O # Consult the download directory for changes, as well as torrent files: $ Unpack (if the 7zr command is missing on your system, first install the 'p7zip' package): $ 7zr x Ubuntu_*.7z Check the PGP signature and integrity of the image (optional): $ gpg --keyserver --recv-key 9F0E78D5 $ gpg --verify *.img.asc Or, alternatively, just check its integrity with a checksum: $ sha256sum -c sha256sum.sha Now you're ready to copy Armbian to the SD card or cards. If you have two blank 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=4096 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 +100M beginning at sector 4096. 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 4096 208895 204800 100M 83 Linux /dev/sdY2 208896 31422463 31213568 14.9G 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' 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 luksFormat /dev/sdY2 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 dropbear-initramfs 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!
  10. Mini tutorial I am putting here some notes for posterity In the current version of armbian (testing H6) I use X11 / Xorg only reaches 1024x768, but my display reaches 1440x900. To add this new resolution to the list of Settings/Display you have to give these commands: # xrandr --listmonitors (this command serves to see what it's called, the hdmi output) # cvt 1440 900 (output: # 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync ) # xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync # xrandr --addmode HDMI-1 1440x900_60.00 # xrandr --output HDMI-1 --mode 1440x900_60.00 If it works then modify Xorg with: # sudo mcedit /etc/X11/xorg.conf.d/40-monitor.conf Section "Monitor" Identifier "HDMI-1" Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync Option "PreferredMode" "1440x900" EndSection # reboot
  11. Hi all. I've made a new video about x11vnc. With this you can control your Linux desktop from any other PC/SBC. It even works for videos and games. Only there's no sound. Here's my video, To Install sudo apt install x11vnc To create a password file x11vnc -storepasswd The service script : /lib/systemd/system/x11vnc.service [Unit] Description="x11vnc" Requires=display-manager.service After=lightdm.service [Service] ExecStart=/usr/bin/x11vnc -auth guess -loop -forever -safer -shared -ultrafilexfer -bg -o /var/log/x11vnc.log ExecStop=/usr/bin/killall x11vnc [Install] Enable the service script sudo systemctl daemon-reload sudo systemctl enable x11vnc sudo systemctl start x11vnc greetings. NicoD
  12. hello dear all, I've been using the lm-sensors tool for years now - first time in Ubuntu and now i want to use it in Manjaro - my actually fav system LM-Sensors - it does a lot: It monitors CPU temperature, the fan speeds, and - additionally - also the motherboard voltages that could be measured. After using it for some time in Ubuntu - my previous fav-linux.i now want to use some advanced uses of lm-sensors - i have heard that we can use it in combination with some graphical interfaces to interact with it. first i have to do the Installation: step one: Install lm-sensors, then run it with no options to see what it does: $ sensors coretemp-isa-0000 Adapter: ISA adapter Physical id 0: +47.0°C (high = +90.0°C, crit = +120.0°C) Core 0: +45.0°C (high = +90.0°C, crit = +120.0°C) Core 1: +47.0°C (high = +90.0°C, crit = +120.0°C) Core 2: +44.0°C (high = +90.0°C, crit = +120.0°C) Core 3: +46.0°C (high = +90.0°C, crit = +120.0°C) This is on an Ubuntu PC. My Manjaro system installs it a bit different i think - and afterwards i have to take care for the configuration, on older systems - (note 10 years ago i used Ubuntu) i have followed another setup: then i go ahead: Run sensors-detect to set it up to detect the sensors and the temp of the CPU. in the past i have learned that the safest method and way to do a setup and basic configuration of lm-sensors is to accept all of the defaults by: $ sudo sensors-detect # sensors-detect revision xyz (2019-01-30 12:00:33 +0200) and.... after getting the first scan - we can the setup in modify /etc/modules: but how to go ahead now.... how to combine it the get the advanced features - and graphical output!?
  13. I made a hardware setup guide for the Pine64 Clusterboard. It's over on their forums: Long and short is that it's a $99 motherboard that can accommodate 7x $30 compute modules.
  14. Is OPI ONE a toy or a toy ? Yes and yes and a fun one too ! The following experiment shows the OPI ONE in use as a Virtual Desktop Server AND Virtual Desktop Client. Setup as Virtual Desktop Server ( remotely access headless OPI ONE desktop ) OPI ONE : install xrdp and tightvncserver <clients> : install and configure remote desktop ( rdesktop on linux, aRDP on android - not yet tested on OS-X or WIN ) Setup as Virtual Desktop Client ( OPI ONE securely accesses a remote linux desktop ) OPI ONE : install x2goclient <server> : install x2goserver on linux server ( physical or virtual ) of choice This document explains the experiment ( you have to click/enlarge pictures in your browser .. sorry ) And here is a screenshot of the actual session : Red : Linux server desktop connecting to OPI ONE via rdesktop / xrdp Orange : OPI ONE desktop connecting to UK virtual server via x2goclient/x2goserver Purple : virtual server (UK) desktop running libreoffice White : actual document being edited ( incl. drawings ! ) in window ( Headline : Italian guy in Switzerland abuses OPI ONE to edit nerd stuff in the UK ) Remote desktop access from smartphone ( cheap Wiko Lenny 2 ) for touch-fumbling nano-fingers Remote desktop access from tablet ( Galaxy Note 8.0 ) using pen There are numerous use cases covered with the simple techniques employed.Thanks to the Armbian team and the forum buddies for their excellent job in making OPI ONE usable. Have fun !
  15. It's *amazing* what you can find reading the Armbian documentation! I dig the shell, even old-school in a virtual terminal or minimal server type setup. Normally that means going through some squinty-eyed hoops to get the Terminus console font installed with larger sizes in the first place on large monitors. Wait - what's this? sudo dpkg-reconfigure console-setup I did this in a virtual terminal, and allowed setup to pick the right character set for me. Then I blasted the framebuffer with the largest Terminus font size allowed. Perfection! Not a big deal to most, but having this be part of the standard distribution image made my day. Soooo easy. thanks!
  16. You may have seen discussions around the forum regarding work being done by @adafruit using circuit python with Armbian, but I wanted to make sure this nice write-up had proper visibility.
  17. Normally you could install (if you use a 64Bit arm-system/OS) the 64Bit version of stockfish with apt install stockfish stockfish is a uci-chess-engine where some Chessboard-Display-Apps can conenct to (later I would show how to use this with TCP) Then you will get (at this time) the Version 8 64Bit = 8 64 = 11/2016 But the actual stockfish-engine is at Version 10 = 12/2018 ( see ) So I did clone the git-master at as .zip After unzipping and cd to ./Stockfish-master/src you could do -make clean -make help BUT there is for arm only a ARCH=armv7 (32Bit) option When using the ARCH=general-64 option make build ARCH=general64 COMP=gcc COMPCXX=g++ then the start of the compile did fail because g++ says that he didnt knows the -m64 commandline-option I searched the Web and found there no solution So I did take a look into the Makefile and first I didnt found anything about -m64, but then I discoverd in the gcc-options the follwing part which I then deleted: else CXXFLAGS += -m$(bits) LDFLAGS += -m$(bits) endif after that I did create a aarch64-ARCH-section under the armv7-ARCH-section: ifeq ($(ARCH),aarch64) arch = any prefetch = yes bits = 64 endif arch = any is copied from the "general-64" section, prefetch is copied from the "armv7"-section and maybe the "bits = 64" is obsolete? Now we can compile - there are two options: dpkg -l|grep 'g++' ii g++ 4:6.3.0-4 arm64 GNU C++ compiler ii g++-6 6.3.0-18+deb9u1 arm64 GNU C++ compiler make build ARCH=aarch64 COMP=gcc COMPCXX=g++ make build ARCH=aarch64 COMP=gcc COMPCXX=g++-6 When the compile has completed you will have the executeable stockfish in your ./Stockfish-master/src directory. see stockfish_10_64 as attached binary at the end of this thread-message When started you will see: Stockfish 140319 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott Enter uci and you will see the stockfish-info: id name Stockfish 140319 64 id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott option name Debug Log File type string default option name Contempt type spin default 24 min -100 max 100 option name Analysis Contempt type combo default Both var Off var White var Black var Both option name Threads type spin default 1 min 1 max 512 option name Hash type spin default 16 min 1 max 131072 option name Clear Hash type button option name Ponder type check default false option name MultiPV type spin default 1 min 1 max 500 option name Skill Level type spin default 20 min 0 max 20 option name Move Overhead type spin default 30 min 0 max 5000 option name Minimum Thinking Time type spin default 20 min 0 max 5000 option name Slow Mover type spin default 84 min 10 max 1000 option name nodestime type spin default 0 min 0 max 10000 option name UCI_Chess960 type check default false option name UCI_AnalyseMode type check default false option name SyzygyPath type string default <empty> option name SyzygyProbeDepth type spin default 1 min 1 max 100 option name Syzygy50MoveRule type check default true option name SyzygyProbeLimit type spin default 7 min 0 max 7 uciok You could leave the stockfish chess-engine with quit I will add (these days) a tutorial for setting up stockfish as TCP-Service (via inetd) and then we could connect via Windows/Android/Linux ChessBoard-Display-Apps to play with the stockfish engine on your 64Bit ARM-System Preview-Information-Links for setting up , connecting and playing with the engine: stockfish_10_64
  18. Orange Pi Zero NTP Stratum 1 PPS GPS Server with Armbian OS. Link to the Tutorial - 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 - Tutorial PDF ntp-stratum1.pdf If you spot any typo's or errors please let me know.
  19. For those of you who're interested in running a CMS on Armbian I've a small tutorial how to get django CMS working. If you're not interested in the 'story' just want a step by step installation guide, scroll to the end of this post, there you find it. Story: Following their installation guide it fails during creation of a django project with 'djangocms -f -p . mysite'. The error looks something like: After a brief google search I found that other also had similar problems. It seemed that pillow is the problem while the whole installation failed. Unfortunately pip pillow also failed, and this one helped me to install pillow. After installation of libpq-dev python-dev libjpeg8-dev, pillow could be installed without any issues and 'djangocms -f -p . mysite' too. Starting the CMS with 'python runserver' worked too but unfortunately wasn't accessible over local network (since all of my armbian devices are running headless, I need access over network to the CMS). Inspired by a next google result, I found out that I should run the CMS on the SBCs network IP not on localhost by using 'python runserver'. Which led in a next error. ... DisallowedHost: Invalid HTTP_HOST header: '192.168.x.xx:8000'. You may need to add u'192.168.x.xx' to ALLOWED_HOSTS. Some housekeeping in the and restart of the CMS led than to a working system. # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ['192.168.x:xx'] Lessons learned: Even if you're not a dev and your background is limited, it is possible to get something like this CMS to work if you're able to use google. By reading through google results and have a look on the output errors during installation you learn much more about your project/SBC than just following the step by step procedure I'll show at the end of this post. The 'tarzan approach' - Tarzan/me swings from tree/error to tree/error holding on to elastic lianas/error logs works but it makes sense to repeat this installation after get a straight forward approach for the next time you'll use it. Step by step procedure: Installing package dependencies sudo apt-get install libpq-dev python-dev virtualenv libjpeg8-dev Make your virtualenv folder for all your CMS projects (since django cms is capable to run multiple cms at once it might make sense to have a 'parent folder' where all of them are placed): mkdir CMS --> cd CMS Create and activate a virtual env: virtualenv env --> source env/bin/activate Update pip: pip install --upgrade pip Use the django CMS installer: pip install djangocms-installer Create a new directory to work in: mkdir tutorial-project --> cd tutorial-project Run it to create a new Django project: djangocms -f -p . mysite Setup for access via LAN: nano mysite/ --> ALLOWED_HOSTS = ['192.168.x:xx'] (IP of yor SBC) Start up the runserver: python runserver 192.168.x.xx:8000 Your CMS will be accessible via browser on your SBCs IP port 8000. Tested on: OPi 0: ARMBIAN 5.31 stable Ubuntu 16.04.2 LTS 3.4.113-sun8i Odroid HC1: ARMBIAN 5.33 user-built Debian GNU/Linux 8 (jessie) 4.9.46-odroidxu4
  20. I like it to anounce some messages/informations via TTS ( T(text)T(o)(S)peech) . Normally I use espeak with a litte better sounding mbrola-voice (No. 6 german). But on Android you could buy - for cheap againt the PC-version - some better voices. Like my favourite german Voice "Julia" from Acapela. So I always wanted to use this voice for the informations. I did found a "server"-app for android which takes a UDP/HTTP-request to play a given string via the default TTS on the android-device (or a .MP3 stored in the memory of the android-device). Its named Home24-MediaPlayer - and can be found at (isnt anymore in the Google PlayStore for me - only the Home24-App for Smartphone or Tablet): You could give the android-device the request via HTTP or UDP from your armbian-commandline or shell-script: # HTTP samples curl'This is a Test' 1>/dev/null 2>/dev/null wget'This is a Test' 1>/dev/null 2>/dev/null wget 1>/dev/null 2>/dev/null # UDP samples echo 'tts=This is a Test'|nc -w 0 -u 50002 echo 'track=MySong.mp3'|nc -w 0 -u 50002 The Message could combine many commands in one line (also in HTTP/UDP): track=Alarm.mp3|tts=Alarm|sms=0150123456&message=Alarm see also the Wiki for the Home24-MediaPlayer: On my Smartphone it also does work, but when the screen and the device goes to sleep it wouldnt work anymore. So I did think about a device without a battery and did try a Orange Pi PC (H3) with H3Droid, but this was too slow for me - because the OPi PC always did work on the SD-Card (dont know if my card was too slow). I was hoping getting a better performance with the OPi PC because of the 1GB of Ram. [EDIT] ========================================================================= It was the card After the Minix NEO X5 - which did work without problems. I did gave the OPi PC a second chance with a brandnew 32GB Sandisk EVO. With this new card the access is now MUCH snappier I installed Acaplea's Julia and the Home24-MediaPlayer and its sounds - for me - a little bit better than the Minix NEO 5. PS: old card seems to be a Fake-SONY Class 10 card (or very old and used) ========================================================================= Now I will try a "old" Android-TVBox: Mini NEO X5 ( Dual Core RK3066 Cortex A9 1.6GHz , 1GB Ram / 16GB Flash). Does any one know another Android-App with a function like this?
  21. I stopped tinkering for a while but perked my interest and been grinning at such a simple project and generally think its really great. I think they have made some odd options as the server and electron browser have been lumped together which is a really strange choice for absolutely no advantage. The server does need restarts and would seem far more often than you would expect and the use of electron means armv7l only which is a shame for the 0/1 owners. You can install using chromium and you certainly don't need the load of a desktop?! Dunno been wondering. I wanted to use a zero as love that tiny footprint and price and there are loads tutorials out there that seem to have much more than necessary and electron is chromium in a java wrapper with reduced architecture offerings so why no support? But hey. Not that bothered about that but why the have made the server and browser monolithic as a server restart now causes a cool device to display a desktop and even why desktop on a mirror has me scratching my head. if anything it will present a different take on the install as for some reason they depart from vanilla and I actually think it works better. Shame there isn't a Banana pi zero image or is there as loving that form factor. I do know it gets hot as hell but just tinkering by a tiny mind with tiny boards. PS if there is something near working give us a shout with Armbian and BPIZ
  22. Not much of a tutorial, but it is something that often needs some googling and head scratching. This is how I got my particular modem working, your mileage may vary. Step 1) Get a modem that will work. I got a Huawei E397u LTE/UMTS/GSM modem. It's Cricket branded, but I'm on Google Fi, it will work with my data SIM. Step 2) Plug it in and see that it doesn't work. Step 3a) apt update Step 3b) apt upgrade Step 4) Install usb-modeswitcher Step 4, optional part 2) install modem-manager, modem-manager-gui (for general playing around) Step 5) unplug/replug the USB modem, see that it should magically have a different VID:PID when you type lsusb. You should also have some ttyUSB's, and you can check out modem details in the modem-manager-gui Step 6) set up network connection via the network dropdown at the top right of the desktop. You will need APN information for your carrier. I put in modem-manager so I could debug. It will cause issues if you do certain things with it while connected. My modem was $15, Ebay has them. So does amazon.
  23. 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
  24. Orange Pi One PCB is designed to easy add almost all removed features from Orange Pi PC. Currently only RAM expansion is unprofitable. To add 2 removed USB ports just solder wires to solder points as shown below on the photo: Data lines for USB #3: points 1,2 Data lines for USB #2: points 3,4 Power can be taken directly from GPIO header or DC socket. OPiOne has no separate voltage regulators for USB ports like previous boards used to have. This way I want to solder mini WiFi dongle (after removing the case and USB port) directly to the PCB.