2016年12月13日 星期二

MT7688 Firmware


Build from source

Document

 

Environment

  • 用MBP跑VirtualBox (ubuntu 14.04),跑了三小時還沒跑完...找台電腦灌native Linux較實在!
  • Host: 14.04.3 LTS

Source

  • LinkIt Smart 7688 firmware v0.9.4
  • OpenWrt Linux distribution (Chaos Calmer 15.05.1)
firmware$ git clone git://git.openwrt.org/15.05/openwrt.gitbin/ramips/openwrt-ramips-mt7688-LinkIt7688-squashfs-sysupgrade.bin

bootloader$ git clone https://github.com/MediaTek-Labs/linkit-smart-uboot.git

kernel packagebin/ramips/packages/base/

Buttons (MPU, WiFi buttons) 的使用

F/w upgrade — USB
  1. 按住WiFi button
  2. 按一下MPU button後放開
  3. WiFi燈熄掉後 (or 按住至少 5sec)再放開WiFi button
Reset MPU
按一下MPU button

切換到AP mode
按住WiFi button 至少5 sec後再放開
http://192.168.100.1/

Cross-compile C/C++

  • Openwrt-SDK-LInkit
    • package  (source code)
      • helloworld
        • Makefile
        • src
          • Makefile
          • helloworld.c
    • build_dir (executable binary)
      • target-mipsel_24kec+dsp_uClibc-0.9.33.2
        • helloworld
          • helloworld
    • bin  (install package)
      • ramips
        • package
          • base
            • helloworld_1.0.0-1_ramips_24kec.ipk


在 Openwrt-SDK-LInkit 目錄下
> make V=99

執行executable binary
產生的
executable binary在 build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/helloworld 下

確認產生的executable binary格式
> cd build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/helloworld
> file helloworld


executable binary upload到Linkit Smart中> scp helloworld root@mylinkit.local:/root

登入Linkit Smartssh root@mylinkit.local> .helloworld

安裝package> cd bin/ramips/package/base> scp helloworld_1.0.0-1_ramips_24kec.ipk  root@mylinkit.local:/root

登入Linkit Smartssh root@mylinkit.local> opkg install



沒有留言:

張貼留言