在编译服务器很多时候没得root权限,linux内核编译后,install 一下,方便得到一套vmlinuz+lib/modules。
#!/bin/bash
if [ ! -f vmlinux ]; then
echo "need to make all build first"
exit 0
fi
fakeroot=~/fake
if [ ! -d $fakeroot ]; then
mkdir -p $fakeroot
fi
INSTALL_MOD_PATH=$fakeroot INSTALL_MOD_STRIP=1 make modules_install
fakeboot=$fakeroot/boot
if [ ! -d fakeboot ]; then
mkdir -p $fakeboot
fi
INSTALL_MOD_PATH=$fakeroot INSTALL_PATH=$fakeboot make install
echo "======================"
echo "kernel image installed in $fakeboot"
echo "kernel image installed in $fakeroot/lib/modules/"
echo "======================"