make kernel module packaging code reusable and use it in madwifi