[Mt8382/8121] adds a test item for the MTK factory test

Source: Internet
Author: User

Abstract:

This section describes how to add MTK factory test items and how to debug them.

Outline:

1. describes how to add a MTK factory test item

2. debugging tips

1. describes how to add a MTK factory test item

Taking the addition of infrared testing as an example:

 

1. mediatek/Factory/INC/common. h

Add item_ir_test to the bottom item_max_ids In The enum enumeration, that is, the last 2nd;

 

2. mediatek/Factory/INC/uistrings_chn.h

Add # define uistr_ir_test "infrared ";

This string is used to match the test items in the factory. ini configuration file. It is added only when the two are the same. Note that this file is GBK encoded.

Unistrings. h is used only when English is selected. Now we use Chinese, so it matches uistring_chn.h.

 

3. mediatek/Factory/src/factory. c

Ftm_test_items [] add item (item_ir_test, uistr_ir_test); (required for manual and individual tests)

Ftm_auto_test_items [] add item (item_ir_test, uistr_ir_test)

The two parameters are the items added in step 1 and must have the same name.

Here, macros are usually used to control whether to add them, unless they are all tested items to avoid running errors.

 

4. mediatek/Factory/src/test/ftm_irtest.c

Add the ftm_irtest.c file. Implement two functions: ir_test_init () and ir_test_entry. Function name is not required. For more information, see ftm_rftest.c. (Rftest uses code to determine whether the test is successful. If you need to manually confirm whether the test is successful, refer to ftm_otg.c. The main difference lies in the entry function)

Ftm_alloc needs to be called in ir_test_init (), which registers a struct related to item_ir_test. Call ftm_register to bind ir_test_entry to the struct.

Ir_test_init () is called during factory initialization.

Ir_test_entry () is called when the project is clicked. Some UI-related bindings and specific verification methods need to be implemented. Generally, a thread such as ir_update_thread is started for testing. The entry checks the test result through the global variable ir_factory.

 

5. mediatek/Factory/src/test/ftm_mods.c

Add extern int ir_test_init ();

Add ir_test_init to the penultimate (null) of ftm_init_funcs. In this way, ir_test_init is automatically called at factory startup, and the test item item_ir_test is bound to ir_test_entry.

So far, all add items are associated.

 

6. mediatek/Factory/Android. mk

Add ftm_ir_test.c to test_src_files.

You can also use macro control to determine whether to add them. Here, we use the macro of cvte_irremote_app_support to control them.

 

7. Factory. ini

Add menuitem = infrared; the name must be the same as that of uistr_ir_test; otherwise, the name cannot match.

This file will first go to the/sdcard directory and then to the/etc directory. We can directly put it into the sdcard directory during debugging.

 

8. mediatek/custom/active_1051j/Factory/factory. ini

Put the modified INI file in the Custom directory and use the MK file to copy it to the/etc directory.

The factory directory of custom contains two files: factory. ini and factory_chn.ini. If it is Chinese, copy factory_chn.ini and rename it factory. ini. If it is English, copy it directly. You can also leave only one factory. ini file, which contains Chinese characters. The factory program will only parse the file named factory. ini.

 

Debugging tips:

1. Install the Eng software and enable USB debugging.

2. Restart to enter the MTK factory for testing.

3. When you need to burn a new factory program, push it to/system/bin and chmod 777/system/bin/factory.

4. Run the PS factory command to query the currently running test program and kill it.

5. Enter Factory in shell to restart the MTK factory test program.

6. When you need to burn a new factory program again, CTRL + C can stop the current factory program and re-Execute step 3 and 5. No need to restart.

 

Copyright. For more information, see the source:

Http://www.cnblogs.com/sickworm/p/4015981.html

[Mt8382/8121] adds a test item for the MTK factory test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.