Cross-compile Linux kernel 1. download linux kernel source code I'm using a linux-loongson-release-zb-kernel.tgz to decompress it to the/usr/src Directory: tar-xzvflinux-loongson-release-zb-kernel.tgz will generate linux -... cross-compile Linux kernel 1. download linux kernel source code I used is the linux-loongson-release-zb-kernel.tgz to decompress it to the/usr/src Directory: tar-xzvf linux-loongson-release-zb-kernel.tgz in this directory will generate linux-loongson-release directory www.2cto.com II. download the cross-compilation tool: http://dev.lemote.com/files/binary/toolchain/kernel/gcc-3.4.6-newbin.ls2f.tar.gz Decompress the package to the/opt directory. first, modify the/opt permission sudo chmod 766/opt tar-xzf gcc? 3.4.6? Newbin.ls2f.tar.gz-C/opt and then specify its PATH export PATH =/opt/gcc-3.4.6-newbin/bin: $ PATH in the loop variables to write it ~ /. Bashrc, easy to use multiple times to set executable permissions chmod + x/opt/gcc-3.4.6-newbin/bin-R www.2cto.com III. the kernel configuration is in the source code directory: cp arch/mips/configs/loongson3a_xxxx_config. note: currently, five loongson3a_dawning_config loongson3a_rs780e_config loongson3a_server_config configuration files are available under arch/mips/configs, and then make config. you will find that the default loongson3a_server_config configuration file has been. 4. compile the kernel www.2cto.com 1. local compilation directly make the completion of Kernel Compilation 2. cross-compilation In the root directory of the kernel source code, enter make ARCH = mips CROSS_COMPILE = mipsel-linux-or modify makefile. modify the makefile in the root directory and assign the following value to the ARCH variable: ARCH? = Mips assigned CROSS_COMPILE variable CROSS_COOMPILE? = Mipsel? Linux? Note: Before executing this step, make menuconfig to enter the configuration page and select Enable loadable module support. then, select 3 and 4, or 2 and 4 in the lower-level directories. after the modification, select Save an Alternate Configuration File to Save the modification.
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