วันศุกร์ที่ 26 กุมภาพันธ์ พ.ศ. 2553

HOW TO COMPILE KERNEL


HOW TO COMPILE KERNEL

  1. Providing environment

    you need to install needed packet and follow by
    #sudo apt-get update
    #sudo apt-get install build-essential
    #sudo apt-apt-get install libncurses5-dev
    #sudo apt-get install uboot-mkimage
  2. Download kernel source (from now,I use 2.26.33 version)

    from http://www.kernel.org/
    and extract it to your desire directory  (I extract in to /home/mestcom/Desktop/src/ then I would get /home/mestcom/Desktop/src/linux-2.6.33 )

    **

  3. Download toolchain from
    http://www.codesourcery.com/sgpp/lite/arm
    and extract(now I extrat in to /home/(your user)/bin/)

    set path of toolchains
    #export $PATH:/home/mestcom/bin/codesourcery-armgcc-2009q1/bin/:$HOME/bin
  4. go into linux source directory

    config .config file to match your board.

    #make sam9_l9260_defconfig
    #export ARCH=arm
    #export CROSS_COMPILE=arm-none-linux-gnueabi-
    #make menuconfig
    you would see config window and then exit and save
    (if you need to config an environment,you can do in this then exit and save BUT make sure that you config as the cross compiling may not work)
  5. Cross Compile kernel

    #make uImage
    after that u need to just wait...
  6. When Cross compiling finish, you would get uImage file in (kener source directory)/arch/arm/boot/ directory
  7. make modules
    #mkdir kernel-modules
    #make modules INSTALL_MOD_PATH=kernel-modules/
    #make modules_install INSTALL_MOD_PATH=kernel-modules/
  8.  

ไม่มีความคิดเห็น:

แสดงความคิดเห็น