主题 : 移植Android2.1(附获取freerunner 2.1 源码的方法) 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 23322
精华: 0
发帖: 56
金钱: 280 两
威望: 56 点
贡献值: 0 点
综合积分: 112 分
注册时间: 2010-06-17
最后登录: 2010-09-10
100楼  发表于: 2010-08-30 18:28
貌似 楼主提供的kernel源代码中没有实现触摸屏的功能?????
级别: 侠客
UID: 23322
精华: 0
发帖: 56
金钱: 280 两
威望: 56 点
贡献值: 0 点
综合积分: 112 分
注册时间: 2010-06-17
最后登录: 2010-09-10
101楼  发表于: 2010-08-31 19:52
版主啊,好消息!!!  系统跑起来了,界面也出来了!!

原因是:
“64M内存对与Android系统来说实在是太少了,加载所有系统程序后,再打开其他程序会变得很慢。”
删掉一些暂时用不到的系统软件!!! 就ok啦~~~
级别: 侠客
UID: 23322
精华: 0
发帖: 56
金钱: 280 两
威望: 56 点
贡献值: 0 点
综合积分: 112 分
注册时间: 2010-06-17
最后登录: 2010-09-10
102楼  发表于: 2010-08-31 19:53
现在有个问题是如何添加USB鼠标?请问有支持usb鼠标的功能吗??
我需要怎么改?版主,提示一下,谢谢!!
级别: 新手上路
UID: 3017
精华: 0
发帖: 5
金钱: 30 两
威望: 14 点
贡献值: 0 点
综合积分: 10 分
注册时间: 2008-12-22
最后登录: 2017-09-13
103楼  发表于: 2010-09-01 15:18
支持支持!
Natural
级别: 侠客
UID: 23967
精华: 0
发帖: 56
金钱: 300 两
威望: 60 点
贡献值: 0 点
综合积分: 112 分
注册时间: 2010-06-29
最后登录: 2017-03-15
104楼  发表于: 2010-09-27 14:19
抱歉我是新手..  请问..
(1)我用 repo init –u git://andropid.git.kernel.org/platform/manifest.git 下载源码是master branch最新的.请问这到底是android 什么版本?
(2)Android make成功后将产生userdata.img, ramdisk.img等档案.请问我要怎样做才能生成可烧写至mini2440的android.img?
谢谢
Natural
级别: 侠客
UID: 23967
精华: 0
发帖: 56
金钱: 300 两
威望: 60 点
贡献值: 0 点
综合积分: 112 分
注册时间: 2010-06-29
最后登录: 2017-03-15
105楼  发表于: 2010-09-28 12:34
Shielk版主. 还有很多地方要跟你请教 谢谢
[ 此帖被parenchang在2010-09-28 13:15重新编辑 ]
级别: 新手上路
UID: 11160
精华: 0
发帖: 25
金钱: 145 两
威望: 29 点
贡献值: 0 点
综合积分: 50 分
注册时间: 2009-11-29
最后登录: 2012-07-26
106楼  发表于: 2010-10-21 19:26
版主,你好。最近在编译android的源码总是不成功。然后按照楼主的方法下载了源码
repo init -u git://gitorious.org/android-on-freerunner/freerunner_platform_manifest.git
进去直接make就发生错误了。问题如下:
bionic/libc/arch-arm/bionic/memcmp.S: Assembler messages:
bionic/libc/arch-arm/bionic/memcmp.S:48: Error: missing ')'
bionic/libc/arch-arm/bionic/memcmp.S:48: Error: garbage following instruction -- `pld (r0,#0)'
bionic/libc/arch-arm/bionic/memcmp.S:49: Error: missing ')'
bionic/libc/arch-arm/bionic/memcmp.S:49: Error: garbage following instruction -- `pld (r1,#0)'
bionic/libc/arch-arm/bionic/memcmp.S:61: Error: missing ')'
bionic/libc/arch-arm/bionic/memcmp.S:61: Error: garbage following instruction -- `pld (r0,#32)'
bionic/libc/arch-arm/bionic/memcmp.S:62: Error: missing ')'
bionic/libc/arch-arm/bionic/memcmp.S:62: Error: garbage following instruction -- `pld (r1,#32)'
bionic/libc/arch-arm/bionic/memcmp.S:112: Error: missing ')'
bionic/libc/arch-arm/bionic/memcmp.S:112: Error: garbage following instruction -- `pld (r4,#64)'
bionic/libc/arch-arm/bionic/memcmp.S:113: Error: missing ')'
bionic/libc/arch-arm/bionic/memcmp.S:113: Error: garbage following instruction -- `pld (r1,#64)'
bionic/libc/arch-arm/bionic/memcmp.S:201: Error: missing ')'
bionic/libc/arch-arm/bionic/memcmp.S:201: Error: garbage following instruction -- `pld (r1,#64)'
bionic/libc/arch-arm/bionic/memcmp.S:202: Error: missing ')'
bionic/libc/arch-arm/bionic/memcmp.S:202: Error: garbage following instruction -- `pld (r4,#64)'
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libc_common_intermediates/arch-

arm/bionic/memcmp.o] 错误
另外,想请问一下这个是要用java6还是java5编译的?两个版本都试过了,都是同样问题。。在线等待回复,实在没办法了,弄了很多天都是移植不成功。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
107楼  发表于: 2010-10-21 23:27

 回 106楼(3107002944) 的帖子

这是ARM汇编档的编译(正确的说法叫汇编),和java没有关系。我觉得上面这些错误似乎是源代码文件损坏造成的。你能把bionic/libc/arch-arm/bionic/memcmp.S这个文件贴出来吗?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 11160
精华: 0
发帖: 25
金钱: 145 两
威望: 29 点
贡献值: 0 点
综合积分: 50 分
注册时间: 2009-11-29
最后登录: 2012-07-26
108楼  发表于: 2010-10-22 13:47

 回 107楼(kasim) 的帖子

版主,你好。memcmp.S文件内容如下
#include <machine/cpu-features.h>

    .text

    .global memcmp
    .type memcmp, %function
    .align 4

/*
* Optimized memcmp() for ARM9.
* This would not be optimal on XScale or ARM11, where more prefetching
* and use of PLD will be needed.
* The 2 major optimzations here are
* (1) The main loop compares 16 bytes at a time
* (2) The loads are scheduled in a way they won't stall
*/

memcmp:
        .fnstart
        PLD         (r0, #0)
        PLD         (r1, #0)

        /* take of the case where length is 0 or the buffers are the same */
        cmp         r0, r1
        cmpne       r2, #0
        moveq       r0, #0
        bxeq        lr

        .save {r4, lr}
        /* save registers */
        stmfd       sp!, {r4, lr}
        
        PLD         (r0, #32)
        PLD         (r1, #32)

        /* since r0 hold the result, move the first source
         * pointer somewhere else
         */
        
         mov        r4, r0
        
         /* make sure we have at least 8+4 bytes, this simplify things below
          * and avoid some overhead for small blocks
          */
         cmp        r2, #(8+4)
         bmi        8f
        
        /* align first pointer to word boundary
         * offset = -src & 3
         */
        rsb         r3, r4, #0
        ands        r3, r3, #3
        beq         0f

        /* align first pointer  */
        sub         r2, r2, r3
1:      ldrb        r0, [r4], #1
        ldrb        ip, [r1], #1
        subs        r0, r0, ip
        bne         9f
        subs        r3, r3, #1
        bne         1b


0:      /* here the first pointer is aligned, and we have at least 4 bytes
         * to process.
         */

        /* see if the pointers are congruent */
        eor         r0, r4, r1
        ands        r0, r0, #3
        bne         5f

        /* congruent case, 32 bytes per iteration
         * We need to make sure there are at least 32+4 bytes left
         * because we effectively read ahead one word, and we could
         * read past the buffer (and segfault) if we're not careful.
         */

        ldr         ip, [r1]
        subs        r2, r2, #(32 + 4)
        bmi         1f
        
0:      PLD         (r4, #64)
        PLD         (r1, #64)
        ldr         r0, [r4], #4
        ldr         lr, [r1, #4]!
        eors        r0, r0, ip
        ldreq       r0, [r4], #4
        ldreq       ip, [r1, #4]!
        eoreqs      r0, r0, lr
        ldreq       r0, [r4], #4
        ldreq       lr, [r1, #4]!
        eoreqs      r0, r0, ip
        ldreq       r0, [r4], #4
        ldreq       ip, [r1, #4]!
        eoreqs      r0, r0, lr
        ldreq       r0, [r4], #4
        ldreq       lr, [r1, #4]!
        eoreqs      r0, r0, ip
        ldreq       r0, [r4], #4
        ldreq       ip, [r1, #4]!
        eoreqs      r0, r0, lr
        ldreq       r0, [r4], #4
        ldreq       lr, [r1, #4]!
        eoreqs      r0, r0, ip
        ldreq       r0, [r4], #4
        ldreq       ip, [r1, #4]!
        eoreqs      r0, r0, lr
        bne         2f        
        subs        r2, r2, #32
        bhs         0b

        /* do we have at least 4 bytes left? */
1:      adds        r2, r2, #(32 - 4 + 4)
        bmi         4f
        
        /* finish off 4 bytes at a time */
3:      ldr         r0, [r4], #4
        ldr         ip, [r1], #4
        eors        r0, r0, ip
        bne         2f
        subs        r2, r2, #4
        bhs         3b

        /* are we done? */
4:      adds        r2, r2, #4
        moveq       r0, #0
        beq         9f

        /* finish off the remaining bytes */
        b           8f

2:      /* the last 4 bytes are different, restart them */
        sub         r4, r4, #4
        sub         r1, r1, #4
        mov         r2, #4

        /* process the last few bytes */
8:      ldrb        r0, [r4], #1
        ldrb        ip, [r1], #1
        // stall
        subs        r0, r0, ip
        bne         9f
        subs        r2, r2, #1
        bne         8b

9:      /* restore registers and return */
        ldmfd       sp!, {r4, lr}
        bx          lr
        .fnend





5:      /*************** non-congruent case ***************/
        and         r0, r1, #3      
        cmp         r0, #2
        bne         4f

        /* here, offset is 2 (16-bits aligned, special cased) */
        
        /* make sure we have at least 16 bytes to process */
        subs        r2, r2, #16
        addmi       r2, r2, #16
        bmi         8b

        /* align the unaligned pointer */
        bic         r1, r1, #3
        ldr         lr, [r1], #4

6:      PLD         (r1, #64)
        PLD         (r4, #64)
        mov         ip, lr, lsr #16
        ldr         lr, [r1], #4
        ldr         r0, [r4], #4
        orr         ip, ip, lr, lsl #16
        eors        r0, r0, ip
        moveq       ip, lr, lsr #16
        ldreq       lr, [r1], #4
        ldreq       r0, [r4], #4
        orreq       ip, ip, lr, lsl #16
        eoreqs      r0, r0, ip
        moveq       ip, lr, lsr #16
        ldreq       lr, [r1], #4
        ldreq       r0, [r4], #4
        orreq       ip, ip, lr, lsl #16
        eoreqs      r0, r0, ip
        moveq       ip, lr, lsr #16
        ldreq       lr, [r1], #4
        ldreq       r0, [r4], #4
        orreq       ip, ip, lr, lsl #16
        eoreqs      r0, r0, ip
        bne         7f
        subs        r2, r2, #16
        bhs         6b
        sub         r1, r1, #2
        /* are we done? */
        adds        r2, r2, #16
        moveq       r0, #0
        beq         9b
        /* finish off the remaining bytes */
        b           8b

7:      /* fix up the 2 pointers and fallthrough... */
        sub         r1, r1, #(4+2)
        sub         r4, r4, #4
        mov         r2, #4
        b           8b


4:      /*************** offset is 1 or 3 (less optimized) ***************/

        stmfd        sp!, {r5, r6, r7}

        // r5 = rhs
        // r6 = lhs
        // r7 = scratch

        mov         r5, r0, lsl #3        /* r5 = right shift */
        rsb         r6, r5, #32         /* r6 = left shift */

        /* align the unaligned pointer */
        bic         r1, r1, #3
        ldr         r7, [r1], #4
        sub         r2, r2, #8

6:      mov         ip, r7, lsr r5
        ldr         r7, [r1], #4
        ldr         r0, [r4], #4
        orr         ip, ip, r7, lsl r6
        eors        r0, r0, ip
        moveq       ip, r7, lsr r5
        ldreq       r7, [r1], #4
        ldreq       r0, [r4], #4
        orreq       ip, ip, r7, lsl r6
        eoreqs      r0, r0, ip
        bne         7f
        subs        r2, r2, #8
        bhs         6b

        sub         r1, r1, r6, lsr #3
        ldmfd       sp!, {r5, r6, r7}

        /* are we done? */
        adds        r2, r2, #8
        moveq       r0, #0
        beq         9b

        /* finish off the remaining bytes */
        b           8b

7:      /* fix up the 2 pointers and fallthrough... */
        sub         r1, r1, #4
        sub         r1, r1, r6, lsr #3
        sub         r4, r4, #4
        mov         r2, #4
        ldmfd        sp!, {r5, r6, r7}
        b           8b
不知道是不是我缺乏什么库文件呢?请版主赐教。。感激不尽。。
级别: 新手上路
UID: 11160
精华: 0
发帖: 25
金钱: 145 两
威望: 29 点
贡献值: 0 点
综合积分: 50 分
注册时间: 2009-11-29
最后登录: 2012-07-26
109楼  发表于: 2010-10-23 21:38
没人能救救我吗!?