Posts mit dem Label yocto werden angezeigt. Alle Posts anzeigen
Posts mit dem Label yocto werden angezeigt. Alle Posts anzeigen

Freitag, 24. April 2015

Yocto: INHERIT, inherit, include, require

For me it was a little bit confusing which directive I have to include in which file to include other files and which includes are valid. This is a little table I've made which shows the valid combinations. I give no promise though that this table is correct or complete but so far it worked for me:
Target: .bb .bbclass .conf .inc
.bb
.bbclass inherit inherit INHERIT
.conf
.inc
include
require
include
require
include
require
include
require

So for example if you are working on a .bb file you can use the inherit statement to include a .bbclass file.

inherit, INHERIT and include won't produce an error if the file does not exist, only the require statement will cause the build to file if the file does not exist!

More informations about the statements can be found on the following website: Locating Include and Class Files

Donnerstag, 23. April 2015

Yocto: Switching to Systemd

If you want to use Systemd to replace the default init-system you can create your own distribution file like this:
 require conf/distro/poky.conf  
 DISTRO = "systemd-distribution"  
 DISTRO_NAME = "Based on Poky which uses Systemd as init system "  
 DISTRO_VERSION = "1.0"  
 DISTRO_FEATURES_append = " systemd"  
 # uncomment the following two line two use directfb  
 #DISTRO_FEATURES_append = " directfb"  
 #DISTRO_FEATURES_remove = " x11 wayland"  
 DISTRO_EXTRA_RDEPENDS += "\  
   initscripts \  
   systemd \  
   systemd-analyze \  
   "   
 # Switch init-system to systemd  
 VIRTUAL-RUNTIME_init_manager = "systemd"  
 DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"  
 VIRTUAL-RUNTIME_initscripts = ""  

Then you need to change the distribution name in your local.conf:
 DISTRO ?= "systemd-distribution"  

If you build your system it should now use Systemd as init-service.

This is the original site I've found this information: Yocto part I – baseline boot time