Fedora8 environment 2.6 kernel compilation steps

Source: Internet
Author: User
The first time we compiled the 2.6 kernel, it was very difficult, and there was always a problem. (Fedora8, kernel 2.6.25) at the beginning, I used the 2.6.26 kernel to decompress the package in the root directory. After makemenuconfig, there was no room to select arm, after checking the information on the Internet, enter the command makeARCH = armcros_compile = arm-linux-menuconfig. However, this is also a problem because none of your menuconfig options are saved,

The first time we compiled the 2.6 kernel, it was very difficult, and there was always a problem. (Fedora 8, kernel 2.6.25)

At the beginning, I used the 2.6.26 kernel to decompress the package in the root directory. After make menuconfig, there is no room for arm, after checking the information on the Internet, enter the command make ARCH = arm CROSS_COMPILE = arm-linux-menuconfig. However, this is also a problem because none of your menuconfig options are saved, it still requires you to choose one by one. This is too troublesome and you can find a solution. Modify the Makefile in the 2.6.26 directory, mainly including the following two items:

ARCH = arm

CROSS_COMPILE =/usr/local/arm/3.4.1/bin/arm-linux

(/Usr/local/arm/3.4.1/bin/arm-linux is the address of your compiler)

In this way, make menuconfig directly. However, a problem occurs immediately after make:

Include/asm/page. h: 111: 2: # error Unknown user operations model

Make [1]: *** [arch/arm/kernel/asm-offsets.s] Error 1

Make: *** [prepare0] Error 2

Make [1]: *** [arch/arm/kernel/asm-offsets.s] Error 1

Make: *** [prepare0] Error 2

I have not done well with this problem for three days.

Later I put the kernel in the/usr/src directory to re-compile, there is no arch/arm/kernel/asm-offsets.s this problem, but there are new problems:

Drivers/gpio/gpiolib. c: In function 'gpiolib _ dbg_show ':

Drivers/gpio/gpiolib. c: 1060: error: implicit declaration of function 'gpio _ to_irq'

Make [2]: *** [drivers/gpio/gpiolib. o] Error 1

Make [1]: *** [drivers/gpio] Error 2

Make: *** [drivers] Error 2

Modify makefile in the drivers/gpio/directory to block gpiolib. c. But the new problem comes again:

Scripts/kconfig/mconf arch/arm/Kconfig

#

# Using defaults found in/boot/config-2.6.25.6-27.fc8

#

/Boot/config-2.6.25.6-27.fc8: 1622: warning: symbol value 'M' invalid for IWL4965

/Boot/config-2.6.25.6-27.fc8: 1769: warning: symbol value 'M' invalid for ISDN

Your display is too small to run Menuconfig!

T must be at least 19 lines by 80 columns.

Make [1]: *** [menuconfig] Error 1

Make: *** [menuconfig] Error 2

I can't change the version. 2.6.25 has been there again, but the problem comes after make:

Include/asm/glue. h: 119: 2: # error Unknown data abort handler type

In file sorted ded from include/linux/mm_types.h: 13,

From include/linux/sched. h: 61,

From arch/arm/kernel/asm-offsets.c: 13:

Include/asm/page. h: 103: 2: # error Unknown user operations model

In file sorted ded from include/asm/semaphore. h: 13,

From include/linux/sched. h: 64,

From arch/arm/kernel/asm-offsets.c: 13:

Include/asm/locks. h: 15: 5: warning: "_ LINUX_ARM_ARCH _" is not defined

Make [1]: *** [arch/arm/kernel/asm-offsets.s] Error 1

Make: *** [prepare0] Error 2

For version 2.6.27, after make:

Arch/arm/plat-s3c24xx/gpiolib. c: 254: undefined reference to 'gpiochip _ add'

Make: *** [. tmp_vmlinux1] Error 1

I blocked gpiolib but still encountered an error:

Rivers/gpio/gpiolib. c: In function 'gpiolib _ dbg_show ':

Drivers/gpio/gpiolib. c: 1060: error: implicit declaration of function 'gpio _ to_irq'

Make [2]: *** [drivers/gpio/gpiolib. o] Error 1

Make [1]: *** [drivers/gpio] Error 2

Make: *** [drivers] Error 2

I personally feel that I have used many of these versions to support arm. For example, I chose arm2410 to support multiple versions at the same time, such as 2440,2400. So I used 2.6.15. After make:

Drivers/media/radio/radio-maestro.c: 294: warning: comparison is always true due to limited range of data type

Drivers/media/radio/radio-maestro.c: 294: warning: comparison is always true due to limited range of data type

Drivers/media/radio/radio-maestro.c: 297: warning: comparison is always true due to limited range of data type

Drivers/media/radio/radio-maestro.c: 297: warning: comparison is always true due to limited range of data type

Make [3]: *** [drivers/media/radio/radio-maestro.o] Error 1

Make [2]: *** [drivers/media/radio] Error 2

Make [1]: *** [drivers/media] Error 2

Make: *** [drivers] Error 2

The old method is to modify the makefile of the current directory. During Compilation:

Make [3]: *** [drivers/video/console/vgacon. o] Error 1

Make [2]: *** [drivers/video/console] Error 2

Make [1]: *** [drivers/video] Error 2

Make: *** [drivers] Error 2

When you make menuconfig, Graphics support-> console display driver support-> vga text console (this is not selected) is compiled in:

Usr/local/arm/3.4.1/bin/arm-linux-ld: no machine record defined

Make: *** [. tmp_vmlinux1] Error 1

The last two lines of arch/arm/kernel/vmlinux. lds (as shown below) found by google are commented out, but not why

ASSERT (_ proc_info_end-_ proc_info_begin), "missing CPU support ")

ASSERT (_ arch_info_end-_ arch_info_begin), "no machine record defined"

Later, I went to arch/arm/kernel/vmlinux. lds to read the comments.

These must never be empty

If you have to comment these two assert statements out, your

Binutils is too old (for other reasons as well)

After compilation.

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.