From: "Saved by Windows Internet Explorer 8" Subject: UsbConfigDevRNDIS - Texas Instruments Embedded Processors Wiki Date: Fri, 19 Oct 2012 11:48:51 -0700 MIME-Version: 1.0 Content-Type: multipart/related; type="text/html"; boundary="----=_NextPart_000_0000_01CDADEF.B559C280" X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01CDADEF.B559C280 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Location: http://processors.wiki.ti.com/index.php/UsbConfigDevRNDIS =EF=BB=BF
|
Contents |
This page describes the Linux kernel config options for usb RNDIS = gadget on=20 different kernel versions. Please refer the config option which matches = with=20 kernel version of release you are using.
Start the Linux Kernel Configuration tool:
$ make = CROSS_COMPILE=3Darm-arago-linux-gnueabi- ARCH=3Darm menuconfig
Select Device Drivers from the main menu.
... ... Power management options ---> [ ] Networking support ---> Device Drivers ---> File systems ---> Kernel hacking ---> ... ...
Select USB support as shown here
... ... <*> Sound card support ---> [*] HID Devices ---> [*] USB support ---> <*> MMC/SD/SDIO card support ---> ...=20 ...
Go to USB Gadget Support as shown here
... ... < > USB YUREX driver support <*> USB Gadget Support ---> *** OTG and related infrastructure *** < > GPIO based peripheral-only VBUS sensing 'transceiver' ... ...
Select Inventra HDRC USB Peripheral as shown here
= ... ... (2) Maximum VBUS Power usage (2-500 mA) (2) Number of storage pipeline buffers <*> USB Peripheral Controller (Inventra HDRC USB Peripheral = (TI, ADI, ...)) ---> < > USB Gadget Drivers=20 ... ...
Select Ethernet Gadget as shown here
... ... <*> USB Peripheral Controller (Inventra HDRC USB Peripheral = (TI, ADI, ...)) ---> < > USB Gadget Drivers=20 ... <M> Ethernet Gadget (with CDC Ethernet support) [*] RNDIS support [ ] Ethernet Emulation Model (EEM) support ... ...
This is all required for adding USB RNDIS gadget support in kernel. =
RNDIS gadget driver module can be inserted using $ insmod=20
g_ether.ko
The RNDIS Gadget driver will create an Ethernet device by the name = usb0. You=20 need to assign an IP address to the device and bring up the device. The = typical=20 command for that would be:
$ ifconfig usb0 =
<IP_ADDR>=20
netmask 255.255.255.0 up
=0A= //Version: 3.1=0A= //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= // en: ADD SOME EXTRA BUTTONS TO THE EDITPANEL=0A= // de: F=C3=9CGE NEUE BUTTON IN DIE WERKZEUGLEISTE=0A= //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= // Vorschl=C3=A4ge f=C3=BCr neue Buttons werden gerne entgegengenommen=0A= // Die Reihenfolge und Anzahl der Buttons ist =C3=BCber die = (alphabetische) Variable XEBOrder w=C3=A4hlbar.=0A= =0A= //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=0A= //Control Variables=0A= //=0A= //rmEditButtons - Removes standard toolbar buttons=0A= //XEBOrder - The order in which the buttons are displayed=0A= =0A= document.write('');=0A= =0A= if(typeof XEBPopups=3D=3D 'undefined')XEBPopups=3Dtrue;=0A= if(typeof XEBHideDelay=3D=3D 'undefined')XEBHideDelay=3D0.5; //Time = before the popup disappears after the mouse moves out=0A= if(typeof XEBExtendEditSummary =3D=3D = 'undefined')XEBExtendEditSummary=3Dtrue; // Is the edit summary extended = after a popup=0A= =0A= //fills the variable mwCustomEditButtons (s. function in /wikibits.js), = with buttons for the Toolbar =0A= function addCustomButton(imageFile, speedTip, tagOpen, tagClose, = sampleText){=0A= mwCustomEditButtons.push({=0A= "imageFile": imageFile,=0A= "speedTip": speedTip,=0A= "tagOpen": tagOpen,=0A= "tagClose": tagClose,=0A= "sampleText": sampleText});=0A= }=0A= =0A= if (typeof usersignature =3D=3D 'undefined') var usersignature =3D '-- = \~\~\~\~';=0A= =0A= var Isrc=3D'http://upload.wikimedia.org/wikipedia/commons/';=0A= =0A= // English Wikipedia creates 11 extra buttons which are stored in = mwCustomEditButtons=0A= // rather than mwEditButtons. However, there is no guarantee it will = always be 11=0A= // so we count them here. =0A= var enExtraButtons=3DmwCustomEditButtons.length;=0A= =0A= =0A= var BDict=3D{=0A= 'A':['e/e9/Button_headline2.png','Secondary = headline','\n=3D=3D=3D','=3D=3D=3D','Secondary headline'],=0A= 'B':['1/13/Button_enter.png','Line break','
','',''],=0A= 'C':['5/5f/Button_center.png','Center','\n','\n<\/div>','Centred text'],=0A= 'D':['e/ea/Button_align_left.png','Left-Align','\n','\n<\/div>','Left-aligned text'],=0A= 'D1':['a/a5/Button_align_right.png','Right-Align','\n','\n<\/div>','Right-aligned text'],=0A= 'E':['0/04/Button_array.png','Table','\n{| class=3D"wikitable" \n|- \n| = 1 || 2\n|- \n| 3 || 4','\n|}\n',''],=0A= 'F':['1/1e/Button_font_color.png','Insert coloured text','Coloured text<\/span>','ColourName'],=0A= 'FS':['1/1b/Button_miss_signature.png','Unsigned = post','{{subst:unsigned|','|date}}','user name or IP'],=0A= 'G':['9/9e/Btn_toolbar_gallery.png','Picture = gallery',"\n";=0A= this.div.innerHTML=3Dmt;=0A= //Turn off autocomplete. If the mouse moves over the autocomplete popup = then x,y in CheckHidePopup is relative to the=0A= // autocomplete popup and our popup is hidden=0A= var InTexts =3D this.div.getElementsByTagName('input');=0A= for (var i =3D 0; i < InTexts.length; i++) {=0A= var theInput =3D InTexts[i];=0A= if (theInput.type =3D=3D = 'text'){theInput.setAttribute('autocomplete','off');}=0A= }=0A= //Add rollover features to menu items. Doing it here means we don't have = to do it for each menu=0A= x=3DXEBgetElementsByClassName(this.div,'XEBMnuItm','span');=0A= for (var i =3D 0; i < x.length; i++) {=0A= var theItm =3D x[i];=0A= theItm.onmouseout=3DXEBMenuMouseOut;=0A= theItm.onmouseover=3DXEBMenuMouseOver;=0A= }=0A= =0A= this.div.style.borderWidth=3D'thin';=0A= this.div.style.borderStyle=3D'solid';=0A= this.div.style.backgroundColor=3D'#D0D0D0';=0A= }=0A= XEBPopup.prototype.width=3D250;=0A= XEBPopup.prototype.dragging=3Dfalse;=0A= XEBPopup.prototype.setInnerHTML=3DsetInnerHTML;=0A= =0A= var curPopup;=0A= =0A= function GetPos(e)=0A= {=0A= this.x=3De.clientX-10+ document.documentElement.scrollLeft + = document.body.scrollLeft;=0A= this.y=3De.clientY-10+ document.documentElement.scrollTop + = document.body.scrollTop;=0A= }=0A= =0A= function XEBPopupTable(e){=0A= m=3Dnew GetPos(e||event);=0A= =0A= curPopup=3Dnew XEBPopup("table",m.x,m.y);=0A= =0A= mt=3D'\nImage:","|[[M63]]\nImage:Mona Lisa.jpg|[[Mona = Lisa]]\nImage:Truite arc-en-ciel.jpg|Eine [[Forelle = ]]\n<\/gallery>",'M63.jpg'],=0A= 'H':['7/74/Button_comment.png','Comment',"",'Comment'],=0A= 'I1':['6/6a/Button_sup_letter.png','Superscript','','<\/sup>','Super= script text'],=0A= 'I2':['a/aa/Button_sub_letter.png','Subscript','','<\/sub>','Subscri= pt text'],=0A= 'J1':['5/58/Button_small.png','Small','','<\/small>','Small = Text'],=0A= 'J2':['5/56/Button_big.png','Big text','','<\/big>','Big text'],=0A= 'K':['b/b4/Button_category03.png','Category',"[[Category:","]]",'Category= name'],=0A= 'L':['8/8e/Button_shifting.png','Insert tab(s)',':','',':'],=0A= 'M':['f/fd/Button_blockquote.png','Insert block of quoted = text',' \n','\n<\/blockquote>','Block quote'],=0A= 'N':['4/4b/Button_nbsp.png','nonbreaking space','=C2=A0','',''],=0A= 'O':['2/23/Button_code.png','Insert code','','<\/code>','Code'],=0A= 'P':['3/3c/Button_pre.png','Pre formatted Text','
','<\/pre>','Pre = formatted text'],=0A= 'P1':['9/93/Button_sub_link.png','Insert link to = sub-page','[[','/Sub_Page]]','Page'],=0A= 'Q':['d/d3/Button_definition_list.png','Insert definition list','\n; = ','\n: Item 1\n: Item 2','Definition'],=0A= 'R':['7/79/Button_reflink.png','Insert a = reference','','<\/ref>','Insert reference material'],=0A= 'R1':['7/79/Button_reflink.png','Start a reference','','','Reference material'],=0A= 'R3':['1/1a/Button_reflink_advanced_3.png','No reference = material','','"/>',''],=0A= 'R4':['9/9a/Button_references.png','Reference = footer',"\n=3D=3DNotes=3D=3D\n\n\n",'',''],=0A= 'S':['c/c9/Button_strike.png','Strikeout','\n ','<\/s>','Struck out = text'],=0A= 'T':['e/eb/Button_plantilla.png','Template','{{','}}','Template name'],=0A= 'TS':['a/a4/TableStart.png','Start a table','{|','',''],=0A= 'TC':['7/71/TableCell.png','Table cell','|','',''],=0A= 'TE':['0/06/TableEnd.png','End a table','','|}',''],=0A= 'TR':['4/4c/TableRow.png','Start a table row','|-','',''],=0A= 'T1':['3/30/Tt_icon.png','Teletype text','','<\/tt>','Teletype = Text'],=0A= 'TL':['3/37/Button_tl_template.png','Template = link',"{{subst:"+"tl|",'}}','Template name'],=0A= 'U':['f/fd/Button_underline.png','Underlined',"","<\/u>",'Underlined = text'],=0A= 'V':['c/c8/Button_redirect.png','Redirect',"#REDIRECT [[","]]",'Article = Name'],=0A= 'W':['8/88/Btn_toolbar_enum.png','Numbering',"\n# ","\n# Element 2\n# = Element 3",'Element 1'],=0A= 'X':['1/11/Btn_toolbar_liste.png','List',"\n* ","\n* Element B\n* = Element C",'Element A'],=0A= 'Y1':['c/ce/Button_no_include.png','No = Include',"","<\/noinclude>",'Text'],=0A= 'Y2':['7/79/Button_include.png','Include = only'," ","<\/includeonly>",'Text'],=0A= 'Z':['3/35/Button_substitute.png','Substitute',"{{subst:","}}",'Template'= ],=0A= 'AI':['1/1c/Button_advanced_image.png','Advanaced = Image',"[[Image:","|thumb|right|px|Caption]]",'FileName.jpg'],=0A= 'GEO':['b/b8/Button_Globe.png','Geo location',"","",""],=0A= 'TALK':['4/49/Button_talk.png','Add talk template',"","",""]=0A= };=0A= =0A= var XEBOrder2=3D[];=0A= =0A= =0A= =0A= =0A= addOnloadHook(initButtons);=0A= if(!wgIsArticle)// only if edit=0A= { =0A= =0A= if(XEBPopups)hookEvent("load", extendButtons);=0A= }=0A= =0A= function initButtons(){=0A= =0A= var bc,d;=0A= =0A= if (typeof XEBOrder!=3D'string') // can be modified=0A= XEBOrder2=3D"A,D,C,D1,F,U,J1,E,G,Q,W,X,K,L,H,O,R,T".split(",");=0A= else if (XEBOrder.toLowerCase()=3D=3D'all') =0A= for (b in BDict) XEBOrder2.push(b);=0A= else XEBOrder2=3DXEBOrder.toUpperCase().split(",");=0A= =0A= for (b in BDict) BDict[b][0] =3D Isrc+BDict[b][0]; // // Add the start = of the URL (Isrc) to the XEB buttons=0A= // If the user has defined any buttons then add them into the available = button lists =0A= =0A= if (typeof myButtons=3D=3D'object')=0A= for (b in myButtons) BDict[b] =3D myButtons[b]; // custom user buttons=0A= // Add the media wiki standard buttons into the available buttons =0A= =0A= for (b in mwEditButtons) { // add standard buttons for full XEB order = changing=0A= =0A= // BDict[b]=3D[];=0A= BDict[b]=3D[mwEditButtons[b].imageFile,mwEditButtons[b].speedTip,mwEditBu= ttons[b].tagOpen,mwEditButtons[b].tagClose,mwEditButtons[b].sampleText];=0A= =0A= // for (d in mwEditButtons[b]) BDict[b].push(mwEditButtons[b][d]);=0A= }=0A= =0A= // Build the new buttons =0A= =0A= for (i=3D0;i =3D0 && n =3Dn)=0A= mwEditButtons[x] =3D mwEditButtons[x+1];=0A= }=0A= mwEditButtons.pop();=0A= }=0A= //Extra buttons in English Wikipedia=0A= n=3Dn-mwEditButtons.length;=0A= if(n>0 && n =3Dn)=0A= mwCustomEditButtons[x] =3D mwCustomEditButtons[x+1];=0A= }=0A= mwCustomEditButtons.pop();=0A= }=0A= }=0A= };=0A= =0A= //Function:=0A= // sortit=0A= //Purpose:=0A= // Used to sort the rmEditButtons array into descending order=0A= function sortit(a,b){=0A= return(b-a)=0A= }=0A= =0A= =0A= //Function:=0A= //Purpose:=0A= // Adds extended onclick-function to some buttons =0A= function extendButtons(){=0A= =0A= if(!(allEditButtons =3D document.getElementById('toolbar'))) return = false;=0A= if(typeof editform !=3D 'undefined')=0A= if(!(window.editform =3D document.forms['editform'])) return false;=0A= =0A= // table=0A= extendAButton(Isrc+"0/04/Button_array.png",XEBPopupTable)=0A= extendAButton(Isrc+"7/79/Button_reflink.png",XEBPopupRef)=0A= extendAButton(Isrc+"b/b8/Button_Globe.png",XEBPopupGeoLink)=0A= extendAButton(Isrc+"4/49/Button_talk.png",XEBPopupTalk)=0A= extendAButton(Isrc+"1/1c/Button_advanced_image.png",XEBPopupImage)=0A= //extendAButton(Isrc+"6/6a/Button_sup_letter.png",XEBPopupFormattedText)=0A= =0A= // redirect -##IE doesn't like this line. Object doesn't support this = property or method=0A= //c=3DXEBOrder2.getIndex('V');=0A= =0A= // if(c !=3D -1)=0A= // allEditButtons[bu_len+c].onclick=3Dfunction(){=0A= // var a=3D'#REDIRECT \[\['+prompt("Which page do you want to redirect = to\?")+'\]\]';=0A= // document.editform.elements['wpTextbox1'].value=3Da;=0A= // document.editform.elements['wpSummary'].value=3Da;=0A= // document.editform.elements['wpWatchthis'].checked=3Dfalse=0A= // };=0A= };=0A= =0A= function extendAButton(url,newfunc)=0A= {=0A= if(!(allEditButtons =3D document.getElementById('toolbar'))) return = false;=0A= if(typeof editform !=3D 'undefined')=0A= if(!(window.editform =3D document.forms['editform'])) return false;=0A= allEditButtons =3D allEditButtons.getElementsByTagName('img');=0A= for(i=3D0;i (pl+2)&&x<(pl+pw-5)&&y>(pt+2)&&y<(pt+ph-5))return;=0A= curPopup.hideTimeout=3DsetTimeout('hideXEBPopup()',XEBHideDelay*1000);=0A= }=0A= =0A= function cancelHidePopup()=0A= {=0A= clearTimeout(curPopup.hideTimeout)=0A= }=0A= =0A= function hideXEBPopup(){=0A= XEBMainDiv=3D document.getElementById("XEB");=0A= m=3D document.getElementById("XEBPopup");=0A= XEBMainDiv.removeChild(m);=0A= }=0A= =0A= function XEBstartDrag(e)=0A= {=0A= m=3Dnew GetPos(e||event);=0A= curPopup.startDrag.mouse=3Dm;=0A= curPopup.startDrag.floatpopup.y=3DparseInt(curPopup.div.style.top);=0A= curPopup.startDrag.floatpopup.x=3DparseInt(curPopup.div.style.left);=0A= curPopup.dragging=3Dtrue;=0A= }=0A= =0A= function XEBstopDrag(e)=0A= {=0A= if(curPopup.dragging=3D=3Dfalse)return;=0A= curPopup.dragging=3Dfalse;=0A= }=0A= =0A= function XEBDrag(e)=0A= {=0A= if(curPopup.dragging=3D=3Dfalse)return;=0A= =0A= m=3Dnew GetPos(e||event);=0A= = x=3DparseInt(curPopup.startDrag.floatpopup.x+(m.x-curPopup.startDrag.mous= e.x));=0A= = y=3DparseInt(curPopup.startDrag.floatpopup.y+(m.y-curPopup.startDrag.mous= e.y));=0A= =0A= curPopup.div.style.top=3Dy+"px";=0A= curPopup.div.style.left=3Dx+"px";=0A= =0A= curPopup.x=3Dx;=0A= curPopup.y=3Dy;=0A= }=0A= =0A= //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=0A= // Popup: Table=0A= //=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=0A= =0A= function XEBPopup(name,x,y)=0A= {=0A= // Make sure the popup can appear on the screen=0A= =0A= this.IESelectedRange=3DXEBgetIESelectedRange();=0A= =0A= winW=3D(is_gecko)?window.innerWidth:document.body.offsetWidth;=0A= if((winW-this.width) ";=0A= mt+=3D' Title'=0A= mt+=3Dtext;=0A= mt+=3D"Enter the table parameters below: <\/p>'=0A= +'