# Driver for RTL8153

**URL:** <https://forum.legato.io/t/driver-for-rtl8153/4337>\
**Category:** Legato Linux distribution (Yocto project)\
**Created:** [May 10, 2019, 4:34pm UTC](https://forum.legato.io/t/driver-for-rtl8153/4337 "2019-05-10T16:34:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paap](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paap](https://forum.legato.io/u/paap)\
**Post date:** [May 10, 2019, 4:34pm UTC](https://forum.legato.io/t/driver-for-rtl8153/4337/1 "2019-05-10T16:34:06Z")

</div>

Does anybody know how to install driver for RTL8153 ? Can I just enable or install it in WP7502 module or do I need to rebuilt kernel? any help appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![JayM2M](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@JayM2M](https://forum.legato.io/u/JayM2M)\
**Post date:** [May 28, 2019, 8:22am UTC](https://forum.legato.io/t/driver-for-rtl8153/4337/2 "2019-05-28T08:22:05Z")

</div>

Hi,

If you are not affraid by Yocto then you can rebuild an image with RTL8152/RTL8153 kernel driver enabled as module:

- In your `linux-yocto_3.14.bbappend` recipe, add:  
`FILESEXTRAPATHS_prepend := "${THISDIR}/files:"`  
`SRC_URI += "file://enable-RTL8153.cfg"`
- In the folder where your `linux-yocto_3.14.bbappend` recipe is located, create a folder “`files`” and create in this folder a file named “`enable-RTL8153.cfg`” with the following content:  
`CONFIG_USB_RTL8152=m`
- In your `mdm9x15-image-minimal.bbappend` recipe, add:  
`IMAGE_INSTALL_append = " kernel-module-r8152"`

Rebuild and flash `yocto_wp75.cwe` image.

Then you should be able to load the kernel module using this command:  
`modprobe r8152`

If you don’t want to generate your own Yocto image then you can use Legato Kernel Module Definition .mdef:

> **[Kernel Module Definition .mdef - Legato Docs](https://docs.legato.io/18_06/defFilesMdef.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

If you are using WP75 release R16.1 or newer, you can build from source.  
Latest Realtek driver source code for RTL8152/RTL8153 is available on their web site:  
[https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software](https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software)

* * *

Jay

---

<div class="post-metadata">

**Author:** ![Elmo](https://avatars.discourse-cdn.com/v4/letter/e/e480ec/32.png) [@Elmo](https://forum.legato.io/u/Elmo)\
**Post date:** [June 5, 2019, 6:06pm UTC](https://forum.legato.io/t/driver-for-rtl8153/4337/3 "2019-06-05T18:06:02Z")

</div>

Hi, I’m trying to do the same kind of thing. The problem is that I’m not too familiar with Yocto and kernel stuff. I’m having a bit hard time understanding how to do this, so is there any specific instructions for newbie how to create a new kernel module and build from source? I tried to create a new folder under mangOH/linux\_kernel\_modules on mangOH VM with downloaded drivers and .mdef-file. Then I tried to rebuild mangOH system as it was advised to do in here ([mangOH Red mt7697 WiFi · mangOH/mangOH Wiki · GitHub](https://github.com/mangOH/mangOH/wiki/mangOH-Red-mt7697-WiFi#rebuild-your-mangoh-system-to-incorporate-the-wifi-patches)). I managed to install the system but somehow it installed it with framework version 18.09.0 (I used to be on 18.06.4) which then broke all my existing applications. Am i anywhere near doing this right and how can I downgrade my device?

-Elmo
