Compiling environment: Ubuntu7.10 cross compiling 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. Install the cross compiling tool
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;