Build MIPS cross-compiling environment under Ubuntu

Source: Internet
Author: User

1. Download:

Https://docs.labs.mediatek.com/resource/linkit-smart-7688/zh_cn/downloads

I downloaded the openwrt SDK for C/s + + for Linux, tried the following toolchain, but the environment was set up after the prompts me to say that the lack of documents, the fact that I did not find the package in the file, so simply tried the SDK, the results inside very complete.

This package I started in the Ubuntu 16 32, the result is not compatible with a variety of errors, so it is recommended to use in 64 (32-bit 64-bit is really a pit to death me)

After downloading is decompression

TAR-JXVF openwrt-sdk-ramips-mt7688_gcc-4.8-linaro_uclibc-0.9.33.2.linux-x86_64.tar.bz2

Move to a folder after decompression is complete

I moved under the/work.

2. Configure Environment variables

VI ~/.BASHRC

Then add the path to the bin directory at the end

Export path=/work/openwrt-toolchain-ramips-mt7688_gcc-4.8-linaro_uclibc-0.9.33.2.linux-x86_64


Then save the environment variable to use the

SOURCE ~/.BASHRC

3. Compile

MIPSEL-OPENWRT-LINUX-GCC Hello.c-o Hello

4. Run the executable file

Upload Hello file to MT7688 via SCP, modify permissions, run.

Summary: In fact, the whole problem is not difficult, it is difficult to find a variety of blogs in the most direct and appropriate way, in order to get this I follow their links to a lot of bags, some bags do not have a bag how to use a word with a feeling that there is no way to learn the solution, a lot of problems but also finally resolved, long sigh of relief. In order to solve this problem, I remember a lot of commonly used knowledge, such as the various suffix file decompression, environment variables, such as the configuration, nonsense, to study Linux file system-,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.