09.03
I’m trying to log how I built an rtl8190 DKMS package, the info may not correct and only works for me.
tar xf rtl8190p_linux_2.6.0011.1029.2009.tar.gz
sudo mv rtl8190p_linux_2.6.0011.1029.2009 /usr/src/rtl8190p-0011.1029.2009/
Modified the Makefile and copy out the .ko file
@make -C $(KSRC) SUBDIRS=$(RTL819x_DIR)/HAL/$(HAL_SUB_DIR) modules
+ cp ./HAL/rtl8192/r8190_pci.ko .
Prepare files needed, “dkms.conf”, “install.sh”, “remove.sh”
% cat /usr/src/rtl8190p-0011.1029.2009/dkms.conf
PACKAGE_NAME="rtl8190p"
PACKAGE_VERSION="0011.1029.2009"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="r8190"
DEST_MODULE_NAME[0]="r8190"
DEST_MODULE_LOCATION[0]="/updates"
POST_INSTALL="install.sh $dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION"
POST_REMOVE="remove.sh"
AUTOINSTALL="yes"
% cat /usr/src/rtl8190p-0011.1029.2009/install.sh
cp -a firmware/RTL8190P /lib/firmware/
% cat /usr/src/rtl8190p-0011.1029.2009/remove.sh
rm -rf /lib/firmware/RTL8190P
And remember to give them execution permission
sudo chmod a+x /usr/src/rtl8190p-0011.1029.2009/{install,remove}.sh
Add this driver into dkms system
% sudo dkms add -m rtl8190p -v 0011.1029.2009
Creating symlink /var/lib/dkms/rtl8190p/0011.1029.2009/source ->
/usr/src/rtl8190p-0011.1029.2009
DKMS: add Completed.
Try to build it
% sudo dkms build -m rtl8190p -v 0011.1029.2009
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....
make KERNELRELEASE=2.6.35-19-generic............
cleaning build area....
DKMS: build Completed.
No error, so try to install it and see if everything all correct.
% sudo dkms install -m rtl8190p -v 0011.1029.2009
r8190_pci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/2.6.35-19-generic/updates/dkms/
Running post_install:
depmod....
DKMS: install Completed.
Now, try to load the module and test the driver
sudo modprobe r8190_pci
dmesg | tail
Pack the .deb package
% sudo dkms mkdsc -m rtl8190p -v 0011.1029.2009 --source-only
Using /etc/dkms/template-dkms-mkdsc
copying template...
modifying debian/changelog...
modifying debian/compat...
modifying debian/control...
modifying debian/copyright...
modifying debian/dirs...
modifying debian/postinst...
modifying debian/prerm...
modifying debian/README.Debian...
modifying debian/rules...
copying legacy postinstall template...
Copying source tree...
Building source package... dpkg-source --before-build rtl8190p-dkms-0011.1029.2009
debian/rules clean
dpkg-source -b rtl8190p-dkms-0011.1029.2009
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-genchanges -S >../rtl8190p-dkms_0011.1029.2009_source.changes
dpkg-genchanges: including full source code in upload
dpkg-source --after-build rtl8190p-dkms-0011.1029.2009
DKMS: mkdsc Completed.
Moving built files to /var/lib/dkms/rtl8190p/0011.1029.2009/dsc...
Cleaning up temporary files...
You can find the .deb file here
% ls -l /var/lib/dkms/rtl8190p/0011.1029.2009/deb
total 2020
-rw-r--r-- 1 root root 2066436 Sep 3 20:21 rtl8190p-dkms_0011.1029.2009_all.deb
No Comment.
Add Your Comment