Jump to content

koakh

Members
  • Posts

    45
  • Joined

  • Last visited

Reputation Activity

  1. Like
    koakh reacted to erew in Installation Guide and your questions answered for TV Boxes   
    Since I originally wrote this post Ive re-written bits and included quick videos to guide you through the steps (My original post is still below).
     
    As Im writing other posts on other topics related to Armbian, but not relevant to install/setup, Im keeping them all on my new site, so all my updates will be on there. Id welcome any feedback (drop me a comment on here or on https://www.OnDROID.net). Also, if anyone has any specific topics they want me to take a look at, let me know. 
     
    As always, thanks to balbes150 for his work getting Armbian on ARM boxes.
     
    Index of Articles https://www.ondroid.net/armbian-os/
    Youtube playlist for the videos https://www.youtube.com/watch?v=jjEdM2nEElw&list=PLNYK1P0CVRKsCqkQsMHEJeL1aWRbPYINk 
    (The videos are quite quick, but are designed to go with the articles below) 
      Requirements https://www.ondroid.net/armbian-os-requirements/
    - Hardware you need
    - Software/Downloads Installation https://www.ondroid.net/armbian-os-installation/ 
    - Steps to image your SD Card/USB stick from a Windows PC
    - First boot setup
    - Updating the system, changing hostname and RDP setup
    - Includes 2 x videos showing the whole process and the extra optional steps Troubleshooting Amlogic Boot https://www.ondroid.net/armbian-os-troubleshootingboot/
    - What to do if your system wont even boot at all
    - Includes 1 x video showing the whole process uEnv.ini and extlinux.conf configuration https://www.ondroid.net/armbian-os-uenv-ini-and-extlinux-conf/
    - Editing the files and picking the right DTB.
    - What do these 2 files do and why cant I boot off emmc internal ram?
    - What should the files look like? Installing to emmc https://www.ondroid.net/armbian-os-installing-to-emmc/
    - Performing the install
    - What files/folder and other issues can cause problems with booting off emmc Bricked device recovery https://www.ondroid.net/armbian-os-bricked-device-recovery/
    - How to figure whats happened when your device no longer boots
    - How to recover your device back to factory/working condition Using Clonezilla to make a compressed backup of your TF card/USB stick - https://www.ondroid.net/armbian-os-backing-up-an-sd-card-usb-stick/
    - How to create a bootable Clonezilla USB
    - How to make a small file sized backup using Clonezilla
    - How to restore using Clonezilla
    - Includes 1 x video showing the whole process Making a Backup of your emmc via the GUI https://www.ondroid.net/armbian-os-backing-up-emmc-nand-via-gui/
    - What you will need
    - All the commands/screens to perform this
    - Includes 1 x video showing the whole process Making a Backup of your emmc via Command line https://www.ondroid.net/armbian-os-backing-up-emmc-nand-via-cli/
    - What you will need
    - All the commands/screens to perform this
    - Includes 1 x video showing the whole process Remote access/administration SSH, RDP and Webmin https://www.ondroid.net/armbian-os-remote-management-access/
    - Not Armbian specific, however very handy for those who want simple remote access or administration of their systems.
    - SSH - Setup/Use (Remote control via a command line)
    - RDP - Setup/Use (Remote control direct to the desktop of Armbian)
    - Webmin Setup/Use (Webpage based administration, setup, configuration, diagnostics, terminal access, backups, settings for just about everything etc etc etc)  
    Ive not yet written anything on fully troubleshooting a linux/armbian system that was working but now fails to boot (TS card damaged/power cut or something like that happened), though these things do happen from time to time. If you are performing a lot of configuration, it took you a long time to setup your system or you want to make a major change to your system, I highly recommend taking a look at the backup videos/instructions Ive done. 
     
    OnDROID is a new thing for me... and Armbian OS install is my first topic/guide on there, so if anyone wants to give me feedback or support you're welcome to drop me a message on here or OnDROID. 
     
    Thanks
     
    erew
    https://www.ondroid.net
    ________________________________________________________________________________________________________________________________________________________________________________
     
     
    Its based on setting up the Armbian that balbes150 created (Thanks @balbes150) and all the things I picked up/learned along the way/had to hunt around the forums to try understand. 
     
    I use Amlogic based systems (905, 912 etc etc).... I assume things are pretty similar for Rockchip etc, but if anyone wants to post other useful information in this post!
     
    Contents of this post:
     
    Contents of this post Intro

    Example of setting up a system Example Setup on a MeCool M8S PRO w (Change your DTB file in uEnv.ini and extlinux.conf for other boxes).
    - Hardware you need
    - Software/Downloads Setting it up
    - Steps to image your SD Card/USB stick from a Windows PC
    - Installing onto the MeCool M8S PRO w (Or any other box assuming youve changed the DTB) Congratulations - If you reach here you will have a working Armbian server.

    Booting Problems and getting your system to boot Booting off SD/USB problems. uEnv.ini and extlinux.conf (Required for booting Armbian)
    - Editing the files and picking the right DTB.
    - What do these 2 files do and why cant I boot off emmc internal ram?
    - What should the files look like? Installing onto emmc/NAND - The internal hard drive of the TV box. LOST.DIR, System Volume Information and Android folders cause problems booting off eMMC/NAND.

    What to do if you brick your device. Ive done something and now my box wont boot/stuck on a splash screen/is a brick what do I do?
    - Getting the system recovered - notes
    - Doing the recovery
      Intro
    I had written a previous article just over 1 year ago and things have moved on and its now far simpler/more efficient to do this… between 20 to 40 minutes depending on your speed. To get a basic working Armbian server, you only need to follow this guide. The example setup is for a MeCool M8S PRO w (4x cores, 2GB ram), though the procedure and information in here is relevant for all TV boxes.
     
    To be clear, on the MeCool M8S PRO w, you have to plug it in via a network cable and run the OS off an SD card or USB stick. The Bluetooth and WiFi dont (at this moment) work. So, if that is a limitation for you, either keep an eye on the Armbian forum looking for later OS builds that may work, or on there you can also find other Android TV boxes that will work. (side note, I think there are 2 revisions of the MeCool M8S Pro w.. one you can install to emmc/NAND and one you cant).
     
    Example Setup on a MeCool M8S PRO w

    Hardware you will need:
     
    MeCool M8S Pro W (or box of your choice…after researching which ones work). A Windows PC/Laptop. A micro SD card OR USB memory sick (16GB or larger recommended)  A way to plug that SD card into your Windows computer to image the Armbian OS onto it. A Cat 5 LAN cable to plug it into your Router/Switch/Network port.  
    NOTE - It looks like you will only see the option to install Armbian to eMMc memory, within Armbian Config, if you are running from an SD Card, NOT a USB stick. (As mentioned, you cannot do this with this MeCool M8S PRO w anyway, but you can with other boxes like the Beelink GT1 Mini).
     
    As an additional note, if you want to UPS protect your device from power outages etc, most (Im not claiming all) of these Android TV boxes (and I assume maybe Pi’s but Ive never tested so research that before you try it) support being powered from the USB ports (and the main power socket simultaneously too if you like). The RAVPOWER RP-PB078 is a battery pack for charging USB devices like phones etc. Its special trick, is that it is like an online UPS style device, meaning it can be both charging and powering your device at the same time. So, if the power cuts out, it will keep powering your device through the USB port (or you can buy a USB to 5v adapter cable if you like and use the main power port). I dont know how long for sure, but my rough estimation is this will give you about 5 to 9 hours run-time on the battery pack without any problems, plenty for small power outages.
     
    Software/Downloads:
     
    Armbain from here https://yadi.sk/d/pHxaRAs-tZiei (Armbian_5.88_Aml-s905_Ubuntu_bionic_default_5.1.0_desktop_20190611) (Later builds should work fine!!)
      Win32DiskImager from here  https://sourceforge.net/projects/win32diskimager/  
    Setting it up
     
    Steps to image your SD Card/USB stick from a Windows PC:
     
    Download the above files. Unzip/Extract with Armbain image file (Use WinRAR or 7Zip). Install Win32DiskImager . Insert your micro SD card or USB Stick into your PC. Run Win32DiskImager as an Administrator. In Win32DiskImager , click the folder Icon and select your Armbian Image file. Check the Device field is pointing at your SD card/USB stick you just inserted and click the Write button. Wait about 5 minutes while the SD card/USB is imaged. (takes about 2 minutes at USB3 speed)  
           
     
     
    The MeCool M8S PRO w and other Amlogic boards are often set to boot from external media first, however there is a simple process I will add at the bottom of this document to show you how to change the boot order if needed. The fix (as far as I know) only works on Amlogic based chipsets 905, 912, 922 etc. If you use a system based on Rockchip or something else, you will need to research the Armbian forums, which I would do ahead of time anyway if you decide to use an alternate TV Box.
     
    For different Android TV boxes (other than the MeCool M8S PRO w), you may need to edit the uEnv.ini and extlinux.conf file on the SD card/USB stick, to choose a different DTB file. The DTB files are effectively for choosing what hardware drivers are needed when loading the OS and different Android TV boxes will have different chipsets e.g 905, 905X2, 912, RK3399 etc. I would suggest using Notepad++ for editing this file on a Windows computer, as the file is in UNIX file format, so much easier to read with Notepad++. I will add a short explanation of uEnv.ini and extlinux.conf at the bottom of this document (though they dont need changing with the above Armbian image, when used on the MeCool M8S PRO w.
     
    Installing onto the MeCool M8S PRO w (Or any other box assuming youve changed the DTB)
     
    Place the SD card or into your MeCool box’s SD card slot, plug in a monitor, network cable to your switch/router, keyboard and mouse and then the power. Your Armbian box should now boot and will prompt you at a text command prompt to type in the Username and Password (default are root and 1234) . After this is done, it will ask you once again to type in the root password 1234 and change the root password to something else more secure. You will now be asked to create a user account, other than the root account. I created a user called openhab with a password. For the “Name” I called it openhab , ignore the other questions, leaving them blank and when asked if this is correct, say Y and press enter. (You will see references in here a user openhab, this is just the account I created. You can use any name you like)

               NOTE - if it doesnt boot to Armbian and you have the box I suggest, or an Amlogic based chipset, read the note at the bottom of this document.
      The box will now load the GUI, asking you for the password of the user account you created . Log in and you will now be at the Armbian desktop.


      From here, we want to open the Application menu at the top left > Settings > Armbian Config. Type in your password when prompted.


      In the config system that opens up, we are going to perform a few tasks pretty quickly. Setup our system keyboard locale, change the name of this computer on the network, setup SAMBA file sharing, setup Microsoft RDP for remote control access to the system.

    NOTE - On this build of Armbian with this MeCool box, Ive had a situation where it sometimes doesnt like detecting my monitor correctly when it boots, at the point it switches from the text boot to the GUI interface, meaning, you can get a black screen. So ensure RDP is enabled on your 1st boot, then you can always RDP from a windows machine to get to the GUI desktop OR, boot it with no monitor attached and after about 5 minutes, you can plug the monitor in and it usually works… As I say, only on THIS build of Armbian and THIS MeCool box, hence setting up RDP.

    You can use the keyboard cursor keys, TAB key to move around each screen and Escape will move you back a screen.


      With your cursor keys, go down to the Personal menu, select Timezone and choose your region. then back and select Keyboard and select your correct keyboard layout.


      Still on the Personal menu select Hostname. This allows you to change the name of the computer to whatever you want to call it on your network (Default is aml). After this, go back to the main Armbian Config main menu. Back at the main menu, select Software and scroll down to RDP - Enable remote desktop from windows and select it. (THIS IS OPTIONAL) This will allow you to use Remote Desktop (mstsc) to this computer ON your LOCAL network from a Windows computer by connecting to the server’s network name or local network IP address. It will not be internet accessible via RDP unless you create a rule in your router/firewall for port 3389 to point to your server, which, please research security concerns if you want to go down the route of allowing the internet to RDP your server. Exit back out of Armbian config and............
                

            (Yes, I know my screen grab says disable, I had already installed RDP)
     
    CONGRATULATIONS - You now have a working Armbian Server.
     
    BOOTING OFF SD/USB PROBLEMS - (ALL the Below sections all cover boot problems)
    If you cant boot an Amlogic based system off external media
     
    Once you have completed steps 1 through to 8, of the Installing onto the MeCool M8S PRO w at the top of this guide. Boot your Amlogic based system into the Android OS that is installed on the box. When you are booted in to Android, plug in your newly created Armbian SD card or USB stick to the system. Somewhere in the Android interface, perhaps the applications folder, you will find a program called Update OR Update&Backup (you can also hunt the Settings menu and find an update in there). Open this application.


      It should give you the choice to update OTA (Over the Air) or from a Local File. Select Local and browse to your SD card/USB stick. You will find a file called aml_autoscript.zip select that and confirm the upgrade. The system should reboot, most likely twice. After which it may either boot into your Android OS or it may start booting into Armbian. Its also possible it may just do the reboots and then sit at a splash screen for a while. In short, if its not booting an OS within 3 minutes, give it 2 more minutes, then pull the power and try rebooting (with your SD card/USB stick in). If it doesnt work (meaning it doesnt boot Armbian off your SD card/USB stick), try again with this process and also check you are using the right DTB files in uEnv.ini (as below) as they can cause a system to hang at a splash screen.  
    To explain what aml_autoscript.zip is doing..... The file is from here:
     
    https://github.com/150balbes/Amlogic_s905/wiki/s905_multi_boot
     
    What it does, is tell the boot partition of the Android TV box, that it has multi-boot (can boot from any device, internal/external) and sets external devices as being the 1st thing to try booting off.
     
    If youve copied your Armbian OS to the emmc/NAND chip and it wont boot off the internal memory, read up below on uEnv.ini and extlinux.conf as that may be the problem… though some boxes just cant/wont boot off emmc/NAND
     
    uEnv.ini and extlinux.conf 
     
    When you set up Armbian on a Android TV box, you need to tell Armbian what drivers/setup to use for the chipset in your box. This is done through matching the best DTB file to your TV Box’s hardware. To do this, there are 2 files on the SD card or USB stick you create.
     
    In the root of the BOOT partition, you will find uEnv.ini and in /extlinux directory, you will find extlinux.conf.
     
    Editing the files and picking the right DTB
    These files are best edited in Notepad++ on Windows, or some program that happily edits Unix format text files.
     
    If you just use Windows Notepad, they wont look correct when edited (as shown below) and you can screw the formatting up, resulting in your system NOT booting. Use Notepad++ or a Unix text file editor!!
     
     
    Within these files you will specify a DTB file, from the dtb folder on the BOOT partition.. Your TV Box might be a 905x2 chipset, or an 912 etc, so you need to find the DTB that works for your chipset. Lets say you have an S912 based system, you can look in the DTB folder and you will see various DTB files with 912 in their name, you can try each one of those, one at a time and see which one works, though not all DTB files are labeled as clearly as this. As an example, I have a Beelink GT1 Mini which is based on the 905x2 chipset, and for that unit, the X96 DTB file is recommended, though I only found that out through hunting the forums/finding out what other people had used.
     
    In short, look at the Armbian forums to find the best one, or just pick one that you think, list it in the uEnv.ini and extlinux.conf, see if the box will boot (try a different DTB file if not) and see if all the hardware works (Try a different DTB file if not, or some boxes its possible to find there is no bluetooth driver or something. Best to research the Armbian forums first to see what boxes people have success with. 
     
    There is no harm in just trying different DTB files, one at a time. Your box will either boot or not boot and either some or all of the features of your box will work.
     
    If you are just at a stage of testing your booting process from an SD card or USB stick, you only need to edit the uEnv.ini file for now, as your system will boot from that, however, when you find the DTB you want to use, update the extlinux.conf file too, so you can install to emmc/NAND.
     
    What do these 2 files do and why cant I boot off emmc internal ram?
    My understanding is that uEnv.ini takes care of the boot information when you are booting off SD card or USB Stick and the extlinux.conf takes care of the boot sequence if you load the OS onto the internal eMMC memory (the internal hard drive ram chip thing).
     
    So long and short… if you boot off external media, transfer the OS to the internal eMMC and you HAVNT updated the extlinux.conf, dont expect it to boot off the internal eMMC, it will just sit at the box’s spashscreen. (though you can boot off an external SD/USB and edit those files).

    In short… just update BOTH files to ensure you can boot off external SD card/USB stick and internal emmc (if you copy the OS over).
     
    What should the files look like?
    NOTE - If they dont look/arent formatted like this when you open them, you arent using a Unix file editor like Notepad++
     
    uEnv.ini
     
    dtb_name=/dtb/meson-gxl-s905x-khadas-vim.dtb
    bootargs=root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0
     
    extlinux.conf
     
    LABEL Armbian
      LINUX /zImage
      INITRD /uInitrd
      FDTDIR /dtb
    #  FDT /dtb/meson-gxl-s905x-khadas-vim.dtb
      APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 
     
    You would be replacing meson-gxl-s905x-khadas-vim.dtb with the DTB file that matches your box, in BOTH these files.
     
    Also, DONT delete the # out of the extlinux.conf file, its meant to be there!
     
    Installing onto emmc/NAND - The internal hard drive of the TV box.
     
    This is pretty simple to do, though its worth re-mentioning not every box will support this, for one reason or another. If you want to try however:
     
    Boot your system from your Armbian OS SD Card (I think it HAS to be an SD card, or at least the menu option wont show up in my tests using a USB stick, only on SD card). Make sure you have edited BOTH your uEnv.ini AND extlinux.conf files as above. In the OS, go to Armbian config (Step 5 onwards from Installing onto the MeCool M8S PRO w above). Go into the system option. In there, the first option should be Install to SATA, emmc, NAND or USB and select that. It will now copy over your files (wiping your Android OS off your box). This takes 3 to 8 minutes approximately. While this is copying, read the section below LOST.DIR, System Volume Information and Android and follow that process if needed. Assuming you configured your extlinux.conf file with the correct DTB, you can shut your system down, take out your SD card, switch it back on, and it should boot.  
    You can always boot off your SD card again, to edit the BOOT_NAND (on the desktop.. I think its called that) which is the copied over boot volume, where you can find the extlinux.conf file, to update the DTB file it uses.
     
    Worst case, check through the bits in this document and the forums. I dont know much about Rockchip based systems and how they differ (most of what Ive put in here was based on my Amlogic chipset TV boxes), Id assume its pretty similar.
     
    LOST.DIR, System Volume Information and Android folders cause problems booting off eMMC/NAND.
    If your SD card or USB stick had been in an Android or Windows box BEFORE you copied your OS over to eMMC/NAND, you may find out that your system WONT boot off the eMMC/NAND memory, but will still boot off your external card. These folders, as far as I can tell ONLY interfere with booting from the internal emmc/NAND and seem to cause no problem when booting from an SD card/USB stick.... but of course, if you copy Armbian to emmc/NAND, they seem to then cause a problem booting from emmc/NAND.
     
    I dont know why these folders seem to create an issue, but in my tests, deleting them before you copy over to your eMMC/NAND, OR after you have copied the OS over to eMMC/NAND, boot the system off your original SD Card/USB stick and on the Desktop of your system, go to the BOOT_EMMC drive, delete the folders LOST.DIR, System Volume Information and Android (or whichever combination of those 3 exist), shutdown the system and try booting again from eMMC.

    I tested multiple times on a system and after I had deleted those folders.... my system suddenly started booting correctly (with the occasional corruption occurring and having to re-copy the OS to eMMC/NAND again,  but if you do this, you can delete the folders before attempting to boot next time).
     
    To be clear, at time of writing this document, on your boot volume, there should be maybe 20 files in the root of the boot partition and only 3 folders ("dtb," "dtb-XXX-aml-XXX "and "extlinux"). (the XXX's will be some number)
     
    Ive done something and now my box wont boot/stuck on a splash screen/is a brick what do I do?
     
    If this happens, it usually means your onboard emmc/NAND storage area has become trashed somehow OR if you have your SD Card/USB stick, thats trashed somehow. To figure which, take your SD card/USB stick out and see if it boots look at these 2 options:
     
    OPTION A - if it boots without the SD Card/USB stick in, then its your SD Card/USB stick. Quick fix is to check you are using the correct DTB and edited uEnv.ini and extlinix.conf correctly (maybe try a different DTB if its never booted).  If it was booting off the SD card/USB stick, then re-image the SD card/USB stick with Armbian and make sure you have the right DTB and all should be good again.
     
    OPTION B - It wont boot without the  SD Card/USB stick in then the emmc/NAND area on your tv box is trashed in some way and its therefore not multibooting. So you need to re-flash the internal memory with the correct ROM/image for your box.
     
    Getting a system recovered - notes
    So for example, with an Amlogic based box, lets say the MeCool M8S Pro w box (Amlogic based box) you would find an original ROM for that system via a google hunt and download it (expect about a 1GB to 2GB download). You would also need the Amlogic USB Burning tool. Id recommend version 2.1.6.8 or later as it starts up in English (though you can find a language menu and select English on older versions).  Install this on a Windows based computer.
     
    You will will need a USB cable that will plug into both the USB port of your computer AND the USB port of your Amlogic based TV Box. This is how it will communicate to re-image the emmc/NAND.
     
    On the TV boxes, there is usually a reset button. but this could be:
     
    a tiny hole in which you need to stick a paperclip or something to press the reset button. you might need to open the box and connect 2 jumpers or short out 2 points on the board (on the MeCool M8S Pro w, its like this) Some systems, you can power on and hold down/press a button on the supplied remote AS you are powering on the box.   
    Doing the recovery
    Lets pretend you have method 1 from above, the paperclip version.
     
    For an Amlogic based system (Other makes will have their own software, but it will be a variation on doing this).
     
    Install the USB Burning tool to your Windows machine. Open the USB Burning tool and go to File > Import Image, then select the image file you have downloaded (Unzip or Unrar the file if its compressed).  DONT power your TV box from the supplied mains adapter!! (The Amlogic boards arent expecting that it appears, so dont go into recovery mode on mains power. It wont hurt your box, it just wont go into recovery). - Plug one end of your USB cable into your Windows PC. - Push down the reset button (or whichever method you need to use) with the paperclip on the TV Box and at THAT point, plug in the USB cable. This should now power on the box, but it may display a blank screen.

              On some TV boxes, it appears ONLY 1 of the multiple USB ports they have will be usable/activate for the flashing process. As such, try your other ports if it doesnt appear in your flashing software. 
      - You should hear a ding/chime or something from your Windows PC and the Amlogic USB Burning tool should now say something like HUB Connected. - In the USB Burning tool you should have it set at "Normal Erase" but Ive also done "Full Erase" before.... I dont quite know the difference... but Normal Erase seems to be fine, try Full if if doesnt work on Normal. - Press the start button and wait about 5 minutes until the USB Burning tool says 100% success. Wait about another 20 seconds. Press Stop and unplug your TV Box. Next time you power on the box, it should start booting into Android.   
    Now you are back at a working box and can start your install procedure as per this guide... so setup multiboot with aml_autoscript.zip etc....
     
    Hopefully all this helps someone figure things out.... if you cant find the answer here.... Im sure someone in the forums will give an answer!
     
    Thanks!
     
    erew (the OP for this topic)
  2. Like
    koakh got a reaction from gnthibault in Armbian for Amlogic S912   
    Hello @guidol
    The problem you are talking is about my post about load and reload module?
     
    This is problem is a nightmare to fix.....now its very stable even boot only with power connected and nothing more (ethernet cable off) 
     
    Now I can move on with APN and finish my docker/springboot headless server
    (That is finished with mongodb Arm64v8 container
     
    If someone have interest in headless server say, I can create a topic from start to finish. 
    Or I can upload the finish image version, no problem (AlfaWise H96 Pro+)
     
    Once again thanks to all PPL envolve in Armbian and in Linux too
  3. Like
    koakh got a reaction from guidol in AlfaWise H96 Pro+ Armbian Development Headless Server Setup   
    This is a quick notes post for people that want to setup Armbian on AlfaWise H96 Pro+ eMMC and use it as a Headless Server for Docker Microservices
     
    Thanks to @balbes150 @guidol and @Jeycop and all the awsome people of this forum
     
    Tech stack used
     
    Armbian
    - Java 8
    - Docker
    - Spring Framework/Boot 2.0
    - Node Js
    - Aurelia Freamework
     
    Download Files
     
    - Android firmware (Optional, required in case of revert from eMMC flash)
     
    - New H96 Pro Plus 7.1.2 firmware download By EBox
     
    - Armbian Version
     
    Armbian_5.41_S9xxx_Ubuntu_xenial_3.14.29_server_20180305.img
     
    Flash SDCard or USBDisk
     
    1) use rufus with dd, or linux disks, or dd command to flash above image
     
    2) plug SDcard/Usb into Box
     
    4) Plug power cable into Box while holding reset button pressed

    Note:This step is only required if is the first time boot armbian after flash android firmware.....
     
    5) See Armbian booting up
     
    8) login with `un:root`, `pw:1234` and configure it
     
    7) reboot
     
    8) login with root
     
    9) start "./install.sh" and wait for finish (5-7 minutes)
     
    (WARNING above command flash eMMC, You Lost ANDROID, dont do that if you dont know how to recovery android firmware, or dont want to use eMMC, SKIP to step 14 for the setup with SdCard/Usb Only)
     
    10) shutdown with `halt` and remove power cable
     
    11) remove SDcard/Usb
     
    12) plug power cable in Box, now you should see Armbian booting up without SDCard/Usb
     
    13) login to catch ip or scan it with `sudo nmap -sS -p 22 192.168.1.0/24 | grep -a4 -b2 00:80:0F:96:E3:01`. Change to your mac and ip
     
    14) SSH To it, and get some info
    $ uname -a Linux amlogic 3.14.29 #114 SMP PREEMPT Mon Mar 5 12:57:46 MSK 2018 aarch64 aarch64 aarch64 GNU/Linux $ lscpu lscpu Architecture: aarch64 Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 2 CPU max MHz: 1512.0000 CPU min MHz: 100.0000 Hypervisor vendor: (null) Virtualization type: full Setup WiFi with 3.14 Mali-6 Image Only (The Version that works with Wifi)
     
    this required some hacked script to put it to work, lost a few hours to figure it, its not pretty but works after boot and its stable
     
    First remove all modules from `/etc/modules` to leave it initialization for `init.d` script
    $ cat /etc/modules #aml_nftl_dev Next Create a `init.d` hacked script, with some magic and optimized sleeps, without that sleep times or with lower times it wont work, Its very strange that I must load and unload module, and reload again, but its seems the only way to put this working, I know its too strange, and hard to find, maybe someone has a better ways, I belive with some knowledge its easy,
     
    Why its working only that way, dont ask me why, I dont care, for me its not pretty, but its hugly and working, Im happy with it, who cares LOL, I dont waste more time for an elegant and pretty solution......
     
    move on.....the `init.d` script
    $ sudo nano /etc/init.d/wlan paste
    #! /bin/sh # /etc/init.d/wlan # ### BEGIN INIT INFO # Provides: wlan # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: AlfaWise H96 Pro+ Wireless Boot Script # Description: This file should be used to construct scripts to be # placed in /etc/init.d. This example start a # single forking daemon capable of writing a pid # file. To get other behavoirs, implemend # do_start(), do_stop() or other functions to # override the defaults in /lib/init/init-d-script. ### END INIT INFO # Some things that run always touch /var/lock/wlan # Carry out specific functions when asked to by the system case "$1" in start) echo "Starting Wlan Script" echo "modprobe wlan" /sbin/modprobe wlan echo "modprobe wlan -r in 28sec..." sleep 28 /sbin/modprobe wlan -r echo "modprobe lan in 28sec..." sleep 28 echo "modprobe wlan..." /sbin/modprobe wlan ;; stop) echo "Stopping script wlan" /sbin/modprobe wlan -r ;; *) echo "Usage: /etc/init.d/wlan {start|stop}" exit 1 ;; esac exit 0 Install systemd service
    $ sudo chmod 755 /etc/init.d/wlan $ sudo systemctl enable wlan Reboot
    $ sudo reboot Configure wireless with nmtui
    $ sudo nmtui $ ifconfig wlan wlan0 Link encap:Ethernet HWaddr 84:5d:d7:??:??:?? inet addr:192.168.1.177 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::865d:d7ff:fe4a:3202/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15 errors:0 dropped:0 overruns:0 frame:0 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3246 (3.2 KB) TX bytes:1556 (1.5 KB) check configs saved from nmtui
    $ ls /etc/NetworkManager/system-connections/ -la total 12 drwxr-xr-x 2 root root 4096 Mar 29 18:42 . drwxr-xr-x 8 root root 4096 Mar 5 10:24 .. -rw------- 1 root root 419 Mar 29 18:42 scWF_WDS1 $ sudo cat /etc/NetworkManager/system-connections/scWF_WDS1 > Note: If Problems arrise using WiFi, with/without eth0 cable, try disable eth0 with `sudo ifdown eth0`, sometimes the connection is linked somehow to ethernet to prevent this kinds of problems disable ethernet or boot without cable connected
    $ sudo reboot After reboot inspect unload/load driver with
    $ sudo tail -f /var/log/syslog | grep wlan Mar 29 18:42:25 localhost dnsmasq[4152]: using nameserver 192.168.1.10#53(via wlan0) Mar 29 18:42:25 localhost nm-dispatcher: req:1 'up' [wlan0]: new request (1 scripts) Mar 29 18:42:25 localhost nm-dispatcher: req:1 'up' [wlan0]: start running ordered scripts... Mar 29 18:42:28 localhost ntpd[3533]: Listen normally on 8 wlan0 192.168.1.177:123 In other PC ping the wifi IP and wait it responds without do anything, here it starts respond after 2:18 (with usb stick) minutes:seconds, not bad since reboot, shutdown and boot, and with time delays for wifi 
     
    some info after login
    $ cat /etc/modules #aml_nftl_dev $ lsmod Module Size Used by wlan 3435325 0 zram 8953 8 cfg80211 415017 1 wlan Update and Install Stuff
    $ sudo apt update && sudo apt upgrade $ sudo apt install docker.io docker-compose samba openvpn lshw hwinfo $ docker -v Docker version 1.13.1, build 092cba3 $ docker-compose -v docker-compose version 1.8.0, build unknown Configure Samba
    sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_ORG sudo nano /etc/samba/smb.conf paste above
    [users] comment = All users path = /home read only = No inherit acls = Yes veto files = /aquota.user/groups/shares/ [root] comment = Root path = / writable = yes printable = no write list = root browseable = no add a user
    $ sudo smbpasswd -a USERNAME # start service $ sudo systemctl restart smbd # enable service $ sudo systemctl enable smbd.service Install Java 8 (Optional currently using Docker Containers, but it may be usefull for running quick prototype protects)
    $ sudo -i $ sudo echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list $ sudo echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 $ sudo apt-get update $ sudo apt-get install oracle-java8-installer #####Important######## To set Oracle JDK8 as default, install the "oracle-java8-set-default" package. E.g.: sudo apt install oracle-java8-set-default On Ubuntu systems, oracle-java8-set-default is most probably installed automatically with this package $ sudo apt install oracle-java8-set-default $ java -version java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode) Create docker-compose.yml to run and test my Spring-Boot IoT Project in Arm64v8 Arquitecture
     
    Note: this step is ommited, it simply is a docker-compose file to test my IOT project, with four docker arm64v8 container microservices,
     
    - Spring Boot Rest Api /Arm64V8
    - Spring Boot Moquette/Mqtt Mongo Server with Auth and ACL
    - Aurelia Framework / NodeJS WebApp / Mqtt.js Client / Chart.js
    - Mongo DB
     
    if someone like to test it with a ESP8266 tell me and paste here the docker-composer.yml 
     
    move on
     
    Backup Image
     
    Use the DD command to create image of `/dev/boot` and `/dev/system`
      
    Create a mount point to house images, using a samba share here to //192.168.1.1/root, one can use a spare disk or other media
    $ sudo nano fstab add //192.168.1.1/root /mnt/koakhserver cifs username=${USER},password=${PASSWORD},_netdev,noauto 0 0 to the bottom
    #/var/swap none swap sw 0 0 #/dev/root / auto noatime,errors=remount-ro 0 1 #proc /proc proc defaults 0 0 /dev/root / ext4 defaults,noatime,errors=remount-ro 0 1 tmpfs /tmp tmpfs defaults,nosuid 0 0 //192.168.1.1/root /mnt/koakhserver cifs username=${USER},password=${PASSWORD},_netdev,noauto 0 0 Backup eMMC
    $ sudo mkdir /mnt/koakhserver -p $ sudo mount /mnt/koakhserver $ sudo dd if=/dev/boot of=/mnt/koakhserver/mnt/1tbdisk2/devices/microcomputers/boot.img bs=1024k status=progress 32+0 records in 32+0 records out 33554432 bytes (34 MB, 32 MiB) copied, 3.3319 s, 10.1 MB/s $ sudo dd if=/dev/system of=/mnt/koakhserver/mnt/1tbdisk2/devices/microcomputers/system.img bs=1024k status=progress 2146435072 bytes (2.1 GB, 2.0 GiB) copied, 150.027 s, 14.3 MB/s 2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB, 2.0 GiB) copied, 197.892 s, 10.9 MB/s when we need to restore use the reverse process
    $ sudo mount /mnt/koakhserver/ $ sudo dd if=/mnt/koakhserver/mnt/1tbdisk2/devices/microcomputers/boot.img of=/dev/boot bs=1024k status=progress $ dd if=/mnt/koakhserver/mnt/1tbdisk2/devices/microcomputers/system.img of=/dev/system bs=1024k status=progress Done......I Think I dont forget nothing.....................
     
    Thanks to all
  4. Like
    koakh reacted to Jeycop in Armbian for Amlogic S912   
    Thank you.
    I got it to work on my internal.
    (H96 Pro+ (Plus) green mainboard with LDDR3 produced in 2017)
     
    I used this version "Armbian_5.41_S9xxx_Ubuntu_xenial_3.14.29_server_20180305.img.xz" LINK
    Installed it directly over original Firmware with "./install.sh" -script without any problems.
    Important for me was to use Rufus to burn the image to a sdcard and to run it without any dtb-file in main directory on the sdcard.
    To start from sdcard I pressed the reset-button for few seconds right after I plugged in the power cable.
     
    I was just wondering about the download, because it's under "5.41_KODI-17.6" but I don't need any kodi on this box.
    So do I have to clean it up at first, so no storage and performance waste on these additional installations?
  5. Like
    koakh got a reaction from odin in Armbian for Amlogic S912   
    Fix Boot Wifi with some hacks and a Init.d Script
    The Problem : Cant boot with Wifi Kernel Module
     
    After many hours of try and fail (almost fail),
    I resolve the problem of Boot with Wifi with lots of pacience and despair,
    and the precious help of @balbes150 and @guidol, and Armbian Forum
     
    The above "solution works" with
    + AlfaWise H96 Pro+ and
    + 3.14 Kernel Based` image (thank for the tip @balbes150) > Armbian_5.41_S9xxx_Ubuntu_xenial_3.14.29_server_20180225.img.xz,

    belive me its not pretty/elegant solution, is more a despair solution........
     
    First remove all modules from `/etc/modules` to leave it initialization for `init.d` script clean,
    I leave the comments, just has a note of my adventure in /etc/modules file LOL

     
    $ cat /etc/modules #aml_nftl_dev #wifi_dummy #cfg80211 #dhd #wlan Next Create a `init.d` hacked script, with some magic and optimized sleeps, without that sleep times or with lower times it wont work,
    Its very strange, I must load and unload module, and reload again, but its seems the only way to put this working,
    I know its too strange, and hard to find, maybe someone has a better ways, I believe with some knowledge its easy,
     
    Why its working only that way? 
    don't ask me why, I don't care, for me its not pretty, but its ugly and working,
    I'm happy with it, who cares, I don't waste more time for an elegant and pretty solution......
     
    move on.....the `init.d` script
     
    $ sudo nano /etc/init.d/wlan #! /bin/sh # /etc/init.d/wlan # ### BEGIN INIT INFO # Provides: wlan # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: AlfaWise H96 Pro+ Wireless Boot Script # Description: This file should be used to construct scripts to be # placed in /etc/init.d. This example start a # single forking daemon capable of writing a pid # file. To get other behavoirs, implemend # do_start(), do_stop() or other functions to # override the defaults in /lib/init/init-d-script. ### END INIT INFO # Some things that run always touch /var/lock/wlan # Carry out specific functions when asked to by the system case "$1" in start) echo "Starting Wlan Script" echo "modprobe wlan" /sbin/modprobe wlan echo "modprobe wlan -r in 28sec..." sleep 28 /sbin/modprobe wlan -r echo "modprobe lan in 28sec..." sleep 28 echo "modprobe wlan..." /sbin/modprobe wlan ;; stop) echo "Stopping script wlan" /sbin/modprobe wlan -r ;; *) echo "Usage: /etc/init.d/wlan {start|stop}" exit 1 ;; esac exit 0  
    After boot inspect unload/load driver with
     
    sudo tail -f /var/log/syslog | grep wlan  
    Install systemd service
     
    $ sudo systemctl enable wlan  
    reboot to test if work
     
    $ sudo reboot  
    in other pc ping the wifi ip and wait it responds without do anything, here it starts respond after 2minutes, not bad since reboot, shutdown and boot
     
    I tested with a lots of combinations, modules, timers, I don't know the things I try,
    but for me it only work that way on boot, maybe someone with knowledge can explain why this driver don't boot, or boot in a state that is faulty, and useless, and must be up, down and up again with this sleep times......
     
    some info after login

     
    $ lsmod Module Size Used by wlan 3435325 0 zram 8953 8 cfg80211 415017 1 wlan ch341 5434 0 I anybody has questions, say so

    thanks to all 
  6. Like
    koakh reacted to odin in Armbian for Amlogic S912   
    Thanks koakh, works great for my h96 pro+ wifi (qca9377), now it works on bootup.
     
    -
    also if anyone has any ideas on my next problem let me know, I am using Armbian_5.41_S9xxx_Ubuntu_xenial_3.14.29_mate_20180307.img (mali6), and overall it works great, is it possible to get hardware accelerated video to work or  videos to play better fullscreen, I tried several software smplayer, vlc, xine (a little better then others),mpv  and all are pretty laggy (unwatchable), window mode they play ok , kodi crashes the display.
     
     
  7. Like
    koakh got a reaction from balbes150 in Armbian for Amlogic S912   
    Fix Boot Wifi with some hacks and a Init.d Script
    The Problem : Cant boot with Wifi Kernel Module
     
    After many hours of try and fail (almost fail),
    I resolve the problem of Boot with Wifi with lots of pacience and despair,
    and the precious help of @balbes150 and @guidol, and Armbian Forum
     
    The above "solution works" with
    + AlfaWise H96 Pro+ and
    + 3.14 Kernel Based` image (thank for the tip @balbes150) > Armbian_5.41_S9xxx_Ubuntu_xenial_3.14.29_server_20180225.img.xz,

    belive me its not pretty/elegant solution, is more a despair solution........
     
    First remove all modules from `/etc/modules` to leave it initialization for `init.d` script clean,
    I leave the comments, just has a note of my adventure in /etc/modules file LOL

     
    $ cat /etc/modules #aml_nftl_dev #wifi_dummy #cfg80211 #dhd #wlan Next Create a `init.d` hacked script, with some magic and optimized sleeps, without that sleep times or with lower times it wont work,
    Its very strange, I must load and unload module, and reload again, but its seems the only way to put this working,
    I know its too strange, and hard to find, maybe someone has a better ways, I believe with some knowledge its easy,
     
    Why its working only that way? 
    don't ask me why, I don't care, for me its not pretty, but its ugly and working,
    I'm happy with it, who cares, I don't waste more time for an elegant and pretty solution......
     
    move on.....the `init.d` script
     
    $ sudo nano /etc/init.d/wlan #! /bin/sh # /etc/init.d/wlan # ### BEGIN INIT INFO # Provides: wlan # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: AlfaWise H96 Pro+ Wireless Boot Script # Description: This file should be used to construct scripts to be # placed in /etc/init.d. This example start a # single forking daemon capable of writing a pid # file. To get other behavoirs, implemend # do_start(), do_stop() or other functions to # override the defaults in /lib/init/init-d-script. ### END INIT INFO # Some things that run always touch /var/lock/wlan # Carry out specific functions when asked to by the system case "$1" in start) echo "Starting Wlan Script" echo "modprobe wlan" /sbin/modprobe wlan echo "modprobe wlan -r in 28sec..." sleep 28 /sbin/modprobe wlan -r echo "modprobe lan in 28sec..." sleep 28 echo "modprobe wlan..." /sbin/modprobe wlan ;; stop) echo "Stopping script wlan" /sbin/modprobe wlan -r ;; *) echo "Usage: /etc/init.d/wlan {start|stop}" exit 1 ;; esac exit 0  
    After boot inspect unload/load driver with
     
    sudo tail -f /var/log/syslog | grep wlan  
    Install systemd service
     
    $ sudo systemctl enable wlan  
    reboot to test if work
     
    $ sudo reboot  
    in other pc ping the wifi ip and wait it responds without do anything, here it starts respond after 2minutes, not bad since reboot, shutdown and boot
     
    I tested with a lots of combinations, modules, timers, I don't know the things I try,
    but for me it only work that way on boot, maybe someone with knowledge can explain why this driver don't boot, or boot in a state that is faulty, and useless, and must be up, down and up again with this sleep times......
     
    some info after login

     
    $ lsmod Module Size Used by wlan 3435325 0 zram 8953 8 cfg80211 415017 1 wlan ch341 5434 0 I anybody has questions, say so

    thanks to all 
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines