关于Data at the root level is invalid错误的解决方式


有时在使用XmlDocument.LoadXML()方法时会出现报Data at the root level is invalid的错误。


网上很多说发是因为xml文件的格式不对引起,如果你在仔细的查看了xml文件格式后并没有发现问题,那么很可能是UTF8编码格式中的BOM头引起的。

这里找的的答案:http://www.codeproject.com/Questions/572872/Dataplusatplustheplusrootpluslevelplusisplusinvali


什么是BOM?

BOM: Byte Order Mark

UTF-8 BOM又叫UTF-8 签名,其实UTF-8 的BOM对UFT-8没有作用,是为了支持UTF-16,UTF-32才加上的

BOM,BOM签名的意思就是告诉编辑器当前文件采用何种编码,方便编辑器识别,但是BOM虽然在编辑器中不显示,但是会产生输出,就像多了一个空行。

Byte Order Marks are special characters at the beginning of a Unicode file to indicate whether it is big or little endian, in other words does the high or low order byte come first. These codes also tell whether the encoding is 8, 16 or 32 bit. You can recognise Unicode files by their starting byte order marks, and by the way Unicode-16 files are half zeroes and Unicode-32 files are three-quarters zeros. Unicode Endian Markers

Byte-order mark Description

EF BB BF UTF-8

FF FE UTF-16 aka UCS-2, little endian

FE FF UTF-16 aka UCS-2, big endian

00 00 FF FE UTF-32 aka UCS-4, little endian.

00 00 FE FF UTF-32 aka UCS-4, big-endian.

UTF的字节序和BOM

UTF-8以字节为编码单元,没有字节序的问题。UTF-16以两个字节为编码单元,在解释一个UTF-16文本前,首先要弄清楚每个编码单元的字节序。例如收到一个“奎”的Unicode编码是594E,“乙”的Unicode编码是4E59。如果我们收到UTF-16字节流“594E”,那么这是“奎”还是“乙”?

Unicode规范中推荐的标记字节顺序的方法是BOM。BOM不是“Bill Of Material”的BOM表,而是Byte Order Mark。BOM是一个有点小聪明的想法:

在UCS编码中有一个叫做"ZERO WIDTH NO-BREAK SPACE"的字符,它的编码是FEFF。而FFFE在UCS中是不存在的字符,所以不应该出现在实际传输中。UCS规范建议我们在传输字节流前,先传输字符"ZERO WIDTH NO-BREAK SPACE"。

这样如果接收者收到FEFF,就表明这个字节流是Big-Endian的;如果收到FFFE,就表明这个字节流是Little-Endian的。因此字符"ZERO WIDTH NO-BREAK SPACE"又被称作BOM。

UTF-8不需要BOM来表明字节顺序,但可以用BOM来表明编码方式。字符"ZERO WIDTH NO-BREAK SPACE"的UTF-8编码是EF BB BF。所以如果接收者收到以EF BB BF开头的字节流,就知道这是UTF-8编码了。

Windows就是使用BOM来标记文本文件的编码方式的。

原来BOM是在文件的开始加了几个字节作为标记。有了这个标记,一些协议和系统才能识别。

 

源文档 <http://www.cnblogs.com/DDark/archive/2011/11/28/2266085.html>



上面的只是说下什么bom,下面针对BOM引起的这个报错一般可以用以下两个方式解决


1.修改xml文件的编码格式


用notepad++的编辑器打开xml文件后将其编码格式换成 无BOM的UTF8保存


2.在代码中强识别去除BOM头


//这里用来去除UTF-8中的bom
                    byte[] bomBuffer = new byte[] { 0xef, 0xbb, 0xbf };
                    if (cache[0] == bomBuffer[0]
                        && cache[1] == bomBuffer[1]
                        && cache[2] == bomBuffer[2])
                    {

                        xmlStr = System.Text.Encoding.UTF8.GetString(cache, 3, cache.Length - 3);

                    }
                    else 
                    {
                        xmlStr = System.Text.Encoding.UTF8.GetString(cache);
                    }
                    doc.LoadXml(xmlStr);



  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
PassMark BurnInTest V5.3 Copyright (C) 1999-2008 PassMark Software All Rights Reserved http://www.passmark.com Overview ======== Passmark's BurnInTest is a software tool that allows all the major sub-systems of a computer to be simultaneously tested for reliability and stability. Status ====== This is a shareware program. This means that you need to buy it if you would like to continue using it after the evaluation period. Installation ============ 1) Uninstall any previous version of BurnInTest 2) Double click (or Open) the downloaded ".exe" file 3) Follow the prompts UnInstallation ============== Use the Windows control panel, Add / Remove Programs Requirements ============ - Operating System: Windows 2000, XP, 2003 server, Vista (*) - RAM: 32 Meg - Disk space: 6 Meg of free hard disk space (plus an additional 10Meg to run the Disk test) - DirectX 9.0c or above software for 3D graphics and video tests (plus working DirectX drivers for your video card) - SSE compatible CPU for SSE tests - A printer to run the printer test, set-up as the default printer in Windows. - A CD ROM + 1 Music CD or Data CD to run the CD test. - A CD-RW to run the CD burn test. - A network connection and the TCP/IP networking software installed for the Network Tests Pro version only: - A serial port loop back plug for the serial port test. - A parallel port loop back plug for the parallel port test. - A USB port loop back plug for the USB port test. - A USB 2.0 port loop back plug for the USB 2.0 port test. - PassMark ModemTest V1.3 1010 (or higher) for Plugin Modem testing. - PassMark KeyboardTest V2.2 1011 (or higher) for Plugin Keyboard testing. - PassMark Firewire Plugin V1.0 1000 (or higher) and a 揔anguru FireFlash?drive for Plugin Firewire testing. (*) Windows 2000 does not support the CD-RW burn test. The advanced RAM test is only available under Windows 2000 and Windows XP professional (the other RAM tests are supported under the other OS's). Users must have administrator privileges. Windows 98 and Windows ME ========================= Windows 98 and ME are not supported in BurnInTest version 5.3 and above. Use a version of BurnInTest prior to 5.2 for compatibility with W98 and ME. Windows 95 and Windows NT ========================= Windows 95 and NT are not supported in BurnInTest version 4.0 and above. Use a version of BurnInTest prior to 3.1 for compatibility with W95 and NT. Version History =============== Here is a summary of all changes that have been made in each version of BurnInTest. Release 5.3 build 1035 revision 4 WIN32 release 10 November 2008 - Lenovo China specific build. Lenovo system detection changes. Release 5.3 build 1035 revision 3 WIN32 release 7 November 2008 - Lenovo China specific build. Lenovo system detection changes. Release 5.3 build 1035 revision 2 WIN32 release 6 November 2008 - Lenovo China specific build. Lenovo logo and Lenovo system detection changes. Release 5.3 build 1035 WIN32 release 5 November 2008 - Lenovo China specific build. Changes include: Lenovo logo added, Lenovo system support only, 32-bit BurnInTest restricted to 32-bit Windows and BurnInTest run as administrator. Release 5.3 build 1034 WIN32 release 3 October 2008 - Correction to setting the CD burn test drive in preferences. - Changed the mechanism to check for the required DirectX Direct3D as the previous method did not work on some system (some W2003 servers). - Enhanced the mechanism to report memory hardware errors in the Memory torture test. Release 5.3 build 1033 WIN32 release 1 October 2008 - Changes to correct a BurnInTest crash problem on some systems. When the disk and standard RAM tests are run for many hours, BurnInTest may have disappeared with no error message. Release 5.3 build 1030 WIN32 release 25 September 2008 - Changes to investigate a BurnInTest crash problem on XP SP3. Release 5.3 build 1028 WIN32 release 11 September 2008 - Two 2D Video memory test crash bug workarounds implemented. Crashes in (i) DirectX DirectShow and (ii) ATI atiumdag.dll library. - A hang on startup has been corrected. A 2 minute timeout has been added to the collection of system information. - Video playback, Hard disk and CD/DVD test 'no operations' error reporting changed. - When BurnInTest crashes, it will not generate a "minidump" file. Minidumps will need to be sent to Microsoft as per the normal process. However, a log entry will be added to the normal BurnInTest log. - Changes to trace logging to reduce activity when trace logging is not turned on. - Note: We have seen a report of the Video Playback failing (crash) due to a faulty video codec, ffdshow.ax. If you are using this we suggest you try a different Video file and codec. Release 5.3 build 1027 revision 0003 WIN32 release 19 August 2008 - Changed the 2D test to wait for the Video Playback test in order to allow memory allocation for the Video playback test. - Changed the Memory test to wait for the Video Playback test and 3D test to allow memory allocation for these tests. - Minor changes to the No operation error watchdog timer for the CD and Hard disk tests. - Minor correction to the Butterfly seek test. - Video playback trace logging increased. Release 5.3 build 1027 revision 0002 WIN32 release 19 August 2008 - Video playback trace logging increased. Release 5.3 build 1027 WIN32 release 31 July 2008 - Corrected a bug where BurnInTest would fail to start if Activity trace level 2 logging (debug level logging) was turned on and the Logging Summarize option was also selected. - Minor change to the serial port test where, if "Disable RTS/CTS and DSR/DTR test phase" was selected the DTR and RTS lines would be explicitly disabled to prevent any toggling of these lines. Previously these where enabled, but not explicitly toggled. Release 5.3 build 1026 WIN32 release 17 July 2008 - Updated Level 2 and Level 3 CPU cache information for newer Intel CPU's. - Updated the detection of Hyperthreading and the number of logical CPUs for a new Intel CPU. Release 5.3 build 1025 WIN32 release 11 July 2008 - Corrected a Disk test bug where on rare occasions a verification error is incorrectly displayed. This is during the random seeking phase of the "Random data with random seeking" test mode and only occurs with some specific test settings. Release 5.3 build 1024 WIN32 release 10 July 2008 - Workaround for the rare crash bug in Vista in atklumdisp.dll at address 0x730676ae. - Added trace debug information for BurnInTest startup and the 3D test. Release 5.3 build 1022 WIN32 release 12 June 2008 - Corrected a bug where the 2D video memory test in BurnInTest v5.3.1020 and v5.3.1021 would report a "Not enough video memory available for test" error if the test was run a couple of times (without closing BurnInTest). Release 5.3 build 1021 WIN32 release 5 June 2008 - 32-bit BurnInTest PRO 5.3.1020 would not start on Windows 2000. This has been corrected. Release 5.3 build 1020 WIN32 release 29 May 2008 - BurnInTest could have crashed on accessing bad video memory hardware in the 2D test. This problem is now just reported as an error (and BurnInTest) continues. - When BurnInTest crashes, it should now generate a "minidump" file to help debug which system component caused the failure (32-bit Pro version only). - Other minor changes. Release 5.3 build 1019 WIN32 release 16 May 2008 - Corrected rare crash bugs in the 2D and Video tests. - Added a hot Key, F4, to set the auto run flag and run the tests (i.e. set "-r" and then run the tests). - Other minor changes. Release 5.3 build 1018 WIN32 release 16 April 2008 - Added an operation watchdog timer for all tests. In rare cases, a single test can stop in the operating system - i.e. there is a problem in the operating system/ device driver that prevents control being returned to the BurnInTest for that test. This was added for specialized serial port hardware that could lockup after several hours of testing. Release 5.3 build 1017 WIN32 release 3 April 2008 - Corrected the Advanced Network test to run on non-English Operating Systems. Release 5.3 build 1016 WIN32 release 17 March 2008 - Added additional USB 2.0 Loopback plug test initialization to ensure plugs are in a 'clean' state when starting the USB tests. This was added due to reported USB data verification errors after scripted USB testing across multiple reboots. Release 5.3 build 1015 WIN32 release 27 February 2008 - Increased error reporting detail for the standard RAM test, when the -v command line option is used. Release 5.3 build 1014 WIN32 release 30 January 2008 - Corrected a problem where the loopback sound test could run out of memory if run for several days. Release 5.3 build 1013 WIN32 release 31 December 2007 - Improved the reporting of COM port errors such that in the rare case a COM port locks up in the Operating System, the error is still reported. - Corrected a bug, where in rare cases, the result summary could be duplicated in a log file. - Updated license management, in an attempt to remove a rare crash on startup. Release 5.3 build 1012.0002 WIN32 release 31 October 2007 - New build of Rebooter (64-bit Windows correction). - Clarifications in the help file. Release 5.3 build 1012 WIN32 release 17 October 2007 - Changed the Standard Network Test, "Test all available NICs" such that the number of Network Addresses specified in Preferences->Network will be the number of NICs tested. This will error faulty NICs that are not detected by the BurnInTest auto NIC detection mechanism. - Minor change to the 2D memory test when run with the 3D test (multiple large windows) and the RAM test. Aimed at correcting sympton: Access Violation 0x00404CF9. - Corrections to the mapping of paths with ".\". Release 5.3 build 1011 rev 2 WIN32 release 17 September 2007 - Modified the Multi-Process torture test to better describe a new error message introduced in V5.3.1010. Release 5.3 build 1011 - Public release WIN32 release 11 September 2007 - Corrected a bug where "Limited Evaluation Version" could be displayed even after BUrnInTest is licensed (problem introduced in 32-bit BITPRO V5.3.1010). - Changed the Sound test to allow any of the tests (Wave, Midi or MP3) to be excluded from testing by blanking the filename. - The Command line parameter "-j" (cycle disk test patterns after each test file) could fail during the Random data test due to the mechanism used in BurnInTest. The Random data test is now excluded from the test when (and only when) the "-j" command line parameter is specified. - In rare circumstances, the 2D test number of operations could potentially overflow and become negative. This has been corrected. - In rare circumstances, BurnInTest could hang if there was a system problem in rebooting the system (ie. it failed to shutdown) using PassMark Rebooter. This has been corrected. Release 5.3 build 1010 - Public release WIN32 release 28 August 2007 WIN64 release 28 August 2007 - As BurnInTest exercises system components, it is possible for faulty hardware or device drivers to cause software exceptions. These are normally seen as Windows reporting an "Access Violation". Changes have been made to handle these errors for the memory tests (for faulty RAM) and direct device driver access (for some device driver errors), as well as overarching more generic handling of these types of errors. - Corrected a software failure bug on startup (particularly Vista) where a DirectX function was causing software failures in "dsetup.dll". - Updated the "Activity Event" generated with the periodic results summary report to be numbered (from 1 upwards) such that when "Logging->Summarize", these events are not summarized. - Corrected a bug where the HTML log name could include a duplicate of the filename prefix. - Updated to the Common Errors section of help. Release 5.3 build 1009 - Public release WIN32 release 16 August 2007 - Corrected a 'zip' version cleanup problem. Release 5.3 build 1008 - Komputer Swiat Expert magazine version WIN32 STD release 14 August 2007 Release 5.3 build 1007 - Public release WIN32 release 7 August 2007 - Corrected a disk test startup problem for some large RAID systems when SMART testing is selected. - Added additional logging for the disk test when an error occurs. - Changed the 3D test when run with the 2D EMC test to be 'behind' the EMC scrolling H's test. Allowed the test to be easily exited when running the 3D test in Fullscreen mode. - Minor corrections to the Advanced Network test. - Changed the log file reference of "Network Name" to "Computer Name". WIN64 specific: - MMX and 3DNow! are obsolete for native 64-bit applications. BurnInTest has been changed to show "NA" (Not applicable) in the test window for these tests. Release 5.3 build 1006 - Limited release WIN32 release 17 July 2007 - Standard Network Test changes: - Increased the number of destination IP addresses from 4 to 6. - Added an option (default) "Test all available NICs", which will force traffic down every system NIC with a basic algorithm of NIC1 to IP Address 1, NIC2 to IP Address 2 etc. - Advanced Network test changes: - Simplified the test. - Removed the UDP and FTP options. The Standard Network test can be used as a UDP test. - Removed the Advanced Network test specific logging, and included all relevant logging in the standard BurnInTest logging mechanism. - Replaced the complicated dynamic balancing of any system NIC to any Endpoint NIC with a simpler static allocation on test startup. - Changed the error detection mechanism to detect errors much more quickly. - Re-worked the errors reported. - Changed the CPU throttling mechanism to reduce the CPU load. - Updated endpoint.exe. - Removed checkend.exe (now obsolete). - Changed the logging rollover to work with the output of interim results (e.g. per 1 minute). Previously rollover only occurred on error events written to the log. This also corrected an issue where interim results summary logging could be written to the physical disk with some delay (based on Windows disk caching). - Corrected the "Unknown" reporting of some operating systems. - Added the skipping of the Butterfly seek disk test when run on Vista and insufficient privileges. A notification of this is logged. - Intel Quad core L2 cache size reporting has been added. - Added new SMART threshold descriptions. - Added new disk test options, accessed via command line parameters: /ka: keep disk test files in all cases (c.f. /k keep disk test files on error). /j: cycle patterns between test files. Note: Random seeking will be skipped in this case. This option has been added to allow multiple test patterns to be used across very large disks. - Added an option to make some test settings unavailable to the user. An example configuration file available on request. Release 5.3 build 1005 0001 (STD only) - Public release WIN32 release 29 June 2007 - Corrected a bug introduced in v5.3.1005.0000 STD (only) where the disk test would use up more and more system resources, thus causing test failures. Release 5.3 build 1005 rev 0003 (PRO only) - Limited public release WIN32 release 21 June 2007 - Correction to the behavior of a static RAM test pattern (rather than the default Cyclic pattern). Release 5.3 build 1005 rev 0002 (PRO only) - Limited public release WIN32 release 15 June 2007 - The "Select all CD/DVD drives" preferences option has been made user configurable, rather than using pre-defined test settings. Release 5.3 build 1005 rev 0001 (PRO only) - Limited public release WIN32 release 13 June 2007 - Bug correction for the CD auto selection feature. Release 5.3 build 1005 - Public release WIN32 release 18 May 2007 WIN64 release 18 May 2007 - In a number of cases, such as when specifying the post test application, uppercase application names were not accepted. This has been corrected. - The default font height in the 2D scrolling H's test should have been Arial 9. This has been changed. - The BurnInTest Video playback test incompatibility with Nero 6 and Nero 7 has been resolved. - The BurnInTest disk test throughput for dual core systems has been improved. Release 5.3 build 1004 rev2 - Limited release WIN32 release 8 May 2007 - Changed the Standard Network Test to better report packet error ratios. In addition, a new warning has been added to indicate that errors have been detected but not enough packets have been attempted to be sent to determine accurately whether the configured error ratio has been exceeded. - Corrected a bug where the "append to existing" logging option did not work across scripted reboots, and a new log file was created instead of appending to the existing log file. - If the 3D test was running, then BurnInTest blocked a forced close of BurnInTest, this blocking has been removed. - Changed the PASS and FAIL windows so they can now also be closed by selecting the Windows Close "X" button. Release 5.3 build 1004 - Public release WIN32 release 10 April 2007 WIN64 release 10 April 2007 - Corrected a problem introduced in BurnInTest v5.2 where BurnInTest could run out of memory (the main symptom) when tests where run for long periods (> 12hours). WIN64 specific: - Corrected a bug where the number of cores reported on a Quad core system was incorrectly reported as CPU packages. Release 5.3 build 1003 - Limited release WIN32 release 3 April 2007 - A new 2D GUI (Graphical User Interface) test has been added to the standard 2D graphics test. - Resolved an issue where BurnInTest would fail to start on Vista systems with DEP enabled for all programs. - On some systems, the Disk test could pause momentarily even when a duty cycle of 100% was specified. This pause has been removed. - When running the CD test under BartPE (Pre-install environment) 4 additional specific files are skipped as they are unavailable for testing. - Minor bug corrections. Release 5.3 build 1002 rev 0001 - Limited release WIN32 release 16 March 2007 - Changes to the new 3D test: - Added a Full screen non-windowed test for the primary monitor, where the resolution can be selected from those supported by the Graphics card. - Added the user option of changes the vertical sync in the full screen non-windowed test to be either the Maximum rate of the graphics card, or to be the rate of the monitor (this may prevent some flicker). - Added a more complex water texture using DirectX Vertex Shader 2.0 and Pixel Shader 2.0 effects (if supported by the graphics card). This applies to 3D test windows that are 800x600 or larger. - Changed some error messages from window displays (that require user intervention) to standard error reporting. Added new 3D error messages and more detail in the error reporting. - Changed the definition of an operation to be a successfully displayed frame. - Changed the definition of a cycle to be 2000 frames. - Changed 2D video memory test to wait until the 3D test starts (as per V5.2 and earlier). - A new version of rebooter has been included. - If BurnInTest is started with the -p command line parameter (to use the bit.exe directory for files such as the configuration file), then BurnInTest will start rebooter with the -p option. This can be useful when running BurnInTest and Rebooter from a USB drive. Release 5.3 build 1002 - Limited release WIN32 release 19 March 2007 - Corrected a bug introduced in V5.2 where selecting accumulated logging could lead to rebooter failing to launch. Release 5.3 build 1001 - Limited release WIN32 release 16 March 2007 - The 3D test has been improved. The 3D ball test has been replaced with a more complex 3D terrain test. This will more thoroughly exercise modern graphics cards. Further, the 3D test has been changed to support multi- monitor testing (up to 4 monitors). Accordingly, a new preferences section has been added for the 3D test. The multi-monitor test options are only available in BurnInTest Professional. Release 5.3 build 1001 - Limited release WIN32 release 16 March 2007 - The 3D test has been improved. The 3D ball test has been replaced with a more complex 3D terrain test. This will more thoroughly exercise modern graphics cards. Further, the 3D test has been changed to support multi- monitor testing (up to 4 monitors). Accordingly, a new preferences section has been added for the 3D test. The multi-monitor test options are only available in BurnInTest Professional. - BurnInTest uses DirectX 9.0c. This version of BurnInTest uses a more recent version of the Microsoft DirectX Direct3D component, October 2006. BurnInTest has been modified to detect and install this component (file) if it does not exist. - A command line parameter -X has been added to skip the DirectX version checking on BurnInTest start-up. - With the recent introduction of multi-monitor support for the Video Playback test, it is now more likely that the system will run out of memory when running multiple video tests simultaneously, particularly when more memory intensive codecs are used. A specific Insufficient resources to complete test message has been added in this case, rather than the previous more generic unrecoverable error message. The video test have been changed to attempt recovery from this and the more generic unrecoverable error, by closing the current video and opening the next. The logging detail has been increased. - Note: The BurnIntest sample video pack has been altered with the DivX Compressed Video file being removed due to the DivX codec failing with this Video file when used with multiple simultaneous Video playbacks. Access Violation: 0x69756e65. See: http://www.passmark.com/download/bit_download.htm - The video description is now collected for a larger range of Vista systems. - Windows 98 and ME are no longer supported. Please see www.passmark.com for a link to an older version of BurnInTest that will support W98/ME. Release 5.3 build 1000 rev2 - Limited release WIN32 release 9 March 2007 - A command line parameter -P has been added to allow the BurnInTest directory to be used rather than the User's personal directory. This may be useful when running BurnInTest from a USB drive for example. - When running the CD test under BartPE (Pre-install environment) 4 additional specific files are skipped as they are unavailable for testing. - A change has been made to support Hmonitor temperature monitoring on Vista. - A number of undocumented command line parameters have been documented: -B: BurnInTest will generate additional Serial port test information when activity trace level 2 logging is set. -E [data]: Specifies the test data to use in the serial port test. -M: Automatically display the Machine ID Window when BurnInTest is started. -U: Force BurnInTest to set logging on at startup. Release 5.3 build 1000 - Limited release WIN32 release 8 March 2007 - Changed the 2D and Video playback tests to support multi-monitor testing. - When running the CD test under BartPE (Pre-install environment) 4 specific files are skipped as they are unavailable for testing. Release 5.2 build 1006 - Limited release WIN32 release 1 March 2007 - Corrected a bug where BurnInTest would fail to start on certain Vista systems. - Corrected a bug where some files where the full path was not specified would be incorrectly referenced in the Program Files directory, rather than the user personal directory. Release 5.2 build 1005 - Public release WIN32 release 21 February 2007 WIN64 release 21 February 2007 - Updated the Graphics card description for Windows Vista systems. - Updated the Advanced Network test to indicate that elevated administrator privileges are required when running on Vista. - Moved files from the Program files directory for the Advanced Network Test (BurnInTest, EndPoint and CheckEnd). Specifically, the User Application directory is now used for the temporary test FTP files and the User Personal directory is now used for the log and configuration files. - Updated the cleanup process for when running the "zip" version of BurnInTest Professional from a CD or flash drive. - Updated the help link from the Windows Start, All Programs, BurnInTest menu for the browser based help. - Corrected a bug where Disk preferences displayed in the Preferences window would be incorrect when the system had no Floppy drive. - Corrected a bug where the Advanced Network test might not have been displayed until after entering the Duty Cycle selection (ie. just chaning from the standard network test to the advanced test). - Corrected a USB bug in Beta 5.2.1003 where the test would not run if there where there insufficient USB loopback plugs attached to the system. - Included a new version of PassMark Rebooter that supports Windows Vista. Release 5.2 build 1004 - Public Pre-release WIN32 release 13 February 2007 - Updated the reported Operating system for the various Vista product editions. - Disk test settings can be configured for "Automatically Select all Hard Disks", rather than using defaults. - When running the CD test under BartPE (Pre-install environment) 4 specific files are skipped as they are unavailable for testing. - Corrected a bug where temperature information could be duplicated in the HTML report. - Corrected a bug certain 'save report' warning messages could be truncated. - Help file updated. Release 5.2 build 1003 - BETA RELEASE ONLY WIN32 release 23 January 2007 - Changed the USB preferences and test to more completely check for the PassMark USB Loopback plugs and ignore any device that is not a PassMark USB Loopback plug (due to reported incorrect detection with another hardware device). - Increased Trace level debugging for Intel temperature monitoring. - Corrected a bug with the disk test introduced in 5.2.1001 Release 5.2 build 1002 - BETA RELEASE ONLY WIN32 release 22 January 2007 - Increased the number of disks that can be tested from 20 to 26. - Updated BurnInTest to reflect that Temperature monitoring with Intel Desktop utilities is supported. Intel Desktop utilities essentially is a replacement for Intel Active Monitor for newer Intel motherboards. - Increased Trace level debugging for Intel temperature monitoring. Release 5.2 build 1001 - BETA RELEASE ONLY WIN32 release 19 January 2007 - Windows Vista support. - The Block size used in the disk test is now configurable per disk. The default block size has been increased from 16KB to 32KB. - An option has been added to automatically detect all of the CD and DVD drives for the CD test (as per the disk test). This may be useful when testing across many systems with different optical drive configurations. - Increased Trace level debugging for Intel temperature monitoring. - Bugs corrected: - Disk preferences - in rare cases invalid default values could be set for a disk, an invalid value error would occur and the values would need to be manually corrected. Release 5.2 build 1000 - limited release WIN32 release 8 January 2007 - Windows Vista support. - Reduced the need for elevated administrator privileges: - Changed the location of the disk test files from the root directory of the test volume to a BurnInTest data files subdirectory (e.g from "C:\" to "C:\BurnInTest test files\") - Moved many of the files from the Program Files directory to the User directory for Windows 2000, XP and Vista. When running BurnInTest on Windows 98, ME or from a key.dat file (e.g. from a USB drive with a licensed key.dat) BurnInTest will store these files in the BurnInTest program directory. Specifically, the following files have been moved from the Program Files directory to the User Personal directory, e.g. Vista - "C:\Users\\Documents\PassMark\BurnInTest\" XP - "My Documents\PassMark\BurnInTest\" Files: Configuration file, Configuration load/save default directory, Save log file and image default directory, parallel port override "ioports.dat" directory, default command line script directory, log file directory, video file directory, Plugin directory, machine id file directory, Run as script default directory, CD burn image, Advanced network FTP temp files. - Replaced the Help system with Browser based help. - Changed the Disk test block size from 16KB to 256KB. It is planned to make this user configurable in the next build. Release 5.1 build 1014 WIN32 release 2 November 2006 WIN64 release 2 November 2006 - Corrected a bug when running on Vista, where the Standard network test would report a checksum error when the transmitted data was correct. - Corrected a bug where BurnInTest would not stop the tests based on the number of test cycles for the Plugin test or the Advanced Network test. - Made the "Could not set USB2Test mode" USB error message more specific by adding an error for insufficient system resources. - Changed the preferences Window to fit on an 800x600 resolution screen. - Corrected a minor bug in Activity level 2 trace logging with the 'hide duplicate' preference setting. - Corrected a minor memory leak if the 2D test failed to initialize (such as due to a DirectX problem). - The Parallel port test may now be used on Windows Vista. Specifically, the PassMark device driver used for the parallel port test could not be loaded on 64-bit Windows Vista as it was not digitally signed. It is now digitally signed. Release 5.1 build 1013 revision 0002 WIN32 release 19 September 2006 WIN64 release 19 September 2006 - Corrected an Access Violation problem reported by a customer on a particular MB. Release 5.1 build 1013 WIN32 release 7 September 2006 WIN64 release 7 September 2006 - The "Notes" section has been added to the Customer results certificate. - Some additional configuration range validation has been added. Release 5.1 build 1012 WIN32 release 15 August 2006 - Corrected a false report of a "Unable to get disk volume extent information" for the disk butterfly seek test. - Advanced Network test changes for errors: "Corrupt header - packet discarded" and "Advanced Network test timed out" - Advanced Network test Endpoint changes for problems on non-English Operating Systems and systems with the Windows "Network Interface" performance statistics disabled. - SMART parameters on a Samsung Hard Disk caused BurnInTest to fail when running the disk test with SMART thresholds enabled. This has been corrected. - The 2D scrolling H's test could display corrupt characters on the second and subsequent test run. This has been corrected. - A problem with the Integer maths test where the results could display a negative number of operations has been resolved. - Minor improvements to the help file. - HTML help file added for Windows Vista and Longhorn Server. - Minor improvements to the Error Classification file (error descriptions). - Some CD Trace level 1 logging has been moved to trace level 2. - Trace level 1 logging has been added to the test closing software. - New build of Endpoint.exe (1.0 1010). Release 5.1 build 1011 WIN32 release 6 July 2006 - New Advanced Network test error reporting added in the previous build V5.1 1010 has been removed. - A broader range of USB 2.0 Loopback plugs can now be used with BurnInTest. Release 5.1 build 1010 WIN32 release 4 July 2006 - Corrected the HTML report description of the L2/L3 CPU cache when the L3 cache size could not be determined. Advanced network changes: - Endpoints ran at 100% CPU load as they contained no throttling. This impacted their ability to effectively handle multiple threads handling TCP/UDP messaging. Throttling has been added to the EndPoint side to reduce CPU load. This does not greatly impact Network load. - Throttling on the BurnInTest side contained a sleep that was not insignificant. This could have impacted the BurnInTest data test thread to to handle incoming TCP and particularly UDP messages. This sleep has been reduced and other throttling parameters changed to suit. (ie. smaller sleeps more often). - EndPoint systems with x NICs (where x > 1), reported themselves as an Endpoint with x NICs, x times. Effectively registering with BurnInTest as x * x EndPoint NICS. This impacted the effectiveness of the load distribution to EndPoint NICs. An Endpoint system now only registers the once with BurnInTest. - The BurnInTest side did not report data verification Checksum errors for full duplex testing. This error determination has been corrected and reporting added. - The Test statistics sent from the Endpoint to BurnInTest could fail if the statistics block is split across 2 lower level TCP send packets. This could lead to problems like incorrect reporting of Endpoint determined checksum errors, Endpoint load and load balancing. Further it would lead to an Endpoint testthread being put into an endless TCP send loop. This would eventually bring the Endpoint system to its knees as more and more of these test threads go into this state. This has been corrected. - The Data Received reported by BurnInTest was double counted. This has been corrected. Release 5.1 build 1009 WIN32 release 23 June 2006 - Plugin test error classifications were incorrect in the log file detailed description. - Corrections to the advanced network test (BurnInTest and EndPoint). Release 5.1 build 1008 - limited release WIN32 release 20 June 2006 - Advanced network changes corrections. Most notably, a bug where part of the payload data could be lost if the payload block (eg. 1000 bytes) was split across 2 (or more) lower level TCP packets. - Added version reporting for Endpoints. Release 5.1 build 1007 - limited release WIN32 release 16 June 2006 Advanced network changes: - Corrected a BurnInTest access Violation introduced in V5.1 1006. - The Endpoint now reports its version and build to BurnInTest and BurnInTest reports this in the log file if it is an earlier version than expected. This is to help avoid the situation where old Endpoints are run on the Network, that may not be compatible with the version of BurnInTest being run by the user. - Removed a timeout report in a specific instance where a timeout is not an error. - Changed the Endpoint rebalancing and polling to occur less often after the test has been running 3 minutes. This is to help allowing the handling of polling from a larger number of multiple copies of BurnInTest on the Network. - Added a connection retries on failure for the Endpoint. - Corrected a memory leak in the Endpoint. - Increased the number of sockets supported. - Corrected some Advanced Network error classifications. Release 5.1 build 1006 - limited release WIN32 release 14 June 2006 - Improvements to the Advanced Network test (both BurnInTest V5.1 1006 and EndPoint V1.0 1004) to remove corrupted false packet corruption errors. Improved the timeout recovery mechanism. Added some validation to the Windows Network performance data used for NIC utilization. - Changes to the collection of Disk drive information on startup to try to resolve a startup issue on Systems with a large number of physical drives and 'unusual' WMI namings. Release 5.1 build 1005 WIN32 release 2 June 2006 - Corrected a bug in the Advanced network test where the test would not recover from timeout errors. The test appears to be running, but the results are 0 and the number of connected End Points are 0. Also improved the retry on timeout mechanism. - Removed some duplication in error reporting in the Advanced Network test. - Changed the Advanced Network display of Utilization to ensure a maximum of 100% displayed. - Corrected an Advanced Network test bug where the number of Errors reported in the test window would not take into account the corrupt packet threshold, and an error would be added for each occurrence of the corrupt packet (rather than when the user set threshold was reached). Release 5.1 build 1004b WIN32 release 25 May 2006 (not publicly released) - Corrected the default Advanced network corrupt packet threshold value. - Updated the data entry fields in the CD preferences when a different CD drive is selected. - The Advanced Network specific log files should be concatenated for a script run. This was only occurring for the first NIC under test. The concatenation will now occur for each NIC under test, when run from a script. - Corrected a bug where a log file name specified with no directory path could be incorrect. - Corrected a bug where the customer "Test Certificate" report incorrectly translated the "%" character from a customer specific HTML template. eg would be translated to . - The "Advanced Network test error" (215) has been removed and replaced with other existing error messages 214, 219, 220, 221 or 222. - Added the Customer name and Technician name to the text and HTMl reports. Previously, this information was only included in the "Test Certificate" report. - We have added a commandline option to specify the Serial port test data as a constant value. To specify specific data for the Serial port test you should specify e.g. "bit.exe /E 23" from the command line where 23 is in decimal and will be used for all test data (instead of random data). The vales should be between 0 and 255. Release 5.1 build 1004 WIN32 release 19 April 2006 (not publicly released) - Added the COM port speed of 921600 Kbits/s for RS 422/RS485 testing. - Changed the CD test to ensure that the entire test CD data is not cached on systems with a large amount of RAM. - Added a -M command line option to display the Machine ID window automatically when BurninTest starts. - Changed the 2D EMC scrolling H's test to work on multiple monitors were the resolution on each is different. - Changed log files such the syntax "..\" could be used for files in the directory up a level. - Minor correction to the advanced network test. Release 5.1 build 1003 WIN32 release 18 April 2006 WIN64 release 18 April 2006 - Changed the Advanced network test to allow a corrupt packet threshold value up to 1 million. - Bundled a new version of rebooter. Release 5.1 build 1002 WIN32 release 11 April 2006 WIN64 release 11 April 2006 - Corrections to the translation of V4.0 to V5 configuration files. Note: Configuration files in V5.x builds prior to V5.1 1002 could become corrupted if a V4.0 configuration file is loaded. - Corrected a bug where the main Window size and location were not restored on restarting BurnInTest. - Changes to the SMART attribute logging to support a greater range of Disk drive device drivers. Added additional Activity Level 2 trace logging. - Added an option to use CTS (Clear To Send) flow control in the loop back stage of the COM port test. - Corrected a bug where the CPU L3 cache could be reported as -1. - Help file updates. Release 5.1 build 1001 WIN32 release 30/March/2006 - Digitally signed the BurnInTest application to allow it to run under Windows Server "Longhorn". Note, previously only the installation package was digitally signed. - Updated the reported Operating system descriptions, including: - Windows Vista - Windows Server "Longhorn" - Corrected a bug where the Advanced network information was not displayed on the main window when it was run from a script. - The Advanced Network Corrupt threshold packet has been changed to produce an error every time the error is received after the threshold is reached. - Corrected the reporting of "Network, Packet discarded due to corrupt header" as a Network test error. - Corrected a bug where a new log file was not created if (only) the log prefix changed during the running of a script file. - Split the "Network, Advanced Network test error" error into 6 errors: "Network, Advanced Network test error" "Advanced Network Socket error" "Advanced Network Send error" "Advanced Network Send error - no data sent" "Advanced Network Receive error" "Advanced Network Receive error - no data received" Added either activity trace 1 or trace 2 logging for each of the errors, with additional information where available. - Added additional Serial port activity trace 2 logging. Including the logging of all transmit buffer data when the /B command line is used. Release 5.1 build 1000 WIN32 release 27/March/2006 (not a public release) Added the following features: - Create the log file directory specified in the Logging Options if it does not exist. - Condense the Advanced Network Test log files to one log file per IP address per script run, when run from a script. - Added an option to summarize duplicate errors in the log file. - Color coded errors based on severity in the Detailed event log Window and the HTML log file. - Added an option to only create a log file when BurnIn actually runs a test as opposed to every time BurnIn is executed. - Added a warning if a test thread completes with 0 cycles and 0 operations. - In the results summary html file, inserted more spacing between the 揘otes? and 揇etailed Event Log? - Changed the Activity Trace file format to be the same as the log file, ie. text or HTML, rather than always text. - The 2D 揝crolling H抯?test will now display across multiple screens/displays ?i.e. all active displays. - A threshold has been added for the 揷orrupt header ?packet discarded?event in the advanced network options so that a 揊ail?is not produced when that is the only thing that produces errors. - Added looping capability in scripting. LOOP n { ? } where n is the number of times to repeat the commands in the brackets. - Corrected a bug where PASS could be displayed if the Advanced Network test was the only test running, but it failed. Release 5.0 build 1001 WIN32 release 9/March/2006 - Corrected a bug where Network directory paths were not accepted, eg. for the log file name and post test application file name. - The CPU maths test has been improved to better load up all CPU's. Previously BurnInTest started a maths test thread per physical CPU package. BurnInTest has been changed to start a maths test thread per CPU (= num. physical CPU packages x num. CPU cores x num. logical CPUs). - The CPU preferences have been changed to allow the CPU maths test to be locked to any CPU (ie. select a CPU from a list of CPU's where the number of CPU's = num. physical CPU packages x num. CPU cores x num. logical CPUs). - The Parallel and Serial port error message have been modified in the case where a test plug may not have been connected to indicate that the user should check this. - Corrected a bug where a licenced version could display the message "[limited evaluation version]" Release 5.0 build 1000 WIN32 release 24/February/2006 WIN64 release 24/February/2006 NEW TESTS & IMPROVEMENTS TO EXISTING TESTS BurnInTest Standard and Professional versions. - Added a customer style results certificate. This will save the log file in HTML format but from the perspective of a end customer. This report style can be tailored by the user (through changing an HTML template). - An MP3 playback test has been added to the Sound test. - A color printer test has been added. - A new post test option to allow the results to be printed automatically at the end of a test has been added. - Added new Post-test action options of: - Optionally allow the user to "run an external program & exit" after BIT has been manually stopped. Modify the $RESULT variable to "PASS (manual abort)" or "FAIL (manual abort)" for this case. - Allow the results window to be displayed for all post test options (except Reboot). - Added new Pre-test actions to allow an external application to be run and have BIT wait for the application to exit. On continuing, BIT will run the subscript file (of scripting commands) if it has been created. - Changed the manual Stop buttons, to abort the running of a script (rather than just the current test). BurnInTest Professional specific. - Added a "Plugin" test that allows users to develop their own BurnInTest test modules for specialized hardware. Three external plugins may be specified at once. - A Modem test has been added to BurnInTest as a Plugin. PassMark's ModemTest Version V1.3 (latest build) is required. - A KeyBoard Test has been added to BurnInTest as a Plugin. PassMark's KeyboardTest Version V2.2 (latest build) is required. - A Firewire Test has been added to BurnInTest as a Plugin. PassMark's free Firewire plugin is required and a "Kanguru FireFlash" drive is required. - A new advanced network test has been added. BurnInTest Professional only. - The Memory test now allows the user to specify the type of test pattern to be used. - Testing with the USB 2.0 Loopback plug has been improved. When used with USB 2.0 Loopback device driver V2.0.1002, error details will now be reported for: CRC error reported by USB Host controller BIT STUFF error reported by USB Host controller DATA TOGGLE MISMATCH error reported by USB Host controller STALL PID error reported by USB Host controller DEVICE NOT RESPONDING error reported by USB Host controller PID CHECK FAILURE error reported by USB Host controller UNEXPECTED PID error reported by USB Host controller DATA OVERRUN error reported by USB Host controller DATA UNDERRUN error reported by USB Host controller BUFFER OVERRUN error reported by USB Host controller BUFFER UNDERRUN error reported by USB Host controller NOT ACCESSED error reported by USB Host controller FIFO error reported by USB Host controller TRANSACTION (XACT) ERROR reported by USB Host controller BABBLE DETECTED error reported by USB Host controller DATA BUFFER ERROR reported by USB Host controller In the case of these errors, BurnInTest will re-attempt the operation. The user can set the Error reporting to be skipped for the initial recovery attempt. IMPROVEMENTS TO TESTING FACILITIES - Added a disk autoconfig, such that when tests are started, the disk drives and settings will be defaults to all disks (exc. CD/DVD). This may be useful when testing multiple systems with different hard disk drive letters. - Store the position of the Main window on exiting BurnInTest. On starting BurnInTest, position the main window as saved; on starting tests, position the test windows as saved. - Allow a "drag & drop" of the Configuration file directly on the BurnInTest program icon. - Allow testing 99.5% to 100% of disk, instead of 94%, for disks that do not contain the Windows directory and do not contain a swap file. - Added the ability to log interim results, which may be useful for unstable systems. - AMD and Intel Dual core reporting added. - New L2 CPU cache sizes added to reports. - CPU support for SSE3, DEP and PAE added to reports. - Shortcut of "F1" for contextual help added to all Windows. - Improve the flexibility in specifying the EXECUTEWAIT scripting command for sleeper. - Updated logging header information with the hard and optical drive model. - The 2D and 3D tests have been updated to use DirectX 9.0c. - User interface updated. - The HTML report format has been improved. - The BurnInTest configuration file extension has been renamed from .cfg to use .bitcfg, to ensure the configuration file is associated with BurnInTest. - An error message indicating that accumulated log files are not supported when run from CD or DVD has been added. - To allow smaller test files with very large disks, the minimum disk test file size has been reduced from 0.1% to 0.01% of the disk space. - Log events were previously shown as "INFORMATION" if they were low level errors, or simply additional information (not errors). "INFORMATION" now refers to a low level error, and "LOG NOTE" now refers to additional information (that is not in the error count). - Improved the specific detail of the Serial Port errors detected. BurnInTest now reports framing errors, buffer overrun errors, input buffer overflow errors, parity errors and Transmit buffer full errors as specific error messages (rather than a broader error description). - Added the /k command line so the user can specify not to delete HDD test files if an error occurs. - Increased Activity trace level 1 error logging for Serial port testing. - Increased Activity trace level 1 error logging for Hyper threading detection. - Bundled a new version of the Rebooter program. - Improved the Serial port error logging (displaying baud rate) and increased Activity trace level 1 error logging (displaying erroneous data). - Modified the Window sizes to help improve navigation on smaller displays (i.e. 640x480). - The CPU load for the Standard and Torture RAM tests has been made more linear with the duty cycle setting. Note: This means that compared to the previous build of BurnInTest, less RAM test operations will be run per second (when the duty cycle is less than 100). - Additional debug code and very minor changes in the Loopback sound test. - The Post test option of "Run external application and exit" has been modified such that if no external file is specified, this Post test option will just exit BurnInTest. - Allowed the full range of PassMark USB1 loopback plugs to be used with BurnInTest Professional. - Added additional Activity Trace level 2 logging. - The delay inserted between packets in the USB2 test, when the duty cycle is less than 50, has been changed from at least 1ms to at least 1ms to 50ms (for a Duty Cycle of 49 down to 0). - The subscript commands to configure BurnInTest from an external application (i.e. specified in the bit-script-input.txt file and run by specifying either a pre-test or EXECUTEWAIT application) has been changed to allow "LOAD" commands (in addition to "SET" scripting commands). - Renamed the "Error" log to "Event" log. - Changed the order of the items in an Event log line, such that the Severity is the first item. - The EXECUTEWAIT script command has been modified such that the external application may provide an input script file (of SET... commands) to be run after the EXECUTEWAIT application closes. This allows external applications to define test environment parameters (such as the serial number and machine type). - Added scripting commands: SETSERIAL "1234-shdfgdhs-GHGHG" SETMACHINETYPE "HP XPS800" SETNOTES "Test notes defined by the external application." SETLOG "\Program Files\Plugin\plugin_log" SETPLUGIN "\Program Files\Plugin\plugin.exe" - Added POST TEST application parameter substitution to allow values to be passed to an external application at the end of a test. These are: $RESULT - "PASS" or "FAIL" will be substituted. $SERIAL - The serial number will be substituted. $MACHINETYPE - The machine type will be substituted. $NOTES - The notes will be substituted. - Added extra logging for memory allocation errors in the disk test - Added "log bad sector increase" and "bad sector threshold" options to disk test. This resulted in a change to the configuration file format and required additional code to automatically convert from old formats. - Modified the user interface in the preferences window for the disk test and the CD test - Improved the handling of USB 2.0 loopback plugs recovery from sleep states. BUG CORRECTIONS - Corrected a bug where the System and Application events logged in the BurnInTest Trace logs were wrong if the event log had reached its maximum size. - Checks that the Sound test files (WAV and MIDI) exist have been added. - The continuous auto updating of the USB image (USB Loopback plug vs. USB 2.0 Loopback plug) on the main window has been removed. This is now updated on BIT startup, selecting Refresh in USB preferences or on starting a test. If there is a serious USB problem, this (together with the USB 2.0 Loopback device driver, V2.0.1002) will avoid the possibility of BurnInTest locking up. - Corrected a bug with the Butterfly seek mode of the Disk test. This was found to occur with FAT32 disks where the Cylinder size was relatively small and the Sector size relatively large. - Reset Defaults on the Configuration Page now resets the Auto Stop Value. - Reset Defaults on the Configuration Page now resets the color indicators. - The CD test has been modified to skip invalid files either with "?"'s , to avoid reporting errors that are due to the CD test media filenames. - The Network test results window scroll bar has been corrected. - The Memory torture test could fail on some systems with a small amount of RAM and relatively high memory fragmentation. This has been corrected. - Scripting correction for .cmd files. - Corrected a bug that caused problems when running the disk test with SMART monitoring turned on. This problem only occurs on a small number of HDD's. - Corrected memory leaks - On occasion, the measured waveform from the loopback sound test may have been slightly altered on starting or stopping all tests, possibly enough to trigger an error. This has been resolved. - If an error occurred in the final second of a test, the error may have been logged but not included in the big PASS/FAIL results window. This has been corrected. - After running a script file that loaded a configuration file, that had a full path specified, the Save and Load configuration menu options no longer worked. This has been corrected. - Previously, the Version of BurnInTest was only written in the First log file after starting BurnInTest. This log line is now written in all log files. - For USB2 tests that have read or write failures, the Windows error codes are now included in the level 2 Activity trace log. - Command line parameters may now be passed to a PreTest application. - Log files may now use a single static filename. This may be useful when the log file is to be parsed by an external program. - Corrected a bug where the Plugin test would stop prematurely. - Corrected the specification of the Scripting EXECUTEWAIT filename. - Changed Script processing such that a script is aborted if a scripting error is encountered and Stop on error is selected. - Added an indication on the main window that a script is currently running ("Script currently running"). - Corrected the serial port test to identify non-existing plugs when the Disable RTS/CTS and DSR/DTR testing has been selected. - Corrected the display of strange results (666666) reported by a user, related to copy protection. - Fixed a memory leak bug in the MBM interface which caused memory allocation errors. - Added BIT version number to the ASCII log file. - Fixed a bug with the 3D Test that was causing it to stop before the autostop timer period - Changed an error in the tape drive test to a warning if tape drive doesn't support setting drive parameters. History of earlier releases: Please see http://passmark.com/products/bit_history.htm Documentation ============= All the documentation is included in the help file. It can be accessed from the help menu. There is also a PDF format Users guide available for download from the PassMark web site. Support ======= For technical support, questions, suggestions, please check the help file for our email address or visit our web page at http://www.passmark.com Ordering / Registration ======================= All the details are in the help file documentation or you can visit our sales information page http://www.passmark.com/sales Compatibility issues with the Network & Parallel Port Tests =========================================================== If you are running Windows 2000 or XP, you need to have administrator privileges to run this test. Enjoy.. The PassMark Development team
调通sina33下的AP6212A0(WIFI+BT) 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/26 11:01 版本:V1.1 本文参照: 《A33 wifi移植说明书.pdf》 还有就是全志R16的parrotv1.1的官方SDK(Android4.4.2) 1、打开AP6212的BT,关闭rtl8723bs的BT: [ 3.141273] Bluetooth: HCI UART driver ver 2.2 [ 3.146210] Bluetooth: HCI H4 protocol initialized [ 3.151563] Bluetooth: HCI BCSP protocol initialized [ 3.157154] usbcore: registered new interface driver btusb [ 3.163282] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 3.169599] Bluetooth: BlueSleep Mode Driver Ver 1.1 [ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] Bluetooth: RFCOMM ver 1.11 [ 3.968340] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.968638] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 3.968734] [mmc]: mclk 0xf1c20090 0xc100000b [ 3.989421] Bluetooth: BNEP filters: protocol multicast [ 3.995242] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 4.001921] L2TP core driver, V2.0 [ 4.005706] PPPoL2TP kernel driver, V2.0 [ 4.010070] L2TP IP encapsulation support (L2TPv3) [ 4.015468] L2TP netlink interface [ 4.019264] L2TP ethernet pseudowire support (L2TPv3) [ 4.023860] [mmc]: sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing MMC-HS(SDR20) dt B [ 4.023929] [mmc]: mclk 0xf1c20090 0xc100000b [ 4.040272] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 4.048780] ThumbEE CPU extension supported. [ 4.053550] Registering SWP/SWPB emulation handler [ 4.059269] [rfkill]: rfkill set power 1 [ 4.063652] gpio ap6xxx_bt_regon set val 0, act val 0 正常启动的BT加载: [ 3.207764] Bluetooth: HCI UART driver ver 2.2 [ 3.212725] Bluetooth: HCI H4 protocol initialized [ 3.218045] Bluetooth: HCI BCSP protocol initialized [ 3.223671] usbcore: registered new interface driver btusb [ 3.229766] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 3.236243] Bluetooth: MSM Sleep Mode Driver Ver 1.2 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r$ ll rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/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 Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. evb 1. maple 2. redwood 3. y2 4. y3 Choice: 4 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd linux-3.4/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ make ARCH=arm menuconfig [*] Networking support ---> <*> Bluetooth subsystem support ---> Bluetooth device drivers ---> < > Broadcom Bluetooth Low Power Manager Support <*> Realtek Bluesleep driver support 修改为: <*> Broadcom Bluetooth Low Power Manager Support < > An inverter between bt hostwake pin and cpu (NEW) < > Realtek Bluesleep driver support 2、(这个不修改:) R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\overlay\frameworks\base\core\res\res\values\config.xml <!-- List of regexpressions describing the interface (if any) that represent tetherable Wifi interfaces. If the device doesn't want to support tethering over Wifi this should be empty. An example would be "softap.*" --> <string-array translatable="false" name="config_tether_wifi_regexs"> <item>"wlan0"</item> </string-array> <!-- List of regexpressions describing the interface (if any) that represent tetherable bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this should be empty. --> <!-- default: disable Bluetooth PAN feature --> <string-array translatable="false" name="config_tether_bluetooth_regexs"> <item>"bt-pan"</item> </string-array> 3、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\astar_y3.mk # ap6181/6210/6330 sdio wifi fw and nvram #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6181/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6210/device-bcm.mk) $(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6212/device-bcm.mk) #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6330/device-bcm.mk) #rtl8723bs bt fw and config #$(call inherit-product, hardware/realtek/bluetooth/rtl8723bs/firmware/rtlbtfw_cfg.mk) # camera config for camera detector #PRODUCT_COPY_FILES += \ # device/softwinner/astar-y3/hawkview/sensor_list_cfg.ini:system/etc/hawkview/sensor_list_cfg.ini #add gms features #PRODUCT_COPY_FILES += \ # frameworks/native/data/etc/android.hardware.faketouch.xml:system/etc/permissions/android.hardware.faketouch.xml \ # frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ # frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml # 3G Data Card Packages #PRODUCT_PACKAGES += \ # u3gmonitor \ # chat \ # rild \ # pppd # 3G Data Card Configuration Flie #PRODUCT_COPY_FILES += \ # device/softwinner/polaris-common/rild/ip-down:system/etc/ppp/ip-down \ # device/softwinner/polaris-common/rild/ip-up:system/etc/ppp/ip-up \ # device/softwinner/polaris-common/rild/3g_dongle.cfg:system/etc/3g_dongle.cfg \ # device/softwinner/polaris-common/rild/usb_modeswitch:system/bin/usb_modeswitch \ # device/softwinner/polaris-common/rild/call-pppd:system/xbin/call-pppd \ # device/softwinner/polaris-common/rild/usb_modeswitch.sh:system/xbin/usb_modeswitch.sh \ # device/softwinner/polaris-common/rild/apns-conf_sdk.xml:system/etc/apns-conf.xml \ # device/softwinner/polaris-common/rild/libsoftwinner-ril.so:system/lib/libsoftwinner-ril.so #PRODUCT_COPY_FILES += \ # device/softwinner/polaris-common/rild/init.3gdongle.rc:root/init.sunxi.3gdongle.rc # 3G Data Card usb modeswitch File #PRODUCT_COPY_FILES += \ # $(call find-copy-subdir-files,*,device/softwinner/polaris-common/rild/usb_modeswitch.d,system/etc/usb_modeswitch.d) PRODUCT_PROPERTY_OVERRIDES += \ ro.sw.embeded.telephony = false PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.timezone=Asia/Shanghai \ persist.sys.language=zh \ persist.sys.country=CN PRODUCT_PACKAGES += Bluetooth #PRODUCT_PROPERTY_OVERRIDES += \ # ro.product.8723b_bt.used=true #GPS Feature #PRODUCT_PACKAGES += gps.polaris #BOARD_USES_GPS_TYPE := simulator #PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml # evb logger PRODUCT_COPY_FILES += \ device/softwinner/astar-y3/tools/logger.sh:system/bin/logger.sh PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mass_storage,adb \ ro.adb.secure=0 ro.udisk.lable=Polaris \ ro.font.scale=1.0 \ ro.hwa.force=false \ rw.logger=0 \ ro.sys.bootfast=true \ debug.hwc.showfps=0 \ debug.hwui.render_dirty_regions=false #ro.sys.storage_type = emulated \ #for gms #PRODUCT_PROPERTY_OVERRIDES += \ # ro.sys.mutedrm=true \ # ro.adb.secure=1 PRODUCT_PROPERTY_OVERRIDES += \ ro.sf.lcd_density=213 \ ro.product.firmware=v2.0 $(call inherit-product-if-exists, device/softwinner/astar-y3/modules/modules.mk) DEVICE_PACKAGE_OVERLAYS := device/softwinner/astar-y3/overlay PRODUCT_CHARACTERISTICS := tablet # Overrides PRODUCT_AAPT_CONFIG := xlarge hdpi xhdpi large PRODUCT_AAPT_PREF_CONFIG := xhdpi PRODUCT_BRAND := Allwinner PRODUCT_NAME := astar_y3 PRODUCT_DEVICE := astar-y3 PRODUCT_MODEL := QUAD-CORE A33 y3 PRODUCT_MANUFACTURER := softwinner #include device/softwinner/polaris-common/prebuild/google/products/gms_base.mk 4、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\BoardConfig.mk # wifi and bt configuration # 1. Wifi Configuration # 1.1 realtek wifi support # 1.1 realtek wifi configuration #BOARD_WIFI_VENDOR := realtek ifeq ($(BOARD_WIFI_VENDOR), realtek) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl SW_BOARD_USR_WIFI := rtl8188eu BOARD_WLAN_DEVICE := rtl8188eu #SW_BOARD_USR_WIFI := rtl8723au #BOARD_WLAN_DEVICE := rtl8723au #SW_BOARD_USR_WIFI := rtl8723bs #BOARD_WLAN_DEVICE := rtl8723bs endif # 1.2 broadcom wifi support BOARD_WIFI_VENDOR := broadcom ifeq ($(BOARD_WIFI_VENDOR), broadcom) BOARD_WPA_SUPPLICANT_DRIVER := NL80211 WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd BOARD_WLAN_DEVICE := bcmdhd WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path" #SW_BOARD_USR_WIFI := AP6181 #SW_BOARD_USR_WIFI := AP6210 #WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm40181a2.bin" #WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm40181a2_p2p.bin" #WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm40181a2_apsta.bin" # 2017/6/21 15:11 wenyuanbo configure ap6212 use ap6210 SW_BOARD_USR_WIFI := AP6212 WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm43438a0.bin" WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm43438a0_p2p.bin" WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm43438a0_apsta.bin" #SW_BOARD_USR_WIFI := AP6330 #WIFI_DRIVER_FW_PATH_STA := "/system/vendor/modules/fw_bcm40183b2_ag.bin" #WIFI_DRIVER_FW_PATH_P2P := "/system/vendor/modules/fw_bcm40183b2_ag_p2p.bin" #WIFI_DRIVER_FW_PATH_AP := "/system/vendor/modules/fw_bcm40183b2_ag_apsta.bin" endif #1.3 eag wifi config #BOARD_WIFI_VENDOR := eagle ifeq ($(BOARD_WIFI_VENDOR), eagle) WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WPA_SUPPLICANT_DRIVER := NL80211 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_eagle BOARD_HOSTAPD_DRIVER := NL80211 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_eagle SW_BOARD_USR_WIFI := esp8089 BOARD_WLAN_DEVICE := esp8089 endif # 2. Bluetooth Configuration # make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor BOARD_HAVE_BLUETOOTH := true BOARD_HAVE_BLUETOOTH_BCM := true #SW_BOARD_HAVE_BLUETOOTH_NAME := ap6210 SW_BOARD_HAVE_BLUETOOTH_NAME := ap6212 #SW_BOARD_HAVE_BLUETOOTH_NAME := ap6330 #BOARD_HAVE_BLUETOOTH_RTK := true #BLUETOOTH_HCI_USE_RTK_H5 := true #SW_BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs 5、 R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\init.sun8i.rc on early-fs mount_all /fstab.sun8i setprop ro.crypto.fuse_sdcard true insmod /system/vendor/modules/disp.ko insmod /system/vendor/modules/lcd.ko insmod /system/vendor/modules/mali.ko insmod /system/vendor/modules/leds-sunxi.ko insmod /system/vendor/modules/bcmdhd.ko insmod /system/vendor/modules/bcm_btlpm.ko #2G or 3G init.rc # import init.sunxi.3gdongle.rc ## 1. realtek & eagle wifi service ## 1.1 realtek & eagle wifi sta service #service wpa_supplicant /system/bin/wpa_supplicant \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -O/data/misc/wifi/sockets \ # -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # # we will start as root and wpa_supplicant will switch to user wifi # # after setting up the capabilities required for WEXT # # user wifi # # group wifi inet keystore # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # ## 1.2 realtek & eagle wifi sta p2p concurrent service #service p2p_supplicant /system/bin/wpa_supplicant \ # -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ # -e/data/misc/wifi/entropy.bin -N \ # -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ # -O/data/misc/wifi/sockets \ # -g@android:wpa_wlan0 # class main # socket wpa_wlan0 dgram 660 wifi wifi # disabled # oneshot # 2. broadcom wifi service # 2.1 broadcom wifi station and softap service wpa_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/system/etc/wifi/wpa_supplicant_overlay.conf \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT # user wifi # group wifi inet keystore class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot # 2.2 broadcom wifi sta p2p concurrent service service p2p_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/system/etc/wifi/wpa_supplicant_overlay.conf \ -O/data/misc/wifi/sockets -N \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -I/system/etc/wifi/p2p_supplicant_overlay.conf \ -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ -g@android:wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT # user wifi # group wifi inet keystore class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot 6、(不需要修改) R:\wyb\ap6212a0_a33_sc3817r\android\device\softwinner\astar-y3\ueventd.sun8i.rc 7、 R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\packages\SettingsProvider\res\values\defaults.xml <integer name="def_screen_off_timeout">1800000</integer> <bool name="def_lockscreen_disabled">true</bool> 8、 R:\wyb\ap6212a0_a33_sc3817r\android\frameworks\base\services\java\com\android\server\BatteryService.java // private static final boolean DEBUG = false; private static final boolean DEBUG = true; private void sendIntentLocked() { // Pack up the values and broadcast them to everyone final Intent intent = new Intent(Intent.ACTION_BATTERY_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_REPLACE_PENDING); int icon = getIconLocked(mBatteryProps.batteryLevel); intent.putExtra(BatteryManager.EXTRA_STATUS, mBatteryProps.batteryStatus); intent.putExtra(BatteryManager.EXTRA_HEALTH, mBatteryProps.batteryHealth); intent.putExtra(BatteryManager.EXTRA_PRESENT, mBatteryProps.batteryPresent); //intent.putExtra(BatteryManager.EXTRA_LEVEL, mBatteryProps.batteryLevel); intent.putExtra(BatteryManager.EXTRA_LEVEL, 100); intent.putExtra(BatteryManager.EXTRA_SCALE, BATTERY_SCALE); intent.putExtra(BatteryManager.EXTRA_ICON_SMALL, icon); intent.putExtra(BatteryManager.EXTRA_PLUGGED, mPlugType); //intent.putExtra(BatteryManager.EXTRA_VOLTAGE, mBatteryProps.batteryVoltage); intent.putExtra(BatteryManager.EXTRA_VOLTAGE, 4200); intent.putExtra(BatteryManager.EXTRA_TEMPERATURE, mBatteryProps.batteryTemperature); intent.putExtra(BatteryManager.EXTRA_TECHNOLOGY, mBatteryProps.batteryTechnology); intent.putExtra(BatteryManager.EXTRA_INVALID_CHARGER, mInvalidCharger); if (DEBUG) { Slog.d(TAG, "2016/12/05 10:41 wenyuanbo **** Sending ACTION_BATTERY_CHANGED. level:" + mBatteryProps.batteryLevel + ", scale:" + BATTERY_SCALE + ", status:" + mBatteryProps.batteryStatus + ", health:" + mBatteryProps.batteryHealth + ", present:" + mBatteryProps.batteryPresent + ", voltage: " + mBatteryProps.batteryVoltage + ", temperature: " + mBatteryProps.batteryTemperature + ", technology: " + mBatteryProps.batteryTechnology + ", AC powered:" + mBatteryProps.chargerAcOnline + ", USB powered:" + mBatteryProps.chargerUsbOnline + ", Wireless powered:" + mBatteryProps.chargerWirelessOnline + ", icon:" + icon + ", invalid charger:" + mInvalidCharger); } mHandler.post(new Runnable() { @Override public void run() { ActivityManagerNative.broadcastStickyIntent(intent, null, UserHandle.USER_ALL); } }); } 9、(直接拷贝同目录下的ap6210:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\conf\softwinner\ap6212\Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := bt_vendor.conf LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/bluetooth LOCAL_MODULE_TAGS := eng LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\conf\softwinner\ap6212\bt_vendor.conf # UART device port where Bluetooth controller is attached UartPort = /dev/ttyS1 # Firmware patch file location FwPatchFilePath = /system/vendor/modules/ # Firmware Name FwPatchFileName = bcm43438a0.hcd 10、新增:vnd_astar-y3-ap6212.txt,直接拷贝:vnd_astar-y2-ap6210.txt R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\include\vnd_astar-y3-ap6212.txt R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\include\vnd_astar-y2-ap6210.txt BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1" FW_PATCHFILE_LOCATION = "/system/vendor/modules/" LPM_IDLE_TIMEOUT_MULTIPLE = 5 UART_TARGET_BAUD_RATE = 1500000 BT_WAKE_VIA_PROC = TRUE #LPM_SLEEP_MODE = FALSE BTVND_DBG = TRUE BTHW_DBG = TRUE VNDUSERIAL_DBG = TRUE UPIO_DBG = TRUE 11、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\src\userial_vendor.c //#ifdef USE_AP6210_BT_MODULE #if defined(USE_AP6210_BT_MODULE) || defined(USE_AP6212_BT_MODULE) /* PATCH for AP6210. Will detect CTS(module side) to select transport mode*/ ALOGE("userial vendor open: USE AP6210 BT MODULE."); usleep(100000); close(vnd_userial.fd); if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1) { ALOGE("userial vendor open: unable to open %s", vnd_userial.port_name); return -1; } #endif //USE_AP6210_BT_MODULE 12、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\Android.mk ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) LOCAL_CFLAGS += -DUSE_AP6210_BT_MODULE endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) LOCAL_CFLAGS += -DUSE_AP6212_BT_MODULE endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6330) include $(LOCAL_PATH)/conf/softwinner/ap6330/Android.mk endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) include $(LOCAL_PATH)/conf/softwinner/ap6210/Android.mk endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) include $(LOCAL_PATH)/conf/softwinner/ap6212/Android.mk endif 13、 R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\libbt\vnd_buildcfg.mk ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6210) SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix -ap6210.txt,$(basename $(TARGET_DEVICE)))) endif ifeq ($(SW_BOARD_HAVE_BLUETOOTH_NAME), ap6212) SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix -ap6212.txt,$(basename $(TARGET_DEVICE)))) endif 14、(这些AP6212的WIFI的bin文件和BT的hcd文件来自全志R16的SDK,当然也可以找正基原厂/代理商索取:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\bcm43438a0.hcd (根据ap6210修改:) R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\device-bcm.mk # # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ######################## -include hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk PRODUCT_COPY_FILES += \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0.bin:system/vendor/modules/fw_bcm43438a0.bin \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0_apsta.bin:system/vendor/modules/fw_bcm43438a0_apsta.bin \ hardware/broadcom/wlan/firmware/ap6212/fw_bcm43438a0_p2p.bin:system/vendor/modules/fw_bcm43438a0_p2p.bin \ hardware/broadcom/wlan/firmware/ap6212/nvram_ap6210.txt:system/vendor/modules/nvram_ap6210.txt \ hardware/broadcom/wlan/firmware/ap6212/bcm43438a0.hcd:system/vendor/modules/bcm43438a0.hcd #hardware/broadcom/wlan/firmware/ap6212/config.txt:system/vendor/modules/config.txt ######################## R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0_apsta.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\fw_bcm43438a0_p2p.bin R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\nvram_ap6212.txt 直接拷贝自nvram_ap6212.txt: R:\wyb\ap6212a0_a33_sc3817r\android\hardware\broadcom\wlan\firmware\ap6212\nvram_ap6210.txt 15、(可选修改:) R:\wyb\ap6212a0_a33_sc3817r\android\packages\apps\Camera2\src\com\android\camera\CameraActivity.java private BroadcastReceiver mBatteryInfoReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (Intent.ACTION_BATTERY_CHANGED.equals(action)) { int Level = intent.getIntExtra("level", 0); int Scale = intent.getIntExtra("scale", 100); Log.w(TAG, "2016/11/29 19:54 &&&& wenyuanbo battery Level" + Level); /* *Logic: *1.the battery level is lower then 5%. *2.if in camera, make sure that not in the snapshot progress. *3.if in videocamera, make sure that not in the videorecording progress. *4.everytime starting the camera activity, the battery level is broadcasted, * if meeting the conditions above, give a dialog, press it and finish the activity. *5.if the conditions are not satisfied when started, play for a moment, in the camera acitvity * or video camera activity, the conditiosn are satisfied, also give a dialog for finishing the activity. * *by fuqiang. */ if(Level < 5) { Runnable runnable_close_camera = new Runnable() { @Override public void run() { //close the camera. // CameraActivity.this.finish(); } }; Log.w(TAG, "2016/11/29 18:20 **** wenyuanbo battery Level" + Level); showLocationDialog(); } /* *Logic: *1.the battery level is lhigher then 5% and lower than 15%. *2.if in camera, make sure that not in the snapshot progress. *3.if in videocamera, make sure that not in the videorecording progress. *4.whether in camera or in videocamera, make sure that the flash mode is supported. *5.everytime starting the camera activity, the battery level is broadcasted, * if meeting the conditions above, forbidden the flash(gray icon), give a dialog to notise user. *6.if the conditions are not satisfied when started, play for a moment, in the camera acitvity * or video camera activity, the conditiosn are satisfied, forbidden the flash and give a notice dialog. *7.the dialog is only given once for each camera activity starting. * *by fuqiang. */ else if(Level < 16) { //close the flash mode. /* if (mIsLowBatteryDialogShown == false) { mRotateDialog.showAlertDialog( getString(R.string.warning), getString(R.string.low_battery_15), null, null, getString(R.string.close), null); mIsLowBatteryDialogShown = true; } */ } } } }; 16、(可选:) R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\default\env.cfg bootdelay=3 loglevel=8 17、 R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\y3\sys_config.fex [power_sply] dcdc1_vol = 3000 dcdc2_vol = 1100 dcdc3_vol = 1200 dcdc4_vol = 0 dcdc5_vol = 1500 aldo1_vol = 3300 aldo2_vol = 2500 aldo3_vol = 3000 dldo1_vol = 3300 dldo2_vol = 3300 dldo3_vol = 2800 ;gpio0_vol = 2800 ldoio0_vol = 2800 ;---------------------------------------------------------------------------------- ;uart configuration ;uart_used = uart x enable ;uart_type = 2:2 wire,4:4 wire,8:8 wire, full function ;---------------------------------------------------------------------------------- [uart0] uart_used = 1 uart_port = 0 uart_type = 2 uart_tx = port:PF02<3><1><default><default> uart_rx = port:PF04<3><1><default><default> [uart1] uart_used = 1 uart_port = 1 uart_type = 4 uart_tx = port:PG06<2><1><default><default> uart_rx = port:PG07<2><1><default><default> uart_rts = port:PG08<2><1><default><default> uart_cts = port:PG09<2><1><default><default> [uart2] uart_used = 1 uart_type = 4 uart_tx = port:PB00<2><1><default><default> uart_rx = port:PB01<2><1><default><default> uart_rts = port:PB02<2><1><default><default> uart_cts = port:PB03<2><1><default><default> [uart3] uart_used = 0 uart_type = 4 uart_tx = port:PH06<3><1><default><default> uart_rx = port:PH07<3><1><default><default> uart_rts = port:PH08<3><1><default><default> uart_cts = port:PH09<3><1><default><default> [uart4] uart_used = 0 uart_port = 4 uart_type = 2 uart_tx = port:PA04<2><1><default><default> uart_rx = port:PA05<2><1><default><default> uart_rts = port:PA06<2><1><default><default> uart_cts = port:PA07<2><1><default><default> ;---------------------------------------------------------------------------------- ;capacitor tp configuration ;ctp_twi_id : twi controller ID ;ctp_twi_addr : I2C slave address, 7bit ;ctp_screen_max_x/_y : resolution of touch panel ;ctp_revert_x/_y_flag : whether need to revert x/y ;ctp_exchange_x_y_flag: whether need to exchange the value of x and y ;ctp_int_port : port for tp's interrupt signal ;ctp_wakeup : port for wakeup tp ;---------------------------------------------------------------------------------- [ctp_para] ctp_used = 1 ctp_name = "gt82x" ctp_twi_id = 0 ctp_twi_addr = 0x5d ctp_screen_max_x = 1280 ctp_screen_max_y = 800 ctp_revert_x_flag = 1 ctp_revert_y_flag = 1 ctp_exchange_x_y_flag = 1 ctp_int_port = port:PL04<4><default><default><default> ctp_wakeup = port:PL03<1><default><default><1> ctp_power_ldo = ctp_power_ldo_vol = ctp_power_io = ;-------------------------------------------------------------------------------- ; CTP automatic detection configuration ;ctp_detect_used --- Whether startup automatic inspection function. 1:used,0:unused ;Module name postposition 1 said detection, 0 means no detection. ;-------------------------------------------------------------------------------- [ctp_list_para] ctp_det_used = 1 ft5x_ts = 1 gt82x = 1 gslX680 = 1 gslX680new = 0 gt9xx_ts = 1 gt9xxf_ts = 0 tu_ts = 0 gt818_ts = 1 zet622x = 1 aw5306_ts = 1 icn83xx_ts = 0 [lcd0_para] lcd_used = 1 lcd_driver_name = "default_lcd" lcd_if = 3 lcd_x = 1280 lcd_y = 800 lcd_width = 150 lcd_height = 94 lcd_dclk_freq = 71 lcd_pwm_used = 1 lcd_pwm_ch = 0 lcd_pwm_freq = 50000 lcd_pwm_pol = 1 lcd_hbp = 20 lcd_ht = 1418 lcd_hspw = 10 lcd_vbp = 10 lcd_vt = 830 lcd_vspw = 5 lcd_lvds_if = 0 lcd_lvds_colordepth = 1 lcd_lvds_mode = 0 lcd_frm = 1 lcd_gamma_en = 0 lcd_bright_curve_en = 0 lcd_cmap_en = 0 deu_mode = 0 lcdgamma4iep = 22 smart_color = 90 lcd_bl_en = port:PD13<1><0><default><1> ;ap6xxx_wl_regon = port:PL06<1><default><default><0> ;lcd_bl_en = port:PL06<1><0><default><1> lcd_power = "axp22_dc1sw" lcdd0 = port:PD18<3><0><default><default> lcdd1 = port:PD19<3><0><default><default> lcdd2 = port:PD20<3><0><default><default> lcdd3 = port:PD21<3><0><default><default> lcdd4 = port:PD22<3><0><default><default> lcdd5 = port:PD23<3><0><default><default> lcdd6 = port:PD24<3><0><default><default> lcdd7 = port:PD25<3><0><default><default> lcdd8 = port:PD26<3><0><default><default> lcdd9 = port:PD27<3><0><default><default> ;---------------------------------------------------------------------------------- ;pwm config ;---------------------------------------------------------------------------------- [pwm0_para] pwm_used = 0 pwm_positive = port:PH00<2><0><default><default> [pwm1_para] pwm_used = 1 pwm_positive = port:PH01<2><0><default><default> ;-------------------------------------------------------------------------------- ;wifi configuration ;wifi_sdc_id: 0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3 ;wifi_usbc_id: 0- USB0, 1- USB1, 2- USB2 ;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0) ;wifi_mod_sel: 0- none, 1- ap6181, 2- ap6210(wifi+bt), ; 3 - rtl8188eu, 4- rtl8723au(wifi+bt), ; 5 - rtl8723bs, 6- esp8089 ;-------------------------------------------------------------------------------- [wifi_para] wifi_used = 1 wifi_sdc_id = 1 wifi_usbc_id = 1 wifi_usbc_type = 1 wifi_mod_sel = 2 wifi_power = "axp22_dldo1" wifi_power_ext1 = "axp22_dldo2" wifi_power_ext2 = "axp22_aldo1" wifi_power_switch = ;wifi_power_switch = port:power0<1><0><default><0> ; 1 - ap6181 sdio wifi gpio config ;ap6xxx_wl_regon = port:PL06<1><default><default><0> ;ap6xxx_wl_host_wake = port:PL07<4><default><default><0> ;ap6xxx_lpo_use_apclk = 1 ; 2 - ap6210 sdio wifi gpio config ap6xxx_wl_regon = port:PL06<1><default><default><0> ;ap6xxx_wl_regon = port:PD13<1><default><default><0> ap6xxx_wl_host_wake = port:PL07<4><default><default><0> ap6xxx_bt_regon = port:PL08<1><default><default><0> ap6xxx_bt_wake = port:PL10<1><default><default><0> ap6xxx_bt_host_wake = port:PL09<4><default><default><0> ap6xxx_lpo_use_apclk = 1 ; 3 - rtl8188eu usb wifi gpio conifg ; 4 - rtl8723au usb wifi + bt ; 5 - rtl8723bs sdio wifi + bt ;rtl8723bs_chip_en = port:PL11<1><default><default><0> ;rtl8723bs_wl_regon = port:PL06<1><default><default><0> ;rtl8723bs_wl_host_wake = port:PL07<4><default><default><0> ;rtl8723bs_bt_regon = port:PL08<1><default><default><0> ;rtl8723bs_bt_wake = port:PL10<1><default><default><0> ;rtl8723bs_bt_host_wake = port:PL09<4><default><default><0> ;rtl8723bs_lpo_use_apclk = 0 ; 6 - eagle sdio wifi ;esp_wl_chip_en = port:PL03<1><default><default><0> ;esp_wl_rst = port:PL02<1><default><default><0> ;-------------------------------------------------------------------------------- ;blue tooth ;bt_used ---- blue tooth used (0- no used, 1- used) ;bt_uard_id ---- uart index ;-------------------------------------------------------------------------------- [bt_para] bt_used = 1 bt_uart_id = 1 power_start = 3 pmu_temp_enable = 0 18、 刷机之后,BT可以用。 传输4.5MB的JPG图片大概需要2分钟。 WIFI: 在设置→WLAN(打开之后): shell@astar-y3:/ $ shell@astar-y3:/ $ [ 469.609956] init: computing context for service '/system/bin/wpa_supplicant' [ 469.618386] init: starting 'p2p_supplicant' [ 469.625739] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010' [ 469.673379] init: waitpid returned pid 2065, status = 0000ff00 [ 469.679923] init: process 'p2p_supplicant', pid 2065 exited [ 476.197334] sndpcm_unmute,line:1099 [ 451.464755] CPU1: Booted secondary processor [ 478.459403] CPU1: shutdown [ 478.462947] [hotplug]: cpu(0) try to kill cpu(1) [ 478.468478] [hotplug]: cpu1 is killed! . shell@astar-y3:/ $ 分析启动的log: [ 17.526849] gpio ap6xxx_wl_regon set val 1, act val 1 [ 17.632508] [ap6xxx]: sdio wifi power state: on [ 17.637576] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.637751] =========== WLAN placed in POWER ON ======== [ 17.654651] [mmc]: sdc1 card_power_on start... [ 17.659576] [mmc]: sdc1 power_supply is null [ 17.664322] [mmc]: sdc1 card_power_on ok [ 17.680039] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.690275] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.772361] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 17.781309] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 17.789448] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.799714] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.862032] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.872262] [mmc]: mclk 0xf1c2008c 0x8002000e [ 17.933953] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !! [ 17.941997] *******************Try sdio******************* [ 17.948400] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 17.958630] [mmc]: mclk 0xf1c2008c 0x8002000e [ 18.027775] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 18.035416] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 18.043087] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 18.051920] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 18.145287] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 18.155436] [mmc]: mclk 0xf1c2008c 0x8002000e [ 18.215346] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 18.225736] [mmc]: mclk 0xf1c2008c 0x8100000b [ 18.285675] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 18.296021] [mmc]: mclk 0xf1c2008c 0x8140030b [ 18.357915] mmc1: new high speed SDIO card at address 0001 [ 18.364532] bcmsdh_register: Linux Kernel SDIO/MMC Driver [ 18.364575] *******************sdio init ok******************* [ 18.377207] bcm_wlan_get_oob_irq enter. [ 18.381537] gpio [359] map to virq [7] ok [ 18.388851] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 18.396019] dhdsdio_probe_attach: unsupported chip: 0xa9a6 [ 18.402155] dhdsdio_probe: dhdsdio_probe_attach failed [ 18.407899] bcmsdh_probe: device attach failed [ 18.412981] [ 18.412984] Dongle Host Driver, version 1.88.45.3 (r420671) [ 18.412989] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 12:06:39 [ 18.428835] dhd_module_init: sdio_register_driver timeout or error [ 18.435928] gpio ap6xxx_wl_regon set val 0, act val 0 [ 18.541549] [ap6xxx]: sdio wifi power state: off [ 18.546679] =========== WLAN placed in POWER OFF ======== [ 18.546915] mmc1: card 0001 removed [ 18.546995] [mmc]: mmc not poweroff notifiy [ 18.547007] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 18.547160] [mmc]: sdc1 card_power_off start... [ 18.547166] [mmc]: sdc1 power_supply is null [ 18.547173] [mmc]: sdc1 card_power_off ok [ 18.631655] init: command 'insmod' r=-1 [ 18.636066] init: command 'insmod' r=-1 [ 18.658010] fs_mgr: swapon failed for /dev/block/zram0 [ 18.663804] init: command 'swapon_all' r=-1 [ 18.668504] init: processing action 0x58e70 (console_init) [ 18.675396] init: width = 1280 [ 18.678788] init: height = 800 [ 18.682224] init: s.st_size = 3145728 [ 18.686308] init: logo match failed!fbsize = 4096000 [ 18.718811] init: command 'console_init' r=0 [ 18.723628] init: processing action 0x55bf0 (fs) [ 18.730640] init: command 'mkdir' r=-2 [ 18.741901] init: command 'insmod' r=0 [ 18.752227] init: command 'insmod' r=0 [ 18.756491] init: command 'insmod' r=-1 [ 18.771211] init: command 'insmod' r=0 [ 18.779731] init: command 'insmod' r=0 [ 18.791739] init: command 'insmod' r=0 [ 18.803941] init: command 'insmod' r=0 [ 18.816178] init: command 'insmod' r=0 19、查找:(dhdsdio_probe_attach: unsupported chip: 0xa9a6) rootroot@rootroot-E400:~$ cd wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "unsupported chip" . -R ./dhd_sdio.c: DHD_ERROR(("%s: unsupported chip: 0xx\n", ./sbutils.c: SI_ERROR(("sb_chip2numcores: unsupported chip 0x%x\n", 匹配到二进制文件 ./dhd_sdio.o 匹配到二进制文件 ./bcmdhd.o 匹配到二进制文件 ./bcmdhd.ko 匹配到二进制文件 ./sbutils.o rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ 经过确认: R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\dhd_sdio.c static bool dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva, uint16 devid) { …… bcmsdh_chipinfo(sdh, bus->sih->chip, bus->sih->chiprev); if (!dhdsdio_chipmatch((uint16)bus->sih->chip)) { DHD_ERROR(("%s: unsupported chip: 0xx\n", __FUNCTION__, bus->sih->chip)); goto fail; } …… } 继续追踪: static bool dhdsdio_chipmatch(uint16 chipid) { if (chipid == BCM4325_CHIP_ID) return TRUE; if (chipid == BCM4329_CHIP_ID) return TRUE; if (chipid == BCM4315_CHIP_ID) return TRUE; if (chipid == BCM4319_CHIP_ID) return TRUE; if (chipid == BCM4336_CHIP_ID) return TRUE; if (chipid == BCM4330_CHIP_ID) return TRUE; if (chipid == BCM43237_CHIP_ID) return TRUE; if (chipid == BCM43362_CHIP_ID) return TRUE; if (chipid == BCM4314_CHIP_ID) return TRUE; if (chipid == BCM43242_CHIP_ID) return TRUE; if (chipid == BCM43340_CHIP_ID) return TRUE; if (chipid == BCM43341_CHIP_ID) return TRUE; if (chipid == BCM43143_CHIP_ID) return TRUE; if (chipid == BCM43342_CHIP_ID) return TRUE; if (chipid == BCM4334_CHIP_ID) return TRUE; if (chipid == BCM43239_CHIP_ID) return TRUE; if (chipid == BCM4324_CHIP_ID) return TRUE; if (chipid == BCM4335_CHIP_ID) return TRUE; if (chipid == BCM4339_CHIP_ID) return TRUE; if (chipid == BCM43349_CHIP_ID) return TRUE; if (chipid == BCM4345_CHIP_ID) return TRUE; if (chipid == BCM4350_CHIP_ID) return TRUE; if (chipid == BCM4354_CHIP_ID) return TRUE; if (chipid == BCM4356_CHIP_ID) return TRUE; if (chipid == BCM4358_CHIP_ID) return TRUE; if (chipid == BCM4371_CHIP_ID) return TRUE; if (chipid == BCM43430_CHIP_ID) return TRUE; if (BCM4349_CHIP(chipid)) return TRUE; return FALSE; } 20、 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ll 总用量 40 drwxr-xr-x 7 rootroot rootroot 4096 6月 26 12:02 ./ drwx------ 6 rootroot rootroot 4096 6月 26 14:16 ../ drwxr-xr-x 10 rootroot rootroot 4096 9月 4 2014 brandy/ -rw-rw-r-- 1 rootroot rootroot 116 6月 26 12:02 .buildconfig drwxr-xr-x 15 rootroot rootroot 4096 9月 4 2014 buildroot/ -r-xr-xr-x 1 rootroot rootroot 55 9月 4 2014 build.sh* drwxr-xr-x 28 rootroot rootroot 4096 6月 26 14:30 linux-3.4/ drwxrwxr-x 3 rootroot rootroot 4096 6月 26 12:02 out/ -r--r--r-- 1 rootroot rootroot 232 9月 4 2014 README drwxr-xr-x 7 rootroot rootroot 4096 6月 7 19:33 tools/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/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 Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. evb 1. maple 2. redwood 3. y2 4. y3 Choice: 4 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh INFO: ---------------------------------------- INFO: build lichee ... INFO: chip: sun8iw5p1 INFO: platform: android INFO: kernel: linux-3.4 INFO: board: y3 INFO: output: out/sun8iw5p1/android/y3 INFO: ---------------------------------------- INFO: build buildroot ... external toolchain has been installed INFO: build buildroot OK. INFO: build kernel ... INFO: prepare toolchain ... Building kernel CHK include/linux/version.h CHK include/generated/utsrelease.h make[1]: “include/generated/mach-types.h”是最新的。 CALL scripts/checksyscalls.sh CHK include/generated/compile.h CC arch/arm/mach-sunxi/pm/standby/common.o CC arch/arm/mach-sunxi/pm/standby/standby_clock.o CC arch/arm/mach-sunxi/pm/standby/standby_ir.o CC arch/arm/mach-sunxi/pm/standby/standby_key.o CC arch/arm/mach-sunxi/pm/standby/standby_power.o CC arch/arm/mach-sunxi/pm/standby/standby_twi.o CC arch/arm/mach-sunxi/pm/standby/standby_usb.o AS arch/arm/mach-sunxi/pm/standby/standby_delay.o CC arch/arm/mach-sunxi/pm/standby/./arisc/standby_arisc.o CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_hwmsgbox.o CHK kernel/config_data.h CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_hwspinlock.o CC arch/arm/mach-sunxi/pm/standby/./arisc/arisc_message_manager.o CC arch/arm/mach-sunxi/pm/standby/./../pm_debug.o CC arch/arm/mach-sunxi/pm/standby/./../mem_timing.o CC arch/arm/mach-sunxi/pm/standby/./../mem_mmu_pc.o AS arch/arm/mach-sunxi/pm/standby/./../mem_mmu_pc_asm.o CC arch/arm/mach-sunxi/pm/standby/./../mem_serial.o CC arch/arm/mach-sunxi/pm/standby/./../mem_printk.o AS arch/arm/mach-sunxi/pm/standby/./../mem_divlib.o CC arch/arm/mach-sunxi/pm/standby/./../mem_divlibc.o CC arch/arm/mach-sunxi/pm/standby/./../mem_int.o CC arch/arm/mach-sunxi/pm/standby/./../mem_tmr.o CC arch/arm/mach-sunxi/pm/standby/./../mem_tmstmp.o CC arch/arm/mach-sunxi/pm/standby/./../mem_clk.o CC arch/arm/mach-sunxi/pm/standby/./../mem_hwspinlock.o CC arch/arm/mach-sunxi/pm/standby/standby.o rm -rf *.o arch/arm/mach-sunxi/pm/standby/../*.o CC arch/arm/mach-sunxi/pm/standby/super/common.o CC arch/arm/mach-sunxi/pm/standby/super/super_twi.o CC [M] drivers/net/wireless/bcmdhd/dhd_sdio.o AS arch/arm/mach-sunxi/pm/standby/super/super_delay.o CC arch/arm/mach-sunxi/pm/standby/super/super_clock.o CC arch/arm/mach-sunxi/pm/standby/super/super_power.o CC arch/arm/mach-sunxi/pm/standby/super/super_cpus.o AS arch/arm/mach-sunxi/pm/standby/super/resume/resume1.o CC arch/arm/mach-sunxi/pm/standby/super/resume/resume_head.o CC arch/arm/mach-sunxi/pm/standby/super/resume/resume1_c_part.o CC arch/arm/mach-sunxi/pm/standby/../pm_debug.o CC arch/arm/mach-sunxi/pm/standby/../mem_timing.o CC arch/arm/mach-sunxi/pm/standby/../mem_mmu_pc.o AS arch/arm/mach-sunxi/pm/standby/../mem_mmu_pc_asm.o CC arch/arm/mach-sunxi/pm/standby/../mem_cpu.o CC arch/arm/mach-sunxi/pm/standby/../mem_serial.o CC arch/arm/mach-sunxi/pm/standby/../mem_printk.o CC [M] drivers/net/wireless/bcmdhd/dhd_cdc.o CC [M] drivers/net/wireless/bcmdhd/bcmsdh_linux.o CC [M] drivers/net/wireless/bcmdhd/dhd_common.o AS arch/arm/mach-sunxi/pm/standby/../mem_divlib.o CC arch/arm/mach-sunxi/pm/standby/../mem_divlibc.o drivers/net/wireless/bcmdhd/dhd_sdio.c: In function ‘dhdsdio_chipmatch’: drivers/net/wireless/bcmdhd/dhd_sdio.c:6936:16: error: ‘BCM43430_CHIP_ID’ undeclared (first use in this function) drivers/net/wireless/bcmdhd/dhd_sdio.c:6936:16: note: each undeclared identifier is reported only once for each function it appears in CC arch/arm/mach-sunxi/pm/standby/../mem_int.o make[4]: *** [drivers/net/wireless/bcmdhd/dhd_sdio.o] 错误 1 make[4]: *** 正在等待未完成的任务.... CC arch/arm/mach-sunxi/pm/standby/../mem_tmr.o CC arch/arm/mach-sunxi/pm/standby/../mem_tmstmp.o CC arch/arm/mach-sunxi/pm/standby/../mem_hwspinlock.o CC arch/arm/mach-sunxi/pm/standby/../mem_clk.o Source file is open Destination file is created. Source file is open Destination file is open. temp value is 400. 0 soure_file size is 9496. destination_file size is 0x2800. check sum generated is 0x68D92007. Everything is ok. rm -rf *.o arch/arm/mach-sunxi/pm/standby/../*.o CC arch/arm/mach-sunxi/pm/mem_mapping.o CC arch/arm/mach-sunxi/pm/mem_divlibc.o CC arch/arm/mach-sunxi/pm/mem_cpu.o AS arch/arm/mach-sunxi/pm/mem_cpu_asm.o AS arch/arm/mach-sunxi/pm/mem_mmu_pc_asm.o CC arch/arm/mach-sunxi/pm/mem_mmu_pc.o CC arch/arm/mach-sunxi/pm/mem_int.o CC arch/arm/mach-sunxi/pm/mem_clk.o CC arch/arm/mach-sunxi/pm/mem_tmr.o CC arch/arm/mach-sunxi/pm/mem_tmstmp.o CC arch/arm/mach-sunxi/pm/mem_twi.o CC arch/arm/mach-sunxi/pm/mem_gpio.o CC arch/arm/mach-sunxi/pm/mem_sram.o CC arch/arm/mach-sunxi/pm/mem_ccu.o CC arch/arm/mach-sunxi/pm/mem_cci400.o CC arch/arm/mach-sunxi/pm/mem_gtbus.o CC arch/arm/mach-sunxi/pm/pm_debug.o CC arch/arm/mach-sunxi/pm/mem_timing.o CC arch/arm/mach-sunxi/pm/mem_hwspinlock.o CC arch/arm/mach-sunxi/pm/pm.o CC arch/arm/mach-sunxi/pm/extended_standby.o CC arch/arm/mach-sunxi/pm/standby/super/super_power.o CC arch/arm/mach-sunxi/pm/standby/super/super_twi.o CC arch/arm/mach-sunxi/pm/standby/super/super_clock.o AS arch/arm/mach-sunxi/pm/standby.o AS arch/arm/mach-sunxi/pm/mem.o LD arch/arm/mach-sunxi/pm/pm_tmp.o LD arch/arm/mach-sunxi/pm/built-in.o LD arch/arm/mach-sunxi/built-in.o make[3]: *** [drivers/net/wireless/bcmdhd] 错误 2 make[2]: *** [drivers/net/wireless] 错误 2 make[1]: *** [drivers/net] 错误 2 make: *** [drivers] 错误 2 ERROR: build kernel Failed rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ 21、(dhdsdio_probe_attach: unsupported chip: 0xa9a6) R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\include\bcmdevs.h #define BCM4350_CHIP_ID 0x4350 #define BCM43430_CHIP_ID 43430 /* 43430 chipcommon chipid 0xa9a6 */ #define BCM4342_CHIP_ID 4342 可以编译通过了。 (查看属性:) shell@astar-y3:/ $ shell@astar-y3:/ $ cd /system/vendor/modules/ shell@astar-y3:/system/vendor/modules $ ll bcm* -rw-r--r-- root root 26020 2017-06-26 12:46 bcm43438a0.hcd -rw-r--r-- root root 748856 2017-06-26 12:46 bcmdhd.ko shell@astar-y3:/system/vendor/modules $ Microsoft Windows [版本 6.1.7600] 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。 C:\Users\Administrator>cd R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\n et\wireless\bcmdhd C:\Users\Administrator>r: R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb remount * daemon not running. starting it now on port 5037 * * daemon started successfully * remount succeeded R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd> R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb push bcmdhd.ko /system/vendor/modules/ 1677 KB/s (748864 bytes in 0.436s) R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd> 继续查看属性: shell@astar-y3:/system/vendor/modules $ ll bcm* -rw-r--r-- root root 26020 2017-06-26 12:46 bcm43438a0.hcd -rw-rw-rw- root root 748864 2017-06-26 14:34 bcmdhd.ko shell@astar-y3:/system/vendor/modules $ shell@astar-y3:/system/vendor/modules $ shell@astar-y3:/system/vendor/modules $ chmod 644 bcmdhd.ko Unable to chmod bcmdhd.ko: Operation not permitted 10|shell@astar-y3:/system/vendor/modules $ (必须在su下才能够修改属性:) shell@astar-y3:/system/vendor/modules $ su shell@astar-y3:/system/vendor/modules # chmod 644 bcmdhd.ko shell@astar-y3:/system/vendor/modules # shell@astar-y3:/system/vendor/modules # sync shell@astar-y3:/system/vendor/modules # reboot 22、 [ 0.658241] [wifi]: select wifi: ap6210 !! [ 0.658587] [ap6xxx]: module power name axp22_dldo1 [ 0.658601] [ap6xxx]: module power ext1 name axp22_dldo2 [ 0.658613] [ap6xxx]: module power ext2 name axp22_aldo1 [ 0.658721] [ap6xxx]: get ap6xxx wifi_power_switch failed [ 0.658731] [ap6xxx]: ap6xxx module power set by axp. [ 0.658930] [ap6xxx]: first time [ 0.659285] [ap6xxx]: regulator on. [ 0.661306] [wifi_pm]: wifi gpio init is OK !! (重启之后,WIFI模块要想办法配置为ap6212,现阶段借用的是AP6210!) [ 8.517657] gpio ap6xxx_wl_regon set val 1, act val 1 [ 8.623325] [ap6xxx]: sdio wifi power state: on [ 8.628389] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 8.628566] =========== WLAN placed in POWER ON ======== [ 8.645459] [mmc]: sdc1 card_power_on start... [ 8.650397] [mmc]: sdc1 power_supply is null [ 8.655129] [mmc]: sdc1 card_power_on ok [ 8.680031] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 8.690267] [mmc]: mclk 0xf1c2008c 0x8002000e [ 8.772360] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 8.781316] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !! [ 8.789448] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 8.799684] [mmc]: mclk 0xf1c2008c 0x8002000e [ 8.861971] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 8.872189] [mmc]: mclk 0xf1c2008c 0x8002000e [ 8.933887] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !! [ 8.941921] *******************Try sdio******************* [ 8.948329] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B [ 8.958545] [mmc]: mclk 0xf1c2008c 0x8002000e [ 9.027690] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 9.035325] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 9.043192] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 9.052046] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 9.145358] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 9.155486] [mmc]: mclk 0xf1c2008c 0x8002000e [ 9.215398] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B [ 9.225785] [mmc]: mclk 0xf1c2008c 0x8100000b [ 9.285721] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 9.296049] [mmc]: mclk 0xf1c2008c 0x8140030b [ 9.357922] mmc1: new high speed SDIO card at address 0001 [ 9.364523] bcmsdh_register: Linux Kernel SDIO/MMC Driver [ 9.364563] *******************sdio init ok******************* [ 9.377203] bcm_wlan_get_oob_irq enter. [ 9.381534] gpio [359] map to virq [7] ok [ 9.388816] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4 [ 9.396740] DHD: dongle ram size is set to 524288(orig 524288) at 0x0 [ 9.404660] dhdsdio_probe: Disable prop_txstatus [ 9.410903] wl_create_event_handler(): thread:wl_event_handler:5d started [ 9.410914] tsk Enter, tsk = 0xddca13d8 [ 9.423788] p2p0: P2P Interface Registered [ 9.428464] dhd_attach(): thread:dhd_watchdog_thread:5e started [ 9.435144] dhd_attach(): thread:dhd_dpc:5f started [ 9.440653] dhd_attach(): thread:dhd_sysioc:60 started [ 9.447276] Broadcom Dongle Host Driver: register interface [wlan0] MAC: 00:90:4c:11:22:33 [ 9.456558] [ 9.456561] Dongle Host Driver, version 1.88.45.3 (r420671) [ 9.456565] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04 [ 9.472427] gpio ap6xxx_wl_regon set val 0, act val 0 [ 9.578054] [ap6xxx]: sdio wifi power state: off [ 9.583186] =========== WLAN placed in RESET ======== (WIFI启动加载正常) shell@astar-y3:/ $ lsmod gt82x 9849 0 - Live 0x00000000 sunxi_schw 12559 0 - Live 0x00000000 (O) cdc_ether 5099 0 - Live 0x00000000 rtl8150 9023 0 - Live 0x00000000 mcs7830 6292 0 - Live 0x00000000 qf9700 7805 0 - Live 0x00000000 asix 17150 0 - Live 0x00000000 usbnet 17700 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000 sunxi_keyboard 3021 0 - Live 0x00000000 sw_device 13604 0 - Live 0x00000000 vfe_v4l2 445364 0 - Live 0x00000000 gc2035 12696 0 - Live 0x00000000 gc0308 10702 0 - Live 0x00000000 vfe_subdev 4523 3 vfe_v4l2,gc2035,gc0308, Live 0x00000000 vfe_os 4099 2 vfe_v4l2,vfe_subdev, Live 0x00000000 cci 21594 2 gc2035,gc0308, Live 0x00000000 videobuf_dma_contig 5535 1 vfe_v4l2, Live 0x00000000 videobuf_core 16520 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000 bcmdhd 556965 0 - Live 0x00000000 leds_sunxi 1351 0 - Live 0x00000000 mali 209914 20 - Live 0x00000000 (O) lcd 38180 0 - Live 0x00000000 disp 993096 8 mali,lcd, Live 0x00000000 nand 280622 0 - Live 0x00000000 (O) shell@astar-y3:/ $ (bcmdhd.ko这个驱动模块加载正常:) (BT没有打开,但是不停地打印BT超时出错,不知道是何解?) shell@astar-y3:/ $ [ 511.880344] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired [ 511.887326] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle 23、 由于此时WIFI出于记住上一次的状态的状态(打不开),所以需要重新刷镜像IMG,然后替换:bcmdhd.ko shell@astar-y3:/ $ shell@astar-y3:/ $ lsmod gt82x 9849 0 - Live 0x00000000 sunxi_schw 12559 0 - Live 0x00000000 (O) cdc_ether 5099 0 - Live 0x00000000 rtl8150 9023 0 - Live 0x00000000 mcs7830 6292 0 - Live 0x00000000 qf9700 7805 0 - Live 0x00000000 asix 17150 0 - Live 0x00000000 usbnet 17700 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000 sunxi_keyboard 3021 0 - Live 0x00000000 sw_device 13604 0 - Live 0x00000000 vfe_v4l2 445364 0 - Live 0x00000000 gc2035 12696 0 - Live 0x00000000 gc0308 10702 0 - Live 0x00000000 vfe_subdev 4523 3 vfe_v4l2,gc2035,gc0308, Live 0x00000000 vfe_os 4099 2 vfe_v4l2,vfe_subdev, Live 0x00000000 cci 21594 2 gc2035,gc0308, Live 0x00000000 videobuf_dma_contig 5535 1 vfe_v4l2, Live 0x00000000 videobuf_core 16520 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000 bcmdhd 556965 0 - Live 0x00000000 leds_sunxi 1351 0 - Live 0x00000000 mali 209914 15 - Live 0x00000000 (O) lcd 38180 0 - Live 0x00000000 disp 993096 8 mali,lcd, Live 0x00000000 nand 280622 0 - Live 0x00000000 (O) shell@astar-y3:/ $ shell@astar-y3:/ $ shell@astar-y3:/ $ [ 110.012176] init: computing context for service '/system/bin/wpa_supplicant' [ 110.025400] init: starting 'p2p_supplicant' [ 110.039886] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010' [ 110.119751] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin [ 110.140144] [ 110.140153] Dongle Host Driver, version 1.88.45.3 (r420671) [ 110.140158] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04 [ 110.173523] wl_android_wifi_on in 1 [ 110.177409] wl_android_wifi_on in 2: g_wifi_on=0 [ 110.200103] gpio ap6xxx_wl_regon set val 1, act val 1 [ 110.280025] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired [ 110.286694] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle [ 110.355684] [ap6xxx]: sdio wifi power state: on [ 110.360930] =========== WLAN going back to live ======== [ 110.366925] sdio_reset_comm(): [ 110.370346] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 110.380773] [mmc]: mclk 0xf1c2008c 0x8140030b [ 110.443029] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 110.454758] [mmc]: mclk 0xf1c2008c 0x8140030b [ 110.516097] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 110.530958] [mmc]: mclk 0xf1c2008c 0x80430309 [ 110.592013] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 110.603518] [mmc]: mclk 0xf1c2008c 0x80030009 [ 110.681418] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 110.690726] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 110.700331] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 110.712218] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 110.894520] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 110.904933] [mmc]: mclk 0xf1c2008c 0x80030009 [ 110.964907] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 110.975514] [mmc]: mclk 0xf1c2008c 0x8100000b [ 111.035618] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B [ 111.046398] [mmc]: mclk 0xf1c2008c 0x8140030b [ 111.108547] [ 111.108566] [ 111.108579] dhd_bus_devreset: == WLAN ON == [ 111.116882] dhd_bus_devreset called when dongle is not in reset [ 111.123683] Will call dhd_bus_start instead [ 111.128637] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin [ 111.140963] dhd_conf_download_config: Ignore config file /system/vendor/modules/config.txt [ 111.151802] Final fw_path=/system/vendor/modules/fw_bcm43438a0.bin [ 111.158689] Final nv_path=/system/vendor/modules/nvram_ap6210.txt [ 111.165542] Final conf_path=/system/vendor/modules/config.txt [ 111.257577] dhdsdio_download_nvram: Open nvram file failed /system/vendor/modules/nvram_ap6210.txt [ 111.268309] _dhdsdio_download_firmware: dongle nvram file download failed [ 111.276022] dhd_bus_start: dhdsdio_probe_download failed. firmware = /system/vendor/modules/fw_bcm43438a0.bin nvram = /system/vendor/modules/nvram_ap6210.txt config = /system/vendor/modules/config.txt [ 111.295979] dhd_bus_devreset: dhd_bus_start fail with -1 [ 111.304154] dhd_dev_reset: dhd_bus_devreset: -1 [ 111.309190] dhd_prot_ioctl : bus is down. we have nothing to do [ 111.330328] dhd_bus_devreset: WLAN OFF DONE [ 111.335225] gpio ap6xxx_wl_regon set val 0, act val 0 [ 111.472499] [ap6xxx]: sdio wifi power state: off [ 111.477661] =========== WLAN placed in RESET ======== [ 111.483304] wl_android_wifi_on: Failed [ 111.487473] wl_android_wifi_off in 1 [ 111.491478] wl_android_wifi_off in 2: g_wifi_on=0 [ 111.496711] wl_android_wifi_off out [ 111.509335] init: waitpid returned pid 1211, status = 0000ff00 [ 111.516072] init: process 'p2p_supplicant', pid 1211 exited shell@astar-y3:/ $ shell@astar-y3:/ $ 24、定位问题:dhd_bus_devreset: dhd_bus_start fail with -1 rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd linux-3.4/drivers/net/wireless/bcmdhd/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "dhd_bus_start fail with" . -R ./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n", 匹配到二进制文件 ./dhd_sdio.o 匹配到二进制文件 ./bcmdhd.o 匹配到二进制文件 ./bcmdhd.ko rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd linux-3.4/drivers/net/wireless/bcmdhd/ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep "dhd_bus_start fail with" . -R ./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n", 匹配到二进制文件 ./dhd_sdio.o 匹配到二进制文件 ./bcmdhd.o 匹配到二进制文件 ./bcmdhd.ko rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ int dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag) { …… dhd_conf_set_fw_name_by_chip(dhdp, fw_path, firmware_path); if ((bcmerror = dhd_bus_start(dhdp)) != 0) DHD_ERROR(("%s: dhd_bus_start fail with %d\n", __FUNCTION__, bcmerror)); } } return bcmerror; } rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep dhd_bus_start . -R ./dhd_sdio.c: if ((ret = dhd_bus_start(bus->dhd)) != 0) { ./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__)); ./dhd_sdio.c: DHD_ERROR(("Will call dhd_bus_start instead\n")); ./dhd_sdio.c: if ((bcmerror = dhd_bus_start(dhdp)) != 0) ./dhd_sdio.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n", ./dhd_sdio - 副本.c: if ((ret = dhd_bus_start(bus->dhd)) != 0) { ./dhd_sdio - 副本.c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__)); ./dhd_sdio - 副本.c: DHD_ERROR(("Will call dhd_bus_start instead\n")); ./dhd_sdio - 副本.c: if ((bcmerror = dhd_bus_start(dhdp)) != 0) ./dhd_sdio - 副本.c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n", ./dhd_sdio - 副本 (2).c: if ((ret = dhd_bus_start(bus->dhd)) != 0) { ./dhd_sdio - 副本 (2).c: DHD_ERROR(("%s: dhd_bus_start failed\n", __FUNCTION__)); ./dhd_sdio - 副本 (2).c: DHD_ERROR(("Will call dhd_bus_start instead\n")); ./dhd_sdio - 副本 (2).c: if ((bcmerror = dhd_bus_start(dhdp)) != 0) ./dhd_sdio - 副本 (2).c: DHD_ERROR(("%s: dhd_bus_start fail with %d\n", ./dhd.h:extern int dhd_bus_start(dhd_pub_t *dhdp); ./wl_android.c:/* Initialize g_wifi_on to 1 so dhd_bus_start will be called for the first ./dhd_linux.c: if ((ret = dhd_bus_start(&dhd->pub)) != 0) { ./dhd_linux.c: /* dhd_prot_init has been called in dhd_bus_start or wl_android_wifi_on */ ./dhd_linux.c:dhd_bus_start(dhd_pub_t *dhdp) rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ 定位到这里: int dhd_bus_start(dhd_pub_t *dhdp) { …… /* try to download image and nvram to the dongle */ if ((dhd->pub.busstate == DHD_BUS_DOWN) && (fw_path[0] != '\0') && (nv_path[0] != '\0')) { #ifdef SHOW_NVRAM_TYPE { /* Show nvram type in the kernel log */ int i; for (i = 0; nv_path[i] != '\0'; ++i) { if (nv_path[i] == '.') { ++i; break; } } DHD_ERROR(("%s: nvram_type = [%s]\n", __FUNCTION__, &nv_path[i])); } #endif /* SHOW_NVRAM_TYPE */ /* wake lock moved to dhdsdio_download_firmware */ if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh, fw_path, nv_path, conf_path))) { DHD_ERROR(("%s: dhdsdio_probe_download failed. firmware = %s nvram = %s config = %s\n", __FUNCTION__, fw_path, nv_path, conf_path)); #ifdef DHDTHREAD if (dhd->threads_only) dhd_os_sdunlock(dhdp); #endif /* DHDTHREAD */ // 2017/6/23 18:40 wenyuanbo download ap6212 fail not return error!!!! //return -1; } } …… return 0; } 由于ap6212没有config.txt文件,下载肯定会出错,比对全志R16平台去AP6212的处理,关闭这里: //return -1; 25、 shell@astar-y3:/ $ shell@astar-y3:/ $ [ 110.012176] init: computing context for service '/system/bin/wpa_supplicant' [ 110.025400] init: starting 'p2p_supplicant' [ 110.039886] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010' [ 110.119751] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin [ 110.140144] [ 110.140153] Dongle Host Driver, version 1.88.45.3 (r420671) [ 110.140158] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 14:34:04 [ 110.173523] wl_android_wifi_on in 1 [ 110.177409] wl_android_wifi_on in 2: g_wifi_on=0 [ 110.200103] gpio ap6xxx_wl_regon set val 1, act val 1 [ 110.280025] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expire

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值