Jiangyi Liu wrote:
>
> Hi all,
>
> After just changing a little in sys/kern/kern_sig.c, how can I rebuild
> the kernel fast? I think it should not take such a long time as 'make
> buildkernel' does. Anyway, just kern_sig.c need to be recompiled and
> the kernel can be linked. So how do you guys do in such case?
Use this to build the kernel:
1st time:
cd /sys/i386/conf
cp GENERIC MYKERNEL
1st time, and any time yo modify the contents of MYKERNEL:
cd /sys/i386/conf
config MYKERNEL
cd ../../compile/MYKERNEL
make depend
Each time you want to build a kernel, after a change:
cd /sys/compile/MYKERNEL
make
If it works, to run on the new kernel:
make install
sync
reboot
If it doesn't boot, at the boot prompt when it is counting
down, hit the spacebar, and type:
unload
boot kernel.old
Once booted, if you want to ignore your changed kernel:
cd /
chflags noschflg kernel modules
mv kernel kernel.bad
mv modules modules.bad
mv modules.old modules
mv kernel.old kernel
I have a shell script for this las, which does everything
automatically, and checking for mistakes automatically,
called "badkernel". If someone is willing to check it in,
I'll provide it.
-- Terry
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message