U-boot porting on mini2440-S3C2440 (1) - Development environment setup - Cross-compilation toolchain installation

Publisher:legend9Latest update time:2022-05-20 Source: eefocusKeywords:U-boot Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

When compiling U-boot for mini2440, to compile an executable file -bin that can be used on the ARM platform, you must first install the cross-compilation tool chain in Ubuntu. Because I use the development board of Friendly Arm, I use the tool chain that has been made. Of course, you can also make your own tool chain: if you make a tool chain based on GCC and glibc, you can use cross tools to compile;

The version of the tool chain I use is arm-linux-gcc-4.3.3, download address: Download address

1. After downloading on the PC, transfer the compressed package to Ubuntu using xftp; of course, you can also use other software to upload it; after uploading, put it in the /usr/local folder in the root directory to create a new arm folder, and then copy the compressed package to this folder; note that creating a folder before uploading can reduce a lot of workload;

Be sure to upload the compressed package and decompress it in Ubuntu;

Be sure to upload the compressed package and decompress it in Ubuntu;

Be sure to upload the compressed package and decompress it in Ubuntu;

2. Decompression command: # tar -xzf Filename.tar.gz

3. After decompression, an opt folder will appear. Keep looking down and find ./opt/FriendlyARM/toolschain/4.4.3/bin. Remember this path;

4. Add the directory where the cross-compilation tool chain is located to the environment variables of the Ubuntu system.


Modify the /etc/environment file and set it to the following:

insert image description here

5. Modify the ~/.bashrc file and add the following content at the end of the file:


    export PATH=$PATH:/opt/FriendlyARM/toolschain/4.4.3/bin


6. Save and close: Execute source ~/.bashrc in the terminal to make the environment variables take effect;

7. Execute echo $path to check whether the path added in step 4 is added successfully;

insert image description here

8. Execute arm-linux-gcc -v to test whether the installation is successful;

insert image description here

9. Congratulations, the installation is complete. Do you think it's over? No.

10. As an ARM-linux engineer, you may want to go to your U-boot directory and try the following commands:

make distclean

make mini2440_config

make

If an error occurs, it means that the arm-linux-gcc in the Makefile in the directory you executed is different from the toolchain version you installed;

Now find the Makefile you want to compile and find the error indication;

For example; when I tested, arm-9tdmi-linux-gnu-gcc appeared. . . .

Use grep to find its location in the Makefile, and then change it to the version of the toolchain you installed;

success!!!

Keywords:U-boot Reference address:U-boot porting on mini2440-S3C2440 (1) - Development environment setup - Cross-compilation toolchain installation

Previous article:U-boot porting on mini2440-S3C2440 (3) - Phase 1: Exploring the boot code
Next article:U-boot porting on mini2440-S3C2440 (2)

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号