Create custom distribution ========================== Step 1 - Create folders for distribution files ---------------------------------------------- Custom distribution files are stored inside ``conf/distro`` folder of your meta layer. Create folder by pasting this command. .. code-block:: mkdir -p ../meta-golemos/conf/distro .. note:: All commands diplayed are executed from the ``build`` directory. Step 2 - Create configuration file for custom distribution ---------------------------------------------------------- Create ``conf`` file which will contain information about your custom distribution. This file should be named the same as your distribution name. .. code-block:: touch ../meta-golemos/conf/distro/golemos.conf .. note:: All commands diplayed are executed from the ``build`` directory. Step 3 - Add information about your distribution ------------------------------------------------ There are several ways to fill your configuration files. The easiest way is to include in your configuration file ``poky.conf`` and overwrite values. The most important variables are ``DISTRO``, ``DISTRO_NAME``, ``DISTRO_VERSION``. Inside ``golemos.conf`` file place this configuration. .. code-block:: # Distro Layer configuration # include and overwrite default poky distro require conf/distro/poky.conf DISTRO = "golemos" DISTRO_NAME = "GolemOS-Linux" DISTRO_VERSION = "1.0" DISTRO_CODENAME = "Groot" SDK_VENDOR = "-golemossdk" SDK_VERSION="${DISTRO_VERSION}" MAINTAINER = "golemos@sclabs.io" TARGET_VENDOR = "-golemos" # Override these in poky based distros GOLEMOS_DEFAULT_DISTRO_FEATURES = "systemd wifi" GOLEMOS_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot" GOLEMOS_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet" DISTRO_EXTRA_RDEPENDS += " ${GOLEMOS_DEFAULT_EXTRA_RDEPENDS}" DISTRO_EXTRA_RRECOMMENDS += " ${GOLEMOS_DEFAULT_EXTRA_RRECOMMENDS}" DISTRO_FEATURES ?= "${GOLEMOS_DEFAULT_DISTRO_FEATURES} ${DISTRO_FEATURES_LIBC} " PACKAGE_CLASSES = "package_rpm" .. warning:: Name of the conf file should match as your ``DISTRO_NAME``. Step 4 - Choose your distribution --------------------------------- From now you can choose ``golemos`` in your ``local.conf``. .. code-block:: DISTRO ?= "golemos" Changing distribution every time you clone repositories can be boring. In the next section you will learn how to create custom sample files to even more automate process of building your own custom Linux distribution. Summary ------- At this step your layer structure should look like this. .. code-block:: ../meta-golemos ├── conf │   ├── distro │   │   └── golemos.conf │ └── layer.conf ├── COPYING.MIT ├── README └── recipes-example └── example └── example_0.1.bb