實(shí)用linux2.6.14在te2410開發(fā)板上的移植_第1頁(yè)
實(shí)用linux2.6.14在te2410開發(fā)板上的移植_第2頁(yè)
實(shí)用linux2.6.14在te2410開發(fā)板上的移植_第3頁(yè)
實(shí)用linux2.6.14在te2410開發(fā)板上的移植_第4頁(yè)
已閱讀5頁(yè),還剩6頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、LINUX2.6.14 在 TE2410 開發(fā)板上的移植作者:王 鵬 喬 鵬本實(shí)驗(yàn)是在 TE2410 開發(fā)板上實(shí)現(xiàn)的。TE2410 開發(fā)板是保定飛凌技術(shù)研發(fā)的一款 ARM9 開發(fā)(),基于三星公司的 ARM 處理器 S3C2410A。一 準(zhǔn)備必要的文件首先去的 linux 內(nèi)核http:/因?yàn)?linux2.6.14 內(nèi)核需要更新版本的編譯器,所以需要交叉編譯器ftp:/ftp.handhelds./projects/toolchain/arm-linux-gcc-3.4.1.tar.bz2二 安裝文件把 arm-linux-gcc 安裝在 /usr/local/arm/3.4.1 目錄下,安

2、裝方法和安裝 gcc2.95.3 和gcc3.3.2 是相同的!接下來需要解壓 linux 內(nèi)核,輸入命令:root localhost hfrk# tar jxvf linux-2.6.14.tar.bz2內(nèi)核被解壓到 linux-2.6.14 目錄下。三 修改 makefile 文件內(nèi)核的編譯是根據(jù) makefile 文件的指示進(jìn)行的, Makefile 文件來組織內(nèi)核的各模塊之間的關(guān)系,了各個(gè)模塊之間的相互聯(lián)系和依賴關(guān)系。首先修改 linux-2.6.14 的根目錄下的 makfile 文件,須改的主要內(nèi)容是目標(biāo)代碼的類型和為編譯內(nèi)核指定一個(gè)編譯器。注釋掉以下內(nèi)容:#ARCH?= $(S

3、UBARCH)PILE?=增加如下內(nèi)容:ARCH: = armPILE =/usr/local/arm/3.4.1/bin/arm-linux-四 修改相關(guān)的文件。11、修改 archarmmach-s3c2410devs.c 文件增加頭文件定義#include#include#include/*end add*/Te2410 開發(fā)板 mtd 分區(qū)表:nameoffsetsizeflagvivi: 0 x000000000 x000200000128kparam: 0 x000200000 x00010000064kkernel: 0 x000300000 x001c000001M+768kr

4、oot: 0 x002000000 x0040000004Musr: 0 x006000000 x03a00000058M增加nand flash分區(qū)信息/*add here*/sic struct mtd_partition partition_info =name: vivi,size: 0 x00020000,offset: 0, name: param,size: 0 x00010000,offset: 0 x00020000, name: kernel,size: 0 x001c0000,offset: 0 x00030000, 2name: root,size: 0 x004000

5、00,offset: 0 x00200000,mask_flags: MTD_WRITEABLE, name: user,size: 0 x03a00000,offset: 0 x00600000,;struct s3c2410_nand_set nandset =nr_partitions: 5 ,partitions: partition_info ,;struct s3c2410_platform_nand superlpplatform=tacls:0,twrph0:30,twrph1:0,sets: &nandset,nr_sets: 1,;/*end add*/struct pla

6、tform_devi3c_device_nand = .name= s3c2410-nand,.id= -1,.num_resour= ARRAY_SIZE(s3c_nand_resource),.resource = s3c_nand_resource,3/*add here*/.dev = .platform_data = &superlpplatform/*end here*/;2. 修改 archarmmach-s3c2410mach-smdk2410.c 文件Startic struct platform_device *smdk2410_devi initdata=&s3c_dev

7、ice_usb,&s3c_device_lcd;&s3c_device_wdt,&s3c_device_i2c;&s3c_device_iis,&s3c_device_nand, /*add here*/;五 解決 ECC 問題修改 drivers/mtd/nand/s3c2410.c 文件:vi drivers/mtd/nand/s3c2410.c找到 s3c2410_nand_init_chip()函數(shù),在該函數(shù)體最后加上一條語(yǔ)句:chip-eccmode = NAND_ECC_E;保存,退出。六做完以上修改以后,內(nèi)核編譯以后就可以在 te2410 開發(fā)板上運(yùn)行了。打開終端窗口,切換到 l

8、inux-2.6.14 目錄下,輸入命令:root localhost linux-2.6.14# make smdk2410_defconfigroot localhost linux-2.6.14#make meueconfig配置選項(xiàng)如下:System Type-*S3C2410 DMA supportGeneral setup-*NWFPE math emulationMemory Technology Devi(MTD)-*MTD partitioning support4*d line partition table parsingNAND Flash DeviceDrivers*

9、NAND Deviupport*NAND Flashsupport for S3C2410 SoCBlock devi-*Initial RAM disk(initrd) supportCharacter devi-*-standard serial port support*S3C2410 RTC DriverFile systems-Miscellaneous filesystems*Compressed Rom file system support(cramfs)-Pseudo filesystems*Virtual memory file system support(former

10、shm fs)*/dev file system support(OBSOLETE)* Automatically mounbootroot localhost linux-2.6.14# make等編譯完成以后,會(huì)生成鏡像文件 arch/arm/boot/zImage ,把這個(gè)文件到開發(fā)板上!七 修改 vivi 串口參數(shù)在 2.6 內(nèi)核中, 2410 的串口由原來的 ttyS0 變?yōu)?ttySAC0啟動(dòng) te2410 目標(biāo)板,進(jìn)入 vivi,在vivi 提示符下輸入:viviparam set linux_cmd_line noinitrd root=/dev/mtdblock/3init=

11、/linuxrc console=ttySAC0,115200viviparam save八啟動(dòng)信息eS3C2410 DEVELOP KITVIVI ver0.1.4 HYPERLINK mailto:(rootlocalhost.local (rootlocalhost.local) (gcc ver2.95.2 20000516(release) ) #0.1.4 日 12 月 24 13:09:55 CST 2006MMU tabase address = 0 x33DFC0005Succeed memory map.NAND device: Manufacture ID: 0 xec,

12、 Chi: 0 x76 (Samsung K9D1208V0M)Found saved vivi parameters.CS8900 - type: 630e, rev: a00CS8900 - sus: ad6 (EEPROM present)Setting MAC address.Display format changed to VGA 640X480 modePress Return to start the LINUX now, any other key foCopy linux kernel from 0 x00030000 to 0 x30008000, size = 0 x0

13、01c0000 . donezImage= 0 x016f2818Setup linuxparameters at 0 x30000100linuxd line is: noinitrd root=/dev/mtdblock/3init= nuxrcconsole=ttySAC0 ,115200MACH_TYPE =193NOW, Booting Linux.pressingLinux. done, booting the kernel.Linux ver2.6.14 HYPERLINK mailto:(rootlocalhost.local (rootlocalhost.local) (gc

14、c ver3.4.1) #1 SatAug11 16:36:16 CST 2007CPU: ARM920Tid(wb) 41129200 rMachine: SMDK2410ATAG_INITRD is deprecated; pleaseupdate your bootloader.Memory policy: ECC disabled, Dache writebackCPU S3C2410A (id 0 x32410002)S3C2410: core 200.000 MHz, memory100.000 MHz, peripheral 50.000 MHzS3C2410 Clocks, (

15、c) 2004 Simtec Electronics CLOCK: Slow mode (1.500 MHz), fast,MPLL on, UPLL on6CPU0:DVIVT write-back cacheCPU0:Icache: 16384 bytes, assotivity 64, 32 byines, 8 setsCPU0:Dcache: 16384 bytes, assotivity 64, 32 byines, 8 setsBuilt1zonelistsKerneld line: noinitrdroot=/dev/mtdblock/3init=nuxrc console=tt

16、ySAC0 ,115200irq: clearing subpending sus 00000003irq: clearing subpending sus 00000002hash table entries: 512(order: 9, 8192 bytes)timer tcon=00000000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8Console: colour dummy device 80 x30Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)In

17、ode-cache hash table entries: 8192 (order: 3, 32768bytes)Memory: 64MB = 64MB totalMemory: 62720KB available (1620K code, 32Mount-cache hash table entries: 512CPU: Testing write buffer coherency: oksoftlockup thread 0 started up.NET: Registered protocol family 16S3C2410:Initialising architectureusbco

18、re:registerednewdriver usbfsusbcore:registerednewdriver hubS3C2410 DMADriver,(c)2003-2004 Simtec ElectronicsDMAchannel0atc4800000,irq33DMAchannel1atc4800040,irq34DMAchannel2atc4800080,irq35DMAchannel3atc48000c0,irq36NetWinder FloatingPoEmulator V0.97 (double preci)Console: switchingto colour frame b

19、uffer device 80 x25fb0: Virtual framebuffer device, using 1024K ofmemory7S3C2410 RTC, (c) 2004 Simtec Electronicss3c2410_serial0atMMIO0 x50000000(irq=70)isaS3C2410s3c2410_serial1atMMIO0 x50004000(irq=73)isaS3C2410s3c2410_serial2atMMIO0 x50008000(irq=76)isaS3C2410ioschedulernoop registeredioscheduler

20、ipatory registeredioschedulerdeadline registeredioschedulercfq registeredRAMDISK driver initialized: 16 RAM disks of 4096K sizeS3C24XX NAND Driver, (c) 2004 Simtec Electronicss3c2410-nand: mapped registers at c4980000s3c2410-nand: timing: Tacls 10ns, Twrph0 40ns, Twrph1 10nsNAND device: Manufacturer

21、 ID: 0 xec, Chi: 0 x76 (Samsung NAND 64MiB 3,3V 8-bit)Scanning device for bad blocksCreating 5 MTD partitions on NAND64MiB 3,3V 8-bit:0 x00000000-0 x00020000:vivi0 x00020000-0 x00030000:param0 x00030000-0 x001f0000:kernel0 x00200000-0 x00600000:root0 x00600000-0 x04000000:userusbmon: debugfs is not

22、availablemice: PS/2 mouse device common forall miceNET: Registered protocol family 2IP route cache hash table entries:1024 (order: 0, 4096 bytes)TCP established hash table entries: 4096 (order: 2, 16384 bytes)TCP bind hash table entries: 4096 (order: 2, 16384 bytes)TCP: Hash tables configured (estab

23、lished 4096 bind 4096)TCP reno registeredTCP bic registered8NET: Registered protocol family 1Please press Enter to activate this console.Starting714, console /dev/console:/bin/shBusyBox v0.60.3 (2002.05.13-08:36)Built-ins(ash)Enter help for a listofbuilt-inds.#九、網(wǎng)卡驅(qū)動(dòng)的移植:91、把 cs8900.c 和 cs8900.h 兩個(gè)針對(duì)

24、 2.6.14 的內(nèi)核的驅(qū)動(dòng)程序源代碼,將其放在 drivers/net/arm/目錄下面。#cp cs8900.c ./drivers/net/arm/ #cp cs8900.h ./drivers/net/arm/并在 cs8900_probe()函數(shù)中,memset (&priv,0,sizeof (cs8900_t);函數(shù)之后添加如下兩條語(yǔ)句: raw_wri(0 x2211d110,S3C2410_BWSCON); raw_wri(0 x1f7c,S3C2410_BCON3);2、修改 drivers/net/arm/目錄下的 Kconfig 文件,在最后添加如下內(nèi)容: Config

25、 ARM_CS8900trise CS8900 supportdepends on NET_ETHERNET & ARM & ARCH_SMDK2410 helpSupport for CS8900A chipset based Ethernet cards. If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from as well as . To compile this driver as a module, choose M here and

26、read.The module will be called cs8900.o.內(nèi)核系統(tǒng)配置文件由 2.4 版本的config.in 變成了 2.6 版本Kconfig 文件,在這個(gè)文件里面添加如上內(nèi)容,則在運(yùn)行 makeconfig 或者 make xconfig 命令的時(shí)候就會(huì)出現(xiàn): CS8900 support這一選項(xiàng)。3、修改 drivers/net/arm/目錄下的 Makefile 文件,在最后添加如下內(nèi)容:10obj-$(CONFIG_ARM_CS8900) += cs8900.o2.6 版本內(nèi)核的 Makefile 文件也與 2.4 版本的有所不同。添加以上語(yǔ)句,就會(huì)使內(nèi)核在編譯的時(shí)候根據(jù)配置將 cs8900A 的驅(qū)動(dòng)程序以模塊或靜態(tài)的方式編譯到內(nèi)核當(dāng)中。4、在/arch/arm/mach-s3c2410/mach-smdk2410.c 文件中,找到 smdk2410_iodesc結(jié)構(gòu)數(shù)組,添加如下如下內(nèi)容:vSMDK2410_ETH_IO, 0 x19000000, SZ_1M, MT_DEVICE修改之后變成了:sic struct map_desc smdk2410_iodesc initdata = /* nothing here yet */* Map the ethernet controller CS8

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論