一、開發環境
宿主機:fedora9.0 或 ubuntu10.04
開發板:tiny6410
編譯器:4.3.2
二、核心移植
linux-2.6.38
2.解壓
( 進入根目錄下的/home/poplar/expr4/kernel目錄,解壓原始碼)
tar xvfj /home/poplar/expr4/kernel/linux-2.6.38.tar.bz2
3.修改架構,編譯器(需要在arm上執行,所以用交叉編譯器)
解壓完進入解壓出來的linux-2.6.38目錄
#cd linux-2.6.38
#vi makefile (或者用gedit)
191行改為
arch ?= arm
cross_compile ?= arm-linux- (找到其交叉編譯環境)
4.生成預設配置檔案
#cp arch/arm/configs/s3c6400_defconfig .config
如省略這個操作的話後面會找不到system type
5.修改配置項
#make menuconfig
system type->[*] mini6410 選上,
6.拷貝nand flash驅動到根目錄下的/home/poplar/expr4/kernel下的linux-2.6.38裡相應的檔案位置處(以下的檔案在實驗五資料夾裡有)
drivers/mtd/nand/s3c_nand.c
arch/arm/plat-samsung/include/plat/regs-nand.h
drivers/mtd/nand/s3c_nand_mlc.fo
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/kconfig
7修改nand 驅動makefile
輸入指令#cd drivers/mtd/nand
#vi makefile
drivers/mtd/nand/makefile中20行增加
obj-$(config_mtd_nand_s3c) += s3c_nand.o
末尾再增加
obj-$(config_mtd_nand_s3c) += s3c_nand_mlc.fo
8.增加相應選項
輸入指令#cd /home/poplar/expr4/kernel/linux-2.6.38
device drivers--->
<*> memory technology device (mtd) support --->
[*] mtd partitioning support
[*] command line partition table parsing
<*> direct char device access to mtd devices
<*> caching block device access to mtd devices
<*> nand device support --->
< > nand flash support for samsung s3c socs 去掉不要選
<*> nand flash support for s3c soc
[*] s3c nand hardware ecc
三、 新增yaffs2檔案系統的支援
首先向核心源**中加入支援yaffs2的源**】
解壓yaffs2.tar.bz2
#cd /home/poplar/expr4/kernel
#tar xvfj /home/poplar/expr4/kernel/yaffs2.tar.bz2
進入解壓出的目錄#cd yaffs2
執行如下命令
./patch-ker.sh c m +核心原始碼路徑(/home/poplar/expr4/kernel/linux-2.6.38)
然後進入核心原始碼目錄
#cd /home/poplar/expr4/kernel/linux-2.6.38
執行make menuconfig
選擇file systems
選擇 [*] miscellaneous filesystems --->
選擇上<*> yaffs2 file system support以及與yaffs2相關選項。
配置結果如下:
退出儲存
四、 新增對ubifs檔案系統的支援
1. 配置核心支援ubifs
#make menuconfig
device drivers --->
memory technology device (mtd) support --->
enableubi - unsorted block images --->
2.配置mtd支援ubi介面
file systems --->
miscellaneous filesystems --->
ubifs file system support
3.再次make
#make zimage一、
此時啟動會出現如下問題
如果成功,如下圖:
usbcore: registered new inte***ce driver usbhid
usbhid: usb hid core driver
vfp support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
mmc0: mmc_rescan_try_freq: trying to init card at 300000 hz
mmc0: mmc_rescan_try_freq: trying to init card at 200000 hz
ubifs: recovery needed
usb 1-1: new full speed usb device using s3c2410-ohci and address 2
mmc0: mmc_rescan_try_freq: trying to init card at 100000 hz
ubifs: recovery completed
ubifs: mounted ubi device 0, volume 0, name "friendlyarm-root"
ubifs: file system size: 2061287424 bytes (2012976 kib, 1965 mib, 1997 lebs)
ubifs: journal size: 12517376 bytes (12224 kib, 11 mib, 13 lebs)
ubifs: media format: w4/r0 (latest is w4/r0)
ubifs: default compressor: lzo
ubifs: reserved for root: 0 bytes (0 kib)
vfs: mounted root (ubifs filesystem) on device 0:10.
hwclock: can't open '/dev/misc/rtc': no such file or directory
[01/jan/1970:00:00:18 +0000] boa.c:173 - unable to create socket: function not implemented
open device leds: no such file or directory
/usr/sbin/alsactl: load_state:1610: no soundcards found...
ifconfig: socket: function not implemented
try to bring eth0 inte***ce up......cat: can't open '/sys/class/net/eth0/address': no such file or directory
ifconfig: socket: function not implemented
route: socket: function not implemented
done
移植capwap到tiny6410上
make的時候用的交叉編譯環境是arm linux gcc 4.5.1 make的時候出現gnu getopt.o relocations in generic elf em 3 錯誤提示。原因 由於這個capwap工程之前使用gcc編譯過x86版本的,然後修改configure 的編譯選項開始編譯...
移植中文字庫到tiny6410
參考 在main.c中新增 qtextcodec setcodecforlocale qtextcodec codecforname utf 8 qtextcodec setcodecfortr qtextcodec codecforname utf 8 qtextcodec setcodecfor...
tiny6410的QT4 7開發與移植
一 系統環境 二 開發平台搭建步驟 將arm linux gcc 4.5.1 v6 vfp 20101103.tgz複製到fedora的目錄下,如 tmp,然後解壓 cd tmp tar xvzf arm linux gcc 4.5.1 v6 vfp 20101103.tgz c 這個命令將arm ...