Buildroot configuration process

Source: Internet
Author: User
Tags gdb debugger

$ Tar jxvf buildroot-snapshot.tar.bz2

$ CD buildroot

$ Make menuconfig

The configuration items are as follows: target architecture (ARM) --- à

Target architecture variant (arm926t) -- à

Target Abi (oabi) --- à

BuildOption -- à this item only makes the following changes (ARM-Linux-GNU) GNUBuildHostname suffix and others are default options

Toolchain type (buildroot toolchain) -- à

Toolchain options --- à

--- Kernel Header Options

Kernel headers (Linux 2.6.21.x kernel headers)-à

---- Uclibc options

Uclibc C library version (uclinbc0.9.29)-à

(Toolchain/uclibc/uClibc-0.9.29.config) uclibc configuration files

[] Enable locale/gettext/i8n support?

Thread library implementation (Linux threads (stable/old) -- à

[] Thread library debugging

----- Binutils options

Binutils version (binutils 2.17) -- à

() Additional binutils options

----- GCC options

GCC compiler version (GCC 3.4.6)-à

[] Enable setjmp/longjmp exceptions?

() Additional GCC options

[]Build/Install C ++ compiler and libstdc ++?

[]Build/Install objective-C compiler and runtime?

[]Build/Install Fortran compiler and runtime?

[*]Build/Install a shared libgcc?

------- Ccache options

[] Enable ccache support?

-------- GDB options

[]BuildGdb debugger for the target

[]BuildGDB server for the target

[]BuildGDB for the host

--------- This option is not configured for elf2flt

--------- This option is not configured in common toolchain options

(-OS-pipe) Target Optimizations

[*] Include target utils in cross toolchain

Package selection for the target -- à busybox additional compilation, not configured here

Target options-à [*] ext2RootThe filesystem is configured by default.

Board support options --- à [*] Atmel target other Not Configured

 

$ Make all

 

After compilation, you can see the following file in the staging_dir Directory: Arm-Linux arm-Linux-uclibc bin include info lib libexec man USR where bin is the corresponding cross-compilation tool, the Lib in the arm-Linux directory is the corresponding library.

 

To verify that the cross-compilation tool works properly, modify the content in the. bash_profile file and comment out export Path = $ path:/usr/local/ARM/3.4.1/bin to add it:

Export Path = $ path:/home/yyl/project1/buildroot/Build_ ARM/staging_dir/bin

 

Restart the system and run the arm-Linux-gcc-version command to detect that the current arm-Linux-GCC version is 3.4.6.

 

Modify the MAKEFILE file under the linux-2.6.21 directory:

Set cross_compile =/usr/local/ARM/3.4.1/bin/ARM-Linux-

Changed to cross_compile =/home/yyl/project1/buildroot/Build_ ARM/staging_dir/bin/ARM-Linux-

 

Since I am using the at91sam9261ek board, you can refer to the documentation for other compilation steps.Linux2.6.21 port kernel to at91sam9261ek

You can obtain the uimage file by compiling the document.

 

Finally, use the new cross-compilation tool, compile the busybox-1.00, when using the make menuconfig command to configure options, you only need to modifyBuildOptions à [*] Do you wantBuildBusybox with a cross compiler?

(/Home/yyl/project1/buildroot/Build_ ARM/staging_dir/bin/ARM-Linux-) This file is used by all others.Linux-2.6.20 kernel porting to AT91RM9200-EK

The ramdisk creation method is implemented step by step. Only the following steps need to be modified (marked in red), and other steps do not need to be modified:

A. C. Prepare the Lib Library File
# Cd/mnt
# Mkdir lib
# Cd/home/yyl/project1/buildroot/Build_ ARM/staging_dir/ARM-Linux/lib
# For file in libc libcrypt libdl libm libpthread libresolv libutil
> Do
> CP $ file-*. So/mnt/lib
> CP-d $ file. So. [* 0-9]/mnt/lib
> Done
# Cp-d ld *. So */mnt/lib

 

Finally, download uimageand ramdisk.gz to the at91sam9261ek board through TFTP, start the system, the system runs properly, you can see through Linux version 2.6.21 (yyl@localhost.localdomain) (GCC version 3.4.6) Here GCC is 3.4.6, in the lib directory, the value of uclibc is 0.9.29.

 

This verifies that the cross-compilation tool works properly. The cross-compilation tool has been created.

For more information about buildroot, see this document http://buildroot.uclibc.org/buildroot.html.

 

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.