follow me

LinkIt 7688のビルド手順。(Chaos Calmer 15.05.1)

仕方ないから過去枠埋めたったるわ。
本記事はルーターハックAdvent Calendar 2018 12日目の記事です。

LinkIt 7688が登場した当時は問題なかったのだが、OpenWrtからforkしたLEDEが登場し、OpenWrtに再結合したり、多くのイベントがあったのもありでLinkIt 7688の公式ドキュメントのビルド手順ではビルドできなくなってしまっている。
だれかがメンテしている様子もないので、解る人しか使ってないのだろうなと予想できる訳ですが。
このLinkIt 7688、実はTELEC取ってるんですよね。

もちろん、シール貼り付けれる人は限られてるのですが。。。
写真のはSeeed株式会社からTELECシール付きでお借りしたものになります。
また、TELECに反しない様にファームをビルドする手順となっています。
Seeed株式会社からなんとかTELEC刻印付きで販売してくれないものか。という話はあるが、なかなかロット数が稼げないと難しいのですかね。
みんなで数千個頼んで刻印入れて貰おうよ。とか人集め始めませんかね?


ちなみに今現在、chaos_calmer-15.05.1をビルドしようとすると以下の様なエラーとなってしまう。
mkdir -p /home/dev/chaos_calmer-15.05.1/dl
echo "Checking out files from the git repository..."; mkdir -p /home/dev/chaos_calmer-15.05.1/tmp/dl && cd /home/dev/chaos_calmer-15.05.1/tmp/dl && rm -rf libmraa-0.8.0 && [ \! -d libmraa-0.8.0 ] && git clone https://github.com/intel-iot-devkit/mraa.git libmraa-0.8.0 --recursive && (cd libmraa-0.8.0 && git checkout 70600dece4138b0c0dbaff42f57828f1559cd840 && git submodule update) && echo "Packing checkout..." && rm -rf libmraa-0.8.0/.git &&      tar czf /home/dev/chaos_calmer-15.05.1/tmp/dl/libmraa-0.8.0-70600dece4138b0c0dbaff42f57828f1559cd840.tar.gz libmraa-0.8.0 && mv /home/dev/chaos_calmer-15.05.1/tmp/dl/libmraa-0.8.0-70600dece4138b0c0dbaff42f57828f1559cd840.tar.gz /home/dev/chaos_calmer-15.05.1/dl/ && rm -rf libmraa-0.8.0;
Checking out files from the git repository...
Cloning into 'libmraa-0.8.0'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 11918 (delta 5), reused 5 (delta 4), pack-reused 11905
Receiving objects: 100% (11918/11918), 3.27 MiB | 1.22 MiB/s, done.
Resolving deltas: 100% (8349/8349), done.
Checking connectivity... done.
Submodule 'doxygen2jsdoc' (https://github.com/intel-iot-devkit/doxygen2jsdoc.git) registered for path 'doxygen2jsdoc'
Submodule 'doxyport' (https://github.com/intel-iot-devkit/doxyport.git) registered for path 'doxyport'
Cloning into 'doxygen2jsdoc'...
remote: Enumerating objects: 112, done.
remote: Total 112 (delta 0), reused 0 (delta 0), pack-reused 112
Receiving objects: 100% (112/112), 359.18 KiB | 0 bytes/s, done.
Resolving deltas: 100% (35/35), done.
Checking connectivity... done.
Submodule path 'doxygen2jsdoc': checked out '67cad692720982ac3cbd99bf1c3421edc69b08f9'
Cloning into 'doxyport'...
remote: Enumerating objects: 55, done.
remote: Total 55 (delta 0), reused 0 (delta 0), pack-reused 55
Unpacking objects: 100% (55/55), done.
Checking connectivity... done.
Submodule path 'doxyport': checked out 'db3e1a6eb8677d3166d90d82c3068689803ce547'
warning: unable to rmdir doxyport: Directory not empty
M       doxygen2jsdoc
Note: checking out '70600dece4138b0c0dbaff42f57828f1559cd840'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 70600de... mraa: update to version 0.8.0
fatal: reference is not a tree: 9cc90b7976252b2d14b7956230c5870097e1f008
Unable to checkout '9cc90b7976252b2d14b7956230c5870097e1f008' in submodule path 'doxygen2jsdoc'
make[3]: *** [/home/dev/chaos_calmer-15.05.1/dl/libmraa-0.8.0-70600dece4138b0c0dbaff42f57828f1559cd840.tar.gz] Error 1
make[3]: Leaving directory `/home/dev/chaos_calmer-15.05.1/feeds/packages/libs/libmraa'
make[2]: *** [package/feeds/packages/libmraa/compile] Error 2
make[2]: Leaving directory `/home/dev/chaos_calmer-15.05.1'
make[1]: *** [/home/dev/chaos_calmer-15.05.1/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/dev/chaos_calmer-15.05.1'
make: *** [world] Error 2


修正した手順は以下になります。
現在は、OpenWrtは、githubからコードを取得してビルドするのが一般的になっている。
ビルド環境は、Ubuntu 14.04.5 LTSとした。
Ubuntu 16.04以降の場合は、今回挙げる以外にもパッチが必要になります。(コレについては別途記載する予定です。)
ビルド手順は、公式ビルド手順と書き方を合わせています。(手順1, 2, 3が変わった形となっている。)

Steps
In the Ubuntu system, open the Terminal application and enter the following commands:

  1. Install prerequisite packages to build the firmware:
  2. $ sudo apt-get install git g++ libncurses5-dev subversion libssl-dev gawk libxml-parser-perl unzip make
    
  3. Download the OpenWrt CC source codes:
  4. ※chaos_calmerのmasterだと、kernelバージョンが上がってしまっていてmtk-sdk-wifiドライバが合うものが無い。15.05.1を使う事になる。 ※TELECの関係上、mtk-sdk-wifiドライバを使用する必要があるため、使用するkernel は 3.18.21、3.18.23、3.18.27、3.18.29、3.18.36、3.18.44 のいずれかである必要がある。
    $ wget https://github.com/openwrt/chaos_calmer/archive/v15.05.1.tar.gz
    $ tar zxf v15.05.1.tar.gz
    
  5. Patch fix git submodule. (Download and Patch)
  6. $ wget http://www.srchack.org/pub/openwrt/LinkIt7688/20181120/fix-git-submodule.patch
    $ patch -p1 < fix-git-submodule.patch
    
  7. Prepare the default configuration file for feeds:
  8. $ cd chaos_calmer-15.05.1
    $ cp feeds.conf.default feeds.conf
    
  9. Add the LinkIt Smart 7688 development board's feed:
  10. $ echo src-git linkit https://github.com/MediaTek-Labs/linkit-smart-7688-feed.git >> feeds.conf
    
  11. Update the feed information for all available packages to build the firmware:
  12. $ ./scripts/feeds update
    
  13. Install all packages:
  14. $ ./scripts/feeds install -a
    
  15. Prepare the kernel configuration:
  16. $ make menuconfig
    
    • Select the following options:
      • Target System: Ralink RT288x/RT3xxx
      • Subtarget: MT7688 based boards
      • Target Profile: LinkIt7688
      • Save and exit (use the default configuration file without any modification)
  17. Start the compilation process:
  18. $ make
    
  19. After the build process is finished, the resulted firmware file will be under "bin/ramips/openwrt-ramips-mt7688-LinkIt7688-squashfs-sysupgrade.bin". Depending on the hardware resources of the host environment, the build process may take more than 2 hours.
  20. You can use this file to update the firmware through Web UI or rename it to lks7688.img to update through a USB drive.


ルーターハックAdvent Calendar 2019は、はじめから参加しますよ。
宜しくお願いします。
ルーターハックAdvent Calendar 2018 12日目譲って貰いました。有り難うございます。
LinkIt 7688のビルド手順。(Chaos Calmer 15.05.1) | 0 件のコメント | アカウント登録
サイト管理者はコメントに関する責任を負いません。