Enabling kernel drivers


I have a VIM2 Pro running Ubuntu xfce bionic Linux 4.9. What I am trying to do is run an Edimax EW-7811Un USB adapter. The build in wifi adapter works great but I want two independent wifi adapters as I plan to use this as a travel router. I understand that the drivers are disabled in the kernel so I set off to create my own Ubuntu build with the drivers enabled.

Using the Fenix script I built a new image using the config below.

Fenix Version: 0.5
Khadas Board: VIM2
Uboot Version: 2015.01
Uboot Configuration: kvim2_defconfig
Uboot Branch: khadas-vim-v2015.01
Linux Version: 4.9
Linux Configuration: kvim_defconfig
Linux DTB: arch/arm64/boot/dts/amlogic/kvim2_linux.dtb
Linux Branch: khadas-vim-4.9.y
Distribution: Ubuntu
Distribution Release: bionic
Distribution Type: xfce
Distribution Arch: arm64
Install Type: EMMC
Final Image: VIM2_Ubuntu-xfce-bionic_Linux-4.9_arm64_EMMC_V20190105.img

I first build an image without making any config changes just to make sure I was able to successfully create the image, load it onto the VIM2 and boot it. Thankfully the image built, loaded and booted fine.

I then did a make clean, added CONFIG_USB_RTL8192CU=m to project/fenix/linux/arch/arm64/configs/defconfig and did another make. The resulting image did not have CONFIG_USB_RTL8192CU=m in its config. I then did another make clean, added CONFIG_USB_RTL8192CU=m to the project/fenix/linux/arch/arm64/configs/kvim_defconfig file and did another make. The resulting image did not have CONFIG_USB_RTL8192CU=m in its config.


  1. What config file do I have to add (or un-comment) CONFIG_USB_RTL8192CU=m in order to have that module loaded in the image being built?
  2. Once update the proper config do I have to do a make clean followed by make again or can I just rebuild the kernel? If I can just rebuild the kernel how do I do that and how do I use that updated kernel on a VIM2?



The configuration for VIM2 is kvim_defconfig not defconfig. Please follow the instructions to enable new configuration:

$ cd linux
$ make ARCH=arm64 kvim_defconfig
$ make ARCH=arm64 menuconfig       # Enable your configuration
$ make ARCH=arm64 savedefconfig
$ mv defconfig arch/arm64/configs/kvim_defconfig

You don’t need to clean the kernel source code, you can enter the fenix root directory and rebuild the kernel and debs:

$ cd fenix
$ make kernel
$ make debs

The new kernel debs will be generated in directory: build/images/debs/0.5, copy them to VIM2, and install them

khadas@Khadas $ sudo dpkg -i linux-image-amlogic-s912-4.9_0.5_arm64.deb
khadas@Khadas $ sync
khadas@Khadas $ sudo reboot


Thanks for the quick response. I’ve been able to successfully build new kernels and add support for different wireless USB adapters.



What is the best way to update kernel drivers in the DualOS build? I installed the VIM2_DualOS_Nougat_Ubuntu-16.04_V180622 image and Ubuntu is using the 4.9.40 kernel. Using Fenix I can only get mainline or Is it possible for me to create my own DualOS image to have more control over Ubuntu distro and kernel used?



You can use Fenix to build 4.9.40 deb packages .

For DualOS we don’t have auto scripts, you need to use Ubuntu rootfs to pack the image.


How do I use Fenix to build 4.9.40 deb packages? In Fenix I only see kernel options for 3.14,, and mainline versions.


Hello tbamkh,

Where is


My Bad! I was looking at the deb file names and assumed the numbers represented the full kernel version which they do not. I can see that the distro being pulled by Fenix is khadas-vim-4.9.y from GitHub which is 4.9.40.

When trying to install the debs I get the error below and it leaves the system in a state where it hangs at the Khadas screen upon reboot.

error when installing kernel debs:
khadas@Khadas:~/Mint Kernel$ sudo dpkg -i linux-image-amlogic-4.9_0.5_arm64.deb [sudo] password for khadas:
Selecting previously unselected package linux-image-amlogic-4.9.
(Reading database … 155045 files and directories currently installed.)
Preparing to unpack linux-image-amlogic-4.9_0.5_arm64.deb …
Unpacking linux-image-amlogic-4.9 (0.5) …
dpkg: error processing archive linux-image-amlogic-4.9_0.5_arm64.deb (–install):
trying to overwrite ‘/boot/System.map-4.9.40’, which is also in package linux-image-amlogic-s912-linux-4.9 0.3
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
khadas@Khadas:~/Mint Kernel$


Well, the package name changed for current code. In the old image, Fenix version 0.3 the package name is linux-image-amlogic-s912-linux-4.9, you need to remove it and install the new one.

khadas@Khadas:~$ sudo dpkg -r linux-image-amlogic-s912-linux-4.9
khadas@Khadas:~$ sudo dpkg -i linux-image-amlogic-4.9_0.5_arm64.deb


That worked perfect, thx!!