スキル一覧に戻る
XuNeo

kconfig-tweak

by XuNeo

6🍴 0📅 2026年1月21日
GitHubで見るManusで実行

SKILL.md


name: kconfig-tweak description: "Modify Linux kernel or NuttX .config files from command line without interactive menuconfig. Use when needing to enable/disable config options, set values, query option states, or batch-modify kernel configurations in scripts or CI/CD pipelines."

kconfig-tweak

Command-line tool for modifying .config files without launching interactive menuconfig.

Quick Reference

# Enable/disable options
kconfig-tweak --enable DEBUG_INFO
kconfig-tweak --disable MODULES
kconfig-tweak -e SMP -d PREEMPT    # Multiple in one command

# Set values
kconfig-tweak --set-val LOG_BUF_SHIFT 17
kconfig-tweak --set-str LOCALVERSION "-custom"

# Query state
kconfig-tweak --state DEBUG_INFO   # Returns: y, n, m, or undef

# Specify config file
kconfig-tweak --file boards/myboard/.config --enable USB

# Module support
kconfig-tweak --module DRM         # Set to m (module)

Commands

CommandShortDescription
--enable OPTION-eSet option to y
--disable OPTION-dSet option to n
--module OPTION-mSet option to m (module)
--set-val OPTION VALUE-Set integer/hex value
--set-str OPTION STRING-Set string value (quoted)
--undefine OPTION-uRemove option definition
--state OPTION-sQuery current state

Position Control

Insert options after a specific option (useful for maintaining config order):

kconfig-tweak --enable-after USB USB_STORAGE    # -E
kconfig-tweak --disable-after NET BRIDGE        # -D
kconfig-tweak --module-after DRM DRM_I915       # -M

Options

OptionDescription
--file FILETarget config file (default: .config)
--keep-case / -kPreserve symbol case (default: auto-uppercase)

Environment Variables

  • CONFIG_ - Symbol prefix (default: "CONFIG_")

Common Patterns

Batch Configuration

# Enable multiple debug options
kconfig-tweak -e DEBUG_INFO -e DEBUG_FS -e KALLSYMS

# Configure network stack
kconfig-tweak --file .config \
  -e NET -e INET -e IPV6 \
  --set-val TCP_CONG_CUBIC y

CI/CD Integration

# Start from defconfig, then customize
make defconfig
kconfig-tweak -e DEBUG_INFO -d MODULES
make olddefconfig  # Resolve dependencies

Query Before Modify

# Check current state
STATE=$(kconfig-tweak -s PREEMPT)
if [ "$STATE" = "y" ]; then
  kconfig-tweak -d PREEMPT
fi

Notes

  • kconfig-tweak does NOT validate dependencies; run make olddefconfig after modifications
  • Symbol names auto-uppercase unless --keep-case is used
  • Changes are immediate; no confirmation prompt

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です