1_21

本文记录了作者在进行嵌入式系统开发过程中遇到的问题及解决办法,包括文件系统编译、内核移植、声卡驱动移植等内容,并分享了具体的调试过程和技术细节。

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

Today
1.新的文件系统编译
包括新的官方Kernel,官方cupcake,了解了下这个版本的特点
【OK】

2.在2.0上加入copybit.so
不行,说是打开mfc设备失败,可能和kernel有关,回头用正确的kernel看还会不会这样的情况。
把copybit_default.so拷到2.0没有用,提示
E/copybit (  852): CMM driver open error
I/SystemServer(  836): Activity Manager
E/copybit (  852): createCmm fail
E/copybit (  852): Post processor open error
E/copybit (  852): createPP fail
E/copybit (  852): open(/dev/s3c-g2d) fail
E/copybit (  852): createG2d fail
E/copybit (  852): IOCTL_CODEC_MEM_FREE fail
E/copybit (  852): destroyCmm fail
E/copybit (  852): CMM driver open error
E/copybit (  852): createCmm fail
E/copybit (  852): Post processor open error
E/copybit (  852): createPP fail
E/copybit (  852): open(/dev/s3c-g2d) fail
E/copybit (  852): createG2d fail
E/copybit (  852): IOCTL_CODEC_MEM_FREE fail
E/copybit (  852): destroyCmm fail
I/ActivityManager(  836): Memory class: 16
【TBD】

所有开发板在从sd卡启动的时候,都是走的steppingstone,就是把这些外设的前8kb代码拷入到这个ram里面执行,也就是说直接跑BL1(uboot)。
但是开发板的一半模式都是直接把8kb代码搬移到ram中跑,感觉这种和上面那种似乎没有区别。但是前一种是三星推荐的,而后一种是从2410就开始有的。
uboot中的start.S是BL1,是lowlevel_init.S是BL2。
【OK】

参照armsys修改
low_level_init.s。备份。
研究内存机制
【TBD】

三星官方cupcake版本相关东西:
看文件大小的方法,再烧yaffs时要用到
YSTEM_SIZE=$(du -b system.img  | awk '{printf "%x",$1}')
du -b system.img  | awk '{printf "%x",$1}'
几段的烧写命令
tftp 50008000 zImage;nand erase 600000 300000;nand write 50008000 600000 300000
tftp 50008000 ramdisk-uboot.img;nand erase 900000 100000;nand write 50008000 900000 100000
tftp 50008000 system.img;nand erase a00000 4300000;nand write.yaffs 50008000 a00000 34f5540        //35e9bc0 for orignal samsung
tftp 50008000 system.img;nand erase a00000 6400000;nand write.yaffs 50008000 a00000 4696980        //for covia
tftp 50008000 system.img;nand erase a00000 6400000;nand write.yaffs 50008000 a00000 35e9bc0        //for samsung
tftp 50008 000 userdata.img;nand erase 9000000 7000000;nand write.yaffs 50008000 9000000 840

tftp 50008000 ubi.img;nand erase 900000 c800000;nand write 50008000 900000 c800000

setenv bootcmd 'nand read 50008000 600000 300000;nand read 50800000 900000 100000;bootm 50008000 50800000'
【OK】
for hhtech
tftp 50008000 zImage;nand erase 600000 c00000;nand write 50008000 600000 c00000
mind this:
[[[[[[[ Make ramdisk image for u-boot ]]]]]]]

Image Name:   ramdisk
Created:      Thu Jan 28 10:24:18 2010
Image Type:   ARM Linux RAMDisk Image (uncompressed)
Data Size:    145369 Bytes = 141.96 kB = 0.14 MB
Load Address: 0x50800000
Entry Point:  0x50800000
cp: accessing `/tftpboot/smdk6410': Not a directory
cp: accessing `/tftpboot/smdk6410': Not a directory
cp: accessing `/tftpboot/smdk6410': Not a directory

[[[[[[[ u-boot commands for fusing ]]]]]]]

tftp 50008000 /tftpboot/smdk6410/ramdisk-uboot.img;nand erase 900000 100000;nand write 50008000 900000 100000
tftp 50008000 /tftpboot/smdk6410/system.img;nand erase a00000 4300000;nand write.yaffs 50008000 a00000 335c700
tftp 50008000 /tftpboot/smdk6410/userdata.img;nand erase 9000000 7000000;nand write.yaffs 50008000 9000000 840

cache erace: nand erase 4d00000 4300000


Success to build : ./build_android.sh

29的kernel无法挂载ramfs:
setenv bootargs "root=/dev/mtdblock3 rootfstype=yaffs2 console=ttySAC0,115200"
init=/init没有加
这些都不对,如果指定了initram也就是ramdisk-uboot,就可以不用定义bootargs了,会自动挂载的
file system -- network filesystem -- root on nfs
这个也不用去,这个只是在无法普通挂载的时候才走这里
最后initramfs要选上解决了问题。
【OK】



三星官方kernel上面声卡移植
memalloc.h
sound/core/memalloc.c: In function 'snd_dma_alloc_pages':
sound/core/memalloc.c:203: error: implicit declaration of function 'snd_malloc_sgbuf_pages'
sound/core/memalloc.c: In function 'snd_dma_free_pages':
sound/core/memalloc.c:273: error: implicit declaration of function 'snd_free_sgbuf_pages'、
/* zhangq add */
/*
 * Scatter-Gather generic device pages
 */
void *snd_malloc_sgbuf_pages(struct device *device,
                 size_t size, struct snd_dma_buffer *dmab,
                 size_t *res_size);
int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab);
中断,把include/sound放过去

/* zhangq add */
typedef unsigned __bitwise__ fmode_t;
/* zhangq end */
include/linux/types.h

/**
 * __gpio_to_irq() - return the IRQ corresponding to a GPIO
 * @gpio: gpio whose IRQ will be returned (already requested)
 * Context: any
 *
 * This is used directly or indirectly to implement gpio_to_irq().
 * It returns the number of the IRQ signaled by this (input) GPIO,
 * or a negative errno.
 */
int __gpio_to_irq(unsigned gpio)
{
    struct gpio_chip    *chip;

    chip = gpio_to_chip(gpio);
    return chip->to_irq ? chip->to_irq(chip, gpio - chip->base) : -ENXIO;
}
EXPORT_SYMBOL_GPL(__gpio_to_irq);
drivers/gpio/gpiolib.c

include/asm-generic/gpio.h
中的gpio_chip结构体中添加
int    (*to_irq)(struct gpio_chip *chip,unsigned offset);
函数。        /* 不一定可以 */
【OK】

Note:
整理tftp文档

makefile中拷贝的命令

tftp目录移动到/tftpboot/smdk6410
[zhangqing@localhost xinetd.d]$ sudo vi tftp
[zhangqing@localhost xinetd.d]$ sudo service xinetd restart
Stopping xinetd: [  OK  ]
Starting xinetd: [  OK  ]

partition.h not partitions.h里面有分区信息

虽然在kernel中定义uboot的起始位置不是0,而是1024-256,但是烧写uboot的时候三星uboot也是用0 40000
三星uboot有源码,但是应该和我们的网卡型号不一样
源码路劲
http://12.23.102.225
try this
git clone git://12.23.102.225/android_uboot.git

各种驱动都已经OK

准备把东西往samsung上面移植

一层层调用,最后在哪个不行只报前面的







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值