wiki:Linux/Ubuntu/Kernel/BuildLinuxRestrictedModules

Build Linux Restricted Modules (L-R-M)

apt-get install libqt3-headers libqt3-mt-dev x11proto-record-dev x11proto-xf86misc-dev x11proto-xf86vidmode-dev libxxf86vm-dev
apt-get source linux-restricted-modules-common

Edit debian/rules and in each ARCH section edit the flavours to be built if you haven't built all kernel flavours.

fakeroot debian/rules binary