跳转到内容
新建笔记

Linux开启RNDIS,实现虚拟网卡

共需要配置两块内容:Networking support 和 Device Drivers。

首先要 `make clean`,清空之前的编译结果。由于之前还 用了` make linux-licheepi_nano_defconfig`,这里直接将使用源码的.config。

Networking support部分:

 Networking support --->  Networking options分别勾选:

**        <*> Packet socket**

**         <*> Unix domain sockets **

**         [*] TCP/IP networking**

**         [*]   IP: kernel level autoconfiguration **

**         [*]     IP: DHCP support **

**        [*]     IP: BOOTP support  **

**        -*- DNS Resolver support**

** Device Drivers 部分:**

 [*] Network device support   进入,勾选:

         [*]   Network core driver support 

         [*]   Ethernet driver support  ---> 

        <*>   USB Network Adapters  --->

[*] USB support  --->  进入,勾选:

        <*>   Support for Host-side USB

        [*]   Enable USB persist by default 

        [*]   Dynamic USB minor allocation

        [*]   OTG support

         <*>   EHCI HCD (USB 2.0) support

         <*>     Generic EHCI driver for a platform device

        <*>   OHCI HCD (USB 1.1) support

        <*>     Generic OHCI driver for a platform device

        <*>   USB Mass Storage support

         <*>   Inventra Highspeed Dual Role Controller

        MUSB Mode Selection (Dual Role mode)  ---> (X) Dual Role mode 

        <*>     Allwinner (sunxi)

         USB Physical Layer drivers  ---> <*> NOP USB Transceiver Driver 

        <*>   USB Gadget Support  ---> 

                        [*]   Serial gadget console support

                         <*>   USB Gadget functions configurable through configfs

                                        [*]     Generic serial bulk in/out

                                        [*]     Abstract Control Model (CDC ACM) 

                                        [*]     Object Exchange Model (CDC OBEX)

                                        [*]     Network Control Model (CDC NCM) 

                                        [*]     Ethernet Control Model (CDC ECM)

                                        [*]     Ethernet Control Model (CDC ECM) subset

                                        [*]     RNDIS

                                        [*]     Ethernet Emulation Model (EEM)

                                        [*]     Function filesystem (FunctionFS)


来源:CSDN 原文,首次发布于 2024-08-15。