aboutsummaryrefslogtreecommitdiff
path: root/documentation/content/en/books/handbook/kernelconfig/_index.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/content/en/books/handbook/kernelconfig/_index.adoc')
-rw-r--r--documentation/content/en/books/handbook/kernelconfig/_index.adoc24
1 files changed, 12 insertions, 12 deletions
diff --git a/documentation/content/en/books/handbook/kernelconfig/_index.adoc b/documentation/content/en/books/handbook/kernelconfig/_index.adoc
index bf6e4d0d21..61e173ed84 100644
--- a/documentation/content/en/books/handbook/kernelconfig/_index.adoc
+++ b/documentation/content/en/books/handbook/kernelconfig/_index.adoc
@@ -76,7 +76,7 @@ Before building a custom kernel, consider the reason for doing so. If there is a
Kernel modules exist in [.filename]#/boot/kernel# and may be dynamically loaded into the running kernel using man:kldload[8]. Most kernel drivers have a loadable module and manual page. For example, the man:ath[4] wireless Ethernet driver has the following information in its manual page:
-[source,bash,subs="macros"]
+[source,shell,subs="macros"]
....
Alternatively, to load the driver as a module at boot time, place the
following line in man:loader.conf[5]:
@@ -100,7 +100,7 @@ Some versions of Microsoft(R) Windows(R) have a System icon which can be used to
If FreeBSD is the only installed operating system, use man:dmesg[8] to determine the hardware that was found and listed during the boot probe. Most device drivers on FreeBSD have a manual page which lists the hardware supported by that driver. For example, the following lines indicate that the man:psm[4] driver found a mouse:
-[source,bash]
+[source,shell]
....
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
@@ -114,7 +114,7 @@ If the output of `dmesg` does not display the results of the boot probe output,
Another tool for finding hardware is man:pciconf[8], which provides more verbose output. For example:
-[source,bash]
+[source,shell]
....
% pciconf -lv
ath0@pci0:3:0:0: class=0x020000 card=0x058a1014 chip=0x1014168c rev=0x01 hdr=0x00
@@ -128,7 +128,7 @@ This output shows that the [.filename]#ath# driver located a wireless Ethernet d
The `-k` flag of man:man[1] can be used to provide useful information. For example, it can be used to display a list of manual pages which contain a particular device brand or name:
-[source,bash]
+[source,shell]
....
# man -k Atheros
ath(4) - Atheros IEEE 802.11 wireless network driver
@@ -148,7 +148,7 @@ Once source is installed, review the contents of [.filename]#/usr/src/sys#. This
Do not make edits to [.filename]#GENERIC#. Instead, copy the file to a different name and make edits to the copy. The convention is to use a name with all capital letters. When maintaining multiple FreeBSD machines with different hardware, it is a good idea to name it after the machine's hostname. This example creates a copy, named [.filename]#MYKERNEL#, of the [.filename]#GENERIC# configuration file for the `amd64` architecture:
-[source,bash]
+[source,shell]
....
# cd /usr/src/sys/amd64/conf
# cp GENERIC MYKERNEL
@@ -173,7 +173,7 @@ When finished customizing the kernel configuration file, save a backup copy to a
Alternately, keep the kernel configuration file elsewhere and create a symbolic link to the file:
-[source,bash]
+[source,shell]
....
# cd /usr/src/sys/amd64/conf
# mkdir /root/kernels
@@ -202,7 +202,7 @@ Using this method, the local configuration file expresses local differences from
====
To build a file which contains all available options, run the following command as `root`:
-[source,bash]
+[source,shell]
....
# cd /usr/src/sys/arch/conf && make LINT
....
@@ -218,21 +218,21 @@ Once the edits to the custom configuration file have been saved, the source code
*Procedure: Building a Kernel*
. Change to this directory:
+
-[source,bash]
+[source,shell]
....
# cd /usr/src
....
. Compile the new kernel by specifying the name of the custom kernel configuration file:
+
-[source,bash]
+[source,shell]
....
# make buildkernel KERNCONF=MYKERNEL
....
. Install the new kernel associated with the specified kernel configuration file. This command will copy the new kernel to [.filename]#/boot/kernel/kernel# and save the old kernel to [.filename]#/boot/kernel.old/kernel#:
+
-[source,bash]
+[source,shell]
....
# make installkernel KERNCONF=MYKERNEL
....
@@ -265,7 +265,7 @@ There are four categories of trouble that can occur when building a custom kerne
`config` fails::
If `config` fails, it will print the line number that is incorrect. As an example, for the following message, make sure that line 17 is typed correctly by comparing it to [.filename]#GENERIC# or [.filename]#NOTES#:
+
-[source,bash]
+[source,shell]
....
config: line 17: syntax error
....
@@ -282,7 +282,7 @@ After booting with a good kernel, check over the configuration file and try to b
====
When troubleshooting a kernel, make sure to keep a copy of [.filename]#GENERIC#, or some other kernel that is known to work, as a different name that will not get erased on the next build. This is important because every time a new kernel is installed, [.filename]#kernel.old# is overwritten with the last installed kernel, which may or may not be bootable. As soon as possible, move the working kernel by renaming the directory containing the good kernel:
-[source,bash]
+[source,shell]
....
# mv /boot/kernel /boot/kernel.bad
# mv /boot/kernel.good /boot/kernel