Build the MIPS cross-compiling environment on Ubuntu

Source: Internet
Author: User
Tags openssh server ssh server
In order to write a program to run on the DD-WRT (broadcom), I tried several ways to build a cross-compilation environment, and finally met my own needs in the simplest way. 1. It is very troublesome to build a cross-compiling environment in cygwin. It is necessary to download the source code and compile it by yourself. Due to the port to the Windows platform, some strange small problems may often occur and are not recommended. 2. I used to directly perform cross-compiling on the vro. This is not a problem. It is very slow and not recommended. 3. In fact, I am only using VMWar

In order to write a program to run on the DD-WRT (broadcom), I tried several ways to build a cross-compilation environment, and finally met my own needs in the simplest way.

1. It is very troublesome to build a cross-compiling environment in cygwin. It is necessary to download the source code and compile it by yourself. Due to the port to the Windows platform, some strange small problems may often occur and are not recommended.

2. I used to directly perform cross-compiling on the vro. This is not a problem. It is very slow and not recommended.

3. In fact, I just installed a Ubuntu 9.04 in VMWare, and then download the compiled open-wrt toolchain to decompress it, You can directly compile the http://www.dd-wrt.com/dd-wrtv2/downloads/others/sourcecode/toolchains/gcc.3.4.4-broadcom-mipsel.tar.bz2

4. Install the MIPS simulator

Sudo apt-get install qemu

Qemu-mipsel-L/home/steeven/work/dd-wrt/home/dd-wrt/whiterussian/openwrt/staging_dir_mipsel/test

On my Ubuntu

Qemu-mipsel-L/home/felix/opt/openwrt/hellofile

Many articles are very complicated. At this time, we need to clarify several concepts, platforms for the compiler to run, and platforms for the target files compiled by the compiler to run. When you are not familiar with cross-compilation, it is easy to mix up and understand that every article is clearly written ~~~.

Appendix:

1. install openssh server for Ubuntu,

No ssh server is installed in Ubuntu by default. You need to install it manually.

Sudo apt-get install openssh-server

2. ubuntu cannot directly install the rpm package. For example, I want to install VMWare Toolkit.

Sudo apt-get install alien # alien is not installed by default, so install it first
Sudo alien xxxx. rpm # convert rpm to deb. A xxxx. deb with the same name is generated.
Sudo dpkg-I xxxx. deb # Installation

3. Start the compiled program

I. Start in startup script is the daemon method and has nothing to do with the terminal.

Ii. In the terminal, you can add the & later processes to run the command, e.g./opt/share/startme &

Iii. You can run it with nohup Command [Arg.

 

This article comes from:Http://www.youwise.com/2009/06/cross-compile-on-ubuntu/

Related Article

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.