How to Compile Modules for AsusWRT Routers

This is mostly for advanced users who want to compile various modules.

In this case I will show you how to compile UVC modules because on almost every kernel changes they must be recompiled.

I will use this guide as reference https://github.com/RMerl/asuswrt-merlin/wiki/Compile-Firmware-from-source-using-Ubuntu to build a RT-AC56U firmware

My Ubuntu username is thx and all paths in this tutorial should be replaced with your Ubuntu username, if you followed this guide exactly your username should be router (ex. /home/thx/asuswrt-merlin become /home/router/asuswrt-merlin)

To start, you have to build a firmware successfully and get a message like this:

build-ac56u-success

Go to kernel directory and input "make menuconfig"

cd /home/thx/asuswrt-merlin/release/src-rt-6.x.4708/linux/linux-2.6.36
make menuconfig

Ncurses interface should show up, choose Device Drivers and press Enter

build-ac56u-ncurses1

Select Multimedia support, press M then Enter

build-ac56u-ncurses2

Select Video For Linux and press M

build-ac56u-ncurses3

Go down and select Video capture adapters, press Y then press Enter

build-ac56u-ncurses4

Select V4L USB devices, press Y then Enter

build-ac56u-ncurses5

Select USB Video Class (UVC) and press M

build-ac56u-ncurses6

 

Press ESC until you are asked: Do you wish to save your new kernel configuration?, Select Yes then press Enter

build-ac56u-ncurses7

Go to build folder and type "make kernel"

cd /home/thx/asuswrt-merlin/release/src-rt-6.x.4708
make kernel

It's time to extract video modules and make an archive

cd /home/thx/Desktop
make -C /home/thx/asuswrt-merlin/release/src-rt-6.x.4708/linux/linux-2.6.36 modules_install INSTALL_MOD_PATH=/home/thx/Desktop/opt
sudo chmod 777 -R /home/thx/Desktop/opt
tar -cvzf ./uvc_modules.tgz \
./opt/lib/modules/2.6.36.4brcmarm/modules.alias \
./opt/lib/modules/2.6.36.4brcmarm/modules.dep \
./opt/lib/modules/2.6.36.4brcmarm/kernel/drivers/input/input-core.ko \
./opt/lib/modules/2.6.36.4brcmarm/kernel/drivers/usb/core/usbcore.ko \
./opt/lib/modules/2.6.36.4brcmarm/kernel/drivers/media/video/
chmod 777 ./uvc_modules.tgz

Now you have an archive with fresh modules on your Ubuntu Desktop  :)

Enjoy...

Get Email Notification When a Server or Port is Unreachable
SoftEther VPN Running on AsusWRT Routers
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Spreed WebRTC server and web client
Asterisk VoIP Server running on AsusWRT Routers
Get Email Notification When a Server or Port is Unreachable
SoftEther VPN Running on AsusWRT Routers
NZBGet through Entware
Minidlna UPnP Media Server through Debian Jessie Arm

SUBSCRIBE

To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...