Skip to content

Instantly share code, notes, and snippets.

@bestpika
Last active September 29, 2016 01:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bestpika/821404a548f3e8556c3bd4ba0de77a47 to your computer and use it in GitHub Desktop.
Save bestpika/821404a548f3e8556c3bd4ba0de77a47 to your computer and use it in GitHub Desktop.

MTK 7688 (DUO)

rootfs

$ opkg update
$ opkg install block-mount kmod-fs-ext4 kmod-usb-storage-extras e2fsprogs
$ mkfs.ext4 /dev/mmcblk0p1
$ mount /dev/mmcblk0p1 /mnt
$ tar -C /overlay -cvf - . | tar -C /mnt -xf -
$ umount /mnt
$ block detect > /etc/config/fstab
$ vi /etc/config/fstab
config 'mount'
  option  target  '/overlay'
  ...
  option  enabled '1'
$ reboot

samba

smbpasswd -a root

MySQL

$ opkg update
$ opkg install libpthread libncurses libreadline mysql-server
$ sed -i 's,^datadir.*,datadir\t\t= /mnt/sdc/srv/mysql,g' /etc/my.cnf
$ sed -i 's,^tmpdir.*,tmpdir\t\t= /tmp,g' /etc/my.cnf
$ sed -i 's,^bind-address.*,bind-address\t\t= 0.0.0.0,g' /etc/my.cnf
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
$ mkdir -p /mnt/sdc/srv/mysql
$ mysql_install_db --force

修改執行順序

$ vi /etc/init.d/mysqld
$ /etc/init.d/mysqld start
$ /etc/init.d/mysqld enable
$ mysqladmin -u root password '{PSWD}'
CREATE USER '{USER}'@'%' IDENTIFIED BY '{PSWD}';
GRANT ALL ON *.* TO '{USER}'@'%' IDENTIFIED BY '{PSWD}';

備份

$ mysqldump -u root -p {DBNAME} > {FILEPATH} --routines

還原

$ mysql -u root -p {DBNAME} < {FILEPATH}

install something

$ opkg update
$ opkg install minicom
$ pip install pyyaml termcolor pymysql google-api-python-client

有線網路設定

  • Network/Interfaces
    • WAN
      • General Setup
        • Static address
      • Physical Settings/Interface
        • Ethernet Switch: "eth0"
    • LAN
      • Physical Settings/Interface
        • Ethernet Adapter: "ra0"
        • Wireless Network: Master "{NAME}"
/sbin/ifup lan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment