Embedded Learning Note 200-linux Kernel first experience

Source: Internet
Author: User

    1. This experiment uses linux-2.6.30.4 version test, cross-compiling to 4.3.3, the relevant source code can be downloaded by themselves or to this blog to see if there is, in their own environment to try to compile kernel by ensuring that the environment OK for subsequent porting ready.
    2. Unzip the downloaded linux-2.6.30.4.tar.bz2 to the location you specified tar jxvf linux-2.6.30.4.tar.bz2-c your_path
    3. Modify the Compilation tool and schema: Enter the kernel root CD linux-2.6.30.4 modify makefile, about 193 will arch = (Subarch) change to arch = arm, 194 rows of cross_compile? = to CRO Ss_compile =/xx/xx/4.3.3/bin/arm-linux-
    4. Basic work can start to try to compile the image file, execute make menuconfig in the root directory for kernel configuration, but there are the following prompt:
      [Email protected]:~/samba/linux-2.6.30.4$ make Menuconfig
      Unable to find the ncurses libraries or the required header files.
      ' Make Menuconfig ' requires the ncurses libraries.

      Install ncurses (Ncurses-devel) and try again.

MAKE[1]: [Scripts/kconfig/dochecklxdialog] Error 1
Make: [Menuconfig] Error 2
[Email protected]:~/samba/linux-2.6.30.4$
Tip requires ncurses libraries to execute sudo apt-get install Ncurses-dev at the terminal, but another error has occurred:
"Warning": The following packages cannot be verified!
Libtinfo-dev Libncurses5-dev
Do you want to install these packages without verification? [y/n] Y
Error Http://hk.archive.ubuntu.com/ubuntu/precise/main Libtinfo-dev i386 5.9-4
Some failures occurred while parsing "Hk.archive.ubuntu.com:http" (-5-no address associated with host name)
Error Http://hk.archive.ubuntu.com/ubuntu/precise/main Libncurses5-dev i386 5.9-4
Some failures occurred while parsing "Hk.archive.ubuntu.com:http" (-5-no address associated with host name)
Unable to download Http://hk.archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libtinfo-dev_5.9-4_i386.deb parsing " Hk.archive.ubuntu.com:http ", there was some failure (-5-no address associated with the host name)
Unable to download Http://hk.archive.ubuntu.com/ubuntu/pool/main/n/ncurses/libncurses5-dev_5.9-4_i386.deb parsing " Hk.archive.ubuntu.com:http ", there was some failure (-5-no address associated with the host name)
E: Several packages cannot be downloaded, you can run Apt-get update or add –fix-missing option to try again?
The last discovery is that Ubuntu is not connected ........ .......
In the VBox to change the bridge to Nat, and then to the bridge so that the Win7 can be accessed, after all, using Samba to achieve Win7 and Ubuntu interconnection. However, before VBox is configured to configure a configuration of two network adapters a configuration of NAT, but I do not know how my vbox can not set up a second Nic .....
The following screen appears after make Menuconfig:

Here we just verify that kernel can compile the past, so use the kernel configured config, move the cursor to the bottom of the bottom second there is a "Load an Alternate Configuration File", press ENTER to enter the input box, enter the address as " /arch/arm/s3c2410_defconfig ", if the input error to ctrl+backspace to delete, if you exit the last click" YES "is only saved to the previous load file, should be on the first page to move the cursor to the bottom of the" save An Alternate configuration file "is saved directly as". config "and a. config profile is generated under the root directory, and make Menuconfig will import the configuration file directly in the future. Changes to Menuconfig after import are saved directly to this. config, so if you want this. config to be a blueprint that you do not want to be modified can be imported and then do not directly exit click "YES", but choose "Save an Alternate Configuration File, but it is recommended that you back up directly in the root directory. config cp. config. config.bak
5. Save the configuration after you exit directly make all
Then a series of compilations will take about 7, 8 minutes, depending on your computer configuration,
The zimage will be generated at the end of the arch/arm/boot/
At this point, the environment required for Linux kernel is OK, ready for the next porting

Embedded Learning Note 200-linux Kernel first experience

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.