天津至扬州泰州飞机:今天重新编译成功2.6.31.1内核| Linux交流区

来源:百度文库 编辑:偶看新闻 时间:2024/04/27 13:30:22

今天重新编译成功2.6.31.1内核

[post]首先下载linux.2.6.31.1.tar.bz2,然后解压缩到/opt/FriendlyARM/mini2440/下。
因为该内核已经支持mini2440,故
yagerya@yagerya-desktop:/opt/FriendlyARM/mini2440/linux-2.6.31.1$
yagerya@yagerya-desktop:/opt/FriendlyARM/mini2440/linux-2.6.31.1$
yagerya@yagerya-desktop:/opt/FriendlyARM/mini2440/linux-2.6.31.1$ cp arch/arm/configs/mini2440_defconfig .config

yagerya@yagerya-desktop:/opt/FriendlyARM/mini2440/linux-2.6.31.1$
yagerya@yagerya-desktop:/opt/FriendlyARM/mini2440/linux-2.6.31.1$ make menuconfig
然后保存退出。
yagerya@yagerya-desktop:/opt/FriendlyARM/mini2440/linux-2.6.31.1$ make zImage
这样就出现如下错误:
a[color=#ff0000]rch/arm/mach-s3c2440/built-in.o:(.init.data+0x724): undefined reference to `s3c_device_usb' make: *** [.tmp_vmlinux1] 错误 1
[/color]
查看Kconfig文件:
# arch/arm/mach-s3c2440/Kconfig
#
# Copyright 2007 Simtec Electronics
#
# Licensed under GPLv2

config CPU_S3C2440
        bool
        depends on ARCH_S3C2410
        select CPU_ARM920T
        select S3C2410_CLOCK
        select S3C2410_PM if PM
        select S3C2410_GPIO
        select S3C2440_DMA if S3C2410_DMA
        select CPU_S3C244X
        select CPU_LLSERIAL_S3C2440
        help
          Support for S3C2440 Samsung Mobile CPU based systems.
      .........................................................................................................
        select CPU_S3C2440
        select PM_H1940 if PM
        help
          Say Y here if you are using the HP iPAQ rx3715.

config ARCH_S3C2440
        bool "SMDK2440"
        select CPU_S3C2440
        select MACH_SMDK
        select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the SMDK2440.

config MACH_NEXCODER_2440
        bool "NexVision NEXCODER 2440 Light Board"
        select CPU_S3C2440
        select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board


config MACH_AT2440EVB
        bool "Avantech AT2440EVB development board"
        select CPU_S3C2440
        select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the AT2440EVB development board

config MACH_MINI2440
        bool "MINI2440 development board"
        select CPU_S3C2440
        select EEPROM_AT24
        select LEDS_TRIGGER_BACKLIGHT
        select SND_S3C24XX_SOC_S3C24XX_UDA134X
        help
          Say Y here to select support for the MINI2440. Is a 10cm x 10cm board
          available via various sources. It can come with a 3.5" or 7" touch LCD.

endmenu
这样就可发现由于mini2440中没有select S3C_DEV_USB_HOST这一项,故出现上面的错误。


好了,我们vim 修改添加它,保存退出。
重新make zImage,就生成了.
...................................................
  Kernel: arch/arm/boot/zImage is ready
root@yagerya-desktop:/opt/FriendlyARM/mini2440/linux-2.6.31.1# ls
arch     Documentation  init    MAINTAINERS     README          sound       [color=#66ff00]vmlinux[/color]
block    drivers        ipc     Makefile        REPORTING-BUGS  System.map  vmlinux.o
COPYING  firmware       Kbuild  mm              samples         tools
CREDITS  fs             kernel  Module.symvers  scripts         usr
crypto   include        lib     net             security        virt