Android平台按键消息处理流程一(Android4.2.2)

Android平台按键消息处理流程

       通过在网上看Andorid相关处理流程,发现Android不同的版本消息处理流程差别还是蛮大的,因此先说明代码流程是基于Android4.2.2。在Android系统中,按键消息主要是WindowManagerService服务来管理的,其初始化在System Server中,所以我先分析一下SystemServer中相关的初始化。 

1.1 加载JNI库

      在Android系统中,Zygote进程负责启动系统服务进程SystemServer,而系统服务进程SystemServer负责启动系统中的各种关键服务。SystemServer核心逻辑的入口是main,代码位于SystemServer.java文件中,对应main函数中我们先看如下代码

public static void main(String[] args){   

.......

System.loadLibrary("android_servers"); //加载JNI动态库

init1(args);//native函数

}

     我们首先看一下init(args)函数的原型申明native public static void init1(String[] args);函数前面的java关键字native表明该函数为native函数(Native一般指的是用C/C++编写的函数)。对于java要调用native函数,就必须通过一个位于JNI层的动态库。 动态库的调用是通过函数System.loadLibrary是实现的。System.loadLibrary函数的参数是动态库的名字,即android_servers。系统会自动根据不同的平台更新成真实的动态库文件名。Android的底层是linux系统,默认会更新为libandroid_servers.so(windows平台上默认会xxx.dll)。

      对于java层,调用JNI只需要完成2步就OK了,一是加载JNI对应的库,二是声明由关键字native修饰的函数并调用。

1.2 JNI函数注册

    

     通过阅读代码,我们会发现JAVA层调用的native函数名称,与实际的JNI层对应的函数是不一样的,我们已前面的init1()函数为说明,init1()函数实际对应的JNI函数为android_server_SystemServer_init1。但代码中Java层的NATIVE函数与JNI层怎么建立一一对应关系的,这其实就是JNI函数的注册问题,通过注册就是将JAVA层的NATIVE函数与JNI层函数关联对应。有了这层关联,调用JAVA层的native函数时,就能顺利找到JNI层对应的函数执行了。对于JNI的注册有2种方式,一种是静态注册,一种是动态注册。2种注册的区别,可以上网查一下。Android代码中才采用动态注册方法来建立java层与JNI层的连接。     

1.2.1 JNI的动态注册

在JNI中是通过JNINativeMethod的结构来保存JAVA层的NATIVE函数与JNI层函数一一对应关系,JNINativeMethod的定义如下:

typedef struct {

const char *name;//Java中native函数的名字,不用携带具体的包的路径

const char *signature;//JAVA函数签名信息(参数类型和返回值)

void *fnPtr;      //JNI层对应函数的函数指针

}JNINativeMethod;

 

     上述结构体中中三个变量,name为Java层中调用的native的函数名称;signature变量为name变量对应的native函数的签名信息(参数类型和函数返回值);fnPtr为JNI层对应的函数指针。上述结构体中的签名信息的出现,主要是因为java支持函数重载,也就是说,可以定义同名但不同参数的函数。然而仅仅根据函数名是没法找到具体函数的。为了解决这个问题,JNI技术中就将参数类型和返回值类型的组合作为一个函数的签名信息,有了签名信息,就能顺利的找到java中的函数了。

     因此通过定义上述结构,就可以完成JAVA层的NATIVE函数与JNI层函数对应关系,我们看一下(已前面提到的native函数init1()为例)

static JNINativeMethod gMethods[] = {

    /* name, signature, funcPtr */

    { "init1", "([Ljava/lang/String;)V", (void*) android_server_SystemServer_init1 },

};

 

定义了上述数组后,实际的注册是通过以下函数实现的:

int register_android_server_SystemServer(JNIEnv* env)

{

    return jniRegisterNativeMethods(env, "com/android/server/SystemServer",

            gMethods, NELEM(gMethods));

}

     在sourceInsight中代码可以通过搜索register_android_server_SystemServer函数,发现该函数在Onload.cpp文件中JNI_OnLoad被调用。对于JNI_OnLoad函数,前面提到了加载JNI动态库后,JNI紧接会查找该库中是否存在JNI_OnLoad函数,如果有的话,就直接调用,调用成功后也就意味动态注册的工作完成了。

    前面我们也提到了systemserver负责启动系统中的各种关键服务,对于系统各种server不可避免的会调用底层接口,底层接口一般都是C或者C++函数写的,对于JAVA层而言就是通过调用native函数通过JNI技术与底层进行交互。因此我们会在Onload.cpp文件中JNI_OnLoad中看到一系列JNI动态注册的接口。本文的目的是介绍消息相关的处理,因此我们关注一下register_android_server_InputManager(env);对于其他注册函数的分析其实想通的。

下面看一下register_android_server_InputManager具体的函数声明。

int res = jniRegisterNativeMethods(env, "com/android/server/input/InputManagerService",

            gInputManagerMethods, NELEM(gInputManagerMethods));

jniRegisterNativeMethods函数完成java标准的native函数的映射工作。上面函数参数中env:指向JNIEnv结构体;第二个函数classname:说明java层对应的类名,对应类名“.”在C++中有特殊的定义,因此用“/”代替(可以换作说法该文件中定义的native函数就是在《上述类名.java》中调用,这样直接在工程中搜索该类名就比较方便找到对应的申明);第三个参数:为前面提到JNINativeMethod类型的指针,主要指向需要动态注册相关参数的数组名;第四个参数表明参数三锁对应的数组中元素的个数。

FIND_CLASS(clazz, "com/android/server/input/InputManagerService");

........

 gMotionEventClassInfo.clazz = jclass(env->NewGlobalRef(gMotionEventClassInfo.clazz));

上述代码主要是初始化变量gServiceClassInfo,gInputDeviceClassInfo,gKeyEventClassInfo和gMotionEventClassInfo。个人认为定义上述变量初始化,主要是从JNI层中调用JAVA层的函数速度优化考虑的,这个可以看一下具体的逻辑代码。在JNI中调用java层的函数,一般是通过env(env可以通过JVAAVM对象获取)获取对应类,获取对应类后创建对应的类对象,然后通过类对象找到对应的方法或者成员变量(对应类中的如果是static方法或者成员变量,是不需要创建对应的类对象的;并且对应是否为静态方法或者静态变量,对应JNI调用的方法也不相同)。

对应JNI相关的初始化到此就基本OK了,对于底层如何通过JNI调用JAVA层的函数会根据具体的代码在做分析。

 

1.3 java层Server相关初始化

 

     前面提到systemserver中的main方法核心逻辑入口,main里面通过调用init1方法,该方法对应的JNI的函数声明中会调用init2()方法,在init2方法中会启动一个线程ServerThread,在ServerThread的run函数中我们看一下如下代码:

Slog.i(TAG, "Input Manager");

inputManager = new InputManagerService(context, wmHandler);

Slog.i(TAG, "Window Manager");

wm = WindowManagerService.main(context, power, display, inputManager,

                    uiHandler, wmHandler,

                    factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL,

                    !firstBoot, onlyCore);

ServiceManager.addService(Context.WINDOW_SERVICE, wm);

 ServiceManager.addService(Context.INPUT_SERVICE, inputManager);

ActivityManagerService.self().setWindowManager(wm);

inputManager.setWindowManagerCallbacks(wm.getInputMonitor());

inputManager.start();

 

1.3.1 InputManagerService的初始化

 

首先看一下InputManagerService对应的构造函数如下:

 public InputManagerService(Context context, Handler handler) {

        this.mContext = context;

        this.mHandler = new InputManagerHandler(handler.getLooper());

 

        mUseDevInputEventForAudioJack =

                context.getResources().getBoolean(R.bool.config_useDevInputEventForAudioJack);

        Slog.i(TAG, "Initializing input manager, mUseDevInputEventForAudioJack="

                + mUseDevInputEventForAudioJack);

        mPtr = nativeInit(this, mContext, mHandler.getLooper().getQueue());

}

重点关注nativeInit函数,该函数为native函数,对应的函数在JNI的定义如下:

static jint nativeInit(JNIEnv* env, jclass clazz,

        jobject serviceObj, jobject contextObj, jobject messageQueueObj) {

    sp<MessageQueue> messageQueue = android_os_MessageQueue_getMessageQueue(env, messageQueueObj);

    NativeInputManager* im = new NativeInputManager(contextObj, serviceObj,

            messageQueue->getLooper());

    im->incStrong(serviceObj);

    return reinterpret_cast<jint>(im);//C++中指针强制类型转化

}

   在Java中如果想查找对应的JNI声明函数,比较快的方法如下:在SourceInsight中直接搜索java文件对应的文件名,然后在收到的结果中直接高亮jniRegisterNativeMethods函数,该函数对应的*.cpp为对应的JNI中的申明。

 

nativeInit函数中会调用NativeInputManager的构造函数如下

NativeInputManager::NativeInputManager(jobject contextObj,

        jobject serviceObj, const sp<Looper>& looper) :

        mLooper(looper) {

   .......

    sp<EventHub> eventHub = new EventHub();

    mInputManager = new InputManager(eventHub, this, this);

}

函数中会创建EventHub的对象如下:

 sp<EventHub> eventHub = new EventHub();

EventHub:是系统中所有事件的中央处理站。它管理所有系统中可以识别的输入设备的输入事件,此外,当设备增加或删除时,EventHub将产生相应的输入事件给系统。EventHub通过getEvents函数,给系统提供一个输入事件流。它也支持查询输入设备当前的状态(如哪些键当前被按下)。而且EventHub还跟踪每个输入调入的能力,比如输入设备的类别,输入设备支持哪些按键。 

 mInputManager = new InputManager(eventHub, this, this);

    首先我们先关注一下InputManager(C++)所在的文件夹与NativeInputManager(JNI中)是不相同的,逻辑上个人认为InputManager中相关的是与底层驱动相关了,上层JAVA应该是看不到InputManager相关的接口的。

 

InputManager::InputManager(

        const sp<EventHubInterface>& eventHub,

        const sp<InputReaderPolicyInterface>& readerPolicy,

        const sp<InputDispatcherPolicyInterface>& dispatcherPolicy) {

        //readerPolicy &&dispatcherPolicy 实质为NativeInputManager对象

    mDispatcher = new InputDispatcher(dispatcherPolicy);

    mReader = new InputReader(eventHub, readerPolicy, mDispatcher);

    initialize();

}

      这里主要是创建了一个InputDispatcher对象和一个InputReader对象,并且分别保存在成员变量mDispatcher和mReader中。InputDispatcher类是负责把键盘消息分发给当前激活的Activity窗口的,而InputReader类则是通过EventHub类来实现读取键盘事件的创建了这两个对象后,还要调用initialize函数来执行其它的初始化操作

 

void InputManager::initialize() {

    mReaderThread = new InputReaderThread(mReader);

    mDispatcherThread = new InputDispatcherThread(mDispatcher);

}

 

这个函数创建了一个InputReaderThread线程实例和一个InputDispatcherThread线程实例,并且分别保存在成员变量mReaderThread和mDispatcherThread中。这里的InputReader实列mReader就是通过这里的InputReaderThread线程实列mReaderThread来读取键盘事件的,而InputDispatcher实例mDispatcher则是通过这里的InputDispatcherThread线程实例mDisptacherThread来分发键盘消息的。

 

    InputManagerC++)的初始化基本完成, InputManager是系统事件处理的核心,通过上述代码分析可以知道其有2个线程如下

    1)InputReaderThread叫做"InputReader"线程,它负责读取并预处理RawEvent,applies policy并且把消息送入DispatcherThead管理的队列中。

     2)InputDispatcherThread叫做"InputDispatcher"线程,它在队列上等待新的输入事件,并且异步地把这些事件分发给应用程序。

     InputReaderThread类与InputDispatcherThread类不共享内部状态,所有的通信都是单向的,从InputReaderThread到InputDispatcherThread。两个类可以通过InputDispatchPolicy进行交互。///???

     InputManager类从不与Java交互,而InputDispatchPolicy负责执行所有与系统的外部交互,包括调用DVM业务。

上面InputManager2个线程只是创建了,实际还没有正式(thread只有调用Start)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
全志R16平台编译linux系统V1.0.txt 2017/4/11 13:36 (编译请使用编译android的lichee的选项编译生成的.config文件,不然直接编译会报错!!!!) 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$ cd lichee/ 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 错误1: 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/buil
给全志R58增加一个lunch为cb5801.txt 开发板:全志R58的官方开发板R58_PER3_LPDDR3_32X1_V1_1.pdf 目标:给全志R58增加一个lunch为cb5801 BSP:r58_20160823.tar.gz(2016/8/22从全志的git服务器拿下来的系统) 显示:HDMI输出1080p分辨率的LCD显示器。 编译R18的时候,看lichee和android选择的是不一样的选项。 初步判断:在android中执行extract-bsp的时候,只是去上一级目录中查找lichee编译生成的内核。 先依葫芦画瓢,依照octopus-perf修改一个octopus-cb5801。下文是例子。 wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58$ cd android/device/softwinner/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ ll 总用量 44 drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 8月 22 12:32 ./ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 ../ drwxrwxr-x 7 wenyuanbo wenyuanbo 4096 8月 22 12:32 astar-common/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 12:32 astar-y3/ drwxrwxr-x 8 wenyuanbo wenyuanbo 4096 8月 22 12:32 common/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 12:32 kylin-common/ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 kylin-p1/ drwxrwxr-x 12 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-common/ drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-f1/ drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-n1/ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-perf/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ cp octopus-perf/ octopus-cb5801/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ cd octopus-cb5801/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner/octopus-cb5801$ ll 总用量 12384 drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 9月 6 18:31 ./ drwxrwxr-x 12 wenyuanbo wenyuanbo 4096 9月 6 18:31 ../ -rwxrwxr-x 1 wenyuanbo wenyuanbo 28 9月 6 18:31 AndroidBoard.mk* -rwxrwxr-x 1 wenyuanbo wenyuanbo 53 9月 6 18:31 AndroidProducts.mk* drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 6 18:31 bluetooth/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 1835 9月 6 18:31 BoardConfig.mk* drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 6 18:31 configs/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 2175 9月 6 18:31 fstab.sun8i* drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 6 18:31 .git/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 15 9月 6 18:31 .gitignore* drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 6 18:31 hawkview/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 12582912 9月 6 18:31 initlogo.rle* -rwxrwxr-x 1 wenyuanbo wenyuanbo 293 9月 6 18:31 init.recovery.sun8i.rc* -rwxrwxr-x 1 wenyuanbo wenyuanbo 5149 9月 6 18:31 init.sun8i.rc* drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 6 18:31 media/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 6039 9月 6 18:31 octopus_perf.mk* drwxrwxr-x 3 wenyuanbo wenyuanbo 4096 9月 6 18:31 overlay/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 692 9月 6 18:31 package.sh* drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 6 18:31 recovery/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 727 9月 6 18:31 recovery.fstab* drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 6 18:31 tp/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 1373 9月 6 18:31 ueventd.sun8i.rc* -rwxrwxr-x 1 wenyuanbo wenyuanbo 875 9月 6 18:31 vendorsetup.sh* wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner/octopus-cb5801$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner/octopus-cb5801$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner/octopus-cb5801$ grep perf . -R 匹配到二进制文件 ./.git/index grep: ./.git/svn: 没有那个文件或目录 ./.git/config: url = ssh://CityBrand@61.143.53.198/git_repo/R58/device/softwinner/octopus-perf.git ./.git/config: projectname = device/softwinner/octopus-perf 对于git文件,直接删除。 wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner/octopus-cb5801$ rm .git -rf ./package.sh:board=perf3_v1_0 看文件名,应该是在打包IMG文件时候的板文件的选择。 ./BoardConfig.mk:TARGET_RECOVERY_UI_LIB := librecovery_ui_octopus_perf ./BoardConfig.mk:BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/softwinner/octopus-perf/bluetooth/ 直接用cb5801搜索替换perf即可。 ./recovery/Android.mk:ifneq (,$(findstring $(TARGET_DEVICE),octopus-perf)) ./recovery/Android.mk:LOCAL_MODULE := librecovery_ui_octopus_perf ./recovery/Android.mk:LOCAL_MODULE := librecovery_updater_octopus_perf 直接用cb5801搜索替换perf即可。 ./AndroidProducts.mk: $(LOCAL_DIR)/octopus_perf.mk 直接用cb5801搜索替换perf即可。 ./octopus_perf.mk: device/softwinner/octopus-perf/overlay \ ./octopus_perf.mk:# Abandon useless system app. Add which module name in apk/Android.mk octopus_perf_app section. ./octopus_perf.mk: octopus_perf_app ./octopus_perf.mk:# device/softwinner/octopus-perf/tp/GT927_1040_9CD8.BIN:/system/vendor/firmware/GT927_1040_9CD8.BIN ./octopus_perf.mk: device/softwinner/octopus-perf/recovery.fstab:recovery.fstab \ ./octopus_perf.mk: device/softwinner/octopus-perf/modules/modules/sunxi_tr.ko:obj/sunxi_tr.ko \ ./octopus_perf.mk: device/softwinner/octopus-perf/modules/modules/disp.ko:obj/disp.ko \ ./octopus_perf.mk:# device/softwinner/octopus-perf/modules/modules/hdcp.ko:obj/hdcp.ko \ ./octopus_perf.mk: device/softwinner/octopus-perf/modules/modules/sw-device.ko:obj/sw-device.ko ./octopus_perf.mk: device/softwinner/octopus-perf/kernel:kernel \ ./octopus_perf.mk: device/softwinner/octopus-perf/fstab.sun8i:root/fstab.sun8i \ ./octopus_perf.mk: device/softwinner/octopus-perf/init.sun8i.rc:root/init.sun8i.rc \ ./octopus_perf.mk: device/softwinner/octopus-perf/init.recovery.sun8i.rc:root/init.recovery.sun8i.rc \ ./octopus_perf.mk: device/softwinner/octopus-perf/ueventd.sun8i.rc:root/ueventd.sun8i.rc \ ./octopus_perf.mk: device/softwinner/octopus-perf/modules/modules/nand.ko:root/nand.ko ./octopus_perf.mk: device/softwinner/octopus-perf/configs/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml ./octopus_perf.mk: device/softwinner/octopus-perf/configs/camera.cfg:system/etc/camera.cfg \ ./octopus_perf.mk: device/softwinner/octopus-perf/configs/gsensor.cfg:system/usr/gsensor.cfg \ ./octopus_perf.mk: device/softwinner/octopus-perf/configs/media_profiles.xml:system/etc/media_profiles.xml \ ./octopus_perf.mk: device/softwinner/octopus-perf/configs/sunxi-keyboard.kl:system/usr/keylayout/sunxi-keyboard.kl \ ./octopus_perf.mk: device/softwinner/octopus-perf/configs/sunxi-ir.kl:system/usr/keylayout/sunxi-ir.kl \ ./octopus_perf.mk: device/softwinner/octopus-perf/configs/tp.idc:system/usr/idc/tp.idc ./octopus_perf.mk:#device/softwinner/octopus-perf/media/initlogo.bmp:system/media/initlogo.bmp ./octopus_perf.mk: device/softwinner/octopus-perf/initlogo.rle:root/initlogo.rle \ ./octopus_perf.mk: device/softwinner/octopus-perf/media/boot.wav:system/media/boot.wav \ ./octopus_perf.mk: device/softwinner/octopus-perf/media/bootlogo.bmp:system/media/bootlogo.bmp \ ./octopus_perf.mk: device/softwinner/octopus-perf/media/bootanimation.zip:system/media/bootanimation.zip ./octopus_perf.mk:$(call inherit-product-if-exists, device/softwinner/octopus-perf/modules/modules.mk) ./octopus_perf.mk:PRODUCT_NAME := octopus_perf ./octopus_perf.mk:PRODUCT_DEVICE := octopus-perf ./octopus_perf.mk:PRODUCT_MODEL := UltraOcta A83 perf 将octopus_perf.mk另存为:octopus_cb5801.mk,直接用cb5801搜索替换perf即可。 ./configs/media_profiles.xml: not perform any checks at all. 不用修改 ./vendorsetup.sh:add_lunch_combo octopus_perf-eng ./vendorsetup.sh:add_lunch_combo octopus_perf-user 直接用cb5801搜索替换perf即可。 ./bluetooth/bdroid_buildcfg.h:#define BTM_DEF_LOCAL_NAME "octopus-perf" 直接用cb5801搜索替换perf即可。 删除其他lunch: wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner/octopus-cb5801$ cd .. wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ ll 总用量 48 drwxrwxr-x 12 wenyuanbo wenyuanbo 4096 9月 6 18:31 ./ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 ../ drwxrwxr-x 7 wenyuanbo wenyuanbo 4096 8月 22 12:32 astar-common/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 12:32 astar-y3/ drwxrwxr-x 8 wenyuanbo wenyuanbo 4096 8月 22 12:32 common/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 12:32 kylin-common/ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 kylin-p1/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 9月 6 18:48 octopus-cb5801/ drwxrwxr-x 12 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-common/ drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-f1/ drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-n1/ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-perf/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ rm octopus-f1/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ rm octopus-n1/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ rm octopus-perf/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ ll 总用量 36 drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 9月 6 18:50 ./ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 ../ drwxrwxr-x 7 wenyuanbo wenyuanbo 4096 8月 22 12:32 astar-common/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 12:32 astar-y3/ drwxrwxr-x 8 wenyuanbo wenyuanbo 4096 8月 22 12:32 common/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 12:32 kylin-common/ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 kylin-p1/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 9月 6 18:48 octopus-cb5801/ drwxrwxr-x 12 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-common/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ ll 总用量 36 drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 9月 6 18:50 ./ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 ../ drwxrwxr-x 7 wenyuanbo wenyuanbo 4096 8月 22 12:32 astar-common/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 12:32 astar-y3/ drwxrwxr-x 8 wenyuanbo wenyuanbo 4096 8月 22 12:32 common/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 12:32 kylin-common/ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 12:32 kylin-p1/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 9月 6 18:48 octopus-cb5801/ drwxrwxr-x 12 wenyuanbo wenyuanbo 4096 8月 22 12:32 octopus-common/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android/device/softwinner$ cd ../../.. wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58$ ll 总用量 16 drwxrwxr-x 4 wenyuanbo wenyuanbo 4096 8月 22 14:35 ./ drwxrwxrwx 9 root root 4096 9月 6 18:00 ../ drwxrwxr-x 26 wenyuanbo wenyuanbo 4096 8月 22 12:35 android/ drwxrwxr-x 7 wenyuanbo wenyuanbo 4096 8月 22 14:13 lichee/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58$ cd lichee/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun50iw1p1 1. sun8iw1p1 2. sun8iw3p1 3. sun8iw5p1 4. sun8iw6p1 5. sun8iw7p1 6. sun8iw8p1 7. sun8iw9p1 8. sun9iw1p1 Choice: 4 All available platforms: 0. android 1. dragonboard 2. linux 3. camdroid Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. f1 1. fpga 2. n1 3. perf1_v1_0 4. perf2_v1_0 5. perf3_v1_0 6. qc Choice: 5 wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee$ ./build.sh wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee$ cd ../android/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ source build/envsetup.sh including device/softwinner/kylin-p1/vendorsetup.sh including device/softwinner/common/vendorsetup.sh including device/softwinner/astar-y3/vendorsetup.sh including device/softwinner/octopus-cb5801/vendorsetup.sh including device/lge/mako/vendorsetup.sh including device/lge/hammerhead/vendorsetup.sh including device/samsung/manta/vendorsetup.sh including device/generic/x86/vendorsetup.sh including device/generic/mips/vendorsetup.sh including device/generic/armv7-a-neon/vendorsetup.sh including device/asus/tilapia/vendorsetup.sh including device/asus/deb/vendorsetup.sh including device/asus/grouper/vendorsetup.sh including device/asus/flo/vendorsetup.sh including sdk/bash_completion/adb.bash wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ lunch You're building on Linux Lunch menu... pick a combo: 1. aosp_arm-eng 2. aosp_x86-eng 3. aosp_mips-eng 4. vbox_x86-eng 5. kylin_p1-eng 6. kylin_p1-user 7. astar_y3-eng 8. astar_y3-user 9. octopus_cb5801-eng 10. octopus_cb5801-user 11. aosp_mako-userdebug 12. aosp_hammerhead-userdebug 13. aosp_manta-userdebug 14. mini_x86-userdebug 15. mini_mips-userdebug 16. mini_armv7a_neon-userdebug 17. aosp_tilapia-userdebug 18. aosp_deb-userdebug 19. aosp_grouper-userdebug 20. aosp_flo-userdebug Which would you like? [aosp_arm-eng] 9 ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.4.4 TARGET_PRODUCT=octopus_cb5801 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a7 HOST_ARCH=x86 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=KTU84Q OUT_DIR=out ============================================ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ extract-bsp /home/wwt/lunch_cb5801_r58/android/device/softwinner/octopus-cb5801/bImage copied! /home/wwt/lunch_cb5801_r58/android/device/softwinner/octopus-cb5801/modules copied! wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ make -j12 wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ pack 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/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_private.fex ./out/test_config.fex ./out/toc0.fex ./out/toc1.fex ./out/usbtool.fex ./out/usbtool_test.fex copying boot resource copying boot file packing for android normal /home/wwt/lunch_cb5801_r58/lichee/tools/pack/pctools/linux/eDragonEx/ /home/wwt/lunch_cb5801_r58/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=4fbc00Add 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=afe000Add partion system.fex SYSTEM_FEX000000 Add partion very system.fex SYSTEM_FEX000000 FilePath: system.fex FileLength=24f6eb58Add partion recovery.fex RECOVERY_FEX0000 Add partion very recovery.fex RECOVERY_FEX0000 FilePath: recovery.fex FileLength=d5b800sys_config.fex Len: 0x110ae config.fex Len: 0xcc38 split_xxxx.fex Len: 0x200 sys_partition.fex Len: 0xe45 boot0_nand.fex Len: 0x8000 boot0_sdcard.fex Len: 0x8000 u-boot.fex Len: 0xd4000 toc1.fex Len: 0x8 toc0.fex Len: 0x8 fes1.fex Len: 0x3080 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: 0x367a9 boot-resource.fex Len: 0x4fbc00 Vboot-resource.fex Len: 0x4 env.fex Len: 0x20000 Venv.fex Len: 0x4 boot.fex Len: 0xafe000 Vboot.fex Len: 0x4 system.fex Len: 0x24f6eb58 Vsystem.fex Len: 0x4 recovery.fex Len: 0xd5b800 Vrecovery.fex Len: 0x4 BuildImg 0 Dragon execute image.cfg SUCCESS ! ----------image is at---------- /home/wwt/lunch_cb5801_r58/lichee/tools/pack/sun8iw6p1_android_perf3_v1_0_uart0.img pack finish wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ 刷机之后,可以看见cb5801了。 shell@octopus-cb5801:/ $ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ cd ../lichee/linux-3.4/tools/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/linux-3.4/tools$ ll 总用量 52 drwxrwxr-x 13 wenyuanbo wenyuanbo 4096 8月 22 14:13 ./ drwxrwxr-x 28 wenyuanbo wenyuanbo 4096 9月 6 18:55 ../ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 firewire/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 hv/ drwxrwxr-x 3 wenyuanbo wenyuanbo 4096 8月 22 14:13 include/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 lguest/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 nfsd/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 14:13 perf/ drwxrwxr-x 4 wenyuanbo wenyuanbo 4096 8月 22 14:13 power/ drwxrwxr-x 4 wenyuanbo wenyuanbo 4096 8月 22 14:13 testing/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 usb/ drwxrwxr-x 4 wenyuanbo wenyuanbo 4096 8月 22 14:13 virtio/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 vm/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/linux-3.4/tools$ cd ../ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/linux-3.4$ cd .. wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee$ ll 总用量 44 drwxrwxr-x 8 wenyuanbo wenyuanbo 4096 9月 6 18:51 ./ drwxrwxr-x 4 wenyuanbo wenyuanbo 4096 8月 22 14:35 ../ drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 8月 22 14:13 brandy/ -rw-rw-r-- 1 wenyuanbo wenyuanbo 124 9月 6 18:51 .buildconfig drwxrwxr-x 15 wenyuanbo wenyuanbo 4096 8月 22 14:13 buildroot/ -r-xr-xr-x 1 wenyuanbo wenyuanbo 55 8月 22 14:13 build.sh* drwxrwxr-x 28 wenyuanbo wenyuanbo 4096 9月 6 18:55 linux-3.4/ drwxrwxr-x 3 wenyuanbo wenyuanbo 4096 9月 6 18:51 out/ -r--r--r-- 1 wenyuanbo wenyuanbo 232 8月 22 14:13 README drwxrwxr-x 6 wenyuanbo wenyuanbo 4096 8月 22 14:13 .repo/ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 14:13 tools/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee$ cd tools/pack/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack$ ll 总用量 637756 drwxrwxr-x 6 wenyuanbo wenyuanbo 4096 9月 7 08:55 ./ drwxrwxr-x 9 wenyuanbo wenyuanbo 4096 8月 22 14:13 ../ drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 8月 22 14:13 chips/ drwxrwxr-x 7 wenyuanbo wenyuanbo 4096 8月 22 14:13 common/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 1323 8月 22 14:13 createkeys* -rwxrwxr-x 1 wenyuanbo wenyuanbo 11 8月 22 14:13 .gitignore* drwxrwxr-x 3 wenyuanbo wenyuanbo 4096 9月 7 08:55 out/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 15707 8月 22 14:13 pack* -rwxrwxr-x 1 wenyuanbo wenyuanbo 1087 8月 22 14:13 parser.sh* drwxrwxr-x 4 wenyuanbo wenyuanbo 4096 8月 22 14:13 pctools/ -rwxrwxr-x 1 wenyuanbo wenyuanbo 653002752 9月 7 08:55 sun8iw6p1_android_perf3_v1_0_uart0.img* wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack$ cd chips/sun8iw6p1/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1$ ll 总用量 24 drwxrwxr-x 6 wenyuanbo wenyuanbo 4096 8月 22 14:13 ./ drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 8月 22 14:13 ../ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 bin/ drwxrwxr-x 3 wenyuanbo wenyuanbo 4096 8月 22 14:13 boot-resource/ drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 14:13 configs/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 tools/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1$ cd configs/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ ll 总用量 40 drwxrwxr-x 10 wenyuanbo wenyuanbo 4096 8月 22 14:13 ./ drwxrwxr-x 6 wenyuanbo wenyuanbo 4096 8月 22 14:13 ../ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 default/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 f1/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 fpga/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 n1/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 perf1_v1_0/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 perf2_v1_0/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 perf3_v1_0/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 qc/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ cp perf3_v1_0/ cb5801/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ ll 总用量 44 drwxrwxr-x 11 wenyuanbo wenyuanbo 4096 9月 7 09:06 ./ drwxrwxr-x 6 wenyuanbo wenyuanbo 4096 8月 22 14:13 ../ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 7 09:06 cb5801/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 default/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 f1/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 fpga/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 n1/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 perf1_v1_0/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 perf2_v1_0/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 perf3_v1_0/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 qc/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ rm perf1_v1_0/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ rm perf2_v1_0/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ rm perf3_v1_0/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ ll 总用量 32 drwxrwxr-x 8 wenyuanbo wenyuanbo 4096 9月 7 09:06 ./ drwxrwxr-x 6 wenyuanbo wenyuanbo 4096 8月 22 14:13 ../ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 7 09:06 cb5801/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 default/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 f1/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 fpga/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 n1/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 qc/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ rm f1/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ rm fpga/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ rm n1/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ rm qc/ -rf wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ ll 总用量 16 drwxrwxr-x 4 wenyuanbo wenyuanbo 4096 9月 7 09:06 ./ drwxrwxr-x 6 wenyuanbo wenyuanbo 4096 8月 22 14:13 ../ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 9月 7 09:06 cb5801/ drwxrwxr-x 2 wenyuanbo wenyuanbo 4096 8月 22 14:13 default/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ Z:\home\wwt\lunch_cb5801_r58\lichee\tools\pack\chips\sun8iw6p1\configs\cb5801 打包之后出错: wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee/tools/pack/chips/sun8iw6p1/configs$ cd ../../../../../ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/lichee$ cd ../android/ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ pack ERROR: board dir or path do not exist. All avaiable chips, platforms and boards: Chip Board sun8iw6p1 cb5801 default sun8iw9p1 default evb qc fpga sun8iw8p1 ipc v3s-perf v3-perf default CDR fpga sun8iw5p1 y3 y2 default h7 evb qc fpga yh sun8iw7p1 perf dolphin default fpga sun50iw1p1 default fpga sun8iw1p1 aw_w02 default evb qc aw_w01 sun8iw3p1 default w01 evb w02 sun9iw1p1 optimus p1 perf g200 wt097 mb976a9 default perf-lpddr3 p2 perf5 For Usage: pack -h wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ ;A83 PAD application ;--------------------------------------------------------------------------------------------------------- ; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串 ; 描述gpio的形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态> ;--------------------------------------------------------------------------------------------------------- [product] version = "100" machine = "cb5801" Z:\home\wwt\lunch_cb5801_r58\android\device\softwinner\octopus-cb5801\package.sh #!/bin/bash cd $PACKAGE chip=sun8iw6p1 platform=android board=perf3_v1_0 这里没有修改。 修改之后正常了: wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$ pack 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/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_private.fex ./out/test_config.fex ./out/toc0.fex ./out/toc1.fex ./out/usbtool.fex ./out/usbtool_test.fex copying boot resource copying boot file packing for android normal /home/wwt/lunch_cb5801_r58/lichee/tools/pack/pctools/linux/eDragonEx/ /home/wwt/lunch_cb5801_r58/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=4fbc00Add 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=afe000Add partion system.fex SYSTEM_FEX000000 Add partion very system.fex SYSTEM_FEX000000 FilePath: system.fex FileLength=24f6eb58Add partion recovery.fex RECOVERY_FEX0000 Add partion very recovery.fex RECOVERY_FEX0000 FilePath: recovery.fex FileLength=d5b800sys_config.fex Len: 0x110aa config.fex Len: 0xcc34 split_xxxx.fex Len: 0x200 sys_partition.fex Len: 0xe45 boot0_nand.fex Len: 0x8000 boot0_sdcard.fex Len: 0x8000 u-boot.fex Len: 0xd4000 toc1.fex Len: 0x8 toc0.fex Len: 0x8 fes1.fex Len: 0x3080 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: 0x367a9 boot-resource.fex Len: 0x4fbc00 Vboot-resource.fex Len: 0x4 env.fex Len: 0x20000 Venv.fex Len: 0x4 boot.fex Len: 0xafe000 Vboot.fex Len: 0x4 system.fex Len: 0x24f6eb58 Vsystem.fex Len: 0x4 recovery.fex Len: 0xd5b800 Vrecovery.fex Len: 0x4 BuildImg 0 Dragon execute image.cfg SUCCESS ! ----------image is at---------- /home/wwt/lunch_cb5801_r58/lichee/tools/pack/sun8iw6p1_android_cb5801_uart0.img pack finish wenyuanbo@cm-System-Product-Name:/home/wwt/lunch_cb5801_r58/android$

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值