kmod: upgraded to v21, added support for target builds.

This commit is contained in:
Ricardo Martins 2015-09-28 16:11:36 +01:00
parent 342137c4a7
commit 8f7fc2b452
2 changed files with 49 additions and 0 deletions

19
rules/kmod/common.bash Normal file
View File

@ -0,0 +1,19 @@
version=\
(
'21'
)
url=\
(
"http://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-$version.tar.xz"
)
md5=\
(
'ee246fab2e1cba9fbdcad6a86ec31531'
)
maintainer=\
(
'Ricardo Martins <rasm@oceanscan-mst.com>'
)

30
rules/kmod/default.bash Normal file
View File

@ -0,0 +1,30 @@
. "$pkg_common"
configure()
{
make distclean
./configure \
--prefix="$cfg_dir_toolchain_sysroot/usr" \
--target="$cfg_target_canonical" \
--host="$cfg_target_canonical" \
--build="$cfg_host_canonical" \
--disable-static \
--enable-shared
}
build()
{
$cmd_make
}
host_install()
{
$cmd_make install
}
target_install()
{
cp -a "$cfg_dir_toolchain_sysroot/usr/lib/libkmod"*.so* "$cfg_dir_rootfs/lib" &&
$cmd_target_strip "$cfg_dir_rootfs/lib/libkmod"*.so*
}