Cross-compile Linux Kernel

Source: Internet
Author: User

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: extract the http://dev.lemote.com/files/binary/toolchain/kernel/gcc-3.4.6-newbin.ls2f.tar.gz to the/opt directory, first modify the/opt permission sudo chmod 766/opt tar-xzf gcc1_3.4.61_newbin.ls2f.tar.gz-C/opt and then specify its PATH export PATH =/opt/gcc-3 in the mirror variable. 4.6-newbin/bin: $ PATH can also be written ~ /. 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 is already. 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 interface 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.

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.