To compile the kernel, you need a complete SYSSRC package, which can be obtained by CVS or FTP mode. To download by CVS, play on the shell: export cvs_rsh = "/ usr / bin / ssh" export cvsroot=anoncvs@anoncvs1.usa.openbsd.org: / CVS wants to use the server in other parts, please see the complete CVS server List. CD / usr && cvs checkout -z9 src / sys To download with ftp, please: ftp://ftp.openbsd.org/pub/openbsd/2.7/srcsys.tar.gz can be put it upon / usr / src directory, unlocked: cp srcsys.tar.gz / usr / src; tar -xzvf /usr/src/srcsys.tar.gz gave the source code, followed by configuring and compiling the kernel. OpenBSD's kernel profile is stored because of multi-platform, so the profile of the corresponding platform is stored in / usr / src / sys / arch / $ arch / conf /. "The $ arch is the platform name you use. We use I386 as an example of an option to optimize the kernel. O processors and I / O parts: Option I686_cpu This is very simple, like FreeBSD #option GPL_MATH_EMULATE Don't open it unless your machine is old, the FPU does not have Option Dummy_nops to turn off the Option UVM Advanced Virtual Memory System, When the system is exchanged, the Option MFS is provided with the free of FreeBSD, which is used to establish a memory disk to enhance the data access speed O network part is: option nmblusters = "8192", like the freeBSD meaning, improve high flow time network operation Speed and improves kernel stability. If the traffic is low, 1024 or 2048 can be used, and the unwanted network card devices are noted, which can reduce the kernel capacity lift start speed. The O disk device section is: option buffachepercent = 45 Reserved 45% of the system memory as the cache of the file system, as the name suggests, according to the number of values in the actual system, it is recommended to lower some values, like the network part, unwanted The disk devices (SCSI, IDE) are commented away. After completing the kernel, hit: CD / USR / SRC / SYS / ARCH / $ Arch / Conf; config youkernelcd ../compile/yourkernel; make dependend && makecp / bsd / bsd-old; CP BSD / BSD will be restarted Directly use the new kernel that just compiled, if it has any problems, you can restart the old kernel just renamed after boot> prompt, command format: boot> boot device: / kernelold to change Device to you The disk device that stores the old kernel is. By the way, you can add a -C option after the above command, which provides the same configuration function as freeBSD.