Compile the uClinux kernel that can run on ML401 on CentOS3_linux

Source: Internet
Author: User
Compile the uClinux kernel that can run on ML401 on CentOS3_linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. Before that, you need to download CentOS3_linux.

1. Obtain hardware system information from auto-config.in

(1) copy the auto-config.in file generated under EDK that contains hardware system information to the/home/devel/src \ uClinux-2.4.x \ arch \ microblze \ platform \ uclinux-auto path in CentOS3_linux. The compiler needs to know "the address map and the processor system" and other relevant information from the auto-config.in file.

(2) convert auto-config.in files to unix format

Here, you need to convert the auto-config.in file to unix format. The conversion can be completed with the command: dos2unix auto-config.in.

2. Configure the kernel and Application

Run the following command:

$ Cd ~ /UClinux-dist

$ Make menuconfig

(1) initial settings

Choose 'vendor/Product Selection '(Press Enter)

Move down to 'bad' selection, press Enter and choose Xilinx as the Vendor from the list.

Move down to 'xilinx products', and choose the 'uclinux-auto' target, which will enable the tool to generate the library based on your hardware information in the auto-config.in file.

Choose Exit and press Enter

Select 'kernel/Library/ults 'selection

Select 'uclibc' for Libc version

Select 'default all settings (lose changes) 'by pressing SPACE

Choose Exit and press Enter, this will return to the main menu

Choose Exit and press Enter again

Answer Yes to save your new kernel configuration

The following configuration options are displayed on the text interface:

Choose Menory model (RAM, ROM) [RAM] (NEM) and press Enter.



FLASH size (AUTO, NONE, 128 K, 1 MB, 2 MB, 4 MB, 6 MB, 8 MB) [8 MB] (NEW) Press enter. The default value is 8 MB.

Then there is a series of shapes like [N/y/m?] Enter N for all configuration options, and then press Enter.



At this point, we have set the initial settings.

(2) configure the kernel for ML401

Run again:

$ Cd ~ /UClinux-dist

$ Make menuconfig

Then follow the prompts below to configure:

Elect 'kernel/Library/defaults' Selection and press Enter

Check both 'mimize Kernel settings' and 'mimize Vendor/User setting' by pressing SPACE

Choose Exit and press Enter

Choose Exit and press Enter again

Answer Yes to save your new kernel configuration

The tool will come back with Kernel configuration main menu

Select 'processor type and features 'and press Enter

Uncheck the 'gpio driver ', uncheck' Kernel internal Lind support' and uncheck' Enable debug logging 'by pressing SPACE

Choose Exit and press Enter

Select 'memory Technology Devices (MTD) 'and press Enter

Select 'ing ing drivers for chip access' and press Enter

Uncheck 'cfi Flash device mapped on Microblaze/mbvanilla (uClinux) 'by pressing SPACE

Choose Exit and press Enter

Choose Exit and press Enter again

Choose Exit and press Enter, and answer Yes to save your new kernel configuration

(3) Configuration Software

The tool will come back with application configuration main menu

Select 'network Applications 'and press Enter

Check 'telnetd does not use openpty () 'by pressing SPACE

Choose Exit and press Enter

Select 'miscellances' and press Enter

Check 'dhrystone 'by pressing SPACE

Choose Exit and press Enter

Choose Exit and press Enter, and answer Yes to save your new kernel configuration

Here, we need to manually modify ~ /UClinux-dist/linux-2.4.x/. config file.

Run the following command:

$ Vi. config

Find CONFIG_MTD_UCLINUX and change it to CONFIG_MTD_UCLINUX = y.



3. Making the image

Run:

$ Cd ~ /UClinux-dist to this path

$ Make dep compilation 2. 4. Required kernel steps

$ Make clean clear old legacy files

$ Make compile the kernel



This process takes about 15 minutes, during which the following content will be completed:

Compile the kernel Build kernel (uClinux-dist/linux-2.4.x)
Compile the C library Build C libraries (uclinux-dist/uClibc) of uClinux)
Compile user program Build user applications (uClinux-dist/user)
Convert to a binary file Convert to flat binary format
Compile the Kernel file system Build local image of the root file system (uClinux-dist/romfs)
Merge the kernel and file system into a binary file Merge the kernel and file system to a single image (uClinux-dist/images)



After compilation, the image. elf and image. bin files are displayed in the image folder. This ELF package contains debugging information, so it is much larger than the binfile. Here we only need to download the binfile to ml401.

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.