mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-07 09:18:59 +00:00
30 lines
11 KiB
HTML
30 lines
11 KiB
HTML
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>Linux kernel options</title><script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script><script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script><script type="text/x-mathjax-config">
|
|
MathJax = {
|
|
tex: {
|
|
inlineMath: [ ['$','$'], ['\(','\)'] ],
|
|
displayMath: [ ['$$','$$'], ['[',']'] ]
|
|
},
|
|
options = {
|
|
processHtmlClass = "math"
|
|
}
|
|
}
|
|
</script><meta name="next-head-count" content="6"/><link rel="preload" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" as="style"/><link rel="stylesheet" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" as="script"/></head><body><div id="__next"><main><h1>Linux kernel options</h1><section class="post-metadata"><span>Date: <!-- -->2021-06-18 15:34:19 +08:00</span><span>Date modified: <!-- -->2021-06-18 15:34:48 +08:00</span></section><nav class="toc"><ol class="toc-level toc-level-1"></ol></nav><ul><li><p><a href="https://wiki.gentoo.org/wiki/Kernel">Gentoo wiki page on kernels</a></p></li><li><p>Linux also has official documentation on kernel.org and tldp.org
|
|
</p></li><li><p>the kernel is large today, most of which can be configured to be compiled or not;
|
|
there is a default configuration when compiling the kernel
|
|
</p></li><li><p>most of the features you would expect can be included
|
|
</p><ul><li><p>run ELF binaries
|
|
</p></li><li><p>various filesystem support
|
|
</p></li><li><p>virtualization support
|
|
</p></li><li><p>Android drivers
|
|
</p></li><li><p>debugging options for kernel hacking
|
|
</p></li><li><p>pseudo-filesystems
|
|
</p></li><li><p>most drivers for common hardware (e.g., LED, USB, and network devices)
|
|
</p></li><li><p>special hardware drivers (e.g., Steam controller, Nintendo Wii)
|
|
</p></li></ul></li><li><p>most of the options can be configured either to be included inside of the kernel image or as an external module
|
|
</p></li><li><p>most of the features are available as kernel options
|
|
</p><ul><li><p><code class="inline-verbatim">CONFIG_HID_GENERIC</code> enables support for generic devices such as mice, keyboards, joysticks
|
|
</p></li><li><p>you can know what compile options is included from the kernel with <code class="inline-verbatim">/proc/config.gz</code> but only if <code class="inline-verbatim">CONFIG_IKCONFIG_PROC</code> is included
|
|
</p></li><li><p><code class="inline-verbatim">CONFIG_HID_BATTERY_STRENGTH</code> enables reporting battery strength
|
|
</p></li></ul></li><li><p>you can know what kernel options of the compiled kernel by looking at <code class="inline-verbatim">/proc/config.gz</code> (e.g., <code class="inline-code">gunzip --stdout /proc/config.gz | bat</code>);
|
|
though, it is only possible if compiled with <code class="inline-verbatim">CONFIG_IKCONFIG_PROC</code> option.
|
|
</p></li></ul></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"metadata":{"date":"\"2021-06-18 15:34:19 +08:00\"","date_modified":"\"2021-06-18 15:34:48 +08:00\"","language":"en","source":""},"title":"Linux kernel options","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[]}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://wiki.gentoo.org/wiki/Kernel"},"children":[{"type":"text","value":"Gentoo wiki page on kernels"}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Linux also has official documentation on kernel.org and tldp.org\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"the kernel is large today, most of which can be configured to be compiled or not;\n there is a default configuration when compiling the kernel\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"most of the features you would expect can be included\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"run ELF binaries\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"various filesystem support\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"virtualization support\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Android drivers\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"debugging options for kernel hacking\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"pseudo-filesystems\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"most drivers for common hardware (e.g., LED, USB, and network devices)\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"special hardware drivers (e.g., Steam controller, Nintendo Wii)\n"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"most of the options can be configured either to be included inside of the kernel image or as an external module\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"most of the features are available as kernel options\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"CONFIG_HID_GENERIC"}]},{"type":"text","value":" enables support for generic devices such as mice, keyboards, joysticks\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"you can know what compile options is included from the kernel with "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"/proc/config.gz"}]},{"type":"text","value":" but only if "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"CONFIG_IKCONFIG_PROC"}]},{"type":"text","value":" is included\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"CONFIG_HID_BATTERY_STRENGTH"}]},{"type":"text","value":" enables reporting battery strength\n"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"you can know what kernel options of the compiled kernel by looking at "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"/proc/config.gz"}]},{"type":"text","value":" (e.g., "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"gunzip --stdout /proc/config.gz | bat"}]},{"type":"text","value":");\n though, it is only possible if compiled with "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"CONFIG_IKCONFIG_PROC"}]},{"type":"text","value":" option.\n"}]}]}]}]},"backlinks":[]},"__N_SSG":true},"page":"/[[...slug]]","query":{"slug":["linux.kernel-options"]},"buildId":"Ie9t5zutrXP6Of75Cb5xF","assetPrefix":"/wiki","nextExport":false,"isFallback":false,"gsp":true}</script><script nomodule="" src="/wiki/_next/static/chunks/polyfills-99d808df29361cf7ffb1.js"></script><script src="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" async=""></script><script src="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" async=""></script><script src="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" async=""></script><script src="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" async=""></script><script src="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" async=""></script><script src="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" async=""></script><script src="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" async=""></script><script src="/wiki/_next/static/Ie9t5zutrXP6Of75Cb5xF/_buildManifest.js" async=""></script><script src="/wiki/_next/static/Ie9t5zutrXP6Of75Cb5xF/_ssgManifest.js" async=""></script></body></html> |