最終更新:2017-07-06 (木) 15:03:52 (109d)  

Linuxカーネル/make はてなブックマークを見る

主な奴

make mrproperconfigで設定した内容の消去を行う
make config純粋なテキストベース
make xconfigX上で行うグラフィックベース(Qt)
make menuconfigテキストベースだけどお気楽メニュー形式
make oldconfig古い.configファイルを読み込んで設定
make defconfigデフォルト設定
make gconfig?GTKベースのフロントエンド

Linuxカーネル/make help

  • ヘルプ

Cleaning targets:

  • make clean? - Remove most generated files but keep the config and enough build support to build external modules
  • make mrproper - Remove all generated files + config + various backup files
  • make distclean? - mrproper + remove editor backup and patch files

メモ

Configuration targets (make *config)

  • make config - Update current config utilising a line-oriented program
  • make nconfig? - Update current config utilising a ncurses menu based program
  • make menuconfig - Update current config utilising a menu based program
  • make xconfig - Update current config utilising a Qt based front-end
  • make gconfig? - Update current config utilising a GTK based front-end
  • make oldconfig - Update current config utilising a provided .config as base
  • make localmodconfig? - Update current config disabling modules not loaded
  • make localyesconfig? - Update current config converting local mods to core
  • make silentoldconfig? - Same as oldconfig, but quietly, additionally update deps
  • make defconfig - New config with default from ARCH supplied defconfig
  • make savedefconfig? - Save current config as ./defconfig (minimal config)
  • make allnoconfig? - New config where all options are answered with no
  • make allyesconfig? - New config where all options are accepted with yes
  • make allmodconfig? - New config selecting modules when possible
  • make alldefconfig? - New config with all symbols set to default
  • make randconfig? - New config with random answer to all options
  • make listnewconfig? - List new options
  • make oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)
  • make kvmconfig? - Enable additional options for kvm guest kernel support
  • make xenconfig? - Enable additional options for xen dom0 and guest kernel support
  • make tinyconfig? - Configure the tiniest possible kernel

Other generic targets:

  • make all? - Build all targets marked with [*]
  • make vmlinux?* - Build the bare kernel
  • make modules* - Build all modules
  • make modules_install - Install all modules to INSTALL_MOD_PATH (default: /)
  • make firmware_install? - Install all firmware to INSTALL_FW_PATH (default: $(INSTALL_MOD_PATH)/lib/firmware)
  • make dir/ - Build all files in dir and below
  • make dir/file.[oisS] - Build specified target only
  • make dir/file.lst? - Build specified mixed source/assembly target only (requires a recent binutils and recent build (System.map))
  • make dir/file.ko? - Build module including final link
  • make modules_prepare - Set up for building external modules
  • make tags/TAGS? - Generate tags file for editors
  • make cscope? - Generate cscope index
  • make gtags? - Generate GNU GLOBAL index
  • make kernelrelease? - Output the release version string
  • make kernelversion? - Output the version stored in Makefile
  • make headers_install? - Install sanitised kernel headers to INSTALL_HDR_PATH (default: /usr/src/linux-source-3.2.0/usr)

Static analysers

  • make checkstack? - Generate a list of stack hogs
  • make namespacecheck? - Name space analysis on compiled kernel
  • make versioncheck? - Sanity check on version.h usage
  • make includecheck? - Check for duplicate included header files
  • make export_report? - List the usages of all exported symbols
  • make headers_check? - Sanity check on exported headers
  • make headerdep? - Detect inclusion cycles in headers
  • make coccicheck? - Check with Coccinelle.

Kernel packaging:

  • make rpm-pkg? - Build both source and binary RPM kernel packages
  • make binrpm-pkg? - Build only the binary kernel package
  • make deb-pkg? - Build the kernel as a deb package
  • make tar-pkg? - Build the kernel as an uncompressed tarball
  • make targz-pkg? - Build the kernel as a gzip compressed tarball
  • make tarbz2-pkg? - Build the kernel as a bzip2 compressed tarball
  • make tarxz-pkg? - Build the kernel as a xz compressed tarball
  • make perf-tar-src-pkg? - Build perf-x.y.z.tar source tarball
  • make perf-targz-src-pkg? - Build perf-x.y.z.tar.gz source tarball
  • make perf-tarbz2-src-pkg? - Build perf-x.y.z.tar.bz2 source tarball
  • make perf-tarxz-src-pkg? - Build perf-x.y.z.tar.xz source tarball

Documentation targets:

Architecture specific target

x86

  • make bzImage?* (bzImage)
  • make fdimage?
  • make fdimage144?
  • make fdimage288?
  • make isomage?
  • make i386_defconfig?
  • make x86_64_defconfig?

ARM

  • make zImage?* (zImage) - Compressed kernel image
  • make Image? - Uncompressed kernel image
  • make xipImage? - XIP kernel image, if configured
  • make uImage (uImage) - U-Boot wrapped zImage
  • make bootpImage? - Combined zImage and initial RAM disk
  • make dtbs? - Build device tree blobs for enabled boards
  • make install - Install uncompressed kernel
  • make zinstall? - Install compressed kernel
  • make uinstall? - Install U-Boot wrapped compressed kernel

環境変数

  • KCPPFLAGS?
  • KAFLAGS?
  • AFLAGS_MODULE?
  • AFLAGS_KERNEL?
  • KCFLAGS?
  • CFLAGS_KERNEL?
  • CFLAGS_MODULE?
  • LDFLAGS_MODULE?
  • KBUILD_VERBOSE?
  • KBUILD_EXTMOD?
  • KBUILD_OUTPUT?
  • KBUILD_DEBARCH?
  • ARCH
  • CROSS_COMPILE
  • CF
  • INSTALL_PATH?
  • INSTALLKERNEL?
  • MODLIB?
  • INSTALL_MOD_PATH?
  • INSTALL_MOD_STRIP?
  • INSTALL_FW_PATH?
  • INSTALL_HDR_PATH?
  • KBUILD_MODPOST_WARN?
  • KBUILD_MODPOST_NOFINAL?
  • KBUILD_EXTRA_SYMBOLS?
  • ALLSOURCE_ARCHS?
  • KBUILD_ENABLE_EXTRA_GCC_CHECKS?
  • KBUILD_BUILD_TIMESTAMP?
  • KBUILD_BUILD_USER?
  • KBUILD_BUILD_HOST?

関連