Build Godson cross-compilation environment on virtual machine

Today, learn how to build the Loongson kernel compilation environment on the x86 platform.
First install the virtual machine and download the linux system image.
Insert picture description here
Then download the compiler in the Loongson open source community

Insert picture description here
Select compilation tool

Select cross compiler
Insert picture description here
Download gcc4.4.7 64 bit
Unzip the compiler to the /opt directory
tar -xzf gcc-4.4.7-7215-o32-loongson.tar.gz -C /opt
Set the environment variable
export PATH=/ opt/gcc-4.4.7-7215-xxx-loongson/usr/bin/:$PATH

export LD_LIBRARY_PATH=/opt/gcc-4.4.7-7215-xxx-loongson/usr/x86_64-unknown-linux-gnu/mips64el-redhat-linux/lib:$LD_LIBRARY_PATH
Use the export command to check and find that the environment variables are set. We can compile the kernel.

Guess you like

Origin blog.csdn.net/baidu_33943325/article/details/107351543