An Emulator for MT7688 Development
LinkIt Smart 7688 is On Fire
Author: Fred Chien（錢逢祥）
LinkIt Smart 7688 is getting more popular recently. Many people wanted to buy one, but couldn’t get one due to out-of-stock inventory. Interestingly, those who finally bought MT7688 end up overloading their system due to limited memory and CPU clock speed. This kind of debugging and development environment makes some developers feel frustrated.
So, isn’t it great that if you can create a VM (Virtual Machine) for MT7688 development on your own computer? Besides having more space to install all the modules, libraries, and tool chains you want, you can have sufficient memory to compile many programs directly. Moreover, complex programs can be directly tested on this VM, thus saving your time.
More importantly, for those who don’t have a MT7688 board in hand, there is a way to develop your own applications on this VM and get familiar with the MT7688 environment.
Utilize “makerboard” to establish your VM environment
The author has developed a tool named “makerboard”, which allows developers to establish their own emulator environment for MT7688 under Linux. This method is implemented by using Container-based technology. Please check the complete source code on Github below,
Install QEMU and SquashFS packages before using it. Please run the following apt-get command to install the packages:
sudo apt-get install qemu-user-static squashfs-tools
Make sure you have Node.js installed on your system, and then run this NPM command for installation:
npm install -g makerboard
After a successful installation, you can use the following makerboard command to “create” your VM environment for MT7688:
makerboard create my7688
Then you will have a “my7688” directory that includes all files and structures of Root Filesystem. And enter this environment by running this command.
makerboard run my7688
If everything goes smoothly, you have successfully entered the Shell of the emulator environment. What you do in this environment could be the same as what you perform on the MT7688 board.
Use the Root Filesystem compiled on your won
Besides obtaining the image files from the LinkIt Smart 7688 official server, we can get it by compiling OpenWrt ourselves and even do a little customization.
If you would like to compile yourself, you could take MTK official documents as a reference for compiling a new image:
Contribute to linkit-smart-7688-feed development by creating an account on GitHub.github.com
It takes time to compile OpenWrt from beginning, but we can obtain a new image of Root Filesystem once the compilation is done.
Afterwards, we can create a new image to establish a new VM environment with “-i” option:
makerboard create myrootfs -i openwrt-ramips-mt7688-root.squashfs
Finally, enter this new emulator environment by running the same command:
makerboard run myrootfs
Emulator for the hardware control like GPIO or ATmega?
Currently there is no emulator for hardware control. The current emulator is mainly made for making developers’ life easier to develop and compile without worrying insufficient resource and efficiency of the MT7688 board.