Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to establish a cross-compilation environment for raspberry pie

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to establish a cross-compilation environment for raspberry pie". It is easy to understand and well-organized. I hope it can help you solve your doubts. Let me lead you to study and learn the article "how to build a cross-compilation environment for raspberry pie".

Virtual machine VirtulBox 5.1.8

Install ubuntu16.04 on computer

Open a command line terminal on a computer that has successfully installed ubuntu

Go to the home directory and execute the following command to install the cross-compilation tool chain

Git clone https://github.com/raspberrypi/tools

This process will take a long time to wait (you can also download the zip package yourself and extract the configuration) after completion

Add the gcc cross-tool chain environment variable to the / .bashrc file.

Sudo nano / .bashrc

At the end of the file, add the directory where the cross-tool chain is located. Note that the ~ symbol indicates the HOME path and .bashrc is a hidden file.

[32-bit system]

ExportPATH=$PATH:$HOME/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin

[64-bit system]

ExportPATH=$PATH:$HOME/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

Note that PATH stands for environment variables, and: colons represent appends. Both kinds of apes have been tried and can be installed successfully.

Save and exit the file, and then execute the following instructions to immediately update the environment variables contained in the current console.

Source / .bashrc

Type arm-linux-gnueabihf-gcc-v to see if the installation is successful, and if the version information similar to the one shown below proves that our cross-compilation tool is installed, we can compile the program running on the raspberry pie.

You can see that my version is 4.8.3. If you are interested, you can write a Mini Program by yourself, and then compile and download it to the raspberry pie to run. In the next lesson, we will talk about how to use the cross compiler to compile the kernel source code. The installation of cross-compilation environment for other platforms is also similar, download the cross-tool chain source code, extract the source code, configure environment variables, view the version, simple testing, if successful, it can be used to compile and develop programs, as well as kernel migration compilation, driver migration compilation, etc. Successful installation of the cross-compilation environment is the foundation, so I hope everyone will install it.

These are all the contents of the article "how to build a cross-compilation environment for raspberry pie". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report