Gec2410linux2.6.8 kernel porting

Source: Internet
Author: User
Tags decompress file
Gec2410linux2.6.8 kernel porting-general Linux technology-Linux programming and kernel information. For details, refer to the following section. Author: Jackwen
Email: jackwen123@21cn.com
Target Board: GEC2410 (64 m ram 64 M Nandflash)

Compiling environment: ubuntu 7.10
CROSS-compilation tool: CROSS-3.3.2 (cross-3.3.2.tar.bz2)
Kernel package: linux-2.6.8.1 (gec2410-linux-2.6.8.1.tar.bz2)

1. Path for installing the cross-compilation tool:/usr/local/arm2410/
Put the kernel package somewhere and decide on your own!

Run tar jxvf file.tar.bz2 to decompress file.tar.bz2.

2. Add the cross-compiler path to the system path:
# Vi/root/. bashrc
Fill in the blank space after alias l = 'LS-CF:

PATH = $ PATH:/usr/local/arm2410/3.3.2/bin
Export PATH
Start the new system path:
# Source/root/. bashrc
Show new system path:
# Echo $ PATH
View the cross-compiler version number
# Arm-linux-gcc-v

3. Modify the makfile file under the root directory of the linux-2.6.8:
Comment out the following:
# ARCH? = $ (SUBARCH)
# CROSS_COMPILE? =

Add the following content:
ARCH: = arm
CROSS_COMPILE =/usr/local/arm2410/3.3.2/bin/arm-linux-

4. Run # make menuconfig
Error: scripts/kconfig/mconf. c: 91: error: static declaration of 'current _ menu 'follows non-static declaration
Scripts/kconfig/lkc. h: 63: error: previous declaration of 'current _ menu 'was here
Make [1]: *** [scripts/kconfig/mconf. o] Error 1
Make: *** [menuconfig] Error 2

Solution:
Modify the scripts/kconfig/mconf. c file and solve the problem by commenting on the relevant code lines:
Static struct termios ios_org;
Static int rows = 0, cols = 0;
Static struct menu * current_menu; // before *********
// Struct menu * current_menu ;//********
Static int child_count;

Comment out the bold line and uncomment its downstream code. The result is as follows:
Static struct termios ios_org;
Static int rows = 0, cols = 0;
// Static struct menu * current_menu; // After the ********* is modified
Struct menu * current_menu ;//********
Static int child_count;

Run: # make menuconfig
Error:
> Unable to find the Ncurses libraries.
>
> You must install ncurses-devel in order
> To use 'make menuconfig'

Make [2]: *** [scripts/lxdialog/ncurses] Error 1
Make [1]: *** [menuconfig] Error 2
Make: *** [menuconfig] Error 2

Solution: Install ncurses-dev (** note the package name **)
# Apt-get install ncurses-dev

Run: # make menuconfig
Load the default gec2410.cfg

Last: # make
Complete Transplantation

Note: Update bootloader (GEC2410_BOIS_bin)

<End>

Enjoy it!
Related Article

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.