test if modeswitch works
$ sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -M "55534243123456780000000000000a11062000000000000100000000000000"
if yes than usually you would do this (but for me it did not work)
#edit config file
/etc/usb_modeswitch.conf
| VPNCMD="sudo /usr/local/vpnserver/vpncmd localhost:443 /SERVER /CMD" | |
| # Create virtual hub | |
| ${VPNCMD} HubCreate ${HubName} /PASSWD:admin | |
| # Create local bridge(connect to physical device) | |
| ${VPNCMD} BridgeCreate ${HubName} /DEVICE:${phy_dev_name:-eth0} | |
| # Create local bridge(create tap interface) | 
| # Basic Strongswan ikev2 server setup | |
| * paltform: atlantic.net ubuntu 14.04 x64 | |
| * the commands below are run with root account | |
| ## Strongswan | |
| ``` | |
| apt-get install strongswan | |
| apt-get install iptables iptables-persistent | |
| ``` | 
test if modeswitch works
$ sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -M "55534243123456780000000000000a11062000000000000100000000000000"
if yes than usually you would do this (but for me it did not work)
#edit config file
/etc/usb_modeswitch.conf
| #!/bin/sh | |
| # | |
| # Read-only Root-FS for Raspian | |
| # | |
| # Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with | |
| # overlayfs integrated in Linux Kernel >= 3.18. | |
| # | |
| # Originally written by Axel Heider (Copyright 2012) for Ubuntu 11.10. | |
| # This version can be found here: | |
| # https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash#Overlayfs | 
| # Find your micro SD card using lsblk - you're going to want to set your DISK parameter to it. | |
| export DISK=/dev/mmcblk0 | |
| sudo dd if=/dev/zero of=${DISK} bs=1M count=16 | |
| sudo sfdisk --in-order --Linux --unit M ${DISK} <<-__EOF__ | |
| 1,48,0xE,* | |
| ,,,- | |
| __EOF__ | 
This is mainly a notes dump and should be used for reference. This guide assumes:
Limitations of the qemu-system-aarch64 emulator on x86 include only being able to emulate one CPU and no KVM support.
| require 'formula' | |
| require 'hardware' | |
| class Qt5Base < Formula | |
| homepage 'http://qt.nokia.com/' | |
| head 'git://gitorious.org/qt/qtbase.git', :tag => 'e34ee3127043773a037bfd18a2d457d409032ee5' | |
| keg_only 'For development purposes only' | |
| def patches | 
| I flashed OpenWrt CHAOS CALMER (Bleeding Edge, r43793) using the stock web interface of the device. Just connect the router with an Ethernet cable to a network, it will switch on the blue and red LEDs. Find you the IP address from the DHCP server, and log into the router using your web browser. | |
| Login: admin | |
| Password: admin | |
| Switch the language to English from the drop down menu. I got reconnected to a wrong IP address, so I had to type the correct one again in the URL field of the browser, then the interface was English. Using the Administrator -> Firmware menu, I flashed https://dl.dropboxusercontent.com/u/98389203/openwrt-ramips-rt305x-a5-v11-squashfs-factory.bin | |
| Or, if you want to make the image yourself, use the OpenWrt Image Generator: | |
| wget https://downloads.openwrt.org/snapshots/trunk/ramips/OpenWrt-ImageBuilder-ramips_rt305x-for-linux-x86_64.tar.bz2 | |
| tar xfj OpenWrt-ImageBuilder-ramips_rt305x-for-linux-x86_64.tar.bz2 | |
| cd OpenWrt-ImageBuilder-ramips_rt305x-for-linux-x86_64/ | |
| make image PROFILE="A5-V11" | 
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux