Telechips TCC8900平台Kernel编译

文章详细介绍了如何在TCC8900Kernel上添加并以builtin方式加入模块的过程,包括打补丁、编译、处理KernelImage及烧入Kernel等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

(2010-06-11 13:37:29)
标签:

it

分类:嵌入式Linux

作者:Sam(甄峰) sam_code@hotmail.com

 

Sam最近需要在TCC8900 Kernel上添加一个模块,且需要以builtin方式加入。过程记录如下:

 

1. Kernel 打补丁:

Telechips提供了Linux Kernel source 以及补丁。

其中Kernel source code是www.kernel.org上标准版本(for x86). 所以需要打上ARM补丁。

 

Sam先查看patch文件,其中包含如下语句:

diff -uNr linux-2.6.28/Makefile linux-2.6.28-tcc/Makefile

判断出如果使用-p0的话,linux-2.6.28与patchFile应该是同级目录。

 

#patch -p0 < patch-linux-2.6.28-100305-R0180B2882

patching file linux-2.6.28/Makefile
patching file linux-2.6.28/arch/arm/Kconfig
patching file linux-2.6.28/arch/arm/Makefile
patching file linux-2.6.28/arch/arm/configs/tcc8900_defconfig
patching file linux-2.6.28/arch/arm/configs/tcc8900_wifi_defconfig
patching file linux-2.6.28/arch/arm/include/asm/mach/map.h
patching file linux-2.6.28/arch/arm/include/asm/mach/time.h
patching file linux-2.6.28/arch/arm/kernel/head.S
patching file linux-2.6.28/arch/arm/kernel/irq.c
patching file linux-2.6.28/arch/arm/kernel/setup.c
patching file linux-2.6.28/arch/arm/kernel/time.c

.....

以上则是已经打好的patch.

 

另外,Telechips要求覆盖USB下2个文件。

#cp tcc_usb_phy.c /home/sam/work1/current/TCC8900/Kernel/Kernel_Patch_Sam/current_Kernel/linux-2.6.28/drivers/usb/dwc_otg/

#cp ohci-tcc.c /home/sam/work1/current/TCC8900/Kernel/Kernel_Patch_Sam/current_Kernel/linux-2.6.28/drivers/usb/host/

 

Sam打开Makefile。发现Cross_compile已经设置完毕。

此时Kernel已经全部准备好了。Sam 编译之。

 

 

2. 编译Kernel:

#make clean

#make tcc8900_defconfig

使用./arch/arm/configs/tcc8900_defconfig

#make menuconfig

#make

 

3. 处理Kernel Image.

首先将Telechips提供的util目录放置到对应目录下。

之后运行Kernel根目录下的./tcc_mkrd.sh

#./tcc_mkrd.sh

======================================================
[Telechips TCC8900]

[MAKE] linux.rom
0+1 records in
1+0 records out
4194304 bytes (4.2 MB) copied, 0.0143234 s, 293 MB/s

[MARK] CRC & ramdisk size 16 Mbyte
image length: [0x00400000] (4194304 byte)
second crc:   [0xCDDEB1DE]
first crc:    [0x5DA398EB]
======================================================

表示成功。在kernel根目录下生成linux.rom 。

 

4. 烧入Kernel;

将生成的linux.rom与tccbox放在同一目录下。mount 到板子上。

#./tccbox firmware_update -f linux.rom -t kernel

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值