kongkong's Blog

No Silver Bullet --- Computer Language is just a tool.

工作杂谈-freescale 方案问题和解决方法

| Comments


frameworks/base/core/java/com/android/internal/widget/LockPatternUtils.java:1280: error 114: @deprecated tag with no explanatory comment


在frameworks/base/core/java/com/android/internal/widget/LockPatternUtils.java文件中, remove line 1280 * @deprecated.

错误2,Android build error with -llzo2 and -luuid on 64 bits ubuntu

I installed liblzo2-2_2.05-1_i386.deb ,liblzo2-dev_2.05-1_i386.deb and uuid-dev_2.20.1-1ubuntu3_i386.deb
install liblzo2

$ sudo mkdir /usr/lib/liblzo2_i386
$ sudo dpkg -x liblzo2-dev_2.05-1_i386.deb /usr/lib/liblzo2_i386/
$ sudo dpkg -x liblzo2-2_2.05-1_i386.deb /usr/lib/liblzo2_i386/ 
$ cd /usr/lib/
$ sudo rm liblzo2.a
$ sudo rm liblzo2.so
$ sudo rm liblzo2.so.2
$ sudo ln -s liblzo2_i386/usr/lib/liblzo2.a liblzo2.a
$ sudo ln -s liblzo2_i386/usr/lib/liblzo2.so.2.0.0 liblzo2.so
$ sudo ln -s liblzo2_i386/usr/lib/liblzo2.so.2.0.0 liblzo2.so.2

install uuid-dev

$ sudo mkdir /usr/lib/uuid-dev
$ sudo dpkg -x uuid-dev_2.20.1-1ubuntu3_i386.deb  /usr/lib/uuid-dev/
$ cd /usr/lib/
$ sudo ln -s uuid-dev/usr/lib/i386-linux-gnu/libuuid.a  libuuid.a
$ sudo ln -s uuid-dev/usr/lib/i386-linux-gnu/libuuid.so  libuuid.so 

2.I modified the external/mtd-utils/mkfs.ubifs/Android.mk.This fixed the "-llzo2 not found; uuid/uuid.h not found;".

$ vi external/mtd-utils/mkfs.ubifs/Android.mk

I added the following to external/mtd-utils/mkfs.ubifs/Android.mk.
LOCAL_LDFLAGS +=-L /usr/lib/
LOCAL_C_INCLUDES +=/usr/lib/uuid-dev/usr/include/
LOCAL_C_INCLUDES +=/usr/lib/liblzo2_i386/usr/include

FEC: Link is down 7949


FEC link is down 7809



  1. 先给sd卡分区,fsl-sdcard-partition.sh是freescale提供的分区脚本,需要修改这个脚本,在"function format_android" 上一行中添加:node=/dev/mmcblk0p。 $ cd ~/myandroid/ $ sudo chmod +x ./device/fsl/common/tools//fsl-sdcard-partition.sh $ sudo ./device/fsl/common/tools/fsl-sdcard-partition.sh /dev/mmcblk0
  2. 分区完成后,使用dd命令将image拷贝到sd卡中。
    Download the U-Boot image:

    # sudo dd if=u-boot.bin of=/dev/sdx bs=1K skip=1 seek=1; sync
    Or If you're using no padding uboot image:

    sudo dd if=u-boot-no-padding.bin of=/dev/sdx bs=1K seek=1; sync

    Download the boot image:
    # sudo dd if=boot.img of=/dev/sdx1; sync
    Download the android system root image:
    # sudo dd if=system.img of=/dev/sdx5; sync
    Download the android recovery image:
    # sudo dd if=recovery.img of=/dev/sdx2; sync
  3. SW6调到 1101 0110(与文档中描述的有出入,这个地方我也不明白)。设置U-Boot的env。
    U-Boot > setenv fastboot_dev [eMMC as fastboot deivce]

    U-Boot > setenv bootcmd booti mmc2         [Load the boot.img from SD card]
    U-Boot > setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,bpp=32
    video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000 vmalloc=400M
    androidboot.console=ttymxc0 androidboot.hardware=freescale  #[Optional]
    U-Boot > saveenv    #[Save the environments]

    从local mirror 下载android aosp


    mkdir  p ~/aosp/mirror
    cd ~/aosp/mirror
    repo init -u https://android.googlesource.com/mirror/manifest -b android-4.2.2_r1  --mirror

    注意点:由于我在生成mirror使用使用了-b android-4.2.2_r1,所以在下载mirror时候的repo init需要加上-b android-4.2.2_r1。

    mkdir myandroid
    cd myandroid
    repo init -u ~/aosp/mirror/platform/manifest.git -b android-4.2.2_r1
    repo sync

    编译源码时出现 Checking API: checkapi-last (unknown): error 17

    use command make update-api then command make -j4 or either use make update-api && make -j4 , and code would be compilable.


comments powered by Disqus