4-Install Linux Kernel

来源:互联网 发布:linux如何取得root权限 编辑:程序博客网 时间:2024/05/19 04:55

原文地址:http://www.embededsystems.ir/1_5_Linux-for-at91sam9260.html


 

4-Install Linux Kernel:

first download linux kernel with this command :       wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.bz2or this link:http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.tar.bz2     tar xvjf linux-2.6.30.tar.bz2         cd linux-2.6.30then download patch with:   wget http://maxim.org.za/AT91RM9200/2.6/2.6.30-at91.patch.gz or this link:http://maxim.org.za/AT91RM9200/2.6/2.6.30-at91.patch.gz(You can find patch and experimental patch and my config in this link)apply patch:    zcat 2.6.30-at91.patch.gz | patch -p1download experimental patch(usually for at91sam9260ek development board but also for most custom design board) with:    wget ftp://www.linux4sam.org/pub/linux/2.6.xx.at91/2.6.30-at91-exp.4.tar.gzor download link:ftp://www.at91.com/pub/linux/2.6.30-at91/2.6.30-at91-exp.4.tar.gzapply it:

     tar xvzf 2.6.30-at91-exp.4.tar.gz

   for p in 2.6.30-at91-exp.4/*; do patch -p1 < $p ; donenow apply download fefault config(you can next time change for requirment)        wget http://www.at91.com/linux4sam/pub/Linux4SAM/LinuxKernel/at91sam9260ek_defconfigdownload link:             ftp://www.at91.com/pub/linux/2.6.30-at91/at91sam9260ek_defconfig                cp at91sam9260ek_deconfig .configchange this files:
 
arch/arm/mach-at91/board-sam9260ek.c:171

           .is_rmii   = 0,

 
 
arch/arm/mach-at91/board-sam9260ek.c:212
 
            .ncs_read_setup               =0, 

           .nrd_setup                     = 1,

           .ncs_write_setup             = 0,

           .nwe_setup                    = 1,

 

           .ncs_read_pulse               = 2,

           .nrd_pulse                     = 2,

           .ncs_write_pulse              = 2,

           .nwe_pulse                     = 2,

 

           .read_cycle                    = 4,

           .write_cycle                    = 4,

 

           .mode                           = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,

           .tdf_cycles                     = 2,

if you have ds1307 or ds1337 on your board and eeprom:for eeprom select correct name and size and page size and address type(AT24_FLAG_ADDR16 or AT24_FLAG_ADDR8)also correct base address
 
arch/arm/mach-at91/board-sam9260ek.c:
 
 
static struct at24_platform_data at24c128 = { 

           .byte_len            =SZ_128K / 8,

           .page_size           = 64,

           .flags                = AT24_FLAG_ADDR16,

};

static structi2c_board_info __initdata ek_i2c_devices[] = {

           {

                       I2C_BOARD_INFO("24c128", 0x53),//base address of eeprom

                       .platform_data = &at24c128,

           },

           {

                       I2C_BOARD_INFO("ds1337",0x68),

           },

           /* more devices can be added using expansion connectors */

};

I addition you must change config :
 
device drivers->I2c support->I2c hardware bus support->GPIO-based bitbanging I2C
 
 
device divers->Miscdevices->EEPROM support-> <*> I2C EEPROMs from most vendors
then:        make ARCH=arm oldconfig now you can modify default config:       make ARCH=arm menuconfig now compile linux kernel:        make ARCH=arm CROSS_COMPILE=(use cross compile address i test with 4.2.4 and buildroot) uImageif all was true you will have uImage in arch/arm/boot/ folder.Now you must upload in board.

 


0 0
原创粉丝点击