Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Kbuilderのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Kbuilder
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:カーネル]] kbuilder is a bash script that allows you to build one of the four officially supported kernels locally with your own optional patches and configuration, under a different package name. For example, you could fetch the sources of the {{Pkg|linux-lts}} kernel, apply a patch that optimizes the kernel for intel processors, and install that kernel as '''linux-lts-intel-optimized'''. == Installation == The following methods can be used to get kbuilder: * [[Install]] the {{AUR|kbuilder}} package. * Install the latest development version from the [https://github.com/AnnikaV9/kbuilder github repository]. == Building a kernel == To fetch the default vanilla {{Pkg|linux}} kernel sources and build the package with the default name '''linux-kbuilder-custom''': $ kbuilder build {{Note|The build directory is {{ic|~/.kbuilder/cache}}.}} During the build process, kbuilder will inject a bash shell into the PKGBUILD. The shell will be run right before {{ic|build()}} is called, allowing you to add any patches or change the kernel config interactively. The build will continue once you exit from the shell. To install the built packages: $ kbuilder install == Build variables == Although kbuilder does not have a configuration file, you can control the build process with [[environment variables]]. * {{ic|KBUILDER_SOURCE_PKG}} should be set as 'linux', 'linux-lts', 'linux-zen' or 'linux-hardened'. kbuilder will fetch and build the kernel specified with this variable. Defaults to 'linux'. For more information about the official kernels, see [[kernel]]. {{Note|Patches that work on one kernel may not necessarily work on another.}} * {{ic|KBUILDER_PKG_NAME_APPEND}} can be set as any string. It will be appended to the end of the kernel version and the kernel package. Defaults to 'kbuilder-custom'. * {{ic|KBUILDER_BUILD_JOBS}} should be set as an integer. kbuilder will replace the {{ic|make all}} line in the PKGBUILD with {{ic|make -jX all}}, where X is the integer specified. Example usage: $ KBUILDER_BUILD_JOBS=4 KBUILDER_PKG_NAME_APPEND="my-custom-patch" KBUILDER_SOURCE_PKG="linux-zen" kbuilder build == Hooks == kbuilder looks for hooks in {{ic|/etc/kbuilder/hooks/}}, and uses run-parts to execute them right before {{ic|build()}} is called. The run-parts command is executed with the flag {{ic|--regex "kbuilder-hook-*"}}. An example hook: {{hc|/etc/kbuilder/hooks/05-kbuilder-hook-cpu-optimize.sh|<nowiki> #!/bin/bash # # kbuilder hook for applying graysky2's kernel compiler patch: # https://github.com/graysky2/kernel_compiler_patch # SOURCE="https://raw.githubusercontent.com/graysky2/kernel_compiler_patch/master" PATCH="more-uarches-for-kernel-5.17+.patch" HOOK_NAME="cpu-optimize-hook" curl -o $PATCH $SOURCE/$PATCH || { echo "$HOOK_NAME failed when fetching $PATCH from $SOURCE" ; exit 1 ; } patch -Np1 -i "$PATCH" || { echo "$HOOK_NAME failed when applying $PATCH" ; exit 1 ; } </nowiki>}} To create a hook, [[create]] and make [[executable]] a file, with a name following the {{ic|''xx''-kbuilder-hook-''hookname''}} form: they will be run in order according to the ''xx'' value. == 参照 == * [[カーネル]] * [https://docs.kernel.org/ The Linux Kernel Documentation] * [https://docs.kernel.org/process/applying-patches.html Applying Patches To The Linux Kernel]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
Kbuilder
に戻る。
検索
検索
Kbuilderのソースを表示
話題を追加