Ubuntu Step-by-step uclinux compilation and porting (full version)

Source: Internet
Author: User

This section mainly contains (ubuntu10.04)

One, often using the compression decompression command under Linux

Second, setting up the environment

Third, kernel compilation

IV, transplant


One, often using the compression decompression command under Linux

Common compressed file formats under Linux are tar gzip zip bzip2 compress etc.

First, for the tar format, compression and decompression methods such as the following

. Tar decompression #tar-xvf file1.tar compression #tar-CVF File1.tar

. tar.gz decompression #tar-zxvf file1.tar compression #tar-ZCVF File1.tar

. tar.bz decompression #tar-jxvf file1.tar compression #tar-JCVF File1.tar

For gzip format, compression and decompression methods such as the following

. gz suffix Decompression #gzip-d file1.gz Compression #gzip file1

For the ZIP format, compression and decompression methods such as the following

Unzip the. zip suffix #uzip file1.zip compression #zip file.zip file1 file2 file3

For bzip2 format, compression and decompression methods such as the following

. bz2 decompression #bunzip2 file.bz2 Compression #bzip2 *



Second, setting up the environment

First of all, the cross-tool setup (see the previous article, the Embedded development environment established)

Provided by others (

Uclinux,:http://www.uclinux.org/pub/uclinux/dist/uclinux-dist-20051110.tar.gz
Cross-compilation environment: http://www.uclinux.org/pub/uClinux/uclinux-elf-tools/arm-elf-tools-20030314.sh

I'm using the arm-elf-tools provided by Tianxiang.

Copy the software arm-elf-tools-20040427.sh in the CD-ROM code to
Run under the root folder of Linux./arm-elf-tools-20040427.sh results +43 error occurred

(Some people say #chmod 777 arm-elf-tools-20040427.sh after the run will not be wrong do not know not to have tried)

The workaround:

#tail-n+43 arm-elf-tools-20040427.sh >> 1.tar.gz

#tar-ZXVF 1.tar.gz

After running, enter ARM-ELF-GCC–V in console

Assuming a successful installation, a version like 2.95.3 will appear.

See where it's installed

#which ARM-ELF-GCC

Check to see if paths are being increased by path:
Echo $PATH

Should be able to see the path where our compilation tool is located


Then get ready for the Uclinux kernel, I'm using 2.4 here.

I just put it in the Home/wenzer/share directory. This directory is shared with Windows

So it's more convenient.

Extract
#tar Xvzf uclinux2.4.tar.gz

And then wait for the compilation

Third, kernel compilation

In the directory we just unzipped, we need to change a file.

#cd uclinux-dist
#make Mrproper

Waiting "...

(I have an error that has been ignored, saying that missing relase I ignored this hint)
Change file 1

#vi linux2.4.x/arch/armnommu/vmlinux-armv.lds.in


In __sto__kallsyms =,;
* (. Got), add the following:
Romfs_data =.;
romfa.o
Romfs_data.end =.;
Then Wq quit.
This step assumes that you are not doing it, and the compile time will be wrong (there must be spaces on both sides of the equals sign).


(4510 need to change makefile

#vi Vendors/samsung/4510b/makefile
The next line in Genromfs-v-V "Romdisk"-F $ (ROMFSIMG)-D $ (romfsdir) is incremented
arm-elf-ld-r-o $ (rootdir)/$ (linuxdir)/romfs.o-b binary $ (romfsimg)
then Wq save Exit

)

#make Menuconfig

Something went wrong.

>> unable to find the ncurses libraries.
>>
>> You must has ncurses installed in order
>> ' Make Menuconfig '

Workaround:

Run command: sudo apt-get install Ncurses-dev is available!

(Ncurses for Make Menuconfig interface display

Go ahead and make a try OK Go to the Configuration interface

IV, transplant

I split the transplant into four paragraphs, the first three paragraphs. The last paragraph of the configuration generates the image file: Select company and Product
Exit to save the middle will ask you to not IIC ah such as all the way to enter whether waiting ... Second paragraph: Configuration interface appears configuration system
Save exit third paragraph configuration Interface three appear
Application and BusyBox the fourth segment generates mirroring #make DEP
#make Lib_only This step is going to go wrong. Install the software #apt-get installation bison again #make lib_only
Next
#vi Config/.config
And then Stare "config_user_old_passwords=y" out of "#CONFIG_USER_OLD_PASSWORDS =y."
#make user_only
#make Romfs
#make image
Assuming this step is wrong, no matter whether he continues to run the next
#make
This will generate the files we want under/image.
。 Ram end can be executed directly in RAM Image.rom is capable of self-extracting is exactly what we need to burn into flash

Ubuntu Step-by-step uclinux compilation and porting (full version)

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.