Image Handler 3 for v1.3.x下载

weixin_39821526 2019-08-23 03:30:30
Image Handler 模块介绍

Image Handler简称 IH模块,是一个用来为Zen Cart程序生成缓存图的功能拓展模块,IH模块可以按程序后台图像参数下配置的图像大小,来生成对应的大中小缩略图用于前台展示,这样作的目的是为了从一定程度上提高页面载入速度,需要说明的是,IH模块生成的缓存图是切实在原图基础上生成的真实文件,并非传统意义上的只对原图尺寸进行大小变更压缩,是一种典型的以空间换速度的作法,因此, IH模块并不适用于哪些空间对网站文件有数量限制的环境下应用,启用IH模块后, 一张图片将被生成大中小三张图片放置于缓存目录下,因此实际文件数为当前网站商品数据的三倍数量.
相关下载链接://download.csdn.net/download/u010907719/5490409?utm_source=bbsseo
...全文
6 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
Version 1.7 ----------- - ADD: Delphi/CBuilder 10.2 Tokyo now supported. - ADD: Delphi/CBuilder 10.1 Berlin now supported. - ADD: Delphi/CBuilder 10 Seattle now supported. - ADD: Delphi/CBuilder XE8 now supported. - ADD: Delphi/CBuilder XE7 now supported. - ADD: Delphi/CBuilder XE6 now supported. - ADD: Delphi/CBuilder XE5 now supported. - ADD: Delphi/CBuilder XE4 now supported. - ADD: Delphi/CBuilder XE3 now supported. - ADD: Delphi/CBuilder XE2 now supported. - ADD: Delphi/CBuilder XE now supported. - ADD: Delphi/CBuilder 2010 now supported. - ADD: Delphi/CBuilder 2009 now supported. - ADD: New demo project FlexCADImport. - FIX: The height of the TFlexRegularPolygon object incorrectly changes with its rotation. - FIX: Added division by zero protect in method TFlexControl.MovePathSegment. - FIX: The background beyond docuemnt wasn't filled when TFlexPanel.DocClipping=True. - FIX: In "Windows ClearType" font rendering mode (OS Windows mode) the "garbage" pixels can appear from the right and from the bottom sides of the painted rectangle of the TFlexText object. - FIX: The result rectangle incorrectly calculated in the TFlexText.GetRefreshRect method. - FIX: Added FPaintCache.rcPaint cleanup in the TFlexPanel.WMPaint method. Now it is possible to define is the drawing take place via WMPaint or via the PaintTo direct call (if rcPaint contain non-empty rectangle then WMPaint in progress). - FIX: The TFlexPanel.FPaintCache field moved in the protected class section. Added rcPaint field in FPaintCache that represents drawing rectangle. - ADD: In the text prcise mode (TFlexText.Precise=True) takes into account the rotation angle (TFlexText.Angle). - FIX: Removed FG_NEWTEXTROTATE directive (the TFlexText Precise mode should be used instead). - FIX: The TFlexRegularPolygon object clones incorrectly drawed in case when TFlexRegularPolygon have alternative brush (gradient, texture). - ADD: Add TFlexPanel.InvalidateControl virtual method which calls from TFle
JavaScript权威指南 犀牛书 Chapter 1. Introduction to JavaScript Section 1.1. JavaScript Myths Section 1.2. Versions of JavaScript Section 1.3. Client-Side JavaScript Section 1.4. JavaScript in Other Contexts Section 1.5. Client-Side JavaScript: Executable Content in Web Pages Section 1.6. Client-Side JavaScript Features Section 1.7. JavaScript Security Section 1.8. Example: Computing Loan Payments with JavaScript Section 1.9. Using the Rest of This Book Section 1.10. Exploring JavaScript Part I: Core JavaScript Chapter 2. Lexical Structure Section 2.1. Character Set Section 2.2. Case Sensitivity Section 2.3. Whitespace and Line Breaks Section 2.4. Optional Semicolons Section 2.5. Comments Section 2.6. Literals Section 2.7. Identifiers Section 2.8. Reserved Words Chapter 3. Data Types and Values Section 3.1. Numbers Section 3.2. Strings Section 3.3. Boolean Values Section 3.4. Functions Section 3.5. Objects Section 3.6. Arrays Section 3.7. null Section 3.8. undefined Section 3.9. The Date Object Section 3.10. Regular Expressions Section 3.11. Error Objects Section 3.12. Primitive Data Type Wrapper Objects Chapter 4. Variables Section 4.1. Variable Typing Section 4.2. Variable Declaration Section 4.3. Variable Scope Section 4.4. Primitive Types and Reference Types Section 4.5. Garbage Collection Section 4.6. Variables as Properties Section 4.7. Variable Scope Revisited Chapter 5. Expressions and Operators Section 5.1. Expressions Section 5.2. Operator Overview Section 5.3. Arithmetic Operators Section 5.4. Equality Operators Section 5.5. Relational Operators Section 5.6. String Operators Section 5.7. Logical Operators Section 5.8. Bitwise Operators Section 5.9. Assignment Operators Section 5.10. Miscellaneous Operators Chapter 6. Statements Section 6.1. Expression Statements Section 6.2. Compound Statements Section 6.3. if Section 6.4. else if Section 6.5. switch Section 6.6. while Section 6.7. do/while Section 6.8. for Section 6.9. for/in Section 6.10. Labels Section 6.11. break Section 6.12. continue Section 6.13. var Section 6.14. function Section 6.15. return Section 6.16. throw Section 6.17. try/catch/finally Section 6.18. with Section 6.19. The Empty Statement Section 6.20. Summary of JavaScript Statements Chapter 7. Functions Section 7.1. Defining and Invoking Functions Section 7.2. Functions as Data Section 7.3. Function Scope: The Call Object Section 7.4. Function Arguments: The Arguments Object Section 7.5. Function Properties and Methods Chapter 8. Objects Section 8.1. Objects and Properties Section 8.2. Constructors Section 8.3. Methods Section 8.4. Prototypes and Inheritance Section 8.5. Object-Oriented JavaScript Section 8.6. Objects as Associative Arrays Section 8.7. Object Properties and Methods Chapter 9. Arrays Section 9.1. Arrays and Array Elements Section 9.2. Array Methods Chapter 10. Pattern Matching with Regular Expressions Section 10.1. Defining Regular Expressions Section 10.2. String Methods for Pattern Matching Section 10.3. The RegExp Object Chapter 11. Further Topics in JavaScript Section 11.1. Data Type Conversion Section 11.2. By Value Versus by Reference Section 11.3. Garbage Collection Section 11.4. Lexical Scoping and Nested Functions Section 11.5. The Function( ) Constructor and Function Literals Section 11.6. Netscape's JavaScript 1.2 Incompatibilities Part II: Client-Side JavaScript Chapter 12. JavaScript in Web Browsers Section 12.1. The Web Browser Environment Section 12.2. Embedding JavaScript in HTML Section 12.3. Execution of JavaScript Programs Chapter 13. Windows and Frames Section 13.1. Window Overview Section 13.2. Simple Dialog Boxes Section 13.3. The Status Line Section 13.4. Timeouts and Intervals Section 13.5. Error Handling Section 13.6. The Navigator Object Section 13.7. The Screen Object Section 13.8. Window Control Methods Section 13.9. The Location Object Section 13.10. The History Object Section 13.11. Multiple Windows and Frames Chapter 14. The Document Object Section 14.1. Document Overview Section 14.2. Dynamically Generated Documents Section 14.3. Document Color Properties Section 14.4. Document Information Properties Section 14.5. Forms Section 14.6. Images Section 14.7. Links Section 14.8. Anchors Section 14.9. Applets Section 14.10. Embedded Data Chapter 15. Forms and Form Elements Section 15.1. The Form Object Section 15.2. Defining Form Elements Section 15.3. Scripting Form Elements Section 15.4. Form Verification Example Chapter 16. Scripting Cookies Section 16.1. An Overview of Cookies Section 16.2. Storing Cookies Section 16.3. Reading Cookies Section 16.4. Cookie Example Chapter 17. The Document Object Model Section 17.1. An Overview of the DOM Section 17.2. Using the Core DOM API Section 17.3. DOM Compatibility with Internet Explorer 4 Section 17.4. DOM Compatibility with Netscape 4 Section 17.5. Convenience Methods: The Traversal and Range APIs Chapter 18. Cascading Style Sheets and Dynamic HTML Section 18.1. Styles and Style Sheets with CSS Section 18.2. Element Positioning with CSS Section 18.3. Scripting Styles Section 18.4. DHTML in Fourth-Generation Browsers Section 18.5. Other DOM APIs for Styles and Style Sheets Chapter 19. Events and Event Handling Section 19.1. Basic Event Handling Section 19.2. Advanced Event Handling with DOM Level 2 Section 19.3. The Internet Explorer Event Model Section 19.4. The Netscape 4 Event Model Chapter 20. Compatibility Techniques Section 20.1. Platform and Browser Compatibility Section 20.2. Language Version Compatibility Section 20.3. Compatibility with Non-JavaScript Browsers Chapter 21. JavaScript Security Section 21.1. JavaScript and Security Section 21.2. Restricted Features Section 21.3. The Same-Origin Policy Section 21.4. Security Zones and Signed Scripts Chapter 22. Using Java with JavaScript Section 22.1. Scripting Java Applets Section 22.2. Using JavaScript from Java Section 22.3. Using Java Classes Directly Section 22.4. LiveConnect Data Types Section 22.5. LiveConnect Data Conversion Section 22.6. JavaScript Conversion of JavaObjects Section 22.7. Java-to-JavaScript Data Conversion Part III: Core JavaScript Reference Chapter 23. Core JavaScript Reference Sample Entry arguments[ ] Arguments Arguments.callee Arguments.length Array Array.concat( ) Array.join( ) Array.length Array.pop( ) Array.push( ) Array.reverse( ) Array.shift( ) Array.slice( ) Array.sort( ) Array.splice( ) Array.toLocaleString( ) Array.toString( ) Array.unshift( ) Boolean Boolean.toString( ) Boolean.valueOf( ) Date Date.getDate( ) Date.getDay( ) Date.getFullYear( ) Date.getHours( ) Date.getMilliseconds( ) Date.getMinutes( ) Date.getMonth( ) Date.getSeconds( ) Date.getTime( ) Date.getTimezoneOffset( ) Date.getUTCDate( ) Date.getUTCDay( ) Date.getUTCFullYear( ) Date.getUTCHours( ) Date.getUTCMilliseconds( ) Date.getUTCMinutes( ) Date.getUTCMonth( ) Date.getUTCSeconds( ) Date.getYear( ) Date.parse( ) Date.setDate( ) Date.setFullYear( ) Date.setHours( ) Date.setMilliseconds( ) Date.setMinutes( ) Date.setMonth( ) Date.setSeconds( ) Date.setTime( ) Date.setUTCDate( ) Date.setUTCFullYear( ) Date.setUTCHours( ) Date.setUTCMilliseconds( ) Date.setUTCMinutes( ) Date.setUTCMonth( ) Date.setUTCSeconds( ) Date.setYear( ) Date.toDateString( ) Date.toGMTString( ) Date.toLocaleDateString( ) Date.toLocaleString( ) Date.toLocaleTimeString( ) Date.toString( ) Date.toTimeString( ) Date.toUTCString( ) Date.UTC( ) Date.valueOf( ) decodeURI( ) decodeURIComponent( ) encodeURI( ) encodeURIComponent( ) Error Error.message Error.name Error.toString( ) escape( ) eval( ) EvalError Function Function.apply( ) Function.arguments[] Function.call( ) Function.caller Function.length Function.prototype Function.toString( ) Global Infinity isFinite( ) isNaN( ) Math Math.abs( ) Math.acos( ) Math.asin( ) Math.atan( ) Math.atan2( ) Math.ceil( ) Math.cos( ) Math.E Math.exp( ) Math.floor( ) Math.LN10 Math.LN2 Math.log( ) Math.LOG10E Math.LOG2E Math.max( ) Math.min( ) Math.PI Math.pow( ) Math.random( ) Math.round( ) Math.sin( ) Math.sqrt( ) Math.SQRT1_2 Math.SQRT2 Math.tan( ) NaN Number Number.MAX_VALUE Number.MIN_VALUE Number.NaN Number.NEGATIVE_INFINITY Number.POSITIVE_INFINITY Number.toExponential( ) Number.toFixed( ) Number.toLocaleString( ) Number.toPrecision( ) Number.toString( ) Number.valueOf( ) Object Object.constructor Object.hasOwnProperty( ) Object.isPrototypeOf( ) Object.propertyIsEnumerable( ) Object.toLocaleString( ) Object.toString( ) Object.valueOf( ) parseFloat( ) parseInt( ) RangeError ReferenceError RegExp RegExp.exec( ) RegExp.global RegExp.ignoreCase RegExp.lastIndex RegExp.source RegExp.test( ) RegExp.toString( ) String String.charAt( ) String.charCodeAt( ) String.concat( ) String.fromCharCode( ) String.indexOf( ) String.lastIndexOf( ) String.length String.localeCompare( ) String.match( ) String.replace( ) String.search( ) String.slice( ) String.split( ) String.substr( ) String.substring( ) String.toLocaleLowerCase( ) String.toLocaleUpperCase( ) String.toLowerCase( ) String.toString( ) String.toUpperCase( ) String.valueOf( ) SyntaxError TypeError undefined unescape( ) URIError Part IV: Client-Side JavaScript Reference Chapter 24. Client-Side JavaScript Reference Sample Entry Anchor Applet Area Button Button.onclick Checkbox Checkbox.onclick Document Document.all[] Document.captureEvents( ) Document.clear( ) Document.close( ) Document.cookie Document.domain Document.elementFromPoint( ) Document.getSelection( ) Document.handleEvent( ) Document.lastModified Document.links[] Document.open( ) Document.releaseEvents( ) Document.routeEvent( ) Document.URL Document.write( ) Document.writeln( ) Element Event FileUpload FileUpload.onchange Form Form.elements[] Form.onreset Form.onsubmit Form.reset( ) Form.submit( ) Form.target Frame getClass( ) Hidden History History.back( ) History.forward( ) History.go( ) HTMLElement HTMLElement.contains( ) HTMLElement.getAttribute( ) HTMLElement.handleEvent( ) HTMLElement.insertAdjacentHTML( ) HTMLElement.insertAdjacentText( ) HTMLElement.onclick HTMLElement.ondblclick HTMLElement.onhelp HTMLElement.onkeydown HTMLElement.onkeypress HTMLElement.onkeyup HTMLElement.onmousedown HTMLElement.onmousemove HTMLElement.onmouseout HTMLElement.onmouseover HTMLElement.onmouseup HTMLElement.removeAttribute( ) HTMLElement.scrollIntoView( ) HTMLElement.setAttribute( ) Image Image.onabort Image.onerror Image.onload Input Input.blur( ) Input.click( ) Input.focus( ) Input.name Input.onblur Input.onchange Input.onclick Input.onfocus Input.select( ) Input.type Input.value JavaArray JavaClass JavaObject JavaPackage JSObject JSObject.call( ) JSObject.eval( ) JSObject.getMember( ) JSObject.getSlot( ) JSObject.getWindow( ) JSObject.removeMember( ) JSObject.setMember( ) JSObject.setSlot( ) JSObject.toString( ) Layer Layer.captureEvents( ) Layer.handleEvent( ) Layer.load( ) Layer.moveAbove( ) Layer.moveBelow( ) Layer.moveBy( ) Layer.moveTo( ) Layer.moveToAbsolute( ) Layer.offset( ) Layer.releaseEvents( ) Layer.resizeBy( ) Layer.resizeTo( ) Layer.routeEvent( ) Link Link.onclick Link.onmouseout Link.onmouseover Link.target Location Location.reload( ) Location.replace( ) MimeType Navigator Navigator.javaEnabled( ) Navigator.plugins.refresh( ) Option Password Plugin Radio Radio.onclick Reset Reset.onclick Screen Select Select.onchange Select.options[] Style Submit Submit.onclick Text Text.onchange Textarea Textarea.onchange URL Window Window.alert( ) Window.back( ) Window.blur( ) Window.captureEvents( ) Window.clearInterval( ) Window.clearTimeout( ) Window.close( ) Window.confirm( ) Window.defaultStatus Window.focus( ) Window.forward( ) Window.handleEvent( ) Window.home( ) Window.moveBy( ) Window.moveTo( ) Window.name Window.navigate( ) Window.onblur Window.onerror Window.onfocus Window.onload Window.onmove Window.onresize Window.onunload Window.open( ) Window.print( ) Window.prompt( ) Window.releaseEvents( ) Window.resizeBy( ) Window.resizeTo( ) Window.routeEvent( ) Window.scroll( ) Window.scrollBy( ) Window.scrollTo( ) Window.setInterval( ) Window.setTimeout( ) Window.status Window.stop( ) Part V: W3C DOM Reference Chapter 25. W3C DOM Reference Sample Entry AbstractView AbstractView.getComputedStyle( ) Attr CDATASection CharacterData CharacterData.appendData( ) CharacterData.deleteData( ) CharacterData.insertData( ) CharacterData.replaceData( ) CharacterData.substringData( ) Comment Counter CSS2Properties CSSCharsetRule CSSFontFaceRule CSSImportRule CSSMediaRule CSSMediaRule.deleteRule( ) CSSMediaRule.insertRule( ) CSSPageRule CSSPrimitiveValue CSSPrimitiveValue.getCounterValue( ) CSSPrimitiveValue.getFloatValue( ) CSSPrimitiveValue.getRectValue( ) CSSPrimitiveValue.getRGBColorValue( ) CSSPrimitiveValue.getStringValue( ) CSSPrimitiveValue.setFloatValue( ) CSSPrimitiveValue.setStringValue( ) CSSRule CSSRuleList CSSRuleList.item( ) CSSStyleDeclaration CSSStyleDeclaration.getPropertyCSSValue( ) CSSStyleDeclaration.getPropertyPriority( ) CSSStyleDeclaration.getPropertyValue( ) CSSStyleDeclaration.item( ) CSSStyleDeclaration.removeProperty( ) CSSStyleDeclaration.setProperty( ) CSSStyleRule CSSStyleSheet CSSStyleSheet.deleteRule( ) CSSStyleSheet.insertRule( ) CSSUnknownRule CSSValue CSSValueList CSSValueList.item( ) Document Document.createAttribute( ) Document.createAttributeNS( ) Document.createCDATASection( ) Document.createComment( ) Document.createDocumentFragment( ) Document.createElement( ) Document.createElementNS( ) Document.createEntityReference( ) Document.createEvent( ) Document.createNodeIterator( ) Document.createProcessingInstruction( ) Document.createRange( ) Document.createTextNode( ) Document.createTreeWalker( ) Document.getElementById( ) Document.getElementsByTagName( ) Document.getElementsByTagNameNS( ) Document.getOverrideStyle( ) Document.importNode( ) DocumentCSS DocumentEvent DocumentFragment DocumentRange DocumentStyle DocumentTraversal DocumentType DocumentView DOMException DOMImplementation DOMImplementation.createCSSStyleSheet( ) DOMImplementation.createDocument( ) DOMImplementation.createDocumentType( ) DOMImplementation.createHTMLDocument( ) DOMImplementation.hasFeature( ) DOMImplementationCSS Element Element.getAttribute( ) Element.getAttributeNode( ) Element.getAttributeNodeNS( ) Element.getAttributeNS( ) Element.getElementsByTagName( ) Element.getElementsByTagNameNS( ) Element.hasAttribute( ) Element.hasAttributeNS( ) Element.removeAttribute( ) Element.removeAttributeNode( ) Element.removeAttributeNS( ) Element.setAttribute( ) Element.setAttributeNode( ) Element.setAttributeNodeNS( ) Element.setAttributeNS( ) ElementCSSInlineStyle Entity EntityReference Event Event.initEvent( ) Event.preventDefault( ) Event.stopPropagation( ) EventException EventListener EventTarget EventTarget.addEventListener( ) EventTarget.dispatchEvent( ) EventTarget.removeEventListener( ) HTMLAnchorElement HTMLAnchorElement.blur( ) HTMLAnchorElement.focus( ) HTMLBodyElement HTMLCollection HTMLCollection.item( ) HTMLCollection.namedItem( ) HTMLDocument HTMLDocument.close( ) HTMLDocument.getElementById( ) HTMLDocument.getElementsByName( ) HTMLDocument.open( ) HTMLDocument.write( ) HTMLDocument.writeln( ) HTMLDOMImplementation HTMLElement HTMLFormElement HTMLFormElement.reset( ) HTMLFormElement.submit( ) HTMLInputElement HTMLInputElement.blur( ) HTMLInputElement.click( ) HTMLInputElement.focus( ) HTMLInputElement.select( ) HTMLOptionElement HTMLSelectElement HTMLSelectElement.add( ) HTMLSelectElement.blur( ) HTMLSelectElement.focus( ) HTMLSelectElement.remove( ) HTMLTableCaptionElement HTMLTableCellElement HTMLTableColElement HTMLTableElement HTMLTableElement.createCaption( ) HTMLTableElement.createTFoot( ) HTMLTableElement.createTHead( ) HTMLTableElement.deleteCaption( ) HTMLTableElement.deleteRow( ) HTMLTableElement.deleteTFoot( ) HTMLTableElement.deleteTHead( ) HTMLTableElement.insertRow( ) HTMLTableRowElement HTMLTableRowElement.deleteCell( ) HTMLTableRowElement.insertCell( ) HTMLTableSectionElement HTMLTableSectionElement.deleteRow( ) HTMLTableSectionElement.insertRow( ) HTMLTextAreaElement HTMLTextAreaElement.blur( ) HTMLTextAreaElement.focus( ) HTMLTextAreaElement.select( ) LinkStyle MediaList MediaList.appendMedium( ) MediaList.deleteMedium( ) MediaList.item( ) MouseEvent MouseEvent.initMouseEvent( ) MutationEvent MutationEvent.initMutationEvent( ) NamedNodeMap NamedNodeMap.getNamedItem( ) NamedNodeMap.getNamedItemNS( ) NamedNodeMap.item( ) NamedNodeMap.removeNamedItem( ) NamedNodeMap.removeNamedItemNS( ) NamedNodeMap.setNamedItem( ) NamedNodeMap.setNamedItemNS( ) Node Node.appendChild( ) Node.cloneNode( ) Node.hasAttributes( ) Node.hasChildNodes( ) Node.insertBefore( ) Node.isSupported( ) Node.normalize( ) Node.removeChild( ) Node.replaceChild( ) NodeFilter NodeIterator NodeIterator.detach( ) NodeIterator.nextNode( ) NodeIterator.previousNode( ) NodeList NodeList.item( ) Notation ProcessingInstruction Range Range.cloneContents( ) Range.cloneRange( ) Range.collapse( ) Range.compareBoundaryPoints( ) Range.deleteContents( ) Range.detach( ) Range.extractContents( ) Range.insertNode( ) Range.selectNode( ) Range.selectNodeContents( ) Range.setEnd( ) Range.setEndAfter( ) Range.setEndBefore( ) Range.setStart( ) Range.setStartAfter( ) Range.setStartBefore( ) Range.surroundContents( ) Range.toString( ) RangeException Rect RGBColor StyleSheet StyleSheetList StyleSheetList.item( ) Text Text.splitText( ) TreeWalker TreeWalker.firstChild( ) TreeWalker.lastChild( ) TreeWalker.nextNode( ) TreeWalker.nextSibling( ) TreeWalker.parentNode( ) TreeWalker.previousNode( ) TreeWalker.previousSibling( ) UIEvent UIEvent.initUIEvent( ) ViewCSS Part VI: Class, Property, Method, and Event Handler Index Chapter 26. Class, Property, Method, and Event Handler Index Section 26.1. A Section 26.2. B Section 26.3. C Section 26.4. D Section 26.5. E Section 26.6. F Section 26.7. G Section 26.8. H Section 26.9. I Section 26.10. J Section 26.11. K Section 26.12. L Section 26.13. M Section 26.14. N Section 26.15. O Section 26.16. P Section 26.17. Q Section 26.18. R Section 26.19. S Section 26.20. T Section 26.21. U Section 26.22. V Section 26.23. W Section 26.24. X Section 26.25. Y Section 26.26. Z
调通sina33下的AP6212A0版本的BT 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 wb4916 AT qq.com 完成时间:2017/6/26 11:01 版本:V1.0 本文参照: 《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 "wlan0" "bt-pan" 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 1800000 true 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_ap6212.txt:system/vendor/modules/nvram_ap6212.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 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 uart_rx = port:PF04 [uart1] uart_used = 1 uart_port = 1 uart_type = 4 uart_tx = port:PG06 uart_rx = port:PG07 uart_rts = port:PG08 uart_cts = port:PG09 [uart2] uart_used = 1 uart_type = 4 uart_tx = port:PB00 uart_rx = port:PB01 uart_rts = port:PB02 uart_cts = port:PB03 [uart3] uart_used = 0 uart_type = 4 uart_tx = port:PH06 uart_rx = port:PH07 uart_rts = port:PH08 uart_cts = port:PH09 [uart4] uart_used = 0 uart_port = 4 uart_type = 2 uart_tx = port:PA04 uart_rx = port:PA05 uart_rts = port:PA06 uart_cts = port:PA07 ;---------------------------------------------------------------------------------- ;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 ctp_wakeup = port:PL03 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 ;ap6xxx_wl_regon = port:PL06 ;lcd_bl_en = port:PL06 lcd_power = "axp22_dc1sw" lcdd0 = port:PD18 lcdd1 = port:PD19 lcdd2 = port:PD20 lcdd3 = port:PD21 lcdd4 = port:PD22 lcdd5 = port:PD23 lcdd6 = port:PD24 lcdd7 = port:PD25 lcdd8 = port:PD26 lcdd9 = port:PD27 ;---------------------------------------------------------------------------------- ;pwm config ;---------------------------------------------------------------------------------- [pwm0_para] pwm_used = 0 pwm_positive = port:PH00 [pwm1_para] pwm_used = 1 pwm_positive = port:PH01 ;-------------------------------------------------------------------------------- ;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 - ap6181 sdio wifi gpio config ;ap6xxx_wl_regon = port:PL06 ;ap6xxx_wl_host_wake = port:PL07 ;ap6xxx_lpo_use_apclk = 1 ; 2 - ap6210 sdio wifi gpio config ap6xxx_wl_regon = port:PL06 ;ap6xxx_wl_regon = port:PD13 ap6xxx_wl_host_wake = port:PL07 ap6xxx_bt_regon = port:PL08 ap6xxx_bt_wake = port:PL10 ap6xxx_bt_host_wake = port:PL09 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 ;rtl8723bs_wl_regon = port:PL06 ;rtl8723bs_wl_host_wake = port:PL07 ;rtl8723bs_bt_regon = port:PL08 ;rtl8723bs_bt_wake = port:PL10 ;rtl8723bs_bt_host_wake = port:PL09 ;rtl8723bs_lpo_use_apclk = 0 ; 6 - eagle sdio wifi ;esp_wl_chip_en = port:PL03 ;esp_wl_rst = port:PL02 ;-------------------------------------------------------------------------------- ;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 expired [ 110.286694] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle [ 110.355684] [ap6xxx]: sdio wifi power state: on [ 110.3
调通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 "wlan0" "bt-pan" 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 1800000 true 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> uart_rx = port:PF04<3><1> [uart1] uart_used = 1 uart_port = 1 uart_type = 4 uart_tx = port:PG06<2><1> uart_rx = port:PG07<2><1> uart_rts = port:PG08<2><1> uart_cts = port:PG09<2><1> [uart2] uart_used = 1 uart_type = 4 uart_tx = port:PB00<2><1> uart_rx = port:PB01<2><1> uart_rts = port:PB02<2><1> uart_cts = port:PB03<2><1> [uart3] uart_used = 0 uart_type = 4 uart_tx = port:PH06<3><1> uart_rx = port:PH07<3><1> uart_rts = port:PH08<3><1> uart_cts = port:PH09<3><1> [uart4] uart_used = 0 uart_port = 4 uart_type = 2 uart_tx = port:PA04<2><1> uart_rx = port:PA05<2><1> uart_rts = port:PA06<2><1> uart_cts = port:PA07<2><1> ;---------------------------------------------------------------------------------- ;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> ctp_wakeup = port:PL03<1><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><1> ;ap6xxx_wl_regon = port:PL06<1><0> ;lcd_bl_en = port:PL06<1><0><1> lcd_power = "axp22_dc1sw" lcdd0 = port:PD18<3><0> lcdd1 = port:PD19<3><0> lcdd2 = port:PD20<3><0> lcdd3 = port:PD21<3><0> lcdd4 = port:PD22<3><0> lcdd5 = port:PD23<3><0> lcdd6 = port:PD24<3><0> lcdd7 = port:PD25<3><0> lcdd8 = port:PD26<3><0> lcdd9 = port:PD27<3><0> ;---------------------------------------------------------------------------------- ;pwm config ;---------------------------------------------------------------------------------- [pwm0_para] pwm_used = 0 pwm_positive = port:PH00<2><0> [pwm1_para] pwm_used = 1 pwm_positive = port:PH01<2><0> ;-------------------------------------------------------------------------------- ;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><0> ; 1 - ap6181 sdio wifi gpio config ;ap6xxx_wl_regon = port:PL06<1><0> ;ap6xxx_wl_host_wake = port:PL07<4><0> ;ap6xxx_lpo_use_apclk = 1 ; 2 - ap6210 sdio wifi gpio config ap6xxx_wl_regon = port:PL06<1><0> ;ap6xxx_wl_regon = port:PD13<1><0> ap6xxx_wl_host_wake = port:PL07<4><0> ap6xxx_bt_regon = port:PL08<1><0> ap6xxx_bt_wake = port:PL10<1><0> ap6xxx_bt_host_wake = port:PL09<4><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><0> ;rtl8723bs_wl_regon = port:PL06<1><0> ;rtl8723bs_wl_host_wake = port:PL07<4><0> ;rtl8723bs_bt_regon = port:PL08<1><0> ;rtl8723bs_bt_wake = port:PL10<1><0> ;rtl8723bs_bt_host_wake = port:PL09<4><0> ;rtl8723bs_lpo_use_apclk = 0 ; 6 - eagle sdio wifi ;esp_wl_chip_en = port:PL03<1><0> ;esp_wl_rst = port:PL02<1><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

12,798

社区成员

发帖
与我相关
我的任务
社区描述
CSDN 下载资源悬赏专区
其他 技术论坛(原bbs)
社区管理员
  • 下载资源悬赏专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧