library 'system/lib/libhoudini.so' not find

转自http://blog.csdn.net/u012350993/article/details/45895809


最近写了一个jni,打包成.so文件,在手机上运行程序没问题,在模拟器(Genymotion)上运行报出”library 'system/lib/libhoudini.so' not find“错误,经过一番查询先把解决方案总结如下:

ARM Translation Installer的压缩包,安装到Genymotion上,重启下,重新运行程序就ok。

下载地址1:http://forum.xda-developers.com/showthread.php?t=2528952

下载地址2:http://download.csdn.net/detail/u012350993/8725479                 

.so打包经验分享:

apk中有对应平台的文件夹,如果项目只包含了 armeabi,那么在所有Android设备都可以运行; 如果项目只包含了 armeabi-v7a,除armeabi架构的设备外都可以运行; 如果项目只包含了 x86,那么armeabi架构和armeabi-v7a的Android设备是无法运行的; 如果同时包含了 armeabi, armeabi-v7a和x86,所有设备都可以运行,程序在运行的时候去加载不同平台对应的so,这是较为完美的一种解决方案,同时也会导致包变大。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
centos7 tfs部署笔记.txt 环境信息: Docker version 1.8.2-fc22, build cb216be/1.8.2 Fedora release 22 (Twenty Two) Linux localhost.localdomain 4.0.4-301.fc22.x86_64 #1 SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux docker centos:CentOS Linux release 7.2.1511 (Core) 参考: http://code.taobao.org/p/tfs/wiki/get/ http://my.oschina.net/beiyou/blog/76129?fromerr=bGluCWDI tfs版本:2.2.16 centos:7.2.1511 gcc:4.8.5 # docker run -i -t centos /bin/bash [root@2f60c4bcddfa /]# yum install make automake autoconf libtool gcc gcc-c++ libuuid-devel zlib-devel mysql-devel readline-devel gperftools-devel.x86_64 -y Libraries have been installed in: /usr/local/lib64//lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/mkdir -p '/usr/local/lib64//include/tbnet' /usr/bin/install -c -m 644 channel.h channelpool.h connection.h controlpacket.h databuffer.h defaultpacketstreamer.h epollsocketevent.h httppacketstreamer.h httprequestpacket.h httpresponsepacket.h iocomponent.h ipacketfactory.h ipackethandler.h ipacketstreamer.h iserveradapter.h packet.h packetqueue.h packetqueuethread.h serversocket.h socketevent.h socket.h stats.h tbnet.h tcpacceptor.h tcpcomponent.h tcpconnection.h transport.h udpacceptor.h udpcomponent.h udpconnection.h connectionmanager.h '/usr/local/lib64//include/tbnet' [root@2f60c4bcddfa tfs_release-2.2.16]# ./configure --prefix=/usr/local/ configure ok make 问题 : serialization.h:575:27: error: conversion to 'char' from 'long int' may alter its value [-Werror=conversion] buff[3] = (v>>32) & 0xFF; ^ serialization.h:576:27: error: conversion to 'char' from 'long int' may alter its value [-Werror=conversion] buff[2] = (v>>40) & 0xFF; ^ serialization.h:577:27: error: conversion to 'char' from 'long int' may alter its value [-Werror=conversion] buff[1] = (v>>48) & 0xFF; ^ serialization.h:578:27: error: conversion to 'char' from 'long int' may alter its value [-Werror=conversion] 解决 [root@2f60c4bcddfa tfs_release-2.2.16]# find -name Makefile | xargs sed -i 's/-Werror//' 问题 : In file included from session_util.cpp:1:0: session_util.h:30:43: 错误:‘int32_t’不是一个类型名 static void gene_session_id(const int32_t app_id, const int64_t session_ip, std::string& session_id); ^ session_util.h:30:51: 错误:ISO C++ 不允许声明无类型的‘app_id’ [-fpermissive] static void gene_session_id(const int32_t app_id, const int64_t session_ip, std::string& session_id); ^ session_util.h:30:65: 错误:‘int64_t’不是一个类型名 static void gene_session_id(const int32_t app_id, const int64_t session_ip, std::string& session_id); ^ session_util.h:30:73: 错误:ISO C++ 不允许声明无类型的‘session_ip’ [-fpermissive] static void gene_session_id(const int32_t app_id, const int64_t session_ip, std::string& session_id); ^ session_util.h:31:68: 错误:‘int32_t’未声明 static int parse_session_id(const std::string& session_id, int32_t& app_id, int64_t& session_ip); ^ session_util.h:31:85: 错误:‘int64_t’未声明 static int parse_session_id(const std::string& session_id, int32_t& app_id, int64_t& session_ip); session_util.cpp:24:10: 错误:‘void tfs::common::SessionUtil::gene_session_id(int32_t, int64_t, std::string&)’的原型不匹配类‘tfs::common::SessionUtil’中的任何一个 void SessionUtil::gene_session_id(const int32_t app_id, const int64_t session_ip, string& session_id) ^ In file included from session_util.cpp:1:0: session_util.h:30:21: 错误:备选为:static void tfs::common::SessionUtil::gene_session_id(int, int, std::string&) static void gene_session_id(const int32_t app_id, const int64_t session_ip, std::string& session_id); ^ session_util.cpp:31:9: 错误:‘int tfs::common::SessionUtil::parse_session_id(const string&, int32_t&, int64_t&)’的原型不匹配类‘tfs::common::SessionUtil’中的任何一个 int SessionUtil::parse_session_id(const string& session_id, int32_t& app_id, int64_t& session_ip) ^ In file included from session_util.cpp:1:0: session_util.h:31:20: 错误:备选为:static int tfs::common::SessionUtil::parse_session_id(const string&, int&, int&) static int parse_session_id(const std::string& session_id, int32_t& app_id, int64_t& session_ip); 解决 [root@localhost tfs_release-2.2.16]# vim src/common/session_util.h 添加 #include <stdint.h> 整体代码如下 #ifndef TFS_COMMON_SESSIONUTIL_H_ #define TFS_COMMON_SESSIONUTIL_H_ #include <string> #include <stdint.h> namespace tfs { namespace common { static const char SEPARATOR_KEY = '-'; class SessionUtil { public: static std::string gene_uuid_str(); static void gene_session_id(const int32_t app_id, const int64_t session_ip, std::string& session_id); static int parse_session_id(const std::string& session_id, int32_t& app_id, int64_t& session_ip); }; } } #endif //TFS_RCSERVER_SESSIONUUID_H_ 问题: /lib64//lib/libtbsys.a -lrt -lpthread -lm -ldl -lc /usr/bin/ld: cannot find -ljemalloc collect2: error: ld returned 1 exit statu 解决 curl -O http://www.canonware.com/download/jemalloc/jemalloc-4.0.4.tar.bz2 tar -jxvf jemalloc-4.0.4.tar.bz2 cd jemalloc-4.0.4/ && ./configure && make && make install 问题: block_collect.cpp:229:17: 错误:‘abs’不是‘__gnu_cxx’的成员 if (__gnu_cxx::abs(info_.version_ - info.version_) <= VERSION_AGREED_MASK)//version agreed ^ client_request_server.cpp:167:21: error: 'abs' is not a member of '__gnu_cxx' stat[3] = __gnu_cxx::abs(out.size() - block_count); 解决:替换成cstdlib的abs 问题: meta_server_service.cpp:1584:48: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] char* pos = strstr(sub_dir, parents_dir); 解决:添加编译参数-fpermissive [root@localhost tfs_release-2.2.16]# vim src/name_meta_server/Makefile CXXFLAGS = -g -D__STDC_LIMIT_MACROS -Wall -Wextra -Wunused-parameter -Wformat -Wconversion -Wdeprecated -fpermissive [root@localhost tfs_release-2.2.16]# make Making all in src make[1]: Entering directory `/usr/local/tfs_release-2.2.16/src' Making all in common make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/common' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/common' Making all in message make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/message' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/message' Making all in new_client make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/new_client' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/new_client' Making all in dataserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/dataserver' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/dataserver' Making all in nameserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/nameserver' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/nameserver' Making all in adminserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/adminserver' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/adminserver' Making all in tools make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools' Making all in util make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/util' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/util' Making all in dataserver make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/dataserver' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/dataserver' Making all in nameserver make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/nameserver' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/nameserver' Making all in adminserver make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/adminserver' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/adminserver' Making all in mock make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/mock' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/mock' Making all in transfer make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/transfer' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/transfer' Making all in cluster make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/cluster' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/cluster' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools' make[3]: Nothing to be done for `all-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools' Making all in rcserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/rcserver' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/rcserver' Making all in monitor make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/monitor' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/monitor' Making all in name_meta_server make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/name_meta_server' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/name_meta_server' Making all in rootserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/rootserver' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/rootserver' Making all in checkserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/checkserver' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/checkserver' make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src' make[1]: Leaving directory `/usr/local/tfs_release-2.2.16/src' Making all in conf make[1]: Entering directory `/usr/local/tfs_release-2.2.16/conf' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/local/tfs_release-2.2.16/conf' Making all in scripts make[1]: Entering directory `/usr/local/tfs_release-2.2.16/scripts' Making all in ha make[2]: Entering directory `/usr/local/tfs_release-2.2.16/scripts/ha' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts/ha' make[2]: Entering directory `/usr/local/tfs_release-2.2.16/scripts' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts' make[1]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts' Making all in sql make[1]: Entering directory `/usr/local/tfs_release-2.2.16/sql' Making all in ms make[2]: Entering directory `/usr/local/tfs_release-2.2.16/sql/ms' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/sql/ms' Making all in rcs make[2]: Entering directory `/usr/local/tfs_release-2.2.16/sql/rcs' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/sql/rcs' make[2]: Entering directory `/usr/local/tfs_release-2.2.16/sql' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/sql' make[1]: Leaving directory `/usr/local/tfs_release-2.2.16/sql' make[1]: Entering directory `/usr/local/tfs_release-2.2.16' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/usr/local/tfs_release-2.2.16' [root@localhost tfs_release-2.2.16]# make install Making install in src make[1]: Entering directory `/usr/local/tfs_release-2.2.16/src' Making install in common make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/common' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/common' make[3]: Nothing to be done for `install-exec-am'. /usr/bin/mkdir -p '/usr/local/include' /usr/bin/install -c -m 644 define.h cdefine.h lock.h func.h internal.h meta_server_define.h rts_define.h error_msg.h '/usr/local/include' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/common' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/common' Making install in message make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/message' make[2]: Nothing to be done for `install'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/message' Making install in new_client make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/new_client' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/new_client' /usr/bin/mkdir -p '/usr/local/lib' /bin/sh ../../libtool --mode=install /usr/bin/install -c libtfsclient.la libtfsclient_c.la '/usr/local/lib' libtool: install: /usr/bin/install -c .libs/libtfsclient.so.0.0.0 /usr/local/lib/libtfsclient.so.0.0.0 libtool: install: (cd /usr/local/lib && { ln -s -f libtfsclient.so.0.0.0 libtfsclient.so.0 || { rm -f libtfsclient.so.0 && ln -s libtfsclient.so.0.0.0 libtfsclient.so.0; }; }) libtool: install: (cd /usr/local/lib && { ln -s -f libtfsclient.so.0.0.0 libtfsclient.so || { rm -f libtfsclient.so && ln -s libtfsclient.so.0.0.0 libtfsclient.so; }; }) libtool: install: /usr/bin/install -c .libs/libtfsclient.lai /usr/local/lib/libtfsclient.la libtool: install: /usr/bin/install -c .libs/libtfsclient_c.so.0.0.0 /usr/local/lib/libtfsclient_c.so.0.0.0 libtool: install: (cd /usr/local/lib && { ln -s -f libtfsclient_c.so.0.0.0 libtfsclient_c.so.0 || { rm -f libtfsclient_c.so.0 && ln -s libtfsclient_c.so.0.0.0 libtfsclient_c.so.0; }; }) libtool: install: (cd /usr/local/lib && { ln -s -f libtfsclient_c.so.0.0.0 libtfsclient_c.so || { rm -f libtfsclient_c.so && ln -s libtfsclient_c.so.0.0.0 libtfsclient_c.so; }; }) libtool: install: /usr/bin/install -c .libs/libtfsclient_c.lai /usr/local/lib/libtfsclient_c.la libtool: install: /usr/bin/install -c .libs/libtfsclient.a /usr/local/lib/libtfsclient.a libtool: install: chmod 644 /usr/local/lib/libtfsclient.a libtool: install: ranlib /usr/local/lib/libtfsclient.a libtool: install: /usr/bin/install -c .libs/libtfsclient_c.a /usr/local/lib/libtfsclient_c.a libtool: install: chmod 644 /usr/local/lib/libtfsclient_c.a libtool: install: ranlib /usr/local/lib/libtfsclient_c.a libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- make install-exec-hook make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/new_client' tmp_dir=".tfs_tmp_dir";\ for client_lib in libtfsclient.a libtfsclient_c.a; \ do \ cd /usr/local/lib;\ test -d $tmp_dir && rm -rf $tmp_dir;\ mkdir -p $tmp_dir && mv $client_lib $tmp_dir;\ cd $tmp_dir;\ ar x $client_lib;\ rm -f $client_lib;\ for i in *.a ; do\ lib_tmp_dir=".tmp_$i";\ mkdir -p $lib_tmp_dir;\ mv $i $lib_tmp_dir;\ cd $lib_tmp_dir;\ ar x $i;\ cd ../; done;\ ar cru ../$client_lib `find . -name '*.o'`;\ ranlib ../$client_lib;\ chmod 644 ../$client_lib;\ done; \ cd .. && rm -rf $tmp_dir make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/new_client' /usr/bin/mkdir -p '/usr/local/include' /usr/bin/install -c -m 644 tfs_client_api.h tfs_client_capi.h tfs_rc_client_api.h tfs_meta_client_api.h '/usr/local/include' make install-data-hook make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/new_client' cd /usr/local/include && \ sed -i 's#common/\(.*\.h\)#\1#g' tfs_client_api.h tfs_client_capi.h tfs_rc_client_api.h tfs_meta_client_api.h && \ sed -i -n -e '/ifdef \+WITH_UNIQUE_STORE/{h;d}' -e '/endif/{x;/ifdef \+WITH_UNIQUE_STORE/d;x;p;d}' -e 'x;/ifdef \+WITH_UNIQUE_STORE/{x;d};x;p' tfs_client_api.h tfs_client_capi.h tfs_rc_client_api.h tfs_meta_client_api.h make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/new_client' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/new_client' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/new_client' Making install in dataserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/dataserver' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/dataserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../libtool --mode=install /usr/bin/install -c dataserver '/usr/local/bin' libtool: install: /usr/bin/install -c dataserver /usr/local/bin/dataserver make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/dataserver' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/dataserver' Making install in nameserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/nameserver' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/nameserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../libtool --mode=install /usr/bin/install -c nameserver '/usr/local/bin' libtool: install: /usr/bin/install -c nameserver /usr/local/bin/nameserver make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/nameserver' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/nameserver' Making install in adminserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/adminserver' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/adminserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../libtool --mode=install /usr/bin/install -c adminserver '/usr/local/bin' libtool: install: /usr/bin/install -c adminserver /usr/local/bin/adminserver make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/adminserver' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/adminserver' Making install in tools make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools' Making install in util make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/util' make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/util' make[4]: Nothing to be done for `install-exec-am'. make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/util' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/util' Making install in dataserver make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/dataserver' make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/dataserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../../libtool --mode=install /usr/bin/install -c clear_file_system ds_client format_file_system read_super_block recover_disk_data_to_cluster recover_sync_file_queue convert_name reload_config read_index_tool read_block_prefix reverse_name modify_super_block tfsping view_local_key gen_block_prefix verify_block_to_dataserver '/usr/local/bin' libtool: install: /usr/bin/install -c clear_file_system /usr/local/bin/clear_file_system libtool: install: /usr/bin/install -c ds_client /usr/local/bin/ds_client libtool: install: /usr/bin/install -c format_file_system /usr/local/bin/format_file_system libtool: install: /usr/bin/install -c read_super_block /usr/local/bin/read_super_block libtool: install: /usr/bin/install -c recover_disk_data_to_cluster /usr/local/bin/recover_disk_data_to_cluster libtool: install: /usr/bin/install -c recover_sync_file_queue /usr/local/bin/recover_sync_file_queue libtool: install: /usr/bin/install -c convert_name /usr/local/bin/convert_name libtool: install: /usr/bin/install -c reload_config /usr/local/bin/reload_config libtool: install: /usr/bin/install -c read_index_tool /usr/local/bin/read_index_tool libtool: install: /usr/bin/install -c read_block_prefix /usr/local/bin/read_block_prefix libtool: install: /usr/bin/install -c reverse_name /usr/local/bin/reverse_name libtool: install: /usr/bin/install -c modify_super_block /usr/local/bin/modify_super_block libtool: install: /usr/bin/install -c tfsping /usr/local/bin/tfsping libtool: install: /usr/bin/install -c view_local_key /usr/local/bin/view_local_key libtool: install: /usr/bin/install -c gen_block_prefix /usr/local/bin/gen_block_prefix libtool: install: /usr/bin/install -c verify_block_to_dataserver /usr/local/bin/verify_block_to_dataserver make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/dataserver' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/dataserver' Making install in nameserver make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/nameserver' make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/nameserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../../libtool --mode=install /usr/bin/install -c admintool showsyncoplog rmsyncoplog ssm tfstool performance syncbyfile read_syncoplog_header repair_block_info '/usr/local/bin' libtool: install: /usr/bin/install -c admintool /usr/local/bin/admintool libtool: install: /usr/bin/install -c showsyncoplog /usr/local/bin/showsyncoplog libtool: install: /usr/bin/install -c rmsyncoplog /usr/local/bin/rmsyncoplog libtool: install: /usr/bin/install -c ssm /usr/local/bin/ssm libtool: install: /usr/bin/install -c tfstool /usr/local/bin/tfstool libtool: install: /usr/bin/install -c performance /usr/local/bin/performance libtool: install: /usr/bin/install -c syncbyfile /usr/local/bin/syncbyfile libtool: install: /usr/bin/install -c read_syncoplog_header /usr/local/bin/read_syncoplog_header libtool: install: /usr/bin/install -c repair_block_info /usr/local/bin/repair_block_info make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/nameserver' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/nameserver' Making install in adminserver make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/adminserver' make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/adminserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../../libtool --mode=install /usr/bin/install -c adminservertool '/usr/local/bin' libtool: install: /usr/bin/install -c adminservertool /usr/local/bin/adminservertool make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/adminserver' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/adminserver' Making install in mock make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/mock' make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/mock' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../../libtool --mode=install /usr/bin/install -c mock_data_server '/usr/local/bin' libtool: install: /usr/bin/install -c mock_data_server /usr/local/bin/mock_data_server make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/mock' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/mock' Making install in transfer make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/transfer' make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/transfer' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../../libtool --mode=install /usr/bin/install -c transfer_block split_block_tool compare_crc compare_same_cluster transfer_same_cluster_block compare_same_cluster_ext remove_block verify_file_same_cluster transfer_ge_dirs transfer_logo_tool '/usr/local/bin' libtool: install: /usr/bin/install -c transfer_block /usr/local/bin/transfer_block libtool: install: /usr/bin/install -c split_block_tool /usr/local/bin/split_block_tool libtool: install: /usr/bin/install -c compare_crc /usr/local/bin/compare_crc libtool: install: /usr/bin/install -c compare_same_cluster /usr/local/bin/compare_same_cluster libtool: install: /usr/bin/install -c transfer_same_cluster_block /usr/local/bin/transfer_same_cluster_block libtool: install: /usr/bin/install -c compare_same_cluster_ext /usr/local/bin/compare_same_cluster_ext libtool: install: /usr/bin/install -c remove_block /usr/local/bin/remove_block libtool: install: /usr/bin/install -c verify_file_same_cluster /usr/local/bin/verify_file_same_cluster libtool: install: /usr/bin/install -c transfer_ge_dirs /usr/local/bin/transfer_ge_dirs libtool: install: /usr/bin/install -c transfer_logo_tool /usr/local/bin/transfer_logo_tool make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/transfer' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/transfer' Making install in cluster make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/cluster' make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools/cluster' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../../libtool --mode=install /usr/bin/install -c sync_by_blk sync_by_log sync_by_file transfer_by_file sync_analyze_tool '/usr/local/bin' libtool: install: /usr/bin/install -c sync_by_blk /usr/local/bin/sync_by_blk libtool: install: /usr/bin/install -c sync_by_log /usr/local/bin/sync_by_log libtool: install: /usr/bin/install -c sync_by_file /usr/local/bin/sync_by_file libtool: install: /usr/bin/install -c transfer_by_file /usr/local/bin/transfer_by_file libtool: install: /usr/bin/install -c sync_analyze_tool /usr/local/bin/sync_analyze_tool make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/cluster' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools/cluster' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools' make[4]: Entering directory `/usr/local/tfs_release-2.2.16/src/tools' make[4]: Nothing to be done for `install-exec-am'. make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/tools' Making install in rcserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/rcserver' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/rcserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../libtool --mode=install /usr/bin/install -c rcserver '/usr/local/bin' libtool: install: /usr/bin/install -c rcserver /usr/local/bin/rcserver make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/rcserver' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/rcserver' Making install in monitor make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/monitor' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/monitor' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../libtool --mode=install /usr/bin/install -c ha_monitor ns_ping '/usr/local/bin' libtool: install: /usr/bin/install -c ha_monitor /usr/local/bin/ha_monitor libtool: install: /usr/bin/install -c ns_ping /usr/local/bin/ns_ping make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/monitor' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/monitor' Making install in name_meta_server make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/name_meta_server' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/name_meta_server' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../libtool --mode=install /usr/bin/install -c metaserver '/usr/local/bin' libtool: install: /usr/bin/install -c metaserver /usr/local/bin/metaserver make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/name_meta_server' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/name_meta_server' Making install in rootserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/rootserver' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/rootserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../libtool --mode=install /usr/bin/install -c rootserver '/usr/local/bin' libtool: install: /usr/bin/install -c rootserver /usr/local/bin/rootserver make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/rootserver' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/rootserver' Making install in checkserver make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src/checkserver' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src/checkserver' /usr/bin/mkdir -p '/usr/local/bin' /bin/sh ../../libtool --mode=install /usr/bin/install -c checkserver '/usr/local/bin' libtool: install: /usr/bin/install -c checkserver /usr/local/bin/checkserver make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src/checkserver' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src/checkserver' make[2]: Entering directory `/usr/local/tfs_release-2.2.16/src' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/src' make[3]: Nothing to be done for `install-exec-am'. make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/src' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/src' make[1]: Leaving directory `/usr/local/tfs_release-2.2.16/src' Making install in conf make[1]: Entering directory `/usr/local/tfs_release-2.2.16/conf' make[2]: Entering directory `/usr/local/tfs_release-2.2.16/conf' make[2]: Nothing to be done for `install-exec-am'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/conf' make[1]: Leaving directory `/usr/local/tfs_release-2.2.16/conf' Making install in scripts make[1]: Entering directory `/usr/local/tfs_release-2.2.16/scripts' Making install in ha make[2]: Entering directory `/usr/local/tfs_release-2.2.16/scripts/ha' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/scripts/ha' make[3]: Nothing to be done for `install-exec-am'. /usr/bin/mkdir -p '/usr/local/scripts/ha' /usr/bin/install -c -m 644 authkeys.sh deploy.sh ha.cf NameServer RootServer rsdep.sh nsdep.sh ns.xml rs.xml '/usr/local/scripts/ha' make install-data-hook make[4]: Entering directory `/usr/local/tfs_release-2.2.16/scripts/ha' mv //usr/local/scripts/ha/authkeys.sh //usr/local/scripts/ha/authkeys mv //usr/local/scripts/ha/deploy.sh //usr/local/scripts/ha/deploy mv //usr/local/scripts/ha/nsdep.sh //usr/local/scripts/ha/nsdep mv //usr/local/scripts/ha/rsdep.sh //usr/local/scripts/ha/rsdep chmod u+x //usr/local/scripts/ha/authkeys chmod u+x //usr/local/scripts/ha/deploy chmod u+x //usr/local/scripts/ha/nsdep chmod u+x //usr/local/scripts/ha/rsdep chmod u+x //usr/local/scripts/ha/NameServer chmod u+x //usr/local/scripts/ha/RootServer make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts/ha' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts/ha' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts/ha' make[2]: Entering directory `/usr/local/tfs_release-2.2.16/scripts' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/scripts' make[3]: Nothing to be done for `install-exec-am'. /usr/bin/mkdir -p '/usr/local/scripts' /usr/bin/install -c -m 644 stfs.sh tfs.sh start_sync_log.sh sync.sh cs_sync.sh '/usr/local/scripts' make install-data-hook make[4]: Entering directory `/usr/local/tfs_release-2.2.16/scripts' mv //usr/local/scripts/stfs.sh //usr/local/scripts/stfs mv //usr/local/scripts/tfs.sh //usr/local/scripts/tfs mv //usr/local/scripts/sync.sh //usr/local/scripts/sync mv //usr/local/scripts/start_sync_log.sh //usr/local/scripts/start_sync_log mv //usr/local/scripts/cs_sync.sh //usr/local/scripts/cs_sync chmod u+x //usr/local/scripts/stfs chmod u+x //usr/local/scripts/tfs chmod u+x //usr/local/scripts/sync chmod u+x //usr/local/scripts/start_sync_log chmod u+x //usr/local/scripts/cs_sync sed -i 's#\(TFS_HOME=\).*$#\1/usr/local#g' //usr/local/scripts/stfs //usr/local/scripts/tfs make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts' make[1]: Leaving directory `/usr/local/tfs_release-2.2.16/scripts' Making install in sql make[1]: Entering directory `/usr/local/tfs_release-2.2.16/sql' Making install in ms make[2]: Entering directory `/usr/local/tfs_release-2.2.16/sql/ms' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/sql/ms' make[3]: Nothing to be done for `install-exec-am'. /usr/bin/mkdir -p '/usr/local/sql/ms' /usr/bin/install -c -m 644 create_dir.sql create_file.sql create_table.sql mv_dir.sql mv_file.sql pwrite_file.sql rm_dir.sql rm_file.sql seq_simulator.sql '/usr/local/sql/ms' make install-data-hook make[4]: Entering directory `/usr/local/tfs_release-2.2.16/sql/ms' make[4]: Nothing to be done for `install-data-hook'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/sql/ms' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/sql/ms' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/sql/ms' Making install in rcs make[2]: Entering directory `/usr/local/tfs_release-2.2.16/sql/rcs' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/sql/rcs' make[3]: Nothing to be done for `install-exec-am'. /usr/bin/mkdir -p '/usr/local/sql/rcs' /usr/bin/install -c -m 644 create_table.sql '/usr/local/sql/rcs' make install-data-hook make[4]: Entering directory `/usr/local/tfs_release-2.2.16/sql/rcs' make[4]: Nothing to be done for `install-data-hook'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/sql/rcs' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/sql/rcs' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/sql/rcs' make[2]: Entering directory `/usr/local/tfs_release-2.2.16/sql' make[3]: Entering directory `/usr/local/tfs_release-2.2.16/sql' make[3]: Nothing to be done for `install-exec-am'. make install-data-hook make[4]: Entering directory `/usr/local/tfs_release-2.2.16/sql' make[4]: Nothing to be done for `install-data-hook'. make[4]: Leaving directory `/usr/local/tfs_release-2.2.16/sql' make[3]: Leaving directory `/usr/local/tfs_release-2.2.16/sql' make[2]: Leaving directory `/usr/local/tfs_release-2.2.16/sql' make[1]: Leaving directory `/usr/local/tfs_release-2.2.16/sql' make[1]: Entering directory `/usr/local/tfs_release-2.2.16' make[2]: Entering directory `/usr/local/tfs_release-2.2.16' make[2]: Nothing to be done for `install-exec-am'. make[2]: Leaving directory `/usr/local/tfs_release-2.2.16' make[1]: Leaving directory `/usr/local/tfs_release-2.2.16'
旧版本版本的全志R16平台的tinav2.1的系统打开softAP 2017/9/14 17:25 版本:V1.0 1、原始编译: rootroot@cm-System-Product-Name:~$ cd /home/wwt/ rootroot@cm-System-Product-Name:/home/wwt$ tar zxvf tinaV2.1_wyb_20170302_patch_leo_20161102.tar.gz rootroot@cm-System-Product-Name:/home/wwt$ mv tinaV2.1 softap_ap6212a0_tinav2.1 rootroot@cm-System-Product-Name:/home/wwt$ cd softap_ap6212a0_tinav2.1/ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ source build/envsetup.sh including target/allwinner/tulip-d1/vendorsetup.sh including target/allwinner/octopus-sch/vendorsetup.sh including target/allwinner/azalea-perf2/vendorsetup.sh including target/allwinner/azalea-perf3/vendorsetup.sh including target/allwinner/octopus-dev/vendorsetup.sh including target/allwinner/astar-evb/vendorsetup.sh including target/allwinner/generic/vendorsetup.sh including target/allwinner/azalea-perf1/vendorsetup.sh including target/allwinner/astar-parrot/vendorsetup.sh including target/allwinner/astar-spk/vendorsetup.sh including target/allwinner/azalea-evb/vendorsetup.sh rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ lunch You're building on Linux Lunch menu... pick a combo: 1. tulip_d1-tina 2. tulip_d1-dragonboard 3. octopus_sch-tina 4. octopus_sch-dragonboard 5. azalea_perf2-tina 6. azalea_perf2-dragonboard 7. azalea_perf3-tina 8. azalea_perf3-dragonboard 9. octopus_dev-tina 10. octopus_dev-dragonboard 11. astar_evb-tina 12. azalea_perf1-tina 13. azalea_perf1-dragonboard 14. astar_parrot-tina 15. astar_parrot-dragonboard 16. astar_spk-tina 17. astar_spk-dragonboard 18. azalea_evb-tina 19. azalea_evb-dragonboard Which would you like?14 ============================================ PLATFORM_VERSION_CODENAME=Neptune PLATFORM_VERSION=2.0.0 TARGET_PRODUCT=astar_parrot TARGET_BUILD_VARIANT=tina TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a7 TARGET_2ND_ARCH= TARGET_2ND_ARCH_VARIANT= TARGET_2ND_CPU_VARIANT= HOST_ARCH=x86_64 HOST_OS=linux HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty HOST_BUILD_TYPE=release BUILD_ID=57513AA3 OUT_DIR= ============================================ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ make -j12 rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ pack -d 2、 将softap.tar.bz2解压到package/allwinner下。 将dnsmasq.tar.bz2解压并替换package/network/services下的dnsmasq文件夹。 3、配置内核: rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ make kernel_menuconfig [*] Networking support ---> --- Networking support Networking options ---> (在第二屏) [ ] Network packet filtering framework (Netfilter) ---> 修改为: [*] Network packet filtering framework (Netfilter) ---> [ ] Advanced netfilter configuration 修改为: [*] Advanced netfilter configuration Core Netfilter Configuration ---> < > Netfilter NFACCT over NFNETLINK interface < > Netfilter NFQUEUE over NFNETLINK interface < > Netfilter LOG over NFNETLINK interface < > Netfilter connection tracking support < > Netfilter Xtables support (required for ip_tables) 修改为: < > Netfilter NFACCT over NFNETLINK interface < > Netfilter NFQUEUE over NFNETLINK interface < > Netfilter LOG over NFNETLINK interface <*> Netfilter connection tracking support [*] Connection mark tracking support [*] Connection tracking security mark support (NEW) (默认选中) [*] Supply CT list in procfs (OBSOLETE) [*] Connection tracking events [*] Connection tracking timeout (NEW) [*] Connection tracking timestamping < > DCCP protocol connection tracking support (EXPERIMENTAL) < > SCTP protocol connection tracking support (EXPERIMENTAL) < > UDP-Lite protocol connection tracking support < > Amanda backup protocol support < > FTP protocol support < > H.323 protocol support < > IRC protocol support < > NetBIOS name service protocol support < > SNMP service protocol support < > PPtP protocol support < > SANE protocol support (EXPERIMENTAL) < > SIP protocol support < > TFTP protocol support <M> Connection tracking netlink interface <M> Connection tracking timeout tuning via Netlink <*> Netfilter Xtables support (required for ip_tables) *** Xtables combined modules *** (有很多项,在下面!) <*> "conntrack" connection tracking match support <*> "state" match support < > IP virtual server support ---> 修改为: <*> IP virtual server support ---> [ ] Netfilter connection tracking (NEW) 修改为(在最后面): [*] Netfilter connection tracking IP: Netfilter Configuration ---> < > IPv4 connection tracking support (required for NAT) 修改为: <*> IPv4 connection tracking support (required for NAT) < > IP tables support (required for filtering/masq/NAT) 修改为: <*> IP tables support (required for filtering/masq/NAT) <*> Packet filtering < > Full NAT 修改为: <*> Full NAT <*> MASQUERADE target support <*> NETMAP target support <*> REDIRECT target support <*> Packet mangling 4、配置系统: rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ make menuconfig Base system ---> < > dnsmasq.............................................. DNS and DHCP server 修改为: <*> dnsmasq.............................................. DNS and DHCP server Allwinner ---> < > softap............................................... Tina softap manager (NEW) ---- 修改为: <*> softap............................................... Tina softap manager ---> --- softap............................................... Tina softap manager < > softap-demo......................................... Tina softap app demo (NEW) 修改为: <*> softap-demo......................................... Tina softap app demo Network ---> Firewall ---> < > iptables................................. IP firewall administration tool ---- 修改为: (里面不用选中) <*> iptables................................. IP firewall administration tool ---> Network ---> < > hostapd................................. IEEE 802.1x Authenticator (full) < > hostapd-common............... hostapd/wpa_supplicant common support files < > hostapd-common-old 修改为: <*> hostapd................................. IEEE 802.1x Authenticator (full) -*- hostapd-common............... hostapd/wpa_supplicant common support files < > hostapd-common-old Utilities ---> <*> playdemo................................... music play in 3 kinds of mode 修改为: < > playdemo................................... music play in 3 kinds of mode 5、配置编译加载选项: rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ find . -name netfilter.mk ./package/kernel/linux/modules/netfilter.mk ./build/netfilter.mk rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ W:\softap_ap6212a0_tinav2.1\build\netfilter.mk $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)xt_LOG)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_common)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_V4)nf_log_ipv4)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_TCPMSS, $(P_XT)xt_TCPMSS)) $(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_REJECT, $(P_V4)ipt_REJECT)) $(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_REJECT, $(P_V4)nf_reject_ipv4)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_TIME, $(P_XT)xt_time)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MARK, $(P_XT)xt_mark)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)xt_LOG)) #$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_common)) #$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_V4)nf_log_ipv4)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_TCPMSS, $(P_XT)xt_TCPMSS)) $(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_REJECT, $(P_V4)ipt_REJECT)) #$(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_REJECT, $(P_V4)nf_reject_ipv4)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_TIME, $(P_XT)xt_time)) $(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MARK, $(P_XT)xt_mark)) 不配置这里就会在这里让你选择(选择:N/y都会出错的!) rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ make -j12 make -C /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/linux-astar-parrot/linux-3.4.39 HOSTCFLAGS="-O2 -I/home/wwt/softap_ap6212a0_tinav2.1/out/host/include -I/home/wwt/softap_ap6212a0_tinav2.1/out/host/usr/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" CONFIG_SHELL="bash" V='' CC="arm-openwrt-linux-muslgnueabi-gcc" modules make[5]: Entering directory `/home/wwt/softap_ap6212a0_tinav2.1/lichee/linux-3.4' scripts/kconfig/conf --silentoldconfig Kconfig drivers/net/wireless/bcmdhd/Kconfig:57:warning: defaults for choice values not supported .config:3733:warning: override: TREE_PREEMPT_RCU changes choice state * * Restart config... * * * IP: Netfilter Configuration * IPv4 connection tracking support (required for NAT) (NF_CONNTRACK_IPV4) [Y/n/m/?] y proc/sysctl compatibility with old connection tracking (NF_CONNTRACK_PROC_COMPAT) [N/y/?] n IP Userspace queueing via NETLINK (OBSOLETE) (IP_NF_QUEUE) [N/m/y/?] n IP tables support (required for filtering/masq/NAT) (IP_NF_IPTABLES) [Y/n/m/?] y "ah" match support (IP_NF_MATCH_AH) [N/m/y/?] n "ecn" match support (IP_NF_MATCH_ECN) [N/m/y/?] n "rpfilter" reverse path filter match support (IP_NF_MATCH_RPFILTER) [N/m/y/?] n "ttl" match support (IP_NF_MATCH_TTL) [N/m/y/?] n Packet filtering (IP_NF_FILTER) [Y/n/m/?] y REJECT target support (IP_NF_TARGET_REJECT) [M/n/y/?] m Force socket error when rejecting with icmp* (IP_NF_TARGET_REJECT_SKERR) [N/y/?] (NEW) n 出错: sh /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/linux-astar-parrot/strace-4.10/ipkg-sunxi/strace rstrip.sh: /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/linux-astar-parrot/strace-4.10/ipkg-sunxi/strace/usr/bin/strace: executable \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm; ) install -d -m0755 /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/packages/base unxi/strace /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/packages/base av2.1/out/astar-parrot/packages/base/strace_4.10-1_sunxi.ipk rm -rf /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-strace strace install -d -m0755 /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-strace/usr/bin v2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-strace/usr/bin/ me/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/' rm -rf /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-strace touch /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/stamp/.strace_installed /rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/strace.default.install make[3]: Leaving directory `/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/package/devel/strace' make[2]: Leaving directory `/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1' make[1]: *** [/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1' Build failed - please re-run with -j1 to see the real error message make: *** [world] 错误 1 #### make failed to build some targets (36:27 (mm:ss)) #### rootroot@cm-System-Product-Name:/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1$ make -j1 rm -rf /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-ap6212-firmware touch /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/stamp/.ap6212-firmware_installed ; echo "ap6212-firmware" >> /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/linux-firmware.default.install make[3]: Leaving directory `/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/package/firmware/linux-firmware' make[3]: Entering directory `/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/package/kernel/linux' rm -rf /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kernel kernel # nothing to do me/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/' rm -rf /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kernel touch /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/stamp/.kernel_installed diron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/linux.default.install rm -rf /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kmod-input-core kmod-input-core NOTICE: module '/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/linux-astar-parrot/linux-3.4.39/drivers/input/input-core.ko' is built-in. ONTROL/postinst-pkg; chmod 0755 /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kmod-input-core/CONTROL/postinst-pkg; fi ore/. /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/' rm -rf /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kmod-input-core touch /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/stamp/.kmod-input-core_installed /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/linux.default.install unxi/kmod-ipt-core/CONTROL /home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo ERROR: module '/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/linux-astar-parrot/linux-3.4.39/net/netfilter/nf_log_common.ko' is missing. make[3]: *** [/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/packages/kernel/kmod-ipt-core_3.4.39-1_sunxi.ipk] Error 1 make[3]: Leaving directory `/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/package/kernel/linux' make[2]: *** [package/kernel/linux/compile] Error 2 make[2]: Leaving directory `/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1' make[1]: *** [/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1' make: *** [world] 错误 2 #### make failed to build some targets (16 seconds) #### rootroot@cm-System-Product-Name:/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1$ grep nf_log_common . -R grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/linux-3.4.39/.git/svn: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/host/u-boot-2014.10/arch/sandbox/include/asm/arch: 没有那个文件或目录 grep: ./build/.git/svn: 没有那个文件或目录 ./build/netfilter.mk:$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_TARGET_LOG, $(P_XT)nf_log_common)) grep: ./package/.git/svn: 没有那个文件或目录 grep: ./target/.git/svn: 没有那个文件或目录 grep: ./.repo/manifests/.git/svn: 没有那个文件或目录 grep: ./tools/.git/svn: 没有那个文件或目录 grep: ./tools/.git/packed-refs: 没有那个文件或目录 grep: ./config/.git/svn: 没有那个文件或目录 grep: ./lichee/linux-3.4/.git/svn: 没有那个文件或目录 grep: ./lichee/brandy/.git/svn: 没有那个文件或目录 grep: ./scripts/.git/svn: 没有那个文件或目录 grep: ./dl/.git/svn: 没有那个文件或目录 grep: ./docs/.git/svn: 没有那个文件或目录 grep: ./prebuilt/.git/svn: 没有那个文件或目录 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux/lib/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux/lib/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux/lib64/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux/lib64/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux-musl/lib/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux-musl/lib/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux-musl/lib64/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux-musl/lib64/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib64/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib64/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib32/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib32/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/arm-openwrt-linux-muslgnueabi/lib/lib: 符号连接的层数过多 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/lib/lib: 符号连接的层数过多 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/lib64/lib: 符号连接的层数过多 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/lib32/lib: 符号连接的层数过多 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/arm-openwrt-linux/lib/lib: 符号连接的层数过多 grep: ./toolchain/.git/svn: 没有那个文件或目录 rootroot@cm-System-Product-Name:/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/rediron/r16_tinav2.1/softap_ap6212a0_tinav2.1$ make -j12 还会出现的错误: rm -rf /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-hostapd-common mkdir -p /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/stamp /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-hostapd-common install -d -m0755 /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-hostapd-common/lib/netifd install -m0644 ./files/netifd.sh /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-hostapd-common/lib/netifd/hostapd.sh SHELL= flock /home/wwt/softap_ap6212a0_tinav2.1/tmp/.root-copy.flock -c 'cp -fpR /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-hostapd-common/. /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/' rm -rf /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-hostapd-common touch /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/stamp/.hostapd-common_installed if [ -f /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/hostapd.supplicant-full.install.clean ]; then rm -f /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/hostapd.supplicant-full.install /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/hostapd.supplicant-full.install.clean; fi; echo "hostapd-common" >> /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/hostapd.supplicant-full.install make[3]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1/package/network/services/hostapd' make[2]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1' make[1]: *** [/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1' Build failed - please re-run with -j1 to see the real error message make: *** [world] 错误 1 #### make failed to build some targets (01:19 (mm:ss)) #### rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ make -j1 or -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/softap-0.0.1/ipkg-install/usr/include -L/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib -L/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/lib -L/home/wwt/softap_ap6212a0_tinav2.1/prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/usr/lib -L/home/wwt/softap_ap6212a0_tinav2.1/prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/lib -znow -zrelro -L/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/softap-0.0.1/ipkg-install/usr/lib -lsoftap -lssl /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `ECDSA_sign' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_POINT_copy' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_set_public_key' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_GROUP_free' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_get0_public_key' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_get0_private_key' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_POINT_oct2point' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_up_ref' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_curve_nist2nid' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_generate_key' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_set_private_key' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_GROUP_new_by_curve_name' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_get0_group' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_GROUP_method_of' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_METHOD_get_field_type' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_POINT_point2oct' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_GROUP_get_curve_name' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_get_conv_form' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_free' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_new' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_GROUP_get_degree' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_set_group' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `ECDSA_verify' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EVP_PKEY_set1_EC_KEY' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_POINT_free' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_POINT_new' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `ECDH_compute_key' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_dup' /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib/libssl.so: undefined reference to `EC_KEY_new_by_curve_name' collect2: error: ld returned 1 exit status make[4]: *** [softap_test] Error 1 make[4]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/softap-0.0.1/demo' make[3]: *** [/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/softap-0.0.1/.built] Error 2 make[3]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1/package/allwinner/softap' make[2]: *** [package/allwinner/softap/compile] Error 2 make[2]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1' make[1]: *** [/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1' make: *** [world] 错误 2 #### make failed to build some targets (17 seconds) #### rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ find . -name libssl.so ./package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/linuxgnueabi/libssl.so ./package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/lgnueabihf/libssl.so ./package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/uclgnueabi/libssl.so ./package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/lgnueabi/libssl.so ./package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi/libssl.so ./out/astar-parrot/compile_dir/target/liballwinner/LIBRARY/install/external/libssl.so ./out/astar-parrot/compile_dir/target/liballwinner/LIBRARY/install/lib/libssl.so ./out/astar-parrot/compile_dir/target/liballwinner/LIBRARY/EXTERNAL/lib32/linuxgnueabi/libssl.so ./out/astar-parrot/compile_dir/target/liballwinner/LIBRARY/EXTERNAL/lib32/lgnueabihf/libssl.so ./out/astar-parrot/compile_dir/target/liballwinner/LIBRARY/EXTERNAL/lib32/uclgnueabi/libssl.so ./out/astar-parrot/compile_dir/target/liballwinner/LIBRARY/EXTERNAL/lib32/lgnueabi/libssl.so ./out/astar-parrot/compile_dir/target/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi/libssl.so ./out/astar-parrot/compile_dir/target/liballwinner/ipkg-install/usr/lib/libssl.so ./out/astar-parrot/compile_dir/target/openssl-1.0.2h/libssl.so ./out/astar-parrot/compile_dir/target/openssl-1.0.2h/ipkg-install/usr/lib/libssl.so ./out/astar-parrot/staging_dir/target/usr/lib/libssl.so rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ 根据经验可以知道全志R16平台的tinav2.1系统的SDK里面自带的库:libssl有问题。(直接删除或者改名) ./package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi/libssl.so rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ cd package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi/ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1/package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi$ ll 总用量 5688 drwxrwxr-x 3 rootroot rootroot 4096 11月 2 2016 ./ drwxrwxr-x 7 rootroot rootroot 4096 11月 2 2016 ../ -rwxrwxr-x 1 rootroot rootroot 135064 11月 2 2016 libaw_aacdec.so* -rwxrwxr-x 1 rootroot rootroot 33844 11月 2 2016 libaw_alacdec.so* -rwxrwxr-x 1 rootroot rootroot 170664 11月 2 2016 libaw_amrdec.so* -rwxrwxr-x 1 rootroot rootroot 76748 11月 2 2016 libaw_apedec.so* -rwxrwxr-x 1 rootroot rootroot 116336 11月 2 2016 libaw_atrcdec.so* -rwxrwxr-x 1 rootroot rootroot 69756 11月 2 2016 libaw_cookdec.so* -rwxrwxr-x 1 rootroot rootroot 55152 11月 2 2016 libaw_flacdec.so* -rwxrwxr-x 1 rootroot rootroot 77500 11月 2 2016 libaw_mp3dec.so* -rwxrwxr-x 1 rootroot rootroot 130672 11月 2 2016 libaw_oggdec.so* -rwxrwxr-x 1 rootroot rootroot 8100 11月 2 2016 libaw_plugin.so* -rwxrwxr-x 1 rootroot rootroot 59284 11月 2 2016 libaw_radec.so* -rwxrwxr-x 1 rootroot rootroot 68296 11月 2 2016 libaw_siprdec.so* -rwxrwxr-x 1 rootroot rootroot 70072 11月 2 2016 libaw_wavdec.so* -rwxrwxr-x 1 rootroot rootroot 87996 11月 2 2016 libcdc_adecoder_debug.so* -rwxrwxr-x 1 rootroot rootroot 35652 11月 2 2016 libcdc_adecoder.so* -rwxrwxr-x 1 rootroot rootroot 166808 11月 2 2016 libcdc_aencoder.so* -rwxrwxr-x 1 rootroot rootroot 1500820 11月 2 2016 libcrypto.so* drwxrwxr-x 2 rootroot rootroot 4096 11月 2 2016 lib_debug/ -rwxrwxr-x 1 rootroot rootroot 1179664 11月 2 2016 liblive555.so* -rwxrwxr-x 1 rootroot rootroot 14464 11月 2 2016 libpostprocess.so* -rwxrwxr-x 1 rootroot rootroot 4672 11月 2 2016 librw_data_api.so* -rwxrwxr-x 1 rootroot rootroot 341764 11月 2 2016 libssl.so* -rwxrwxr-x 1 rootroot rootroot 1282208 11月 2 2016 libxml2.so* -rwxrwxr-x 1 rootroot rootroot 80792 11月 2 2016 libz.so* rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1/package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi$ mv libssl.so libssl.so_bak rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1/package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1/package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1/package/allwinner/liballwinner/LIBRARY/EXTERNAL/lib32/muslgnueabi$ cd - /home/wwt/softap_ap6212a0_tinav2.1 rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ make -j1 rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ pack -d 6、刷机之后,在串口终端中通过softap_test打开softap出错(查明是全志给的patch的路径的问题!) [ 16.536954] dhd_prot_ioctl : bus is down. we have nothing to do [ 16.543761] bcmsdh_oob_intr_unregister: Enter [ 16.548794] bcmsdh_oob_intr_unregister: irq is not registered [ 16.555292] dhd_txglom_enable: enable 0 [ 16.559734] dhd_bus_devreset: WLAN OFF DONE [ 16.564616] wifi_platform_set_power = 0 [ 16.568970] ======== PULL WL_REG_ON LOW! ======== [ 16.574416] [wifi_pm]: wifi power off [ 16.578581] dhdsdio_probe : the lock is released. [ 16.584007] dhd_module_init: Exit err=0 [ 16.591551] xt_time: kernel timezone is -0000 [ 17.648758] [mmc]: sdc2 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 8 timing UHS-DDR50 dt B [ 17.662302] [mmc]: sdc2 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 8 timing UHS-DDR50 dt B [ 17.678544] [mmc]: sdc2 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 8 timing UHS-DDR50 dt B [ 17.850121] android_usb: already disabled [ 17.890241] adb_open [ 17.892807] adb_bind_config [ 17.896040] ep_matches, wrn: endpoint already claimed, ep(0xc068721c, 0xd7a980c0, ep1in-bulk) [ 19.785448] android_usb gadget: high-speed config #1: android BusyBox v1.24.1 () built-in shell (ash) _____ _ __ _ |_ _||_| ___ _ _ | | |_| ___ _ _ _ _ | | _ | || | | |__ | || || | ||_'_| | | | || | || _ | |_____||_||_|_||___||_,_| |_| |_||_|_||_|_| Tina is Based on OpenWrt! ---------------------------------------------- Tina Linux (Neptune, 57513AA3) ---------------------------------------------- root@TinaLinux:/# root@TinaLinux:/# root@TinaLinux:/# so softap_down softap_test softap_up sort root@TinaLinux:/# so softap_down softap_test softap_up sort root@TinaLinux:/# cd /bin/ root@TinaLinux:/bin# ll so* -rwxr-xr-x 1 root root 4095 Sep 14 19:08 softap_down -rwxr-xr-x 1 root root 4095 Sep 14 19:08 softap_test -rwxr-xr-x 1 root root 8191 Sep 14 19:08 softap_up root@TinaLinux:/bin# root@TinaLinux:/bin# root@TinaLinux:/bin# softap_test *************************** Start hostapd test! *************************** Start to reload firmware! Enter: wifi_get_fw_path function, fw_type=1,Eneter: wifi_change_fw_path, fwpath = lib/firmware/fw_bcm43438a0_apsta.bin. Softap fwReload - OkMessage is: OK Reload firmware finished! Start to set softap! Message is: OK Set softap finished! [ 75.613141] dhd_open: Enter d720d000 [ 75.617247] [ 75.617249] Dongle Host Driver, version 1.201.59.3 (r506368) [ 75.617254] Compiled in drivers/net/wireless/bcmdhd on Sep 14 2017 at 11:02:29 [ 75.633597] wl_android_wifi_on in 1 [ 75.637659] wl_android_wifi_on in 2: g_wifi_on=0 [ 75.642896] wifi_platform_set_power = 1 [ 75.647247] ======== PULL WL_REG_ON HIGH! ======== [ 75.652765] [wifi_pm]: wifi power on [ 75.960028] sdio_reset_comm(): [ 75.963526] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 75.976104] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 75.987627] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B [ 75.998550] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B [ 76.020809] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 76.028967] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 76.037137] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 76.047072] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 76.165734] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 76.176190] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 76.186815] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 76.197594] [ 76.197597] [ 76.197599] dhd_bus_devreset: == WLAN ON == [ 76.206013] F1 signature read @0x18000000=0x1540a9a6 [ 76.213284] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 76.221292] DHD: dongle ram size is set to 524288(orig 524288) at 0x0 [ 76.228727] dhdsdio_probe_init: set use_rxchain 1 from config.txt [ 76.235753] dhd_conf_read_config: Ignore config file /lib/firmware/config.txt [ 76.243796] dhd_conf_set_fw_name_by_chip: firmware_path=lib/firmware/fw_bcm43438a0_apsta.bin [ 76.253368] Final fw_path=lib/firmware/fw_bcm43438a0_apsta.bin [ 76.260041] Final nv_path=/lib/firmware/nvram.txt [ 76.265358] Final conf_path=/lib/firmware/config.txt [ 76.271554] dhdsdio_download_code_file: Open firmware file failed lib/firmware/fw_bcm43438a0_apsta.bin [ 76.282093] _dhdsdio_download_firmware: dongle image file download failed [ 76.289838] dhd_net_bus_devreset: dhd_bus_devreset: -35 [ 76.295753] dhd_prot_ioctl : bus is down. we have nothing to do [ 76.302529] dhd_net_bus_devreset: dhd_bus_devreset: -35 [ 76.308454] wifi_platform_set_power = 0 [ 76.312912] ======== PULL WL_REG_ON LOW! ======== [ 76.318233] [wifi_pm]: wifi power off [ 76.322408] wl_android_wifi_on: Failed [ 76.326758] dhd_open : wl_android_wifi_on failed (-35) [ 76.332573] dhd_stop: Enter d720d000 [ 76.336637] wl_android_wifi_off in 1 [ 76.340800] wl_android_wifi_off in 2: g_wifi_on=0 [ 76.346115] wl_android_wifi_off out [ 76.350093] dhd_stop: Exit [ 76.353290] dhd_open: Exit ret=-1 ifconfig: SIOCSIFFLAGS: Operation not permitted Start to start softap! Configuration file: /etc/wifi/ho[ 80.454347] dhd_open: Enter d720d000 stapd.conf [ 80.458611] [ 80.458613] Dongle Host Driver, version 1.201.59.3 (r506368) [ 80.458618] Compiled in drivers/net/wireless/bcmdhd on Sep 14 2017 at 11:02:29 [ 80.476003] wl_android_wifi_on in 1 [ 80.479971] wl_android_wifi_on in 2: g_wifi_on=0 [ 80.485214] wifi_platform_set_power = 1 [ 80.489657] ======== PULL WL_REG_ON HIGH! ======== [ 80.495082] [wifi_pm]: wifi power on SoftAP started successfullyMessage is: OK Start softap finished! [ 80.800038] sdio_reset_comm(): [ 80.803641] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 80.816148] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 80.827683] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B [ 80.838604] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B [ 80.860859] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 80.869016] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 80.877280] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 80.887030] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 81.005831] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 81.016222] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 81.026711] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 81.037496] [ 81.037499] [ 81.037502] dhd_bus_devreset: == WLAN ON == [ 81.045875] F1 signature read @0x18000000=0x1540a9a6 [ 81.053157] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 81.061161] DHD: dongle ram size is set to 524288(orig 524288) at 0x0 [ 81.068590] dhdsdio_probe_init: set use_rxchain 1 from config.txt [ 81.075623] dhd_conf_read_config: Ignore config file /lib/firmware/config.txt [ 81.083760] dhd_conf_set_fw_name_by_chip: firmware_path=lib/firmware/fw_bcm43438a0_apsta.bin [ 81.093240] Final fw_path=lib/firmware/fw_bcm43438a0_apsta.bin [ 81.099901] Final nv_path=/lib/firmware/nvram.txt [ 81.105228] Final conf_path=/lib/firmware/config.txt [ 81.111473] dhdsdio_download_code_file: Open firmware file failed lib/firmware/fw_bcm43438a0_apsta.bin [ 81.122017] _dhdsdio_download_firmware: dongle image file download failed [ 81.129672] dhd_net_bus_devreset: dhd_bus_devreset: -35 [ 81.135676] dhd_prot_ioctl : bus is down. we have nothing to do [ 81.142356] dhd_net_bus_devreset: dhd_bus_devreset: -35 [ 81.148373] wifi_platform_set_power = 0 [ 81.152740] ======== PULL WL_REG_ON LOW! ======== [ 81.158059] [wifi_pm]: wifi power off [ 81.162321] wl_android_wifi_on: Failed [ 81.166579] dhd_open : wl_android_wifi_on failed (-35) [ 81.172394] dhd_stop: Enter d720d000 [ 81.176548] wl_android_wifi_off in 1 [ 81.180623] wl_android_wifi_off in 2: g_wifi_on=0 [ 81.185942] wl_android_wifi_off out [ 81.189908] dhd_stop: Exit [ 81.193026] dhd_open: Exit ret=-1 Could not set interface wlan0 fl[ 81.196943] dhd_inetaddr_notifier_call: bus not ready, exit ags (UP): Operation not permitte[ 81.206128] dhd_open: Enter d720d000 d nl80211: Could not set interf[ 81.212702] ace 'wlan0' UP nl80211: deinit [ 81.212706] Dongle Host Driver, version 1.201.59.3 (r506368) ifname=wlan0 disabled_11b_rates=[ 81.212710] Compiled in drivers/net/wireless/bcmdhd on Sep 14 2017 at 11:02:29 0 [ 81.236958] wl_android_wifi_on in 1 [ 81.241176] wl_android_wifi_on in 2: g_wifi_on=0 [ 81.246400] wifi_platform_set_power = 1 [ 81.250760] ======== PULL WL_REG_ON HIGH! ======== [ 81.256266] [wifi_pm]: wifi power on [ 81.570028] sdio_reset_comm(): [ 81.573521] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 81.586092] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 81.597610] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B [ 81.608512] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B [ 81.630743] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 81.638905] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 81.647165] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 81.656911] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 81.775658] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 81.785943] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 81.796508] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 81.807280] [ 81.807283] [ 81.807285] dhd_bus_devreset: == WLAN ON == [ 81.815693] F1 signature read @0x18000000=0x1540a9a6 [ 81.822936] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 81.830931] DHD: dongle ram size is set to 524288(orig 524288) at 0x0 [ 81.838356] dhdsdio_probe_init: set use_rxchain 1 from config.txt [ 81.845386] dhd_conf_read_config: Ignore config file /lib/firmware/config.txt [ 81.853427] dhd_conf_set_fw_name_by_chip: firmware_path=lib/firmware/fw_bcm43438a0_apsta.bin [ 81.862999] Final fw_path=lib/firmware/fw_bcm43438a0_apsta.bin [ 81.869660] Final nv_path=/lib/firmware/nvram.txt [ 81.874988] Final conf_path=/lib/firmware/config.txt [ 81.881223] dhdsdio_download_code_file: Open firmware file failed lib/firmware/fw_bcm43438a0_apsta.bin [ 81.891670] _dhdsdio_download_firmware: dongle image file download failed [ 81.899411] dhd_net_bus_devreset: dhd_bus_devreset: -35 [ 81.905327] dhd_prot_ioctl : bus is down. we have nothing to do [ 81.912108] dhd_net_bus_devreset: dhd_bus_devreset: -35 [ 81.918034] wifi_platform_set_power = 0 [ 81.922493] ======== PULL WL_REG_ON LOW! ======== [ 81.927810] [wifi_pm]: wifi power off [ 81.932073] wl_android_wifi_on: Failed [ 81.936331] dhd_open : wl_android_wifi_on failed (-35) [ 81.942144] dhd_stop: Enter d720d000 [ 81.946298] wl_android_wifi_off in 1 [ 81.950371] wl_android_wifi_off in 2: g_wifi_on=0 [ 81.955686] wl_android_wifi_off out [ 81.959742] dhd_stop: Exit [ 81.962860] dhd_open: Exit ret=-1 ifconfig: SIOCSIFFLAGS: Operation not permitted nl80211 driver initialization failed. wlan0: interface state UNINITIALIZED->DISABLED wlan0: AP-DISABLED hostapd_free_hapd_data: Interface wlan0 wasn't started *************************** Hostapd test successed! *************************** root@TinaLinux:/bin# 因为softap_test的绝对路径是:/bin/softap_test。那么lib/firmware/fw_bcm43438a0_apsta.bin的路径就应该是:/bin/lib/firmware/fw_bcm43438a0_apsta.bin。 将目录/lib/firmware/fw_bcm43438a0_apsta.bin中的AP6212的库文件全部拷贝到:/bin/lib/firmware/fw_bcm43438a0_apsta.bin就可以通过softap_test正常打开softap了! root@TinaLinux:/bin# root@TinaLinux:/bin# mkdir -p lib/firmware/ root@TinaLinux:/bin# cd lib/firmware/ root@TinaLinux:/bin/lib/firmware# ll drwxr-xr-x 2 root root 1024 Sep 16 03:16 . drwxr-xr-x 3 root root 1024 Sep 16 03:16 .. root@TinaLinux:/bin/lib/firmware# cd /lib/firmware/ root@TinaLinux:/lib/firmware# ll drwxr-xr-x 2 root root 139 Sep 14 19:08 . drwxr-xr-x 10 root root 681 Sep 14 19:02 .. -rw-r--r-- 1 root root 26020 Sep 14 17:31 bcm43438a0.hcd -rw-r--r-- 1 root root 378595 Sep 14 17:31 fw_bcm43438a0.bin -rw-r--r-- 1 root root 309352 Sep 14 17:31 fw_bcm43438a0_apsta.bin -rw-r--r-- 1 root root 336323 Sep 14 17:31 fw_bcm43438a0_p2p.bin -rw-r--r-- 1 root root 902 Sep 14 17:31 nvram.txt root@TinaLinux:/lib/firmware# cp * /bin/lib/firmware/ root@TinaLinux:/lib/firmware# cd /bin/lib/firmware/ root@TinaLinux:/bin/lib/firmware# ll drwxr-xr-x 2 root root 1024 Sep 16 03:17 . drwxr-xr-x 3 root root 1024 Sep 16 03:16 .. -rw-r--r-- 1 root root 26020 Sep 16 03:17 bcm43438a0.hcd -rw-r--r-- 1 root root 378595 Sep 16 03:17 fw_bcm43438a0.bin -rw-r--r-- 1 root root 309352 Sep 16 03:17 fw_bcm43438a0_apsta.bin -rw-r--r-- 1 root root 336323 Sep 16 03:17 fw_bcm43438a0_p2p.bin -rw-r--r-- 1 root root 902 Sep 16 03:17 nvram.txt root@TinaLinux:/bin/lib/firmware# cd /bin/ root@TinaLinux:/bin# root@TinaLinux:/bin# root@TinaLinux:/bin# softap_test *************************** Start hostapd test! *************************** Start to reload firmware! Enter: wifi_get_fw_path function, fw_type=1,Eneter: wifi_change_fw_path, fwpath = lib/firmware/fw_bcm43438a0_apsta.bin. Softap fwReload - OkMessage is: OK Reload firmware finished! Start to set softap! Message is: OK Set softap finished! [ 190.043911] dhd_open: Enter d720d000 [ 190.048003] [ 190.048006] Dongle Host Driver, version 1.201.59.3 (r506368) [ 190.048010] Compiled in drivers/net/wireless/bcmdhd on Sep 14 2017 at 11:02:29 [ 190.064444] wl_android_wifi_on in 1 [ 190.068411] wl_android_wifi_on in 2: g_wifi_on=0 [ 190.073643] wifi_platform_set_power = 1 [ 190.078087] ======== PULL WL_REG_ON HIGH! ======== [ 190.083512] [wifi_pm]: wifi power on [ 190.390029] sdio_reset_comm(): [ 190.393528] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 190.406118] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 190.417559] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B [ 190.428484] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B [ 190.450739] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 190.458990] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 190.467164] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 190.477004] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 190.595621] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 190.606060] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 190.616684] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 190.627433] [ 190.627436] [ 190.627439] dhd_bus_devreset: == WLAN ON == [ 190.635854] F1 signature read @0x18000000=0x1540a9a6 [ 190.643122] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 190.651026] DHD: dongle ram size is set to 524288(orig 524288) at 0x0 [ 190.658542] dhdsdio_probe_init: set use_rxchain 1 from config.txt [ 190.665481] dhd_conf_read_config: Ignore config file /lib/firmware/config.txt [ 190.673620] dhd_conf_set_fw_name_by_chip: firmware_path=lib/firmware/fw_bcm43438a0_apsta.bin [ 190.683192] Final fw_path=lib/firmware/fw_bcm43438a0_apsta.bin [ 190.689763] Final nv_path=/lib/firmware/nvram.txt [ 190.695090] Final conf_path=/lib/firmware/config.txt [ 190.733434] NVRAM version: AP6212_NVRAM_V1.0_20140603 [ 190.742372] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded. [ 190.804325] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us) [ 190.811066] bcmsdh_oob_intr_register: Enter [ 190.815806] bcmsdh_oob_intr_register: HW_OOB enabled [ 190.821429] bcmsdh_oob_intr_register OOB irq=7 flags=414 [ 190.827623] bcmsdh_oob_intr_register: enable_irq_wake [ 190.833345] bcmsdh_oob_intr_register: enable_irq_wake failed with -6 [ 190.841211] dhd_conf_set_band: Set band 0 [ 190.848224] Firmware up: op_mode=0x0002, MAC=02:1a:11:f9:3d:89 [ 190.854908] dhd_conf_set_country: Set country CN, revision 0 [ 190.924854] Country code: CN (CN/0) [ 190.929416] dhd_conf_set_roam: Set roam_off 1 [ 190.940302] dhd_arp_offload_enable: failed to enabe ARP offload to 0, retcode = -23 [ 190.949649] dhd_arp_offload_set: failed to set ARP offload mode to 0x0, retcode = -23 [ 190.959035] Firmware version = wl0: Jun 6 2014 14:57:15 version 7.10.226.49 (r) FWID 01-cf4a5122 [ 190.969088] Driver: 1.201.59.3 (r506368) [ 190.969093] Firmware: wl0: Jun 6 2014 14:57:15 version 7.10.226.49 (r) FWID 01-cf4a5122 [ 190.983566] dhd_txglom_enable: enable 1 [ 190.987919] dhd_conf_set_disable_proptx: set disable_proptx 0 [ 190.996601] dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79 [ 191.004833] dhd_wlfc_init(): wlfc_mode=0x0, ret=-23 [ 191.011090] wl_android_wifi_on: Success [ 191.085709] dhd_open: Exit ret=0 Start to start softap! Configuration file: /etc/wifi/hostapd.conf nl80211: Could not re-add multic[ 195.098274] netdev_ifidx(5), chan_type(1) target channel(6) ast membership for vendor events: -2 (No such file or directory) [ 195.159332] Disconnect STA : ff:ff:ff:ff:ff:ff scb_val.val 3 Using interface wlan0 with hwaddr 02:1a:11:f9:3d:89 and ssid "Smart-AW-HOSTAPD" VLAN: vlan_set_name_type: SET_VLAN_NAME_TYPE_CMD name_type=2 failed: No error information SoftAP started successfullyMessage is: OK Start softap finished! wlan0: interface state UNINITIALIZED->ENABLED wlan0: AP-ENABLED *************************** Hostapd test successed! *************************** root@TinaLinux:/bin# root@TinaLinux:/bin# 7、查找/修改路径lib/firmware/fw_bcm43438a0_apsta.bin的位置,解决问题! rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ grep "lib/firmware/fw_bcm43438a0_apsta.bin" . -R grep: ./target/.git/svn: 没有那个文件或目录 grep: ./dl/.git/svn: 没有那个文件或目录 grep: ./scripts/.git/svn: 没有那个文件或目录 grep: ./toolchain/.git/svn: 没有那个文件或目录 grep: ./lichee/brandy/.git/svn: 没有那个文件或目录 grep: ./lichee/linux-3.4/.git/svn: 没有那个文件或目录 grep: ./.repo/manifests/.git/svn: 没有那个文件或目录 grep: ./tools/.git/packed-refs: 没有那个文件或目录 grep: ./tools/.git/svn: 没有那个文件或目录 ./package/allwinner/softap/src/include/wifi.h:#define WIFI_DRIVER_FW_PATH_AP "lib/firmware/fw_bcm43438a0_apsta.bin" grep: ./package/.git/svn: 没有那个文件或目录 grep: ./config/.git/svn: 没有那个文件或目录 grep: ./prebuilt/.git/svn: 没有那个文件或目录 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/arm-openwrt-linux-muslgnueabi/lib/lib: 符号连接的层数过多 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/lib64/lib: 符号连接的层数过多 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/arm-openwrt-linux/lib/lib: 符号连接的层数过多 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/lib/lib: 符号连接的层数过多 grep: ./prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/lib32/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib64/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib64/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux-musl/lib64/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux-musl/lib64/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux-musl/lib/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux-musl/lib/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux/lib64/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux/lib64/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux/lib/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/aarch64-openwrt-linux/lib/lib: 符号连接的层数过多 grep: 警告: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib32/lib64: 嵌套目录循环 grep: ./prebuilt/gcc/linux-x86/aarch64/toolchain-sunxi/toolchain/lib32/lib: 符号连接的层数过多 grep: ./docs/.git/svn: 没有那个文件或目录 grep: ./build/.git/svn: 没有那个文件或目录 grep: 警告: ./out/astar-parrot/compile_dir/target/alsa-lib-1.1.0/include/alsa: 嵌套目录循环 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/ccX0DZGY.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/arjGlms3: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/.xrdp/xrdp-Wpph9R: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/.xrdp/xrdp-sesman-j8EDdT: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/ccZVA9SY.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/ccX0uKZX.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/jack-sam: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/cc61XiF1.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/config-err-1dsmuu: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/.X11-unix/X0: 没有那个设备或地址 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/ccsCfxm0.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/rootfs/var/.ICE-unix/1629: 没有那个设备或地址 grep: ./out/astar-parrot/compile_dir/target/rootfs/etc/fstab: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/target/rootfs/etc/resolv.conf: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/target/rootfs/etc/localtime: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/target/rootfs/etc/TZ: 没有那个文件或目录 匹配到二进制文件 ./out/astar-parrot/compile_dir/target/rootfs/lib/libsoftap.so ./out/astar-parrot/compile_dir/target/rootfs/usr/lib/opkg/info/ap6212-firmware.list:/lib/firmware/fw_bcm43438a0_apsta.bin grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/iptables-1.4.21/ipkg-install/usr/bin/iptables-xml: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/linux-3.4.39/.git/svn: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/ccYUdHeN.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/ccwnGT98.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/arjGlms3: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/.xrdp/xrdp-Wpph9R: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/.xrdp/xrdp-sesman-j8EDdT: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/jack-sam: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/config-err-1dsmuu: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/ccKPHt0a.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/.X11-unix/X0: 没有那个设备或地址 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/ccTjmDl9.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/cchl8Q5Z.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/.ICE-unix/1629: 没有那个设备或地址 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/cc8cLhMk.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/var/cchrl5HM.s: 权限不够 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/etc/fstab: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/etc/resolv.conf: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/etc/localtime: 没有那个文件或目录 grep: ./out/astar-parrot/compile_dir/target/linux-astar-parrot/base-files/ipkg-sunxi/base-files/etc/TZ: 没有那个文件或目录 匹配到二进制文件 ./out/astar-parrot/compile_dir/target/softap-0.0.1/src/libsoftap.so ./out/astar-parrot/compile_dir/target/softap-0.0.1/src/include/wifi.h:#define WIFI_DRIVER_FW_PATH_AP "lib/firmware/fw_bcm43438a0_apsta.bin" 匹配到二进制文件 ./out/astar-parrot/compile_dir/target/softap-0.0.1/ipkg-sunxi/softap/lib/libsoftap.so 匹配到二进制文件 ./out/astar-parrot/compile_dir/target/softap-0.0.1/ipkg-install/usr/lib/libsoftap.so grep: ./out/astar-parrot/compile_dir/host/u-boot-2014.10/arch/sandbox/include/asm/arch: 没有那个文件或目录 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/.xrdp/xrdp-Wpph9R: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/.xrdp/xrdp-sesman-j8EDdT: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/jack-sam: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/ccOJeBXg.s: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/ccx3i6ni.s: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/config-err-1dsmuu: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/ccyysPO4.s: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/ccvMBZVn.s: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/.X11-unix/X0: 没有那个设备或地址 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/cc2RTnRj.s: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/arXGbM2T: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/.ICE-unix/1629: 没有那个设备或地址 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/ccngUTgH.s: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/var/ccbLfznO.s: 权限不够 grep: ./out/astar-parrot/staging_dir/target/rootfs/etc/fstab: 没有那个文件或目录 grep: ./out/astar-parrot/staging_dir/target/rootfs/etc/resolv.conf: 没有那个文件或目录 grep: ./out/astar-parrot/staging_dir/target/rootfs/etc/localtime: 没有那个文件或目录 grep: ./out/astar-parrot/staging_dir/target/rootfs/etc/TZ: 没有那个文件或目录 匹配到二进制文件 ./out/astar-parrot/staging_dir/target/rootfs/lib/libsoftap.so 匹配到二进制文件 ./out/astar-parrot/staging_dir/target/lib/libsoftap.so rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ W:\softap_ap6212a0_tinav2.1\package\allwinner\softap\src\include\wifi.h #ifndef WIFI_DRIVER_FW_PATH_AP #define WIFI_DRIVER_FW_PATH_AP "lib/firmware/fw_bcm43438a0_apsta.bin" #endif #ifndef WIFI_DRIVER_FW_PATH_P2P #define WIFI_DRIVER_FW_PATH_P2P "lib/firmware/fw_bcm43438a0_p2p.bin" #endif 修改为: #ifndef WIFI_DRIVER_FW_PATH_AP //#define WIFI_DRIVER_FW_PATH_AP "lib/firmware/fw_bcm43438a0_apsta.bin" #define WIFI_DRIVER_FW_PATH_AP "/lib/firmware/fw_bcm43438a0_apsta.bin" #endif #ifndef WIFI_DRIVER_FW_PATH_P2P //#define WIFI_DRIVER_FW_PATH_P2P "lib/firmware/fw_bcm43438a0_p2p.bin" #define WIFI_DRIVER_FW_PATH_P2P "/lib/firmware/fw_bcm43438a0_p2p.bin" #endif rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ make -j12 ONTROL/postinst-pkg; echo "insert_modules $modules" >> /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kmod-net-ap6212/CONTROL/postinst-pkg; chmod 0755 /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kmod-net-ap6212/CONTROL/postinst-pkg; fi SHELL= flock /home/wwt/softap_ap6212a0_tinav2.1/tmp/.root-copy.flock -c 'cp -fpR /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kmod-net-ap6212/. /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/' rm -rf /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/tmp-kmod-net-ap6212 touch /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/rootfs/stamp/.kmod-net-ap6212_installed if [ -f /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/linux.default.install.clean ]; then rm -f /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/linux.default.install /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/linux.default.install.clean; fi; echo "kmod-net-ap6212" >> /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/pkginfo/linux.default.install make[3]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1/package/kernel/linux' make[2]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1' make[1]: *** [/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/wwt/softap_ap6212a0_tinav2.1' Build failed - please re-run with -j1 to see the real error message make: *** [world] 错误 1 #### make failed to build some targets (8 seconds) #### rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ rootroot@cm-System-Product-Name:/home/wwt/softap_ap6212a0_tinav2.1$ make -j1 #softap_test make -C /home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/softap-0.0.1/demo/ ARCH="arm" AR="arm-openwrt-linux-muslgnueabi-ar" CC="arm-openwrt-linux-muslgnueabi-gcc" CXX="arm-openwrt-linux-muslgnueabi-g++" CFLAGS="-Os -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -fno-caller-saves -fno-plt -mfloat-abi=hard -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LDFLAGS="-L/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/usr/lib -L/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/staging_dir/target/lib -L/home/wwt/softap_ap6212a0_tinav2.1/prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/usr/lib -L/home/wwt/softap_ap6212a0_tinav2.1/prebuilt/gcc/linux-x86/arm/toolchain-sunxi/toolchain/lib -znow -zrelro" CONFIG_PREFIX="/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/softap-0.0.1/ipkg-install" all make[4]: Entering directory `/home/wwt/softap_ap6212a0_tinav2.1/out/astar-parrot/compile_dir/target/softap-0.0.1/demo' arm-openwrt-linux-muslgnueabi-gcc -o softap_test softap_test.c -Os -pipe -march=armv
rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ tar zxvf lichee_parrotv1.1_20161202.tar.gz rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ ll 总用量 10786992 drwx------ 4 rootroot rootroot 4096 5月 2 14:48 ./ drwxrwxrwx 18 rootroot rootroot 4096 5月 2 13:50 ../ -rwx------ 1 rootroot rootroot 8557328646 12月 2 16:08 android_parrotv1.1_20161202.tar.gz* drwxrwxr-x 7 rootroot rootroot 4096 12月 2 15:52 lichee/ -rwx------ 1 rootroot rootroot 2488523424 12月 2 16:15 lichee_parrotv1.1_20161202.tar.gz* drwxrwxr-x 8 rootroot rootroot 4096 5月 2 14:40 parrotv1p1_lichee/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16$ cd lichee/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ll 总用量 36 drwxrwxr-x 7 rootroot rootroot 4096 12月 2 15:52 ./ drwx------ 4 rootroot rootroot 4096 5月 2 14:48 ../ drwxrwxr-x 8 rootroot rootroot 4096 12月 2 15:51 brandy/ drwxrwxr-x 15 rootroot rootroot 4096 12月 2 15:52 buildroot/ -r-xr-xr-x 1 rootroot rootroot 55 12月 2 15:52 build.sh* drwxrwxr-x 26 rootroot rootroot 4096 12月 2 15:52 linux-3.4/ -r--r--r-- 1 rootroot rootroot 232 12月 2 15:52 README drwxrwxr-x 6 rootroot rootroot 4096 12月 2 15:51 .repo/ drwxrwxr-x 7 rootroot rootroot 4096 12月 2 15:52 tools/ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 2 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. bell-one 1. evb 2. evb-20 3. evb-30 4. evb-rtl8723bs 5. sc3813r Choice: 3 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh KCONFIG_AUTOCONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/tristate.config BUILDROOT_CONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf --silentoldconfig Config.in # # make dependencies written to .auto.deps # ATTENTION buildroot devels! # See top of this file before playing with this auto-preprequisites! # make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot' You must install 'makeinfo' on your build machine makeinfo is usually part of the texinfo package in your distribution make: *** [dependencies] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ d/buildroot-config/conf.o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/zconf.tab.o -o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf rm /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/zconf.tab.c make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot/package/config' # # configuration written to /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config # make:离开目录“/home/wwt/linux_r16/lichee/buildroot” make:进入目录'/home/wwt/linux_r16/lichee/buildroot' /usr/bin/make -j6 O=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot silentoldconfig make[1]: 正在进入目录 `/home/wwt/linux_r16/lichee/buildroot' GEN /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/Makefile KCONFIG_AUTOCONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/tristate.config BUILDROOT_CONFIG=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/.config /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/buildroot-config/conf --silentoldconfig Config.in # # make dependencies written to .auto.deps # ATTENTION buildroot devels! # See top of this file before playing with this auto-preprequisites! # make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/buildroot' You must install 'makeinfo' on your build machine makeinfo is usually part of the texinfo package in your distribution make: *** [dependencies] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ sudo apt-get install texinfo [sudo] password for rootroot: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libfakeroot Use 'apt-get autoremove' to remove them. 将会安装下列额外的软件包: libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libintl-perl libio-html-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libnet-http-perl libtext-unidecode-perl libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl 建议安装的软件包: libdata-dump-perl libintl-xs-perl libcrypt-ssleay-perl libauthen-ntlm-perl texinfo-doc-nonfree 下列【新】软件包将被安装: libencode-locale-perl libfile-listing-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libintl-perl libio-html-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libnet-http-perl libtext-unidecode-perl libwww-perl libwww-robotrules-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-parser-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl texinfo 升级了 0 个软件包,新安装了 28 个软件包,要卸载 0 个软件包,有 737 个软件包未被升级。 需要下载 3,425 kB 的软件包。 解压缩后会消耗掉 13.0 MB 的额外空间。 您希望继续执行吗? [Y/n] y 获取:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libencode-locale-perl all 1.03-1 [12.4 kB] 获取:2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-date-perl all 6.02-1 [10.4 kB] 获取:3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libfile-listing-perl all 6.04-1 [9,774 B] 获取:4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libfont-afm-perl all 1.20-1 [14.3 kB] 获取:5 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-tagset-perl all 3.20-2 [13.5 kB] 获取:6 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-parser-perl amd64 3.71-1build1 [98.2 kB] 获取:7 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libio-html-perl all 1.00-1 [15.7 kB] 获取:8 http://cn.archive.ubuntu.com/ubuntu/ trusty/main liblwp-mediatypes-perl all 6.02-1 [21.7 kB] 获取:9 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-message-perl all 6.06-1 [78.7 kB] 获取:10 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-form-perl all 6.03-1 [23.5 kB] 获取:11 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-tree-perl all 5.03-1 [215 kB] 获取:12 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhtml-format-perl all 2.11-1 [44.7 kB] 获取:13 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-cookies-perl all 6.00-2 [23.3 kB] 获取:14 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-daemon-perl all 6.01-1 [17.0 kB] 获取:15 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libhttp-negotiate-perl all 6.00-2 [13.4 kB] 获取:16 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libintl-perl all 1.23-1build1 [1,204 kB] 获取:17 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libnet-http-perl all 6.06-1 [24.2 kB] 获取:18 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libwww-robotrules-perl all 6.01-1 [14.1 kB] 获取:19 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libwww-perl all 6.05-2 [146 kB] 获取:20 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main liblwp-protocol-https-perl all 6.04-2ubuntu0.1 [7,644 B] 获取:21 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libtext-unidecode-perl all 0.04-2 [115 kB] 获取:22 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-namespacesupport-perl all 1.11-1 [13.2 kB] 获取:23 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-base-perl all 1.07-1 [21.5 kB] 获取:24 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-perl all 0.99+dfsg-2ubuntu1 [64.6 kB] 获取:25 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main libxml-libxml-perl amd64 2.0108+dfsg-1ubuntu0.1 [337 kB] 获取:26 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-parser-perl amd64 2.41-1build3 [294 kB] 获取:27 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libxml-sax-expat-perl all 0.40-2 [11.5 kB] 获取:28 http://cn.archive.ubuntu.com/ubuntu/ trusty/main texinfo amd64 5.2.0.dfsg.1-2 [561 kB] 下载 3,425 kB,耗时 2秒 (1,303 kB/s) Selecting previously unselected package libencode-locale-perl. (正在读取数据库 ... 系统当前共安装有 213805 个文件和目录。) Preparing to unpack .../libencode-locale-perl_1.03-1_all.deb ... Unpacking libencode-locale-perl (1.03-1) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../libhttp-date-perl_6.02-1_all.deb ... Unpacking libhttp-date-perl (6.02-1) ... Selecting previously unselected package libfile-listing-perl. Preparing to unpack .../libfile-listing-perl_6.04-1_all.deb ... Unpacking libfile-listing-perl (6.04-1) ... Selecting previously unselected package libfont-afm-perl. Preparing to unpack .../libfont-afm-perl_1.20-1_all.deb ... Unpacking libfont-afm-perl (1.20-1) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../libhtml-tagset-perl_3.20-2_all.deb ... Unpacking libhtml-tagset-perl (3.20-2) ... Selecting previously unselected package libhtml-parser-perl. Preparing to unpack .../libhtml-parser-perl_3.71-1build1_amd64.deb ... Unpacking libhtml-parser-perl (3.71-1build1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../libio-html-perl_1.00-1_all.deb ... Unpacking libio-html-perl (1.00-1) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../liblwp-mediatypes-perl_6.02-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.02-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../libhttp-message-perl_6.06-1_all.deb ... Unpacking libhttp-message-perl (6.06-1) ... Selecting previously unselected package libhtml-form-perl. Preparing to unpack .../libhtml-form-perl_6.03-1_all.deb ... Unpacking libhtml-form-perl (6.03-1) ... Selecting previously unselected package libhtml-tree-perl. Preparing to unpack .../libhtml-tree-perl_5.03-1_all.deb ... Unpacking libhtml-tree-perl (5.03-1) ... Selecting previously unselected package libhtml-format-perl. Preparing to unpack .../libhtml-format-perl_2.11-1_all.deb ... Unpacking libhtml-format-perl (2.11-1) ... Selecting previously unselected package libhttp-cookies-perl. Preparing to unpack .../libhttp-cookies-perl_6.00-2_all.deb ... Unpacking libhttp-cookies-perl (6.00-2) ... Selecting previously unselected package libhttp-daemon-perl. Preparing to unpack .../libhttp-daemon-perl_6.01-1_all.deb ... Unpacking libhttp-daemon-perl (6.01-1) ... Selecting previously unselected package libhttp-negotiate-perl. Preparing to unpack .../libhttp-negotiate-perl_6.00-2_all.deb ... Unpacking libhttp-negotiate-perl (6.00-2) ... Selecting previously unselected package libintl-perl. Preparing to unpack .../libintl-perl_1.23-1build1_all.deb ... Unpacking libintl-perl (1.23-1build1) ... Selecting previously unselected package libnet-http-perl. Preparing to unpack .../libnet-http-perl_6.06-1_all.deb ... Unpacking libnet-http-perl (6.06-1) ... Selecting previously unselected package libwww-robotrules-perl. Preparing to unpack .../libwww-robotrules-perl_6.01-1_all.deb ... Unpacking libwww-robotrules-perl (6.01-1) ... Selecting previously unselected package libwww-perl. Preparing to unpack .../libwww-perl_6.05-2_all.deb ... Unpacking libwww-perl (6.05-2) ... Selecting previously unselected package liblwp-protocol-https-perl. Preparing to unpack .../liblwp-protocol-https-perl_6.04-2ubuntu0.1_all.deb ... Unpacking liblwp-protocol-https-perl (6.04-2ubuntu0.1) ... Selecting previously unselected package libtext-unidecode-perl. Preparing to unpack .../libtext-unidecode-perl_0.04-2_all.deb ... Unpacking libtext-unidecode-perl (0.04-2) ... Selecting previously unselected package libxml-namespacesupport-perl. Preparing to unpack .../libxml-namespacesupport-perl_1.11-1_all.deb ... Unpacking libxml-namespacesupport-perl (1.11-1) ... Selecting previously unselected package libxml-sax-base-perl. Preparing to unpack .../libxml-sax-base-perl_1.07-1_all.deb ... Unpacking libxml-sax-base-perl (1.07-1) ... Selecting previously unselected package libxml-sax-perl. Preparing to unpack .../libxml-sax-perl_0.99+dfsg-2ubuntu1_all.deb ... Unpacking libxml-sax-perl (0.99+dfsg-2ubuntu1) ... Selecting previously unselected package libxml-libxml-perl. Preparing to unpack .../libxml-libxml-perl_2.0108+dfsg-1ubuntu0.1_amd64.deb ... Unpacking libxml-libxml-perl (2.0108+dfsg-1ubuntu0.1) ... Selecting previously unselected package libxml-parser-perl. Preparing to unpack .../libxml-parser-perl_2.41-1build3_amd64.deb ... Unpacking libxml-parser-perl (2.41-1build3) ... Selecting previously unselected package libxml-sax-expat-perl. Preparing to unpack .../libxml-sax-expat-perl_0.40-2_all.deb ... Unpacking libxml-sax-expat-perl (0.40-2) ... Selecting previously unselected package texinfo. Preparing to unpack .../texinfo_5.2.0.dfsg.1-2_amd64.deb ... Unpacking texinfo (5.2.0.dfsg.1-2) ... Processing triggers for man-db (2.6.7.1-1) ... Processing triggers for doc-base (0.10.5) ... Processing 1 added doc-base file... 正在设置 libencode-locale-perl (1.03-1) ... 正在设置 libhttp-date-perl (6.02-1) ... 正在设置 libfile-listing-perl (6.04-1) ... 正在设置 libfont-afm-perl (1.20-1) ... 正在设置 libhtml-tagset-perl (3.20-2) ... 正在设置 libhtml-parser-perl (3.71-1build1) ... 正在设置 libio-html-perl (1.00-1) ... 正在设置 liblwp-mediatypes-perl (6.02-1) ... 正在设置 libhttp-message-perl (6.06-1) ... 正在设置 libhtml-form-perl (6.03-1) ... 正在设置 libhtml-tree-perl (5.03-1) ... 正在设置 libhtml-format-perl (2.11-1) ... 正在设置 libhttp-cookies-perl (6.00-2) ... 正在设置 libhttp-daemon-perl (6.01-1) ... 正在设置 libhttp-negotiate-perl (6.00-2) ... 正在设置 libintl-perl (1.23-1build1) ... 正在设置 libnet-http-perl (6.06-1) ... 正在设置 libwww-robotrules-perl (6.01-1) ... 正在设置 libtext-unidecode-perl (0.04-2) ... 正在设置 libxml-namespacesupport-perl (1.11-1) ... 正在设置 libxml-sax-base-perl (1.07-1) ... 正在设置 libxml-sax-perl (0.99+dfsg-2ubuntu1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version 正在设置 libxml-libxml-perl (2.0108+dfsg-1ubuntu0.1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version 正在设置 texinfo (5.2.0.dfsg.1-2) ... Running mktexlsr. This may take some time. ... done. 正在设置 libwww-perl (6.05-2) ... 正在设置 liblwp-protocol-https-perl (6.04-2ubuntu0.1) ... 正在设置 libxml-parser-perl (2.41-1build3) ... 正在设置 libxml-sax-expat-perl (0.40-2) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::Expat with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh http://blog.csdn.net/linuxarmsummary/article/details/12775457 msgfmt包错误 makeinfo 包错误 e.o -MD -MP -MF .deps/execute.Tpo -c -o execute.o execute.c /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT exitfail.o -MD -MP -MF .deps/exitfail.Tpo -c -o exitfail.o exitfail.c In file included from clean-temp.h:22:0, from clean-temp.c:23: ./stdio.h:456:1: error: 'gets' undeclared here (not in a function) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ^ mv -f .deps/exitfail.Tpo .deps/exitfail.Po /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT fatal-signal.o -MD -MP -MF .deps/fatal-signal.Tpo -c -o fatal-signal.o fatal-signal.c mv -f .deps/c-ctype.Tpo .deps/c-ctype.Po /usr/bin/gcc -std=gnu99 -I. -O2 -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/include -I/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/include -MT fd-safer-flag.o -MD -MP -MF .deps/fd-safer-flag.Tpo -c -o fd-safer-flag.o fd-safer-flag.c mv -f .deps/c-stack.Tpo .deps/c-stack.Po make[4]: *** [clean-temp.o] Error 1 make[4]: *** Waiting for unfinished jobs.... mv -f .deps/execute.Tpo .deps/execute.Po mv -f .deps/fd-safer-flag.Tpo .deps/fd-safer-flag.Po mv -f .deps/fatal-signal.Tpo .deps/fatal-signal.Po mv -f .deps/gl_avltree_oset.Tpo .deps/gl_avltree_oset.Po make[4]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15' make[1]: *** [all] 错误 2 make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15' make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/.stamp_built] 错误 2 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name stdio.in.h ./out/sun8iw5p1/linux/common/buildroot/build/host-m4-1.4.15/lib/stdio.in.h rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ Z:\home\wwt\linux_r16\lichee\out\sun8iw5p1\linux\common\buildroot\build\host-m4-1.4.15\lib\stdio.in.h // 2017/5/2 14:13 wenyuanbo add!!!! //_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif http://www.cnblogs.com/hjj801006/p/3988220.html 'gets' undeclared here (not in a function) rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/lib' Making install in doc make[3]: Entering directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc' restore=: && backupdir=".am$$" && \ am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \ rm -rf $backupdir && mkdir $backupdir && \ if (/bin/sh /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/build-aux/missing --run makeinfo --version) >/dev/null 2>&1; then \ for f in autoconf.info autoconf.info-[0-9] autoconf.info-[0-9][0-9] autoconf.i[0-9] autoconf.i[0-9][0-9]; do \ if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$am__cwd"; \ if /bin/sh /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/build-aux/missing --run makeinfo --no-split -I . \ -o autoconf.info autoconf.texi; \ then \ rc=0; \ CDPATH="${ZSH_VERSION+.}:" && cd .; \ else \ rc=$?; \ CDPATH="${ZSH_VERSION+.}:" && cd . && \ $restore $backupdir/* `echo "./autoconf.info" | sed 's|[^/]*$||'`; \ fi; \ rm -rf $backupdir; exit $rc conftest.c:14625: must be after `@defmac' to use `@defmacx' make[3]: *** [autoconf.info] Error 1 make[3]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65' make[1]: *** [install] 错误 2 make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65' make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/.stamp_host_installed] 错误 2 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build buildroot Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name autoconf.texi ./out/sun8iw5p1/linux/common/buildroot/build/host-autoconf-2.65/doc/autoconf.texi rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ Z:\home\wwt\linux_r16\lichee\out\sun8iw5p1\linux\common\buildroot\build\host-autoconf-2.65\doc\autoconf.texi @r{[}@var{\varname\}@r{]}@c (修改为:) @r{[}@var{\varname\}@r{]} @r{[}@var{\varname\} = @samp{\default\}@r{]}@c (修改为:) @r{[}@var{\varname\} = @samp{\default\}@r{]} http://blog.csdn.net/laohuang1122/article/details/44098291/ Ubuntu14.04编译Allwinner lichee 两个出错解决方法 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh libtool: install: ranlib /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib/libfakeroot.a libtool: finish: PATH="/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/external-toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin:/sbin" ldconfig -n /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib ---------------------------------------------------------------------- Libraries have been installed in: /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- test -z "/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin" || /bin/mkdir -p "/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin" /bin/sh ./libtool --mode=install /usr/bin/install -c 'faked' '/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/faked' libtool: install: /usr/bin/install -c faked /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/faked make[3]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' make[2]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' make[1]:正在离开目录 `/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-fakeroot-1.9.5' rm -rf /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs mkdir /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs cp package/makedevs/makedevs.c /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs cc -Wall -Werror -O2 /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c -o /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c: In function ‘main’: /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c:374:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] int ret = EXIT_SUCCESS; ^ cc1: all warnings being treated as errors make: *** [/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs] 错误 1 make:离开目录“/home/wwt/linux_r16/lichee/buildroot” ERROR: build rootfs Failed rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ find . -name makedevs.c ./buildroot/package/makedevs/makedevs.c ./out/sun8iw5p1/linux/common/buildroot/build/host-makedevs/makedevs.c ./out/sun8iw5p1/linux/common/buildroot/build/busybox-1.18.3/miscutils/makedevs.c rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ http://blog.csdn.net/laohuang1122/article/details/44098291/ Ubuntu14.04编译Allwinner lichee 两个出错解决方法 rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh /local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin"" >> /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs chmod a+x /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin/fakeroot -- /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/build/_fakeroot.fs rootdir=/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/target table='target/generic/device_table.txt' Warning: skip syncing -d /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/target /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/images/rootfs.ext4 -N 1399 -b 42633 tune2fs 1.42.9 (4-Feb-2014) Creating journal inode: 完成 This filesystem will be automatically checked every 20 mounts or 0 days, whichever comes first. Use tune2fs -c or -i to override. e2fsck 1.42.9 (4-Feb-2014) 文件系统缺少UUID;正在生成一个。 Adding dirhash hint to 文件系统. /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/images/rootfs.ext4: clean, 1009/1440 files, 38102/42633 blocks busybox directfb directfb-examples divine dosfstools e2fsprogs ethtool ext4-utils freetype fsck-msdos fuse-exfat libfuse i2c-tools input-tools iostat iperf iw jpeg libnl libpcap libpng memstat memtester ntfs-3g openssh openssl portmap strace stress sysstat szrz tcpdump tiobench tslib udev which wireless_tools wpa_supplicant zlib target-generic-hostname target-generic-issue target-generic-getty-busybox target-finalize target-purgelocales /home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/bin:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/host/usr/sbin/:/home/wwt/linux_r16/lichee/out/sun8iw5p1/linux/common/buildroot/external-toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/arm-linux-androideabi/bin:/home/cm/cm/R58/r58_new20161012/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/jdk1.6.0_45/bin:/opt/jdk1.6.0_45/jre/bin make:离开目录“/home/wwt/linux_r16/lichee/buildroot” INFO: build rootfs OK. INFO: ---------------------------------------- INFO: build lichee OK. INFO: ---------------------------------------- rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ ./build.sh pack INFO: packing firmware ... copying tools file copying configs file ./out/aultls32.fex ./out/aultools.fex ./out/cardscript.fex ./out/cardtool.fex ./out/diskfs.fex ./out/env_burn.cfg ./out/env.cfg ./out/image.cfg "./out/image_linux.cfg" -> "./out/image.cfg" ./out/split_xxxx.fex ./out/sys_config.fex ./out/sys_partition_dragonboard.fex ./out/sys_partition_dump.fex ./out/sys_partition.fex "./out/sys_partition_linux.fex" -> "./out/sys_partition.fex" ./out/sys_partition_private.fex ./out/sys_partition_tina.fex ./out/test_config.fex ./out/usbtool.fex ./out/usbtool_test.fex copying boot resource copying boot file packing for linux normal /home/wwt/linux_r16/lichee/tools/pack/pctools/linux/eDragonEx/ /home/wwt/linux_r16/lichee/tools/pack/out Begin Parse sys_partion.fex Add partion boot-resource.fex BOOT-RESOURCE_FEX Add partion very boot-resource.fex BOOT-RESOURCE_FEX FilePath: boot-resource.fex FileLength=453400Add partion env.fex ENV_FEX000000000 Add partion very env.fex ENV_FEX000000000 FilePath: env.fex FileLength=20000Add partion boot.fex BOOT_FEX00000000 Add partion very boot.fex BOOT_FEX00000000 FilePath: boot.fex FileLength=c5a000Add partion rootfs.fex ROOTFS_FEX000000 Add partion very rootfs.fex ROOTFS_FEX000000 FilePath: rootfs.fex FileLength=29a2400sys_config.fex Len: 0xf450 config.fex Len: 0x9ac8 split_xxxx.fex Len: 0x200 sys_partition.fex Len: 0xa80 boot0_nand.fex Len: 0x8000 boot0_sdcard.fex Len: 0x8000 u-boot.fex Len: 0xc4000 fes1.fex Len: 0x1fc0 usbtool.fex Len: 0x23000 aultools.fex Len: 0x26ead aultls32.fex Len: 0x238dd cardtool.fex Len: 0x14000 cardscript.fex Len: 0x6ea sunxi_mbr.fex Len: 0x10000 dlinfo.fex Len: 0x4000 arisc.fex Len: 0x2ed88 vmlinux.fex Len: 0x2c78baa boot-resource.fex Len: 0x453400 Vboot-resource.fex Len: 0x4 env.fex Len: 0x20000 Venv.fex Len: 0x4 boot.fex Len: 0xc5a000 Vboot.fex Len: 0x4 rootfs.fex Len: 0x29a2400 Vrootfs.fex Len: 0x4 BuildImg 0 Dragon execute image.cfg SUCCESS ! ----------image is at---------- /home/wwt/linux_r16/lichee/tools/pack/sun8iw5p1_linux_evb-30_uart0.img pack finish rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$
EhLib 9.1.024 源码版本,自行编译 EhLib 9.1 Build 9.1.024 Professional Edition. ---------------------------------------------- The Library contains components and classes for Borland Delphi versions 7, 9, Developer Studio 2006, Delphi 2007, Embarcadero RAD Studio 2009-XE10.2, Lazarus. TABLE OF CONTENTS ----------------- Overview Installation Library Installation Help Demonstration Programs Registering and Prices Other information About author Where to start. ------------------- Start overview of the library with the main Demo project .\Demos\Bin\MainDemo.Exe. (Compiled Demo files are available in the Evaluation version of the library) If you've used previous versions of the library, then you can read a summary of the new features and changes in the file history-eng.html. More detail about new features in this version of the library can be found in the file - About EhLib 9.1 Eng.doc To install a new version of the library in the IDE, use the installation program .\Installer\EhLibInstaller.exe If, at the installation have any problems, write a letter to ehlib support address support@ehlib.com You can also install the files in the library IDE manually, as described in Section 2. Installation Library After installation, make sure the operability of all installed components. To do this, open the IDE, compile and launch a major demonstration project .\Demos\MainDemo\Project1_XE2.dpr Read next file for full instructions of working with the library components: .\Hlp\ENG\"EhLib - Users guide.doc" Read about EhLib for Lazarus in the file - Lazarus<*>\readme.txt Overview -------- The Library contains several components and objects. TDBGridEh component TDBGridEh provides all functionality of TDBGrid and adds several new features as follows: Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column resizing to set grid width equal client width. Ability to change row and title height. Allows automatic broken of a single line long title and data row to a multiline. Title can act as button and, optionally show a sort marker. Automatically sortmarking. Ability to truncate long text with ellipsis. Lookup list can show several fields. Incremental search in lookup fields. Frozen columns. DateTime picker support for TDateField and TDateTimeField. Allows to show bitmaps from TImageList depending on field value. Allows to hide and track horizontal or vertical scrollbars. Allows to hide columns. Allows to show 3D frame for frozen, footer and data rows. Allows to draw memo fields. Multiline inplace editor. Proportional scrolling independently of sequenced of dataset. Automatically show checkboxes for Boolean fields. Allows to show checkboxes for other type of fields. Has a procedures to save and restore layout (visible columns, columns order, columns width, sortmarkers, row height) in/from registry or ini file. Allows to show hint (ToolTips) for text that don't fit in the cell. Allows to export data to Text, Csv, HTML, RTF, XLS and internal formats. Allows to import data from Text and internal formats. Can sort data in various dataset's. Can filter data in various dataset's. When DBGridEh is connected to DataSet of TMemTable type it allows: To view all data without moving active record. To display a tree-type structure of TMemTable records. To form list of values in dropdown list of SubTitle filter automatically. To create grouping records basing on the selected coulmns. TDBVertGridEh component Component to show one record from dataset in Vertical Orientation. Have a special column to show Field Captions Can customize inplace editor and data of the cell like in DBGridEh. TDBLookupComboboxEh component Provides all functionality of TDBLookupCombobox and adds several new features as follows: Can have flat style. Allows assign values as to KeyValue property just and to display Text property. Allows to type (assign) values to Text property not contained in data list (Style = csDropDownEh). Allows to hold KeyValue and Text as not affecting to each other values. Take effect when KeyField, ListField, ListSource, DataField and DataSource properties is empty. Drop down list can: Show titles, Have sizing grip, Automaticaly set width as sum of DisplayWidth of the list fields (Width = -1), Automaticaly drops on user pressed the key. Edit button can: Show DropDown, Ellipsis or Bitmap image. Have specified width. Have additional events: OnKeyValueChanged, OnButtonClick. TDBSumList component This component is intended for totaling sums and amounts of records in a TDataSet with dynamic changes. Component keeps a list of TDBSum objects, which contains types of group operations (goSum or goCount) and name sum field (goCount name of field is unnecessary). TPrintDBGridEh component TPrintDBGridEh provides properties and routines for preview and print of TDBGridEh component with several features: Ability to expand rows vertically until all text is printed. Ability to scale grid to fit it to page width. Ability to print/preview title for grid. Ability to print/preview page header and page footer where you can specify macros for current page, current date, current time and/or static text. Automatically print/preview multiselected area of TDBGridEh if it area is not empty. Ability to print/preview rich text before and after grid. TPreviewBox component TPreviewBox lets you create a customizable runtime preview. TPrinterPreview object TPrinterPreview lets you to record printable data in buffer for following output them on screen and to printer. TPrinterPreview have all functions and properties as in TPrinter object. You can use TPrinterPreview object similarly of TPrinter except some details. In TPrinter Printer.Canvas.Handle and Printer.Handle is the same but in TPrinterPreview PrinterPreview.Canvas.Handle represent the metafile in that is recored the data and PrinterPreview.Handle represent Printer.Handle. That is mean that you have to use PrinterPreview.Canvas.Handle for draw operation (DrawText, DrawTexteEx, e.t.c.) and use PrinterPreview.Handle in functions that return information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows data in default preview form. TDBEditEh component represents a single or multi-line edit control that can display and edit a field in a dataset or can works as non data-aware edit control. TDBDateTimeEditEh component represents a single-line date or time edit control that can display and edit a datetime field in a dataset or can works as non data-aware edit control. TDBComboBoxEh component represents a single or multi-line edit control that combines an edit box with a scrollable list and can display and edit a field in a dataset or can works as non data-aware combo edit control. TDBNumberEditEh component represents a single-line number edit control that can display and edit a numeric field in a dataset or can works as non data-aware edit control. TPropStorageEh, TIniPropStorageManEh, TRegPropStorageManEh components Components realize technology to store component properties to/from settings storage such as ini files, registry etc. TMemTableEh component dataset, which hold data in memory. Its possible consider as an array of records. Besides, it: Supports a special interface, which allows DBGridEh component to view all data without moving active record. Allows fetch data from TDataDriverEh object (DataDriver property). Allows unload change back in DataDriver, operative or postponed (in dependencies of the CachedUpdates property). Allows to create a master/detail relations on the client (filtering record) or on the external source (updating parameters [Params] and requiring data from DataDriver). Allows once-only (without the dynamic support) sort data, including Calculated and Lookup field. Allows create and fill data in design-time and save data in dfm file of the Form. Allows keep record in the manner of trees. Each record can have record elements-branches and itself be an element to other parental record. Component TDBGridEh supports to show the tree-type structure of these records. Allows to connect to the internal array of other TMemTableEh (via ExternalMemData property) and work with its data: sort, filter, edit. Has interface for requesting list of all unique values in one column of records array, ignoring local filter of the DataSet. TDBGridEh uses this property for automatic filling a list in DropDownBox of the subtitle filter cell. TDataDriverEh component carry out two tasks: Delivers data to TMemTableEh. Processes changed records of TMemTableEh (writes them in other dataset, or call events for processing the changes in program). TSQLDataDriverEh DataDriver that have four objects of the TSQLCommandEh type: SelectCommand, DeleteCommand, InsertCommand, UpdateCommand, GetrecCommand. TSQLDataDriverEh can not transfer queries to the server but it call global (for application) event which it is necessary to write to execute SQL expressions on the server. TBDEDataDriverEh, TIBXDataDriverEh, TDBXDataDriverEh and TADODataDriverEh Components. These are SQLDataDrivers that can deliver queries to the server using corresponding drivers of the access to datas. -------------------- 2. Installation Library -------------------- -------------------- 2.1 Installing library automatically -------------------- Run EhLibInstaller.exe program from "Installer" folder to install EhLib in Delphi/C++ Builder IDE. The program creates folders to keep EhLib binary and other requared files, copies requared files to created folders, compiles packages, register packages in IDE and write requared paths in registry. If you have executable installation program (for example, EhLibSetupD7Eval.exe) then you only need to run program and follow installation process. Setup automatically writes all units in necessary directory, installs packages and help files in IDE. -------------------- 2.2 Installing library manually ------------------- Follow next instructions to install files from EhLib archive: -- 2.2.1. For RAD Studio XE2 (Delphi) or higher: --------------------------------------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including EhLib.bpl, EhLib.dcp or EhLibXX.bpl, EhLibXX.dcp, EhLibDataDriversXX, DclEhLibDataDriversXX files). These files can be located in the following folders on your computer C:\Users\All Users\Documents\RAD Studio\1X.0 C:\Users\All Users\Documents\Embarcadero\Studio\XX.0\Bpl C:\Users\All Users\Documents\Embarcadero\Studio\XX.0\Dcp Create new folder where source code and binary files will be kept (For example, C:\RAD_Studio_XE2\Components\EhLib). Hereinafter this folder will be call as "EhLib folder". Create new subfolder "Lib" in the "EhLib folder". Copy files from folders "Common", "RADStudioXE2" and "LangResources\Res" of EhLib archive into the folder "[EhLib folder]\Lib" as that all files were in one folder - "Lib". Default language resource of the library is English. If you want to change it to the other language do the next steps: - Select one of language file EhLibLangConsts.XXX.dfm - Copy this file to EhLibLangConsts.dfm file (with replacment of existing file) - In the first line of a new EhLibLangConsts.dfm file delete _XXX suffix in the name of object like this: object TEhLibLanguageConsts_ENU -> object TEhLibLanguageConsts Run RAD Studio IDE and Open EhLibProjGroup160.groupproj file from [EhLib folder]\Lib. Compile all packages of Prject Group. Install DclEhLibXX.Dpk and DclEhLibDataDriversXX.Dpk packages in IDE (Use Project/Install menu). Consistently compile packages EhLibXX.Dpk and EhLibDataDriversXX.Dpk in next modes: Win32\Debug Win64\Release Win64\Debug After compilation there should be created subfolders a Win32\Release, Win32\Debug, Win64\Release, Win64\Debug in the "[EhLib folder]\Lib" folder. Copy the *. dfm and *. res files from the "[Folder EhLib]\Lib" folder into the each of the next folders: Win32\Release, Win32\Debug, Win64\Release, Win64\Debug In the RAD Studio IDE add next paths: "[EhLib folder]\Lib\Win32\Release" path in the "Library path" for the Win32 platform. "[EhLib folder]\Lib\Win32\Debug" path in the "Debug dcu" for the Win32 platform. "[EhLib folder]\Lib\" path in the "Brasing path" for the Win32 platform. "[EhLib folder]\Lib\Win64\Release" path in the "Library path" for the Win64 platform. "[EhLib folder]\Lib\Win64\Debug" path in the "Debug dcu" for the Win64 platform. "[EhLib folder]\Lib\" path in the "Brasing path" for the Win64 platform. -- Copy DEMOS folder from the Archive EhLib to the "[EhLib Folder]". Open and compile any demo project for test. 2.2.2. Delphi 5.x - 7.x, Delphi 9.X Win32, BDS2006 Win32, Delphi2007, CodeGear RAD Studio 2009: ------------------------------------------------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including EhLib.bpl, EhLib.dcp or EhLibXX.bpl, EhLibXX.dcp, EhLibDataDriversXX, DclEhLibDataDriversXX files). Create directory from which you will install EhLib library ('EhLib directory') (for example, C:\Delphi[X]\EhLib). Copy files from "Common", "Delphi[X]" | "BDS2006" and "LangResources\Res.Ansi" folders of the EhLib archive to 'EhLib directory'. Default language resource of the library is English. If you want to change it to the other language do the next steps: - Select one of language file EhLibLangConsts.XXX.dfm - Copy this file to EhLibLangConsts.dfm file (with replacment of existing file) - In the first line of a new EhLibLangConsts.dfm file delete _XXX suffix in the name of object like this: object TEhLibLanguageConsts_ENU -> object TEhLibLanguageConsts By default Delphi (5, 6 and 7) places compiled files to the <Delphi path>\Projects\Bpl directory and this directory already present in the search PATH. But if you overwrite default BPL directory then you need put compiled EhLibXX.BPL file into directory that is accessible through the search PATH (i.e. DOS "PATH" environment variable; for example, in the Windows\System directory). Add, (if needed) 'EhLib directory' in Tools->Environment Options->Library-> Library Path (For Delphi 9 in Tools->Options->Environment Options-> Delphi Options->Library - Win32->Library Path). Use "File\Open..." menu item of Delphi IDE to open the runtime package - EhLibXX.Dpk. In "Package..." window click "Compile" button to compile the package. After that open and compile EhLibDataDriversXX.Dpk. After compiling run-time packages install design-time packages DclEhLibXX.BPL and DclEhLibDataDriversXX.BPL into the IDE. For that use "File\Open..." menu item to open design-time package DclEhLibXX.Dpk. In "Package..." window click "Compile" button to compile the package and then click "Install" button to register EhLib components on the component palette. Open and install DclEhLibDataDriversXX.Dpk package. EhLib components have to appear on 'EhLib' page of components palette. 2.2.4. Delphi 9.X Vcl.Net, , BDS2006 Vcl.Net: ---------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including Vcl.EhLib90.dll, Vcl.DclEhLib90.dll, Vcl.EhLibDataDrivers90.dll, Vcl.DclEhLibDataDrivers90.dll files). Create directory from which you will install EhLib library ('EhLib directory') (for example, C:\BDS\3.0\EhLibVclNet). Copy files from Common and Delphi9 directories of the EhLib archive to 'EhLib directory'. In Delphi IDE: Add, (if needed) 'EhLib directory' in Component->Installed .NET Components ...-> Assembly Search Paths. Add, (if needed) 'EhLib directory' in Tools->Options->Environment Options-> Delphi Options->Library - NET->Library Path. Use "File\Open..." menu item of Delphi IDE to open the runtime package - Vcl.EhLibXX.Dpk. In "Project Manager..." window, click right button above 'Vcl.EhLibXX.Dll' and select "Build" menu to compile package. After that, open and compile Vcl.EhLibDataDriversXX.Dpk, Vcl.DclEhLibXX.Dpk and Vcl.DclEhLibDataDriversXX.Dpk. Open menu "Component->Installed .NET Components ..."->.NET VCL Components. Press 'Add...' button. Locate 'Vcl.DclEhLibXX.dll' and press 'Open'. (By default, this file have to be located in 'EhLib directory' directory) Press 'Ok' in 'Installed .NET Components' Dialog. 4. Documentation and Help ------------------------- 4.1. This version of library doesn't have embedded help files for Delphi8 or Higher. But the online help is available on the ehlib home page - http://www.ehlib.com/online-help 4.2. Delphi 7.x: Copy the EhLib.hlp and EhLib.cnt files to the Delphi HELP subdirectory. Select Help|Customize to start the OpenHelp application. Add the EhLib.cnt file to the Contents page, add the EhLib.hlp file to the Index and Link pages. 5. Demonstration Programs and Projects -------------------------------------- Demonstration programs use tables from the DEMOS directory and ADO Data Access. Read description of Demo projects in the file Demos\Info Eng.doc 6. Registering and Prices ------------------------- The EhLib is a Commercial product. If you find it useful and want to receive the latest versions please register your evaluation copy. You can read detailed information about prices on ehlib home prices page http://www.ehlib.com/buy You can read detailed information about registration at https://secure.shareit.com/shareit/product.html?productid=102489 After registration you will receive (e-mail only) address of registered version for downloading and password for unpacking. By registering the components you get the following advantages: 1. You will get new versions of the library free within a year from the date of registration. 2. You will get technical support for the library all the time. 3. You encourage EhLib Team to make the library even better. 7. Other information ----------------- (1) Information for user who already have old version of TDBGridEH or TDBSumList or EhLib installed: Before installation this version of EhLib uninstall previous version of TDBGridEh or TDBSumList or EhLib from IDE and remove or copy this files to other directory to prevent crossing of new and old files. (2) If at compile-time under C++ Builder you get next error: [Linker Error] Unresolved external 'AlphaBlend' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\LIB\EHLIBB60.LIB|C:\VCL6\EhLib\Common\DBGridEh.pas then add msimg32.lib library in Linker options of your Project. It is placed at $(BCB)\lib\psdk\msimg32.lib 8. About Company ---------------- Contact as if you have any questions, comments or suggestions: EhLib Team
----------------------------------- Android 编程基础 1 封面----------------------------------- Android 编程基础 2 开放手机联盟 --Open --Open --Open --Open Handset Handset Handset Handset Alliance Alliance Alliance Alliance 什么是开放手机联盟? 开放手机联盟, Open Handset Alliance :是美国 Google 公司与 2007 年 11 月 5 日宣布组建的一个全球性的联 盟组织。这一联盟将会支持 Google 发布的 Android 手机操作系统或者应用软件,共同开发名为 Android 的 开 放源代码的移动系统。开放手机联盟包括手机制造商、手机芯片厂商和移动运营商几类。目前,联盟成员 数 量已经达到了 43 家。 移动手机联盟创始成员: Aplix 、 Ascender 、 Audience 、 Broadcom 、中国移动、 eBay 、 Esmertec 、谷歌、宏达电、英特尔、 KDDI 、 Living Image 、 LG 、 Marvell 、摩托罗拉、 NMS 、 NTT DoCoMo 、 Nuance 、 Nvidia 、 PacketVideo 、高通、三星 、 SiRF 、 SkyPop 、 Sonic Network 、 Sprint Nextel 、 Synaptics 、 TAT 、意大利电信、西班牙电信、德州仪器、 T-M obile 和 Wind River 。 Mobile Mobile Mobile Mobile Operators Operators Operators Operators 移动运营商类 China Mobile Communications Corporation 中国移动通信 KDDI CORPORATION 日本 KDDI 电信 NTT DoCoMo, Inc. 日本多科莫电信 SOFTBANK MOBILE Corp. 日本软银移动 Sprint Nextel( 美国 ) T-Mobile( 德国 ) Telecom Italia( 意大利 ) Telef ó nica( 西班牙 ) Vodafone 沃达丰电信 China Unicom 中国联通 Semiconductor Semiconductor Semiconductor Semiconductor Companies Companies Companies Companies 半导体制造公司 AKM Semiconductor Inc Audience ARM Atheros Communications Broadcom Corporation( 博通 ) Ericsson ( 爱立信公司 ) Intel Corporation ( 英特尔公司 ) Marvell Semiconductor, Inc. ( 收购了 intel 手机芯片部门的公司 )----------------------------------- Android 编程基础 3 NVIDIA Corporation ( 英伟达公司 ) Qualcomm Inc.( 高通公司 ) SiRF Technology Holdings, Inc.( 知名 GPS 芯片制造商 ) Synaptics, Inc. Texas Instruments Incorporated ( 德州仪器 ) Handset Handset Handset Handset Manufacturers Manufacturers Manufacturers Manufacturers 电话制造商 ASUSTeK Computer Inc. 华硕 Garmin International, Inc. HTC Corporation ( 多普达的母公司 ) 宏达电子 Huawei Technologies 华为科技 LG Electronics, Inc. 乐金电子 Motorola, Inc. 摩托罗拉 Samsung Electronics 三星电子 Sony Ericsson 索尼爱立信 Toshiba Corporation 东芝公司 lenovo 联想移动 联盟成员: Software Software Software Software Companies Companies Companies Companies 软件提供公司 Ascender Corp. eBay Inc. Esmertec Google Inc. LivingImage LTD. Nuance Communications, Inc. OMRON SOFTWARE Co, Ltd. 日本欧姆龙软件 有限公司 PacketVideo (PV) SkyPop SONiVOX ASUSTeK Computer Inc. 华硕 AKM Semiconductor AKM 半导体公司 ARM 公司 Atheros Communications Toshiba Corporation 东芝公司 lenovo 联想移动 软银移动 日本无线运营商软银 瑞典计算机咨询公司 Teleca AB Garmin International, Inc. 高明 HTC Corporation ( 多普达的母公司 ) 宏达电子 Huawei Technologies 华为科技 LG Electronics, Inc. 乐金电子 Motorola, Inc. 摩托罗拉 Samsung Electronics 三星电子 Sony Ericsson 索尼爱立信 沃达丰 Teleca Borqs 播思通讯 联盟目的 将会支持 Google 可能发布的手机操作系统或者应用软件,共同开发名为 Android 的开放源代码的移动 系 统。 谷歌早在 2002 年就进入了移动领域,可是由于目前的手机操作系统企业和手机企业相对封闭,提高了 行业的进入门槛,移动互联网的发展远没有拥有统一标准的传统互联网发展迅速,此次推出的开源手机操 作 系统平台就是出于这个目的。 也有分析认为,谷歌并不想做一个简单的手机终端制造商或者软件平台开发商,而意在一统传统互联网和 移 动互联网。----------------------------------- Android 编程基础 4 Android Android Android Android 手机新概念 操作系统的选择 -------- 定制和长尾 � 重构 � MVC 和 Web APP 架构 Android Android Android Android 开发背景 � 计算技术、无线接入技术的发展,使嵌入式系统逐渐有能力对桌面系统常规业务进行支持。 � 谷歌长期以来奉行的移动发展战略:通过与全球各地的手机制造商和移动运营商结成合作伙伴,开发 既 有用又有吸引力的移动服务,并推广这些产品。 Android 进一步推进了 " 随时随地为每个人提供信息 " 这一企 业 目标的实现。 � Open Handset Alliance 汇集了多家业界巨头。运营商如: China Mobile 、 NTT DoCoMo 、 Vodafone 、 T-M obile 等;设备制造商如 ASUS 、 HTC 、 Huawei 、 LG 、 Motorola 、 Samsung 、 Sony Ericsson 、 Toshiba 等;芯片厂商 如 ARM 、 Broadcom 、 Intel 、 Marvell 、 NVIDIA 、 Qualcomm 等。软件厂商如 Ascender 、 eBay 、 Esmertec 、 Li vingImage 等。 � Android 更像一款桌面环境为 Java 的 Linux 操作系统。有助于 Google 实现其 " 随时随地为每个人提供信 息 " 的企业战略。 HTC HTC HTC HTC Dream/G1 Dream/G1 Dream/G1 Dream/G1 具体配置 硬件 3.17 英寸 HVGA (480 x 320) ; 1150mAh 电池 ;高通 528Mhz 7201 处理器 ; 64MB RAM 、 128MB ROM ; 1GB MicroSD 卡 ; QWERTY 全键盘; 310 万像素摄像头。 流媒体 支持视频格式: H.264 、流媒体、 3GPP 、 MPEG4 和 Codec 3GP ;支持音频格式: MP3 、 AAC 、 AAC+ 、 W MA 、 MPEG4 、 WAV 、 MIDI 、 REAL 、 AUDIO 和 OGG ;支持墙纸格式: JPG 、 BMP 、 PNG 和 GIF ;铃声 (MP3 、 AAC 、 AAC+ 和 WMA) 。 接入技术 蓝牙 (class 1) ;四频 (850 , 900 , 1800 , 1900) ;支持 3G , 802.11b 和 802.11g 。----------------------------------- Android 编程基础 5 互联网 支持 HTTP 、 WAP Push 和 xHTML ;支持 POP 、 IMAP 、 SMTP ,以及 AOL 和 GMAIL 电子邮件服务;支持 AIM 、 MSN 、雅虎通和 GTALK ;与谷歌日历同步;与 Android Market 联机;支持谷歌 “ 街景 ” 服务;包装盒内附 数据工具包。 更多信息 https://sites.google.com/a/android.com/opensource/release-features Android Android Android Android 盈利模式 Android 的 App Market 模式,软件开发者获得 7 成收入, 3 成用于系统维护。难点在于位置营销。 设备商通过卖设备、内置特色应用来获得盈利。也可以兼职专业软件开发者进行赢利。 Google 自身通过基于统一平台为用户提供信息来盈利。 Android Android Android Android 的优势 � 源代码完全开放,便于开发人员更清楚的把握实现细节,便于提高开发人员的技术水平,有利于开发 出 更具差异性的应用。 � 采用了对有限内存、电池和 CPU 优化过的虚拟机 Dalvik , Android 的运行速度比想象的要快很多。 � 运营商(中国移动等)的大力支持,产业链条的热捧。 � 良好的盈利模式( 3/7 开),产业链条的各方:运营商、制造商、独立软件生产商都可以获得不错的利 益 。 将移动终端的评价标准从硬件向软件转变,极大的激发了软件开发者的热情。 � Android 的源代码遵循 Apache V2 软件许可,而不是通常的 GPL v2 许可。有利于商业开发。 � 具有强大的 Linux 社区的支持。 Android Android Android Android 的不足 � 由于采用了 Java 作为应用开发语言,目前可用的传统第三方应用还很少,但由于 Android 是一款完全 开 源的移动计算平台,相信第三方应用会很快的丰富起来。 � Google 提供了一套 Java 核心包 (J2SE 5,J2SE 6) 的有限子集,尚不承诺遵守 Java 任何 Java 规范 , 可能会造 成J ava 阵营的进一步分裂。 � 现有应用完善度不太够,需要的开发工作量较大。----------------------------------- Android 编程基础 6 � 基于 QEMU 开发的模拟器调试手段不十分丰富,只支持通话、SMS等,速度慢。 � 暂不具备 Push Mail 和 Office(DataViz 、 QuickOffice 计划近期推出 ) 功能,目前主要面向的是普通消费 者 用户,对商业用户支持尚弱。 Android Android Android Android 带来的影响 ANDROID 的推出后可能影响的产业包括移动电信业,软件开发业,手机制造业,在以消费者为核心的状 态 。 对消费者的影响 � 高档手机选择面增加。 � A ndroid 在设计初期就考虑了与现其有业务的融合,改变以往从计算机为主改成从手机使用为导向。新 生应用如:G oogle 地图及其衍生应用、 GMail 、 GTalk 等。 � GPS 卫星导航功能,手机照相, MP3 ,蓝芽等均被列为 Android 所提供支持的基本选项。 � Android 的平台基本上是免费的,虽然有部份原生链接库会要求费用,但大部份是免权利金; Android 的 程序可以采用 JAVA 开发,但是因为它的虚拟机 (Virtual Machine) Dalvik ,是将 JAVA 的 bytecode 转成 自 己的格式,回避掉需要付给 SUN 有关 JAVA 的授权费用。 对手机制造者的影响 � Android 是款开源的移动计算软件平台,组建了 google 主导的拥有众多产业界巨头的产业联盟,有利于 高效开发、降低成本。 � 由于是源代码开放的产品,对非主导厂商而言,可以避开与主导厂商在核心技术上面的差距,开发出 更 具竞争力和差异化的产品。 对运营商的影响 � 丰富的数据业务,将导致数据流量的显著增加 。 � 手机来源增加,价格更为低廉。 对软件开发者的影响 � 因为 Android 移动软件平台抱持开放互通的观念,势必吸引不少自由软件的拥护者。 � 开发方向有三个重点 :----------------------------------- Android 编程基础 7 � 应用软件的开发 � 特殊功能的原生链接库 � 专属应用程序框架 � 由于 Android 的A pp Market 性质,可能催生出专门的应用软件开发商。 Android Android Android Android 应用现状 � 设备商: lenovo 、琦基、戴尔、三星、摩托罗拉、华为、英特尔、 Kogan 、索爱、华硕、多普达、爱可 视 、 Archos 等。 � 制造商: HTC 、 Telstra 等。 � 手机设计公司:播思、德信无线等。 � 运营商:中国移动、 Sprint 、 T-Mobile 、 Teleca AB 等。 � 芯片商: Qualcomm 、 Marvell 、 TI 、 Boardcom 等。----------------------------------- Android 编程基础 8 Android Android Android Android 开发入门 System System System System Requirements Requirements Requirements Requirements The sections below describe the system and software requirements for developing Android applications using the Android SDK tools included in Android 1.1 SDK, Release 1. Supported Supported Supported Supported Operating Operating Operating Operating Systems Systems Systems Systems • Windows XP (32-bit) or Vista (32- or 64-bit) • Mac OS X 10.4.8 or later (x86 only) • Linux (tested on Linux Ubuntu Dapper Drake) Supported Supported Supported Supported Development Development Development Development Environments Environments Environments Environments Eclipse IDE o Eclipse 3.3 (Europa), 3.4 (Ganymede) � Eclipse JDT plugin (included in most Eclipse IDE packages) � WST (optional, but needed for the Android Editors feature; included in most Eclipse IDE packages ) o JDK 5 or JDK 6 (JRE alone is not sufficient) o Android Development Tools plugin (optional) o Not Not Not Not compatible with Gnu Compiler for Java (gcj) Other development environments or IDEs o JDK 5 or JDK 6 (JRE alone is not sufficient) o Apache Ant 1.6.5 or later for Linux and Mac, 1.7 or later for Windows o Not Not Not Not compatible with Gnu Compiler for Java (gcj) Note: Note: Note: Note: If JDK is already installed on your development computer, please take a moment to make sure that it meets the version requirements listed above. In particular, note that some Linux distributions may include JDK 1.4 or Gnu Compiler for Java, both of which are not supported for Android development----------------------------------- Android 编程基础 9 什么是 Android? Android? Android? Android? Android 是一个专门针对移动设备的软件集,它包括一个操作系统,中间件和一些重要的应用程序。 Beta 版 的 Android SDK 提供了在 Android 平台上使用 JaVa 语言进行 Android 应用开发必须的工具和 API 接口。 特性 • 应用程序框架 支持组件的重用与替换 • Dalvik Dalvik Dalvik Dalvik 虚拟机 专为移动设备优化 • 集成的浏览器 基于开源的 WebKit 引擎 • 优化的图形库 包括定制的 2D 图形库, 3D 图形库基于 OpenGL ES 1.0 (硬件加速可选) • SQLite SQLite SQLite SQLite 用作结构化的数据存储 • 多媒体支持 包括常见的音频、视频和静态图像格式 ( 如 MPEG4, H.264, MP3, AAC, AMR, JPG, PNG , GIF ) • GSM GSM GSM GSM 电话技术 (依赖于硬件) • 蓝牙 Bluetooth, Bluetooth, Bluetooth, Bluetooth, EDGE, EDGE, EDGE, EDGE, 3G, 3G, 3G, 3G, 和 WiFi WiFi WiFi WiFi (依赖于硬件) • 照相机, GPS GPS GPS GPS ,指南针,和加速度计( accelerometer accelerometer accelerometer accelerometer ) (依赖于硬件) • 丰富的开发环境 包括设备模拟器,调试工具,内存及性能分析图表,和 Eclipse 集成开发环境插件 应用程序 Android 会同一系列核心应用程序包一起发布,该应用程序包包括 email 客户端, SMS 短消息程序,日历, 地图,浏览器,联系人管理程序等。所有的应用程序都是使用 JAVA 语言编写的。 应用程序框架 开发人员也可以完全访问核心应用程序所使用的 API 框架。该应用程序的架构设计简化了组件的重用;任 何 一个应用程序都可以发布它的功能块并且任何其它的应用程序都可以使用其所发布的功能块(不过得遵循 框 架的安全性限制)。同样,该应用程序重用机制也使用户可以方便的替换程序组件。 隐藏在每个应用后面的是一系列的服务和系统 , 其中包括; • 丰富而又可扩展的视图( Views ),可以用来构建应用程序, 它包括列表( lists ),网格( grids ),文 本框( text boxes ),按钮( buttons ), 甚至可嵌入的 web 浏览器。 • 内容提供器( Content Providers )使得应用程序可以访问另一个应用程序的数据(如联系人数据库), 或 者共享它们自己的数据 • 资源管理器( Resource Manager )提供 非代码资源的访问,如本地字符串,图形,和布局文件( la yout files )。 • 通知管理器 ( Notification Manager ) 使得应用程序可以在状态栏中显示自定义的提示信息。 • 活动管理器( Activity Manager ) 用来管理应用程序生命周期并提供常用的导航回退功能。----------------------------------- Android 编程基础 10 程序库 Android 包含一些 C/C++ 库,这些库能被 Android 系统中不同的组件使用。它们通过 Android 应用程序框架 为开发者提供服务。以下是一些核心库: • 系统 C C C C 库 - 一个从 BSD 继承来的标准 C 系统函数库( libc ), 它是专门为基于 embedded linu x 的设备定制的。 • 媒体库 - 基于 PacketVideo OpenCORE ;该库支持多种常用的音频、视频格式回放和录制,同时支 持 静态图像文件。编码格式包括 MPEG4, H.264, MP3, AAC, AMR, JPG, PNG 。 • Surface Surface Surface Surface Manager Manager Manager Manager - 对显示子系统的管理,并且为多个应用程序提 供了 2D 和 3D 图层的无缝融合。 • LibWebCore LibWebCore LibWebCore LibWebCore - 一个最新的 web 浏览器引擎用,支持 Android 浏览器和一个可嵌入的 web 视图。 • SGL SGL SGL SGL - 底层的 2D 图形引擎 • 3D 3D 3D 3D libraries libraries libraries libraries - 基于 OpenGL ES 1.0 APIs 实现;该库可以使用硬件 3D 加速(如果可用)或者使用高 度优化的 3D 软加速。 • FreeType FreeType FreeType FreeType - 位图( bitmap )和矢量( vector )字体显示。 • SQLite SQLite SQLite SQLite - 一个对于所有应用程序可用,功能强劲的轻型关系型数据库引擎。 Android Android Android Android 运行库 Android 包括了一个核心库,该核心库提供了 JAVA 编程语言核心库的大多数功能。 每一个 Android 应用程序都在它自己的进程中运行,都拥有一个独立的 Dalvik 虚拟 机实例。 Dalvik 被设计 成一个设备可以同时高效地运行多个虚拟系统。 Dalvik 虚拟机执行( .dex )的 Dalvik 可执行文件,该格式 文 件针对小内存使用做了 优化。同时虚拟机是基于寄存器的,所有的类都经由 JAVA 编译器编译,然后通过 SDK 中 的 "dx" 工具转化成 .dex 格式由虚拟机执行。 Dalvik 虚拟机依赖于 linux 内核的一些功能,比如线程机制和底层内存管理机制。 Linux Linux Linux Linux 内核 Android 的核心系统服务依赖于 Linux 2.6 内核,如安全性,内存管理,进程管理, 网络协议栈和驱动模 型 。 Linux 内核也同时作为硬件和软件栈之间的抽象层。----------------------------------- Android 编程基础 11 Android Android Android Android 的系统架构 系统构架 Android Android Android Android 内核 � Linux 内核版本 2.6 � 位于硬件和软件堆之间的抽象层 � 核心服务:安全机制、内存管理、进程管理、网络、硬件驱动。 Android 依赖 Linux 内核 2.6 提供核心服务,比如安全、内存管理、进程管理、网络、硬件驱动。在这里, L inux 内核扮演的是硬件层和系统其它层次之间的一个抽象层的概念。这个操作系统并非类 GNU/Linux 的,因为 其 系统库,系统初始化和编程接口都和标准的 Linux 系统是有所不同的。----------------------------------- Android 编程基础 12 从 Google 目前 release 的 Linux 系统来看,其没有虚拟内存文件系统,系统所用的是 yaffs2 文件系统,具体 的映像也都位于 SDK 安装目录下。通过 emulator -console 命令,我们可以在 host 中断下得到一个简单的可 以 控制 Android 的 shell ,这 个 系 统 包 含 了 一 个 Toolbox ,提 供 一 些 基 本 的 命 令 工 具 , 集 中 在 /sbin,/system/sbin,/system/bin 中,但是很简陋,命令种类也很少。 目前 Android 的程序安装模式是靠 Eclipse 自动进行的,通过对底层的分析可知,大致步骤就是在 /data/app 和 data/data 下存放 android 底层和普通内核没有什么大的区别,我们可以将其作为一个 Linux 来进行开发和 hacking 。 Lib Lib Lib Lib 和运行环境 lib � C/C++ 库:被各种 Android 组件使用 � 通过应用程序框架开发者可以使用其功能 � 包括: � 媒体库: MPEG4 H.264 MP3 JPG PNG ..... � WebKit/LibWebCore : Web 浏览引擎 � SQLite 关系数据库引擎 � 2D , 3D 图形库、引擎 丰富的类库支持: 2D 和 3D 图像库 OpenGL ES 、数据库 SQLite 、对象数据库 db4o 类库、媒体库、基于 Lin ux 底层系统 C 库等等,让应用开发更简单多样。 Google 使用 Apache 的 Harmony 类库, Harmony 某些方面速 度 快于 Sun 的 VM 。 Runtime 在 Dalvik Java VM 上, Dalvik 采用简练、高效的 byte code 格式运行,它能够在 低 资耗和没有应用相互干扰的情况下并行执行多个应用。 运行时环境 � 核心库提供的 Java 功能 � Dalvik 虚拟机依赖于 Linux 内核,例如线程或底层内存管理 � 设备可以运行多个 Dalvik 虚拟机,每一个 Android 应用程序在它自己的 Dalvik VM 实例中运行 � VM 执行优化的 Dalvik 可执行文件 (.dex) � Dx- 工具把编译过的 Java 文件转换为 dex 文件----------------------------------- Android 编程基础 13 应用和框架 � 核心应用,例如联系人,电子邮件,电话,浏览器,日历,地图, ... � 充分访问所有核心应用框架 API � 简化组件的重用 � 用 Java 编写应用程序----------------------------------- Android 编程基础 14 支持的功能 + Application framework: 可重用的和可替换的组件部分,在这个层面上,所有的软件都是平等的。 + Dalvik virtul machine: 一个基于 Linux 的虚拟机。 + Integrated browser: 一个基于开源的 WebKit 引擎的浏览器,在应用程序层。 + Optimized graphics: 包含一个自定义的 2D 图形库和基于 OpenGL ES 1.0 标准的 3D 实现。 + SQLite: 数据库 + Media support: 通用的音频,视频和对各种图片格式的支持 (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GI F) + GSM Telephony: GSM 移动网络 , 硬件支持。 + Bluetooth, EDGE, 3G, and WiFi: 都依赖于硬件支持。 + Camera, GPS, compass, and accelerometer: 都依赖于硬件支持。 + Rich development environment: 包含一套完整的开发工具集,方便跟踪调试,内存检测和性能测试,而且 提供了 Eclipse 的插件。最底层的是一个 Linux Kernel ,加载了几个移动设备必要的系统驱动(这么说来 Android 基 础系统是要以 GPL 发布了?不知道 34 家厂商的硬件开发商们是怎么样想的);上面是类库和 Runtime ,绿 色 的类库部分可以看到大名鼎鼎的 SQLite ,这个软件甚至声称自己属于公共领域(比 MIT License 还要强 @ @ ) , 字体 FreeType 是 BSD-style License 的,图形库 OpenGL ES 只需通过产品测试,无偿使用于产品。再向上看 是应用层的东西了,这里可以做的事情就非常多了 ,各个社区,各个厂家都可以参与进来。难怪 Android 的 sdk 可以 Apache License 发布了 , 对企业和开发人员友好啊。 那么 Google 自己的东西在哪里呢?没错,就是 右 边那个 runtime ,最吸引技术人员的就是这个 runtime (注意,这个才是 Android 的核心)。 Google 为它准备 了 一个虚拟机,叫做 Dalvik 。这个让人摸不着头脑的东西的到底是什么?从开发平台上我们清清楚楚地得到 了 答案: Java----------------------------------- Android 编程基础 15 封面----------------------------------- Android 编程基础 1 封面----------------------------------- Android 编程基础 2 7 7 7 7 个 Linux Linux Linux Linux 手机平台 � Maemo � Android � LIMO � OpenMOKO � GPE^2 � ALP � QTopia Phone Edition Maemo Maemo Maemo Maemo 架构----------------------------------- Android 编程基础 3 Android Android Android Android 架构----------------------------------- Android 编程基础 4 LIMO LIMO LIMO LIMO 架构----------------------------------- Android 编程基础 5 OpneMOKO OpneMOKO OpneMOKO OpneMOKO 架构----------------------------------- Android 编程基础 6 GPE^2 GPE^2 GPE^2 GPE^2 架构----------------------------------- Android 编程基础 7 ALP ALP ALP ALP 架构----------------------------------- Android 编程基础 8 QTopia QTopia QTopia QTopia Phone Phone Phone Phone Edition Edition Edition Edition 架构----------------------------------- Android 编程基础 9 进程间的通信 Linux 手机平台进程间通信 � Maemo 采用 D-BUS � Android 采用 OpenBinder � LiMO 采用 D-BUS � OpenMoko 采用 D-BUS � GPE Phone Edition 采用 D-BUS � ALC 采用 OpenBinder � Qtopia Phone Edition 采用 D-BUS 进程间通信种类 � D-BUS � Openbinder � CORBA/Corbit � IVY � GNET D-BUS----------------------------------- Android 编程基础 10 Android Android Android Android 学习方法 ① 了解什么是 Androi ② 建立开发环境 ③ 阅读 SDK 文档 ④ 背景知识 � Java � 面向对象 � 设计模式 � J2ME 、 Brew 、 Symbian 建立 Android Android Android Android 开发环境 ① 下载 JDK 5 or JDK 6 (JRE alone is not sufficient) -> 安装 -> 设置环境变量 JAVA_HOME CLASSPATH path ② 下载 Eclipse 3.3 (Europa), 3.4 (Ganymede) IDE for JAVA-> 解压 ③ 下载 Android SDK 解压 -> path 里加入 SDK 包中的 tools 目录全路径 ④ 下载 ADT 0.8.0 解压 ⑤ 打开 Eclipse 安装 ADT 插件----------------------------------- Android 编程基础 11 封面----------------------------------- Android 编程基础 1 封面----------------------------------- Android 编程基础 2 Android Android Android Android 开发环境搭建 ADV ADV ADV ADV 的创建 ADT0.9.1 版本 ① 在 Eclipse 中创建----------------------------------- Android 编程基础 3 ② 在命令行中创建 打开 CMD 命令行,进入到 Android SDK tools 目录 使用 android 命令列出 target 值 使用 android create avd 命令来创建 AVD cd E:\Mobile DEV\Android_SDK1.5\tools android list targets 行为: "create avd": 创建一个新的 Android 虚拟设备。 选项: -t --target 新的 AVD 的 Target ID( 必须 ) -c --sdcard 指向一个共享的 SD 存储卡的路径或是为新的 AVD 定制的新 SD 存储卡的容量大小 -p --path 新 AVD 将被创建的位置路径 -n --name 新 AVD 的名称 ( 必须 ) -f --force 强制创建 ( 覆盖已存在的 AVD) -s --skin 新 AVD 的皮肤----------------------------------- Android 编程基础 4 例子 : 将建一个名叫 GPhone 的 AVD , Target ID=2 、 SD 存储卡容量 52M 、路径 C:\AVD\ 、皮肤 SUSE-HVGA- P 查看自己新创建的 ADV : list avd 命令 ADT0.9.0 版本 只能在命令行中创建 开启命令行进入 Android SDK tools 目录 列出 Target ID 创建一个新的 AVD 查看新创建的 AVD 运行指定的 AVD 运行新创建的 AVD:GPhone android create avd -n GPhone -t 2 -c 52M -p C:\AVD\ -s SUSE-HVGA-P android list avd cd E:\Mobile DEV\Android_SDK1.5\tools andriod list target android create avd -n GPhone -t 2 -c 52M -p C:\AVD\ -s SUSE-HVGA-P android list avd emulator -avd GPhone----------------------------------- Android 编程基础 5 Windows Windows Windows Windows 平台: Eclipse IDE 版本 ------------JDK+Eclipse+Android SDK+ADT 1. 必须软件 2. 安装过程 ① 安装 JAVA JDK SE 1.6 � 设置环境变量 � JAVA_HOME � JAVA_JRE_HOME � JRE_HOME � Android_SDK_HOME � CLASSPATH � Path ① JAVA JDK SE 1.6 jdk-6u13-windows-i586-p.exe ② Eclipse 3.4.2 eclipse-java-ganymede-SR2-win32.zip ③ Google Android SDK android-sdk-windows-1.5_r1.zip ④ ADT-0.9.0 ADT-0.9.0.zip JAVA_HOME=C:\Program Files\Java\jdk1.6.0_13 JAVA_JRE_HOME=C:\Program Files\Java\jdk1.6.0_13\jre JRE_HOME=C:\Program Files\Java\jre6 Android_SDK_HOME =C:\Mobile Phone DEV\Android SDK CLASSPATH=.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt. jar;%JRE_HOME%\lib;%JRE_HOME%\lib\rt.jar;%JAVA_JRE_HOME%\lib;%JAVA_JRE_HOME% \lib\rt.jar Path= %Android_SDK_HOME%\tools ;%JAVA_HOME%\bin;%JRE_HOME%\bin;%JAVA_JRE _HOME%\bin; 要使用命令行工具必须配置----------------------------------- Android 编程基础 6 ② 解压 Eclipse 3.4.2 ③ 解压 Google Android SDK ④ Eclipse 下安装 ADT 0.9.0 ⑤ 设置 Google Android SDK 路径 解压 eclipse-java-ganymede-SR2-win32.zip 到 C:\Eclipse For Android\ 解压 android-sdk-windows-1.5_r1.zip 到 C:\Mobile Phone DEV\Android SDK 复制 ADT-0.9.0.zip 到 C:\ 打开 C:\Eclipse For Android\eclipse.exe 设置工作路径为 C:\WorkSpace Help->SoftWare Update->find and install ->Search for new features to install ->Next->New Archived site-> 选中 C:\ ADT-0.9.0.zip->OK->Finish->ADT-0.9.0.zip 选勾 ->Next->Accept->Next->Finish- >Install All->Restart “ YES ” Window->preferences-> 选中 Android->SDK Location 中选择 Google Android SDK 的安装路 径 C:\Mobile Phone DEV\Android SDK->OK----------------------------------- Android 编程基础 7 3. HelloWorld 程序实例 ① 新建一个 Android Project � Project name 设置工程名 Hello Google Android � Package name 设置包名 zyf.android.test.hello � Activity name 设置活动名 Hello � Application name 设置应用程序名 Hello � Build Target 设置 AVD API 的版本 3 Android1.5----------------------------------- Android 编程基础 8----------------------------------- Android 编程基础 9 ② 修改 Hello.java 文件 内容如下: ③ 运行 as Android package package package package zyf.android.test.hello; import import import import android.app.Activity; import import import import android.os.Bundle; import import import import android.widget.TextView; public public public public class class class class Hello extends extends extends extends Activity { /** Called when the activity is first created. */ @Override public public public public void void void void onCreate(Bundle savedInstanceState) { super super super super .onCreate(savedInstanceState); // setContentView (R.layout.main); TextView tv = new new new new TextView( this this this this ); tv.setText( " 这是一个测试 Android 的 helloWorld" ); setContentView(tv); } }----------------------------------- Android 编程基础 10 ④ 代码分析: 在 Android 中,用户界面控件被封装成了各种 Class 叫做 Views 。一个 View 是一个可以显示的控件对 象,比如 RadioButton , Animation , TextLable 等。其中的一个简单的控件是 TextView: 传入 TextView 构造函数的参数是一个 Context 对象,通过这个对象可以使用系统提供的功能接口,比 如加载资源,访问数据库和共享数据等等。 Activity 类从 Context 类继承而来,所以 Activity 本身 是 一个 Context ( Java 中的继承概念)。 TextView 对象构建以后就可以设置要显示的数据了。 tv.setText(" 这是一个测试 Android 的 helloWorld"); 最后是连接 TextView 到屏幕 , 类似这样 : setContentView() 方法可以控制具体哪一个控件和系统的 UI 联系起来(我的理 解是设置为主显示 View )。如果没有设置,屏幕中将会显示空白。 ⑤ 结果 TextView tv = new new new new TextView( this this this this ); setContentView(tv);----------------------------------- Android 编程基础 11----------------------------------- Android 编程基础 12 Apache Ant IDE 版本 ------------JDK+Android SDK +Ant 1. 必须软件 2. 安装过程 ① 安装 JAVA JDK SE 1.6 � 设置环境变量 � JAVA_HOME � JAVA_JRE_HOME � JRE_HOME � Android_SDK_HOME � ANT_HOME � CLASSPATH � Path ① JAVA JDK SE 1.6 jdk-6u13-windows-i586-p.exe ② Google Android SDK android-sdk-windows-1.5_r1.zip ③ Apache Ant apache-ant-1.7.1-bin.zip JAVA_HOME=C:\Program Files\Java\jdk1.6.0_13 JAVA_JRE_HOME=C:\Program Files\Java\jdk1.6.0_13\jre JRE_HOME=C:\Program Files\Java\jre6 Android_SDK_HOME =C:\Mobile Phone DEV\Android SDK ANT_HOME=C:\Mobile Phone DEV\Apache Ant\apache-ant-1.7.1 CLASSPATH=.;%ANT_HOME%\lib;%ANT_HOME%\lib\ant.jar;%JAVA_HOME%\lib;%JAV A_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar;%JRE_HOME%\lib;%JRE_HOME%\lib\r t.jar;%JAVA_JRE_HOME%\lib;%JAVA_JRE_HOME%\lib\rt.jar Path=%ANT_HOME%\bin;%Android_SDK_HOME%\tools;%JAVA_HOME%\bin;%JRE_HO ME%\bin;%JAVA_JRE_HOME%\bin;----------------------------------- Android 编程基础 13 ② 解压 Google Android SDK ③ 解压 apache-ant-1.7.1.zip 3. HelloWorld 程序实例 结果 解压 android-sdk-windows-1.5_r1.zip 到 C:\Mobile Phone DEV\Android SDK 解压 Apache Ant apache-ant-1.7.1.zip 到 C:\Mobile Phone DEV\Apache Ant\apache-ant-1.7.1 ① 开始 -> 运行 ->cmd ② cd C:\Mobile Phone DEV\WorkSpace ③ 使用命令行工具来创建一个新工程 ④ cd Hello ⑤ ant debug ⑥ cd bin ⑦ emulator -avd Android_SDK1.5 ⑧ adb install ./hello-debug.apk ⑨ 在模拟器中运行 hello 程序 android create project -k zyf.hello -n HelloAndroid -t 2 -a AntActivity -p ./Hello----------------------------------- Android 编程基础 14 Linux Linux Linux Linux 平台: JDK+Eclipse+Android SDK+ADT JDK+Android SDK +Ant----------------------------------- Android 编程基础 15 应用解析 Activity Activity Activity Activity : : : : 活动是最基本的 Android 应用程序组件,应用程序中,一个活动通常就是一个单独的屏幕。每一个活动 都被实现为一个独立的类,并且从活动基类中继承而来,活动类将会显示由视图控件组成的用户接口,并 对 事件做出响应。大多数的应用是由多个屏幕显示组成。例如 : 一个文本信息的应用也许有一个显示发送消息 的 联系人列表屏幕,第二个屏幕用来写文本消息和选择收件人,再来一个屏幕查看消息历史或者消息设置操 作 等。这里每一个这样的屏幕就是一个活动,很容易实现从一个屏幕到一个新的屏幕并且完成新的活动。在 某 些情况下当前的屏幕也许需要向上一个屏 幕活动提供返回值 -- 比如让用户从手机中挑选一张照片返回通讯录 做为电话拨入者的头像。 当一个新的屏幕打开后,前一个屏幕将会暂停,并保存在历史堆栈中。用户可以返回到历史堆栈中的 前 一个屏幕。当屏幕不再使用时,还可以从历史堆栈中删除。默认情况下, Android 将会保留从主屏幕到每一 个应用的运行屏幕。 简单理解 Activity 代表一个用户所能看到的屏幕, Activity 主要是处理一个应用的整体性工作,例如, 监 听系统事件 ( 按键事件、触摸屏事件等 ) 、为用户显示指定的 View ,启动其他 Activity 等。所有应用的 Activit y 都继承于 android.app.Activity 类,该类是 Android 提供的基层类,其他的 Activity 继承该父类后,通过 Over ride 父类的方法来实现各种功能,这种设计在其他领域也较为常见。 Intent Intent Intent Intent : : : : 调用 Android 专有类 Intent 进行架构屏幕之间的切换。 Intent 是描述应用想要做什么。 Intent 数据结构两 个最重要的部分是动作和动作对应的数据。典型的动作类型有 :MAIN (活动的门户)、 VIEW 、 PICK 、 EDIT 等。而动作对应的数据则以 URI 的形式进行表示。例如 : 要查看某个人的联系方式,你需要创建一个动作类 型为 VIEW 的 Intent ,以及一个表示这个人的 URI 。 Android 使用了 Intent 这个特殊类,实现在屏幕与屏幕之间移动。 Intent 类用于描述一个应用将会做什 么 事。在 Intent 的描述结构中,有两个最重要的部分:动作和动作对应的数据。典型的动作类型有: MAIN ( a ctivity 的门户)、 VIEW 、 PICK 、 EDIT 等。而动作对应的数据则以 URI 的形式进行表示。例如:要查看一个人的 联 系方式,你需要创建一个动作类型为 VIEW 的 intent ,以及一个表示这个人的 URI 。 与之有关系的一个类叫 IntentFilter 。相对于 intent 是一个有效的做某事的请求,一个 intentfilter 则用于 描 述一个 activity (或者 IntentReceiver )能够操作哪些 intent 。一个 activity 如果要显示一个人的联系方式时, 需 要声明一个 IntentFilter ,这个 IntentFilter 要知道怎么去处理 VIEW 动作和表示一个人的 URI 。 IntentFilter 需 要在 AndroidManifest.xml 中定义。 通过解析各种 intent ,从一个屏幕导航到另一个屏幕是很简单的。当向前导航时, activity 将会调用 startActivity(IntentmyIntent) 方法。然后,系统会在所有安装的应用程序中定义的 IntentFilter 中查找,找到最 匹配 myIntent 的 Intent 对应的 activity 。新的 activity 接收到 myIntent 的通知后,开始运行。当 startActivity 方 法被调用将触发解析 myIntent 的动作,这个机制提供了两个关键好处:----------------------------------- Android 编程基础 16 A 、 Activities 能够重复利用从其它组件中以 Intent 的形式产生的一个请求; B 、 Activities 可以在任何时候被一个具有相同 IntentFilter 的新的 Activity 取代。 IntentReceiver: IntentReceiver: IntentReceiver: IntentReceiver: 当你希望你的应用能够对一个外部的事件 ( 如当电话呼入时,或者数据网络可用时,或者到了晚上时 ) 做出响 应,你可以使用一个 IntentReceiver 。虽然 IntentReceiver 在感兴趣的事件发生时,会使用 NotificationManage r 通知用户,但它并不能生成一个 UI 。 IntentReceiver 在 AndroidManifest.xml 中注册,但也可以在代码中使用 Context.registerReceiver() 进行注册。当一个 intentreceiver 被触发时,你的应用不必对请求调用 inten treceiver , 系统会在需要的时候启动你的应用。各种应用还可以通过使用 Context.broadcastIntent() 将它们自己的 intentreceiver 广播给其它应用程序。 Service Service Service Service : : : : 一个 Service 是一段长生命周期的,没有用户界面的程序。比较好的一个例子就是一个正在从播放列表中 播放歌曲的媒体播放器。在一个媒体播放器的应用中,应该会有多个 activity ,让使用者可以选择歌曲并播 放 歌曲。然而,音乐重放这个功能并没有对应的 activity ,因为使用者当然会认为在导航到其它屏幕时音乐应 该 还在播放的。在这个例子中,媒体播放器这个 activity 会使用 Context.startService() 来启动一个 service ,从而 可以在后台保持音乐的播放。同时,系统也将保持这个 service 一直执行,直到这个 service 运行结束。另外 , 我们还可以通过使用 Context.bindService() 方法,连接到一个 service 上(如果这个 service 还没有运行将启动 它)。当连接到一个 service 之后,我们还可以 service 提供的接口与它进行通讯。拿媒体播放器这个例子来 说 , 我们还可以进行暂停、重播等操作。 Content Content Content Content Provider Provider Provider Provider : : : : Android 应用程序能够将它们的数据保存到文件、 SQLite 数据库中,甚至是任何有效的设备中。当你想 将你的应用数据与其它的应用共享时,内容提供器就可以发挥作用了。因为内容提供器类实现了一组标准 的 方法,从而能够让其它的应用保存或读取此内容提供器处理的各种数据类型。 数据是应用的核心。在 Android 中,默认使用鼎鼎大名的 SQLite 作为系统 DB 。但是在 Android 中,使用方 法有点小小的不一样。在 Android 中每一个应用都运行在各自的进程中,当你的应用需要访问其他应用的数 据时,也就需要数据在不同的虚拟机之间传递,这样的情况操作起来可能有些困难 ( 正常情况下,你不能读 取 其他的应用的 db 文件 ) , ContentProvider 正是用来解决在不同的应用包之间共享数据的工具。 � 所有被一个 Android 应用程序创建的偏好设置,文件和数据库都是私有的。 � 为了和其他应用程序共享数据,应用程序不得不创建一个 Content Provider � 要回索其他应用程序的数据,它自己的 Content Provider 必须被调用 � Android 本地 Content Provider 包括: � CallLog :地址和接收到的电话信息 � Contact.People.Phones :存储电话号码 � Setting.System :系统设置和偏好设置 � 等等----------------------------------- Android 编程基础 17 封面----------------------------------- Android 编程基础 1 封面----------------------------------- Android 编程基础 2 Android Android Android Android 虚拟机 Dalvik Dalvik Dalvik Dalvik Dalvik Dalvik Dalvik Dalvik 冲击 随着 Google 的 AndroidSDK 的发布,关于它的 API 以及在移动电话领域所带来的预 期影响这些方面的讨论不胜枚举。不过,其中的一个话题在 Java 社区是一石激起千层浪, 这就是 Android 平台的基础 —— Dalvik 虚拟机。 Dalvik Dalvik Dalvik Dalvik 和标准 Java Java Java Java 虚拟机 (JVM) (JVM) (JVM) (JVM) 首要差别 Dalvik 基于寄存器,而 JVM 基于栈。,基于寄存器的虚拟机对于更大的程序来说,在它们编译的时候,花 费 的时间更短。 Dalvik Dalvik Dalvik Dalvik 和 Java Java Java Java 运行环境的区别 Dalvik 经过优化,允许在有限的内存中同时运行多个虚拟机的实例,并且每一个 Dalvik 应用作为一个独立 的 Linux 进程执行。独立的进程可以防止在虚拟机崩溃的时候所有程序都被关闭 . Dalvik Dalvik Dalvik Dalvik 形势 Dalvik 的诞生也导致人们开始忧虑 Java 平台的第一次大规模的分道扬镳或许已经是进行时了 —— 有人已经 把 Davlik 和微软的 JVM 以及 Sun 对微软的诉讼联系起来,等着看 Google 身上是否也会发生类似事情;另外 一 些人则指出, Google 并没有宣称 Dalvik 是一个 Java 实现,而微软却是这样做的。 Sun 也对可能带来的阵营 分裂表达了忧虑情绪,并提出和 Google 合作来保证 Dalvik 和 JVM 之间的兼容性 —— Google 对此的解释是, Dalvik 是对解决目前 JavaME 平台上分裂的一次尝试,也是为了提供一个拥 有较少限制许可证的平台。甚至 还有人怀疑这是否是 Sun 和 Google 两大阵营对 Java 之未来的一次大规模较量。----------------------------------- Android 编程基础 3 Android Android Android Android 中各种 JAVA JAVA JAVA JAVA 包的功能描述 在 Android 的应用程序开发中,通常使用的是 JAVA 语言,除了需要熟悉 JAVA 语 言的基础知识之外,还需要了解 Android 提供的扩展的 JAVA 功能。 在一般的 JAVA 应用中,如果需用引用基础类库,通常需要使用如下的方式: import javax.swing.*; 以上代码表示了引用 JAVA 的 GUI 组件 Swing,javax.swing 即 JAVA 中的一个包。 android 提供一些扩展的 JAVA 类库,类库分为若干个包,每个包中包含若干个类。 重要包的描述: android.app :提供高层的程序模型、提供基本的运行环境 android.content :包含各种的对设备上的数据进行访问和发布的类 android.database :通过内容提供者浏览和操作数据库 android.graphics :底层的图形库,包含画布,颜色过滤,点,矩形,可以将他们直接绘制到屏幕上 . android.location :定位和相关服务的类 android.media :提供一些类管理多种音频、视频的媒体接口 android.net :提供帮助网络访问的类,超过通常的 java.net.* 接口 android.os :提供了系统服务、消息传输、 IPC 机制 android.opengl :提供 OpenGL 的工具 android.provider :提供类访问 Android 的内容提供者 android.telephony :提供与拨打电话相关的 API 交互 android.view :提供基础的用户界面接口框架 android.util :涉及工具性的方法,例如时间日期的操作 android.webkit :默认浏览器操作接口 android.widget :包含各种 UI 元素(大部分是可见的)在应用程序的屏幕中使用----------------------------------- Android 编程基础 4 Android Android Android Android 的相关文件类型 Java Java Java Java 文件 ----- ----- ----- ----- 应用程序源文件 android 本身相当一部分都是用 java 编写而成 ( 基本上架构图里头蓝色的部份都是用 Java 开发的 ) , android 的 应用必须使用 java 来开发。 Class Class Class Class 文件 ------Java ------Java ------Java ------Java 编译后的目标文件 不像 J2se , java 编译成 class 就可以直接运行, android 平台上 class 文件不能直接在 android 上运行。由于 G oogle 使用了自己的 Dalvik 来运行应用,所以这里的 class 也肯定不能在 AndroidDalvik 的 java 环境中运行, androi d 的 class 文件实际上只是编译过程中的中间目标文件,需要链接成 dex 文件后才能在 dalvik 上运行。 Dex Dex Dex Dex 文件 -----Android -----Android -----Android -----Android 平台上的可执行文件 Android 虚拟机 Dalvik 支持的字节码文件格式 Google 在新发布的 Android 平台上使用了自己的 Dalvik 虚拟 机 来定义,这种虚拟机执行的并非 Java 字节码,而是另一种字节码: dex 格式的字节码。在编译 Java 代码之 后 , 通过 Android 平台上的工具可以将 Java 字节码转换成 Dex 字节码。虽然 Google 称 Dalvik 是为了移动设备定 做的,但是业界很多人认为这是为了规避向 sun 申请 Javalicense 。这个 DalvikVM 针对手机程式 /CPU 做过 最 佳化,可以同时执行许多 VM 而不会占用太多 Res ource 。 Apk Apk Apk Apk 文件 -------Android -------Android -------Android -------Android 上的安装文件 Apk 是 Android 安装包的扩展名,一个 Android 安装包包含了与某个 Android 应用程序相关的所有文件。 apk 文件将 AndroidManifest.xml 文件、应用程序代码 (.dex 文件 ) 、资源文件和其他文件打成一个压缩包。一个工 程只能打进一个 .apk 文件。----------------------------------- Android 编程基础 5 Android Android Android Android 的应用程序结构分析: HelloActivity 本例以一个简单的 HelloActivity 程序为例,简单介绍 Android 应用程序的源代码结构。事实 上, Android 应用程序虽然不是很复杂,但是通常涉及了 JAVA 程序 ,XML 文件, Makefile 多方面的内容。 HelloActivity 虽然简单,但是麻雀虽小,五脏俱全,是学习 Android 应用程 序的最好示例。 第一部分: HelloActivity HelloActivity HelloActivity HelloActivity 的源代码 HelloActivity 工程的源代码在 Android 目录的 development/samples/HelloActivity/ 中,代码的 结构如下所示: 其中 tests 是一个独立的项目,可以暂时不考虑。其他部分看作一个 Android 的一应用程序 的工程。这个工程主要的组成部分如下所示: AndroidManifest.xml :工程的描述文件,在运行时有用处 Android.mk :整个工程的 Makefile development/samples/HelloActivity/ |-- Android.mk |-- AndroidManifest.xml |-- res | |-- layout | | `-- hello_activity.xml | `-- values | `-- strings.xml |-- src | `-- com | `-- example | `-- android | `-- helloactivity | `-- HelloActivity.java `-- tests |-- Android.mk |-- AndroidManifest.xml `-- src `-- com `-- android `-- helloactivity `-- HelloActivityTest.java----------------------------------- Android 编程基础 6 res :放置资源文件的目录 src/com/example/android/helloactivity/HelloActivity.java :这是 JAVA 类文件,这个文件的路径 表示在 Andorid 的 JAVA 包的结构中的位置, 这个包的使用方式为 com.example.android.helloactivity 。 第二部分: 编译的中间结果 这个 HelloActivity 工程经过编译后将生成 out/target/common/obj/APPS/He lloActivity_intermediates/ 目录, 这个目录中的内容都是 HelloActivity 工程相关的, 更具体地说都与 development/samples/HelloActivity/ 中的 Android.mk 文件相关。 classes.dex 是一个最重要的文件,它是给 Android 的 JAVA 虚拟机 Dalvik 运行的字节码文 件。 classes.jar 是一个 JAR 文件, JAR 的含义为 Java ARchive ,也就是 Java 归档,是一种与平台 无关的文件格式,可将多个文件合成一个文件。解压缩之后的目录结构: (JAVA 标准编译得 到的类 ) out/target/common/obj/APPS/He lloActivity_intermediates/ |-- classes.dex (字节码) |-- classes.jar ( JAR 文件 ) |-- public_resources.xml (根据 resources 结构生成的 xml ) `-- src |-- R.stamp `-- com `-- example `-- android `-- helloactivity `-- R.java ( resources 生成的文件)----------------------------------- Android 编程基础 7 各个以 class 为扩展名的文件,事实上是 JAVA 程序经过编译后的各个类的字节码。 第三部分: 目标 apk apk apk apk 文件 目标 apk 文件是 Android 的 JAVA 虚拟机 Dalvik 安装和运行的文件,事实上这个 apk 文件将 由编译的中间结果和原始文件生成。 apk 文件的本质是一个 zip 包。这个 APK 包解压缩后的 目录结构如下所示: 值得注意的是,这里的 xml 文件经过了处理,和原始的文件不太一样,不能按照文本文件 的方式阅读。 classes |-- META-INF | `-- MANIFEST.MF `-- com `-- example `-- android `-- helloactivity |-- HelloActivity.class |-- R$attr.class |-- R$id.class |-- R$layout.class |-- R$string.class `-- R.class out/target/product/generic/obj/APPS/HelloActivity_intermediates/package.apk_FILES/ |-- AndroidManifest.xml |-- META-INF | |-- CERT.RSA | |-- CERT.SF | `-- MANIFEST.MF |-- classes.dex |-- res | `-- layout | `-- hello_activity.xml `-- resources.arsc----------------------------------- Android 编程基础 8 第四部分: 源代码的各个文件 Android.mk 是整个工程的 “ Makefile ” ,其内容如下所示: � LOCAL_PATH:= $(call my-dir) � include $(CLEAR_VARS) � LOCAL_MODULE_TAGS := samples � # Only compile source java files in this apk. � LOCAL_SRC_FILES := $(call all-java-files-under, src) � LOCAL_PACKAGE_NAME := HelloActivity � LOCAL_SDK_VERSION := current � include $(BUILD_PACKAGE) � # Use the following include to make our test apk. � include $(call all-makefiles-under,$(LOCAL_PATH)) 这个文件在各个 Android 的工程中都是类似的,其中 LOCAL_PACKAGE_NAME 表示了这 个包的名字。 LOCAL_MODULE_TAGS 表示了模块的标,在这里使用的是 samples ,正式的应用程序( packages 目录中的应用)中多使用 eng development 。 AndroidManifest.xml 是这个 HelloActivity 工程的描述文件,其内容如下所示: 其中 package 用于说明这个包的名称, android:labeapplication 中的内容是表示这个应用程序 在界面上显示的标题, activity 中的 android:name 表示这个 Android 的活动的名称。 ----------------------------------- Android 编程基础 9 文件 src/com/example/android/helloactivity/HelloActivity.java 是程序主要文件,由 JAVA 语言 写成 com.example.android.helloactivity 表示的是这个包的名称 , 在文件的头部引入了两个包 android.app.Activity 是一个 Android 活动( Activity )包,每一个 Android 活动都需要继承 Activity 类。 包 android.os.Bundle 用于映射字符串的值。 onCreate() 是一个重载的函数,在这个函数中实现应用程序创建的所执行的过程。其中 setContentView() 设置当前的视图( View )。 设置的方法是使用一个文件,这个文件因此决定了视图中包含的内容。这里使用的是 R.layout.hello_activity ,表示从 res/layout/ 目录中使用 hello_activity.xml 文件。 res/layout/hello_activity.xml 文件的内容如下所示: 其中定义了一个可编辑的文本( EditText ),下面的各项其实是它的各种属性, android:text 表示这个文本 的 内 容 ,string/hello_activity_text_text 表 示 找 到 相 应 的 文 件 , 也 就 是 res/value/string.xml 文 件 中 的 hello_activity_text_text 文本。 res/value/string.xml 的内容如下所示: hello_activity_text_text 文本被 res/layout/hello_activity.xml 文件引用,正是应用程序运行时在 屏幕显示的文本。 package package package package com.example.android.helloactivity; import import import import android.app.Activity; import import import import android.os.Bundle; public public public public class class class class HelloActivity extends extends extends extends Activity { public public public public HelloActivity() { } @ Override public public public public void void void void onCreate(Bundle savedInstanceState) { super super super super .onCreate(savedInstanceState); setContentView(R.layout.hello_activity); } } He llo , World! ----------------------------------- Android 编程基础 10 Android Android Android Android ADB ADB ADB ADB 工具使用 adb(Android Debug Bridge) 是 Android 提供的一个通用调试工具,借助这个工具,我妈可以管理设备或手机 模 拟器的状态。 adb adb adb adb 功能操作: � 快速更新设备或手机模拟器中的代码,如应用或 Android 系统升级 � 在设备上运行 shell 命令 � 管理设备或手机模拟器上预定端口 � 在设备或手机模拟器上复制、粘贴文件 adb adb adb adb 常用操作: 安装应用到模拟器 Android 没有提供一个卸载应用的命令,只能手动删除: 进入设备或模拟器的 Shell 通过以上命令,可以进入设备或模拟器的 shell 环境中,在这个 Linux Shell 中,你可以执行各种 Linux 的命 令 , 另外如果只想执行一条 shell 命令,可以采用以下方式: 如: 会打印出内核的调试信息 发布端口 可以设置任意的端口号,做为主机向模拟器或设备的请求端口。如 : adb install app.apk adb shell cd data/app rm app.apk adb shell adb shell [command] adb shell dmesg adb forward tcp:5555 tcp:8000----------------------------------- Android 编程基础 11 复制文件 可向一个设备或从一个设备中复制文件 � 复制一个文件或目录到设备或模拟器上: 如: � 从设备或模拟器上复制一个文件或目录 如: 搜索 / 等待模拟器、设备实例 取得当前运行的模拟器、设备的实例列表及每个实例的状态 | 等待正在运行的设备 查看 Bug 报告 记录无线通讯日志 无线通讯记录日志非常多,在运行时没必要记录,可以通过命令设置记录 获取设备 ID 和序列号 访问数据库 SQLite3 adb push adb push test.txt /tmp/test.txt adb pull adb pull /android/lib/libwebcore.os adb devices adb wait-for-device adb bugreport adb shell logcat -b radio adb get-product adb get-serialno adb shell sqlite3----------------------------------- Android 编程基础 12 封面----------------------------------- Android 编程基础 1 封面----------------------------------- Android 编程基础 2 Android Android Android Android 模拟器 模拟器参数 参数格式 option 选项 emulator [option] [-qemu args] -sysdir 为模拟器在 目录中搜索系统硬盘镜像 -system 为模拟器从 文件中读取初始化系统镜像 -datadir 设置用户数据写入的目录 -kernel 为模拟器设置使用指定的模拟器内核 -ramdisk 设置内存 RAM 镜像文件 ( 默认为 /ramdisk.img) -image 废弃,使用 -system 替代 -init-data 设置初始化数据镜像 ( 默认为 /userdata.img) -initdata 和 "-init-data " 使用方法一致 -data 设置数据镜像 ( 默认为 /userdata-qemu.img) -partition-size system/data 分区容量大小 (MB) -cache 设置模拟器缓存分区镜像 ( 默认为 零时文件 ) -no-cache 禁用缓存分区 -nocache 与 "-no-cache" 使用方法相同 -sdcard 指定模拟器 SDCard 镜像文件 ( 默认为 /sdcard.img) -wipe-data 清除并重置用户数据镜像 ( 从 initdata 拷贝 ) -avd 指定模拟器使用 Android 虚拟设备 -skindir 设置模拟器皮肤 在 目录中搜索皮肤 ( 默认为 /skins 目录 ) -skin 选择使用给定的皮肤 -no-skin 不适用任何模拟器皮肤 -noskin 使用方法与 "-no-skin" 相同 -memory 物理 RAM 内存大小 (MB) -netspeed 设置最大网络下载、上传速度 -netdelay 网络时延模拟 -netfast 禁用网络形态 -tarce 代码配置可用 -show-kernel 显示内核信息 -shell 在当前终端中使用根 Shell 命令 -no-jni Dalvik 运行时禁用 JNI 检测 -nojni 使用方法与 "-no-jni" 相同 -logcat 输出给定 tag 的 Logcat 信息----------------------------------- Android 编程基础 3 -no-audio 禁用音频支持 -noaudio 与 "-no-audio" 用法相同 -audio 使用指定的音频 backend -audio-in 使用指定的输入音频 backend -audoi-out 使用指定的输出音频 backend -raw-keys 禁用 Unicode 键盘翻转图 -radio 重定向无线模式接口到个性化设备 -port 设置控制台使用的 TCP 端口 -ports , 设置控制台使用的 TCP 端口和 ADB 调试桥使用的 TCP 端口 -onion 在屏幕上层使用覆盖 PNG 图片 -onion-alpha 指定上层皮肤半透明度 -onion-rotation 0|1|2|3 指定上层皮肤旋转 -scale 调节模拟器窗口尺寸 ( 三种: 1.0-3.0 、 dpi 、 auto) -dpi-device 设置设备的 resolution (dpi 单位 ) ( 默认 165) -http-proxy 通过一个 HTTP 或 HTTPS 代理来创建 TCP 连接 -timezone 使用给定的时区,而不是主机默认的 -dns-server 在模拟系统上使用给定的 DNS 服务 -cpu-delay 调节 CUP 模拟 -no-boot-anim 禁用动画来快速启动 -no-window 禁用图形化窗口显示 -version 显示模拟器版本号 -report-console 向远程 socket 报告控制台端口 -gps 重定向 GPS 导航到个性化设备 -keyset 指定按键设置文件名 -shell-serial 根 shell 的个性化设备 -old-system 支持旧版本 (pre 1.4) 系统镜像 -tcpdump 把网络数据包捕获到文件中 -bootchart bootcharting 可用 -qemu args.... 向 qemu 传递参数 -qemu -h 显示 qemu 帮助 -verbose 和 "-debug-init" 相同 -debug 可用、禁用调试信息 -debug- 使指定的调试信息可用 -debug-no- 禁用指定的调试信息 -help 打印出该帮助文档 -help- 打印出指定 option 的帮助文档 -help-disk-images 关于硬盘镜像帮助 -help-keys 支持按钮捆绑 ( 手机快捷键 ) -help-debug-tags 显示出 -debug 命令中的 tag 可选值 -help-char-devices 个性化设备说明 -help-environment 环境变量 -help-keyset-file 指定按键绑定设置文件 -help-virtula-device 虚拟设备管理----------------------------------- Android 编程基础 4 -help-sdk-images 当使用 SDK 时关于硬盘镜像的信息 -help-build-images 当构建 Android 时,关于硬盘镜像的信息 -help-all 打印出所有帮助----------------------------------- Android 编程基础 5 进程: 在 Android 中,进程完全是应用程序的实现细节,不是用户一般想象的那样。 它们的用途很简单: � 通过把不信任或是不稳定的代码放到其他进程中来提高稳定性或是安全性 � 通过在相同的进程中运行多个 .apk 代码来减少消耗 � 通过把重量级代码放入一个分开的进程中来帮助系统管理资源。该分开的进程可以被应用程序的其他 部 分单独地杀死 � 如果两个没有共享相同的用户 ID 的 .apk 试图在相同的进程中运行,这将不被允许,并且系统会为每一 个 apk 程序创建不同的进程会 线程 � Android 让一个应用程序在单独的线程中,指导它创建自己的线程 � 应用程序组件( Activity 、 service 、 broadcast receiver )所有都在理想的主线程中实例化 � 没有一个组件应该执行长时间或是阻塞操作 ( 例如网络呼叫或是计算循环 ) 当被系统调用时,这将中断所 有在该进程的其他组件 � 你可以创建一个新的线程来执行长期操作----------------------------------- Android 编程基础 6 Android Android Android Android 释放手机资源,进程释放优先级 当系统资源消耗, Android 将会杀死一些进程来释放资源。 进程优先级顺序: ① 前台进程: 包含一个前台 Activity 、包含一个正在运行的广播接收器、正在运行的服务(当前用户所需的 Activity 、 正在屏幕顶层运行的 Activity ) ② 可视进程: 包含一个可视化的 Activity ( Activity 可视的,但是不是在前台的( onPause ))、例如显示在一个前台对 话框之后的以前的 Activity ) ③ 服务进程: 包含一个被开启的服务 ( 处理服务,不是直接可视,例如媒体播放器,网络上传、下载 ) ④ 后台进程: 包含一个不可视的 Activity( 带有一个当前不可视的 Activity 、可以在任意时刻杀死该进程来回收内存 ) ⑤ 空进程 没有持有任何应用程序组件----------------------------------- Android 编程基础 7 Android Android Android Android 应用开发 1 1 1 1 分析 Hello Hello Hello Hello Android Android Android Android 打开 Hello Android 工程 Main.xml src 文件夹 HelloAndroid.java R.java Android Library Assets 文件夹 源文件 主程序文件 资源文件 Java 库 静态文件 打包 res 文件夹 drawable 文件夹 layout 文件夹 values 文件夹 程序图标 (ico.png) 布局 UI (main.xml) 程序用到的 String 、颜色 **(string.xml) AndroidMainfest.xml 描述应用程序、构成、组件、权限 bin 文件夹 classes.dex HelloAndroid.apk 自定义的包文件夹 编译的 java 二进制 码 Android 安装包 (APK 包 ) 存放编译后的字节码文件 整体布局 表示线性布局 xmlns:android = "http://schemas.android.com/apk/res/android" 名字空间 android:orientation = "vertical" 控件布局 垂直往下布局 android:layout_width = "fill_parent" android:layout_height = "fill_parent" 上层控件填充满 图形空间 派生于 View ----------------------------------- Android 编程基础 8 R.java 通过 res 文件夹下的 xml 文件定义自动生成的, main.xml ico.png string.xml 是配套的关联,进行修改后 R.java 自动重新生成 AndroidManifest.xml 有关版本,程序信息, java 包,程序图标,程序记录信息等。 Manifest.xml 文件轮廓 ----------------------------------- Android 编程基础 9 添加编辑框与按钮 package package package package zyf.Study.AndroidSturdyByMyself; import import import import android.app.Activity; import import import import android.os.Bundle; import import import import android.view.View; import import import import android.view.View.OnClickListener; import import import import android.widget.Button; import import import import android.widget.EditText; import import import import android.widget.TextView; public public public public class class class class AndroidSturdyByMyself extends extends extends extends Activity { private private private private EditText getNameEditText ; private private private private Button button_Login ; private private private private TextView show_Login_TextView ; /** Called when the activity is first created. */ @Override public public public public void void void void onCreate(Bundle savedInstanceState) { super super super super .onCreate(savedInstanceState); setContentView(R.layout. main ); getNameEditText =(EditText)findViewById(R.id. widget29_getName_EditText ); button_Login =(Button)findViewById(R.id. widget30_Login_Button ); show_Login_TextView =(TextView)findViewById(R.id. widget31_showLogin_TextView ); button_Login .setOnClickListener( new new new new OnClickListener(){ @Override public public public public void void void void onClick(View v) { // TODO TODO TODO TODO Auto-generated method stub show_Login_TextView .setText( getNameEditText .getText()+ " 欢迎您进入 " ); } }); } }----------------------------------- Android 编程基础 10 使用 Intent Intent Intent Intent 启动另一个 Activity Activity Activity Activity 在多个 Activity Activity Activity Activity 之间切换时候,注意每个 Activity Activity Activity Activity 都应在 AndroidManifest.xml AndroidManifest.xml AndroidManifest.xml AndroidManifest.xml 中有所声 明定义(如下) 在不同 Task Task Task Task 中启动 Activity Activity Activity Activity Intent.FLAG_ACTIVITY_NEW_TASK Intent showNextPage_Intent= new new new new Intent(); showNextPage_Intent.setClass(UsingBundel. this this th

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值