Skip to content

Instantly share code, notes, and snippets.

@wrtcoder
wrtcoder / A5-V11.txt
Created January 10, 2016 08:08 — forked from probonopd/A5-V11.txt
Very cheap (8 USD) "3G/4G Router", apparently similar to Hame MPR-A1 (but a clone since I can login with admin/admin via telnet). On the PCB it has a W9825G6EH-75 RAM chip. Ethernet MAC address starts with 2C:67:FB:
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"
@wrtcoder
wrtcoder / qt5-base.rb
Created February 17, 2016 21:41 — forked from jkp/qt5-base.rb
Formula to build a minimal qt5 base installation.
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
@wrtcoder
wrtcoder / aarch64qemu.md
Created February 27, 2016 23:20 — forked from ecliptik/aarch64qemu.md
Ubuntu 14.04 arm64 Port QEMU Configuration

Setting up a Ubuntu 14.04 or Debian 8 (jessie) arm64 VM

This is mainly a notes dump and should be used for reference. This guide assumes:

  • Ubuntu 14.04 (or Debian 8) hypervisor/host with bridge networking
  • Knowledge of qemu
  • Knowledge of debootstrap

Limitations of the qemu-system-aarch64 emulator on x86 include only being able to emulate one CPU and no KVM support.

@wrtcoder
wrtcoder / gist:d479c209f9b05f740bef
Created March 2, 2016 23:33 — forked from 17twenty/gist:6925066
Setting up your sdcard and u-boot's uEnv.txt for Beaglebone Black
# 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__
@wrtcoder
wrtcoder / root-ro
Created March 11, 2016 03:14 — forked from niun/root-ro
Read-only Root-FS with overlayfs for Raspian
#!/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
@wrtcoder
wrtcoder / usb-modeswitch-huawei-e303-debian-jessie-lite-raspberry.md Debug USB-Modeswitch (Raspberry with debian jessi lite) and Huawei E303

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
# 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
```
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)

Set up L2TP/IPsec VPN on Debian

Set up IPsec

Set up networking

Testing qemu 2.1 arm64 support

qemu-system-aarch64 -m 1024 -cpu cortex-a57 -nographic -machine virt -kernel trusty-server-cloudimg-arm64-vmlinuz-generic -append 'root=/dev/vda1 rw rootwait mem=1024M console=ttyAMA0,38400n8 init=/usr/lib/cloud-init/uncloud-init ds=nocloud ubuntu-pass=ubuntu' -drive if=none,id=image,file=trusty-server-cloudimg-arm64-disk1.img -netdev user,id=user0 -device virtio-net-device,netdev=user0 -device virtio-blk-device,drive=image

qemu-system-aarch64 -m 1024 -cpu cortex-a57 -nographic -machine virt -kernel trusty-server-cloudimg-arm64-vmlinuz-generic -append 'root=/dev/vda1 rw rootwait mem=1024M console=ttyAMA0,38400n8 init=/usr/lib/cloud-init/uncloud-init ds=nocloud' -drive if=none,id=image,file=trusty-server-cloudimg-arm64-disk1.img -netdev user,id=user0 -device virtio-net-device,netdev=user0 -device virtio-blk-device,drive=image

[A Quick'n'Dirty Set-up of an Aarch64 Ubuntu 14.04 VM with QEMU]