UBoot烧写 for PAO(TFTP)

1.准备:
      A.将本机IP设置静态地址
         IP:192.168.1.178
         Default Gateway:192.168.1.1
      B.连接网线(机对机或通过交换机都可以,网络两种都可以,一般都是自适应的)、电源、COM线

旧版本到新版本(有菜单):
      nand erase 0x0
      tftp 0xc0008000 u-boot-nand.bin;nand erase 0x0 0x80000;nand write 0xc0008000 0 0x80000

新版本到新版本:
      nand erase.chip
      tftp 0x50018000 u-boot-nand.bin;nand erase u-boot 0x80000;nand write 0x50018000 u-boot 0x80000
      tftp 0x50018000 uImage_a70;nand erase kernel 0x500000;nand write 0x50018000 kernel 0x500000
      tftp 0x50018000 uImage_n43;nand erase kernel 0x500000;nand write 0x50018000 kernel 0x500000
      tftp 0x50018000 root.img;nand erase root.ubi 0x3fa40000;nand write 0x50018000 root.ubi 0x5a00000

posted @ 2011-05-14 22:54 Fallen Angel 阅读(123) 评论(0) 编辑
以前发现有些例子的图片必须要以“.9.png”为后缀,后来发现原来Android有一个叫Nine Patch的技术。

相关教程:http://www.cnblogs.com/feisky/archive/2010/01/16/1649502.html
posted @ 2011-05-14 22:53 Fallen Angel 阅读(427) 评论(0) 编辑
1.安装Ubuntu 10.10
      可选择使用Wubi安装。

2.安装Python
      Ubuntu 10.10 已经安装了2.6版。

3.安装JDK
      更新软件库:
      sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
      sudo apt-get update
      下载JDK:
      使用新立得软件包管理器下载 sun-java6-jdk或执行命令:sudo apt-get install sun-java6-jdk
      修改当前使用的JDK版本:sudo update-alternatives --config java

4.安装所需的组件
      To set up your development environment, install the following required packages:
      执行命令:sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev

      For building Froyo or an older release on a 64-bit system, several other packages are necessary to establish a 32-bit build  environment:
      执行命令:sudo apt-get install gcc-multilib g++-multilib libc6-i386 libc6-dev-i386

5.安装几个必须库
      进入新立得软件包管理器勾选lib32z1-dev、zlib-bin并安装。

6.Android编译需要安装mtd-utils(该程序不能升级,使用指定版本mtd-utils_20090606-1_amd64.deb)
      使用强制安装方式:sudo dpkg -i 文件名
      此组件是用来创建UBI文件系统的。

7.安装GCC编译器
      系统已经默认安装了4.4.5版。

8.安装交叉编译工具arm-linux-gcc(PAO的默认配置为源码放在主文件夹的project下,arm-linux-gcc放在project的tools下)
      A.解压arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz,执行命令:
         tar xvzf arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz –C home/administrator/project/tools/
         cp -r home/administrator/project/tools/opt/FriendlyARM/toolschain/4.5.1 /home/administrator/project/tools/arm-linux-4.5.1/
         rm -rf home/administrator/project/tools/opt
      B.设置环境变量(多个变量时用“:”分格):
             sudo gedit /etc/profile
             在最后添加:PATH=$PATH:/home/administrator/project/tools/arm-linux-4.5.1/bin
      C.重新登录后运行:arm-linux-gcc --v 测试是否安装成功。

9.错误处理
      在Ubuntu10.10(64位)编译Android2.3源码时,遇到各种各样的问题。不是缺这个,就是少那个。现把这些问题和解决方法罗列出来,供大家参考。

错误:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] 错误 1

解决:
  sudo apt-get install libc6-dev-i386

错误:
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] error 1

解决:
  sudo apt-get install g++-multilib

错误:
external/clearsilver/cgi/cgi.c:22: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o] Error 1

解决:
sudo apt-get install zlib1g-dev

错误:
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1

解决:
sudo apt-get install lib32z1-dev

错误:
bison -d  -o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
/bin/bash: bison: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127

解决:
sudo apt-get install bison

错误:
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/bin/bash: flex: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127

解决:
sudo apt-get install flex

错误:
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1

解决:
sudo apt-get install lib32ncurses5-dev

错误:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/main-common.o] Error 1

解决:
sudo apt-get install libx11-dev

错误:
sh: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 96.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] Error 25
make: *** Deleting file `out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h'

解决:
sudo apt-get install gperf

错误:
build/core/java.mk:9: *** bin: Target java module does not define any source or resource files. Stop.

解决:
      删除源码根目录下的bin文件夹,这个文件夹是导入eclipse时创建的。

10.相关资料
      A.http://source.android.com/source/initializing.html;
      B.mini6410用户手册。
posted @ 2011-05-14 22:52 Fallen Angel 阅读(2593) 评论(0) 编辑
1.安装Wine,本工具用于运行Windows下的应用程序
      使用Ubuntu软件中心查找并安装1.2.2版本。

2.安装Source Insight3.5,该工具主要用于查看和编译
      在命令行下运行:wine Si35Setup.exe,然后按提示完成安装,注意:双屏下安装时会自动注销。

3.安装SVN和GIT
      使用Ubuntu软件中心查找并安装。

4.配置USB设备访问权限
      Under GNU/linux systems (and specifically under Ubuntu systems), regular users can't directly access USB devices by default. The system needs to be configured to allow such access.
      The recommended approach is to create a file /etc/udev/rules.d/51-android.rules (as the root user) and to copy the following lines in it. must be replaced by the actual username of the user who is authorized  to access the phones over USB.

      # adb protocol on passion (Nexus One)
      SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
      # fastboot protocol on passion (Nexus One)
      SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
      # adb protocol on crespo (Nexus S)
      SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
      # fastboot protocol on crespo (Nexus S)
      SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"

5.安装eclipse、ADT、Android SDK、NDK
      A.eclipse可使用MOTODEV_Studio_for_Android_2.1,已包含ADT;
      B.可选安装一个功能比较强的文本编辑器插件:AnyEdit tool;
      C.具体安装请看相关教程,比较简单,到此为止Android应用开发环境已经安装完成。

6.安装minicom和tftp(用于烧写程序)
      A.mincom类似于windows的超级终端;
      B.tftp用作烧写程序的服务器,分客户端和服务器。
posted @ 2011-05-14 22:50 Fallen Angel 阅读(259) 评论(0) 编辑
1.首先设置好Ubuntu的USB设备连接权限
      参考"搭建Android应用开发环境及编译环境"。

2.连接Android真机
      A.插好线后先不要开机;
      B.运行命令:
         sudo /home/administrator/work/android-sdk-linux_86/platform-tools/adb kill-server        // 关闭服务
         sudo /home/administrator/work/android-sdk-linux_86/platform-tools/adb start-server    // 启动服务
         sudo /home/administrator/work/android-sdk-linux_86/platform-tools/adb devices           // 显示设备
      C.启动Android真机
         运行“ sudo /home/administrator/work/android-sdk-linux_86/platform-tools/adb devices”

         看到以下字样即表示成功连接:
         administrator@ubuntu:~$ sudo /home/administrator/work/android-sdk-linux_86/platform-tools/adb devices
         List of devices attached
         0123456789ABCDEF device
posted @ 2011-05-14 22:48 Fallen Angel 阅读(1000) 评论(2) 编辑
1.编译器:arm-linux-gcc

       arm-linux-gcc hello.c -o hello 

 2.反汇编工具:arm-linux-objdump

       arm-linux-objdump -D -S hello 

 3.ELF文件查看工具:arm-linux-readelf

       arm-linux-readelf -a hello

       arm-linux-readelf -d hello 查看hello使用的动态库
posted @ 2011-05-14 22:47 Fallen Angel 阅读(49) 评论(0) 编辑
1.将.classpath文件复制到根目录
      输入命令(当前目录为Android源码根目录):cp development/ide/eclipse/.classpath  ./
      chmod u+w .classpath # Make the copy writable

2.检查Android源码根目录的.classpath文件对应的目录是否一一存在,并对其进行修改(不存在的请删除);

3.在eclipse新建一个JAVA项目(名称可自定义),新建时选择Android源码根目录为项目路径。
posted @ 2011-05-14 19:55 Fallen Angel 阅读(47) 评论(0) 编辑
1.通过下载安装包进行本地安装,下载地址:
      http://dl.google.com/android/ADT-0.9.9.zip
      http://dl.google.com/android/ADT-10.0.0.zip
      http://dl.google.com/android/ADT-10.0.1.zip

2.通过URL进行远程安装
      URL:http://dl-ssl.google.com/android/eclipse/
   
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值