最終更新:2022-10-31 (月) 13:25:17 (32d)  

Buildroot/パッケージ
Top / Buildroot / パッケージ

Buildroot is basically a set of Makefiles that download, configure, and compile software with the correct options.

There is basically one Makefile per software package, and they are named with the .mk extension.

ディレクトリ

  • Buildroot/toolchain? - contains the Makefiles and associated files for all software related to the cross-compilation toolchain: binutils, gcc, gdb, kernel-headers and uClibc.
  • Buildroot/arch? - contains the definitions for all the processor architectures that are supported by Buildroot.
  • Buildroot/package - contains the Makefiles and associated files for all user-space tools and libraries that Buildroot can compile and add to the target root filesystem. There is one sub-directory per package.
  • Buildroot/linux? - contains the Makefiles and associated files for the Linux kernel.
  • Buildroot/boot? - contains the Makefiles and associated files for the bootloaders supported by Buildroot.
  • Buildroot/system - contains support for system integration, e.g. the target filesystem skeleton and the selection of an init system.
  • Buildroot/fs? - contains the Makefiles and associated files for software related to the generation of the target root filesystem image.

makeのターゲット

  • Buildroot/make show-info?
  • Buildroot/make pkg-stats?
  • Buildroot/make <pkg>-*
  • in the order they are executed
    Buildroot/make <pkg>-source?Fetch the source (download the tarball, clone the source repository, etc)
    Buildroot/make <pkg>-depends?Build and install all dependencies required to build the package
    Buildroot/make <pkg>-extract?Put the source in the package build directory (extract the tarball, copy the source, etc)
    Buildroot/make <pkg>-patch?Apply the patches, if any
    Buildroot/make <pkg>-configure?Run the configure commands, if any
    Buildroot/make <pkg>-build?Run the compilation commands
    Buildroot/make <pkg>-install-staging?target package: Run the installation of the package in the staging directory, if necessary
    Buildroot/make <pkg>-install-target?target package: Run the installation of the package in the target directory, if necessary
    Buildroot/make <pkg>-install?target package: Run the 2 previous installation commands
    host package:Run the installation of the package in the host directory

中身

  • Each directory contains at least 2 files:

Buildroot/パッケージ/Config.in?

  • Config.in? is a part of the configuration tool description file. It describes the options related to the package.
config BR2_PACKAGE_LIBFOO
        bool "libfoo"
        depends on BR2_PACKAGE_LIBBAZ
        select BR2_PACKAGE_LIBBAR
        help
          This is a comment that explains what libfoo is. The help text
          should be wrapped.

          http://foosoftware.org/libfoo/

Buildroot/パッケージ/パッケージ名.mk

  • something.mk? is the Makefile that downloads, configures, compiles and installs the package something.
  • ビルドのための変数定義とか