Native Compiling
Introduction
With DebWrt installed on your device, you have a full Debian running. Including all the compile and build utils Debian offers on all of the supported architectures. And that is a lot! It is relatively easy to compile some software native on your device. Try that with OpenWrt or others ;-) If the package is to big to compile for your device, you will need to do cross-compiling. See DebWrtDevCross.
To get you started:
apt-get install build-essential
Examples
Native compiling Debian source packages
apt-get source <package> apt-get build-dep <package> cd <package-dir> dpkg-buildpackage
Native compiling of xtables kernel modules using Debian module assistant
- Download and install DebWrt kernel modules package for your device if these are not already installed: http://www.debwrt.net/download/releases/2.0/src/
- Next, use module-assistant to compile the xtable-addons kernel modules:
apt-get install xtables-addons-source apt-get install xtables-addons-common apt-get install kernel-package apt-get install libncurses5-dev cd /usr/src/linux make scripts m-a -t -v --kernel-dir=/usr/src/linux-headers-2.6.32.20/ build xtables-addons
- or if you want to debug the compile:
cd /usr/src/modules/xtables-addons /usr/bin/make -C /usr/src/linux-headers-2.6.32.20/ M=/usr/src/modules/xtables-addons XA_ABSTOPSRCDIR=/usr/src/modules/xtables-addons
Native compiling of Linux wireless drivers ( compat-wireless ) from source
In this example we will compile compat-wireless drivers for realtek 8192 based devices. Adjust with /scripts/driver-select to select b43 or other supported drivers.
- Install DebWrt kernel headers package for your kernel version
- Download and untar http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2
- cd compat-wireless-<version>
- export KLIB=/usr/src/linux-headers-<kversion>/
- export KLIB_BUILD=/usr/src/linux-headers-<kversion>/
- /scripts/driver-select rtlwifi
- make
- make install
- depmod -a
- modprobe rtl8192cu ( modprobe your module )
Last modified 11 years ago
Last modified on Aug 14, 2011, 3:32:03 PM