Build a uboot compiling environment based on MIPS

Source: Internet
Author: User

Work needs. We are going to port uboot on MIPS for two days. Now we can record the environment setup method as follows:

1. Prepare the compilation tool
Uboot MIPS part using mips_4kc-gcc compilation, so can not use the GNU development package MIPS-elf-GCC under cygwin, mainly because uboot using the GP pointer, when MIPS-elf-GCC is used, it may be relocated and thus cannot work normally. Well, here we will focus on building a compilation environment based on the mips_4KC-gcc tool chain.
Step 1: download the latest ubootsource code from http://sourceforge.net/projects/u-boot.
Step 2: Decompress the uboot package and read the README document in the root directory carefully. Here you can get a rough idea about the entire uboot structure. It also tells you that the uboot compiling environment requires ELDK (Embedded Linux Develop Kit ).
Step 3: To begin. Sorry, ELDK cannot be installed in sygwin. Therefore, either you use Linux or you have to install VMware. The VMware installation solution I used
Step 4: Download a VMware software and a Linux installation file. I am using vmware6 + redhat9.

 

Ii. Installation of the compilation environment
Step 1: Install vmware6.0 and install redhat9 in it. That's nothing to say.
Step 2: Install VMware Tools to use the share folder feature of VMware to facilitate the use of Windows resources. Here we will mainly use the uboot we downloaded earlier.
Enable the VM shared file function and set the directory. Then we will talk about how to mount cdrom in the system. Now we can see that there is an RPM package in CDROM, copy it out and install it. If it succeeds, an HGFS directory should be added under/mnt, which is the directory under Windows just set.
Step 3: mount the downloaded ELDK image file to the CDROM. You can directly use the VM function in this step. The method is the same as that used for Linux installation. In the system, mount the disc and CP it to any directory of the system, for example (/tmp ). Add the "chmod-R + X Directory" to the files in the directory, and install the files.
Step 4: Decompress the uboot package in the shared directory. All preparations have been completed.

 

Iii. Start Compilation
Step 1: Modify the. bash_profile file in your working directory (root is used) and add the/bin and/usr/bin paths of the ELDK you installed.
Step 2: Go to the uboot root directory and execute the following commands in sequence:
Make distclean
Make incaip_config
Make
If it goes well, uboot. Bin should appear in the uboot root directory!

 

**************************************** *********************************

Some Supplements:
1. Do not use WinRAR to decompress the uboot package, because there are two files with duplicate extension names, because Windows is case insensitive.
2. Do not compile uboot in the share directory, because the LN of ELDK reports an error in the shared directory.
3. After VMware is installed on some machines, the clock is not synchronized with the system clock. As a result, make errors may occur and cannot proceed smoothly. Install the tar toolkit in VMware Tools and perform the following steps in sequence:
Step 1: Run/usr/bin/vmware-config-tools.pl in text mode to enable the additional clock function
Step 2: Execute vmware-toolbox in X-Windows, and select the time synchronization between option and host.
Step 3: Add clock = pit to the end of the kernel row in/boot/GRUB/grub. conf

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.