Recipes
Structure
The main structure is divided into four modules:
base recipes
connectivity recipes
core recipes
extended recipes
Below there is graphical illustration of the layer structure.
meta-golemos
├── README
├── conf
│ ├── bblayers.conf.sample
│ ├── conf-notes.txt
│ ├── distro
│ │ └── golemos.conf
│ ├── layer.conf
│ └── local.conf.sample
├── recipes-base
│ ├── datalogger-api-request
│ │ └── datalogger-api-request.bb
│ ├── datalogger-main-page
│ │ └── datalogger-main-page.bb
│ ├── datalogger-setup-page
│ │ └── datalogger-setup-page.bb
│ ├── nginx
│ │ ├── files
│ │ │ ├── datalogger-setup.local
│ │ │ └── datalogger.local
│ │ └── nginx_%.bbappend
│ ├── python3-gunicorn
│ │ ├── files
│ │ │ ├── datalogger_setup_page.service
│ │ │ └── datalogger_setup_page.socket
│ │ └── python3-gunicorn_%.bbappend
│ └── python3-mfrc522
│ └── python3-mfrc522_0.0.7.bb
├── recipes-connectivity
│ ├── hostapd
│ │ ├── files
│ │ │ ├── hostapd@.service
│ │ │ └── wlan0.conf
│ │ └── hostapd_%.bbappend
│ ├── kea
│ │ ├── files
│ │ │ ├── kea-dhcp4.conf
│ │ │ └── kea-dhcp4.service
│ │ └── kea_%.bbappend
│ └── wpa-supplicant
│ ├── files
│ │ └── wpa_supplicant-nl80211-wlan0.conf
│ └── wpa-supplicant_%.bbappend
└── recipes-core
├── images
│ ├── datalogger-dev-image.bb
│ ├── datalogger-extended-image.bb
│ └── datalogger-image.bb
├── packagegroups
│ ├── datalogger-base-packagegroup.bb
│ ├── datalogger-core-packagegroup.bb
│ ├── datalogger-dev-packagegroup.bb
│ └── datalogger-extended-packagegroup.bb
├── systemd
│ └── systemd_%.bbappend
└── systemd-conf
├── files
│ └── wlan.network
└── systemd-conf_%.bbappend
Recipes description
Here you will find detailed description of each module as well as of recipes included in them.
Core recipes
Core recipes are most important recipes of all. Without them you can not be able to build any custom image. Currently are three version of images:
production image,
extended version of production image,
development image.
This recipes also contain package groups. Groups are divided into parts to distinguish:
core packages needed to build system,
base packages needed for the proper functioning of the system,
extended packages added for system extensions,
dev packages which are currently under development and have not yet made it into the basic packages.
This sets of recipes are pivotal to custom systems. They include recipes to build custom images as well as package groups.
Images
There are three different types of image.
- Production image
This image is primary for the each device. It contain basic functionalities of the system with guarantee of stability.
- Extended version of production image
This image type is practically the production image but it also has some packages which is not required for basic system functionalities such as
vim
orgit
.- Development image
This image type consists of basic packages and the functionality of the system and some of newer versions of packages as well as packages that are currently under development and have not been released yet.
Package groups
Second type of recipes in this set is package groups. This instructions allow to control sets of packages that are required to install. It also allows for greater control of what is required in a given version of the image.
- Base packages
Base package group contain packages required for basic functionality of the device. Removing this package group allow to compile system but it will not have any functionality.
- Core packages
Without core packages basic functionality of the system is impossible. This package group is required in every system version. It contains packages such as
systemd
or drivers for wireless card.- Extended packages
This packages are not necessary for base system, but can add some nice touch.
- Development packages
This package group consists of packages that are currently under development and have not made into base or extended version of system yet.
Recipes
- systemd
This recipe ensure that
wpa_supplicant
have proper dependency. It enablenetworkd
andresolved
. In order to see how this recipe impact onwpa_supplicant
see tutorial in step guide (extended) about wireless connection.- systemd-conf
For now this recipe is connected with
wpa_supplicant
recipe. It place in appropriate folders network configuration files. To learn how it is connected with wireless network tool see step guide (extended) about wireless connection.
Base recipes
Base recipes for now contain instructions for building basic functionalities of Datalogger OS. In this set of instruction, you can find recipes for web server or hardware functionality like buttons or RFID scanner.
- datalogger-api-request
To computer board there are four buttons connected. Two of them are responsible for sending information to custom API. Two other ones are directly connected to board and control behaviour of wireless setup or rebooting system. This recipe take script from external api repository and program this functionality.
Note
This recipe depends directly on python3-mfrc522
.
- datalogger-main-page
After setting up device and connecting to proper wireless network the setup page is switched with main webpage. This recipe place source files for this website from external main page repository. Destination of source files is
/var/www/datalogger.local
.
- datalogger-setup-page
To setup device and it’s connection to wireless network this recipe arose. This instructions place website’s source files in
/var/www/datalogger-setup.local
. Source files are fetched from external setup page repository. In this repository there is also script which configure connection to wireless network and restart services to disable hotspot mode. This page is displayed only in hotspot mode.
- nginx
To serve two websites,
nginx
web server was configured. This recipe add configuration files to it’s destinations and enable server on boot. Important this is also that is remove default nginx website fromsites-enabled
and place setup page as default on boot. To see detailed instructions about configuring web server check step by step guide (extended) about configuring web server.
Note
This recipe depends directly on socket configured in
python3-gunicorn
as well as diroctory for main website.
- python3-gunicorn
gunicorn
is a WSGI server for Python apps. Setup page is written in flask and needs such a service. This recipe add WSGI server and as well setup service (datalogger_setup_page.service
) with socket (datalogger_setup_page.socket
) to listen on. To see how this was set up check step by step guide (extended) about WSGI server.
Note
This recipe depends directly on location of setup page.
- python3-mfrc522
To board a RFID scanner is connected. To allow programming it from python script you need compatibility layer. This recipe pull module from pypi website. In order to learn how to set up such a thing check out step by step guide (extended) about implementing custom Python packages in yocto.
Connectivity recipes
The recipes in this folder are designed to enable wireless or wired connectivity. Some of them link directly to core recipes. Connectivity recipes should not be used without core recipes.
- hostapd
The recipe is used to create initial hotspot. It allow to connect directly to the device and sent to it information about network to which it will be connected. Full how to about creating hotspot is in step by step guide (extended) about creating hotspot.
Note
This recipe works with relation with kea
. Do not use them
separately.
- kea
This recipe enable DHCP server for hotspot mode. It has some custom configuration not to wait till network is online, but only wait for interface to be up. Full how to about creating hotspot is in step by step guide (extended) about creating hotspot.
Note
This recipe work with relation with hostapd
. Do not use them
separately.
- wpa_supplicant
Instruction in this recipe connect device to wireless network. In order to connect device on system boot, this recipe require configuration file. More about how to connect to wireless network you can find in step by step guide (extended) about connecting to wireless network.
Extended recipes
Extended recipes are addition to base system functionalities. They widen possibilities of any custom image. For this packages there is separate version of system image.