Skip to content

Yocto Autobuilder

sipke edited this page Jul 13, 2018 · 14 revisions

Some notes on setting up Autobuilder.

Running setup

Follow the README-QUICKSTART, and SAVE the log output somewhere, it tells you what password it generated.

But where then?

Go to yocto-controller/controller.cfg And it will tell you the url used after starting the controllers and workers. Likely http://localhost:8010

Your password

So you go to your url and it has a login. what? where? Look for the password information generated in the output when you ran setup (see above).

Generating an .htpasswd file using your current username and RrPes4um at /media/data1/repositories/yocto-autobuilder/.htpasswd

Point to your download directory

If you're done builds before you'll have a download directory. Save some time and point to it to save fetching.

config/autobuilder.conf has pretty much all the default settings for paths etc. you'll note there is /tmp/yocto-autobuilder

symlink it to somewhere you would prefer and you can avoid modifying all the other settings pointing to that directory, including you're download directory.

Set up

Edit config/autobuilder.conf and add publish sstate, so they can be re-used for developer/local builds. PUBLISH_SSTATE = True

meta-openembedded build

Because meta-openembedded is a git repo with multiple layers, but the root is not a layer, you will need to set autoinclude to False for the bblayers to be setup correctly, and add additional layers.

[nightly-mine]
builders: 'example-worker'
repos: [{'poky':
           {'repourl':'/media/data1/www/git.yoctoproject.org/poky',
            'layerversion':{'core':'meta', 'yoctobsp':'meta-yocto-bsp', 'yocto':'meta-yocto', 'poky':'meta-
poky'},
            'branch':'rocko'}},
       {'meta-openembedded':
           {'repourl':'/media/data1/www/git.openembedded.org/meta-openembedded',
            'branch':'rocko',
            'autoinclude':False}}]
steps: [{'SetDest':{}},
       {'CheckOutLayers': {}},
       {'RunPreamble': {}},
       {'CreateAutoConf': {'machine': 'qemuarm',
                           'distro': 'poky',
                           'buildhistory' : False}},
       {'CreateBBLayersConf': {'buildprovider' : 'yocto',
         'layerdirs': ['meta-openembedded/meta-oe',
                 'meta-openembedded/meta-python',
                 'meta-openembedded/meta-networking',
                 'meta-openembedded/meta-perl'] }},
       {'BuildImages': {'images': 'core-image-minimal core-image-sato'}},
       ]
scheduler: [{'day':{'hour':18, 'minute':00}}, {'night':{'hour':23, 'minute':59}}]

Documentation

http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/plain/docs/YoctoAutobuilderDevelopersDocument.html

Gotchas

If you're setting up and you get a failed start, check yocto-controller/twistd.log If you get a config parsing error on NoneType as below,

    self.configdir=os.path.dirname(self.cfile)
  File "/usr/lib/python2.7/posixpath.py", line 122, in dirname
    i = p.rfind('/') + 1
exceptions.AttributeError: 'NoneType' object has no attribute 'rfind'

you can fix it by exporting as follows.

export YOCTO_AB_CONFIG=<yourpath>/buildset-config/yoctoAB.conf

Its effectively a result possibly a small error in ...lib/python2.7/site-packages/autobuilder/Autobuilder.py where in __init__ the cfile value is not correctly populated.

Clone this wiki locally