Skip to content

Yocto Autobuilder

sipke edited this page Jul 19, 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 https://github.com/rossburton/yocto-autobuilder https://www.reliableembeddedsystems.com/pdfs/yocto-for-mere-m0rtals-qemux86.pdf Nice Video: https://www.youtube.com/watch?v=noU-A0iqIZY

Gotchas

Missing YOCTO_AB_CONFIG export

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.

Artifacts are not published

You've added the publish artefacts step in your build-set configuration but it says

Skipping Step.

Likely the PUBLISH_BUILDS environment variable is not True or deploy comes to False. See lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py

53         deploy = self.getProperty("custom_deploy_artifacts", "False")
54         if str(os.environ.get('PUBLISH_BUILDS')) == "True" \
55            and deploy == "True":

...
279         else:
280             self.command = "echo 'Skipping Step.'"

Ensure you have a property (props in config) for custom_deploy_artifacts.

props: [{'custom_deploy_artifacts':{'prop_type':'ChoiceStringParameter',
                     'choices': ['False', 'True'],
                     'name': 'custom_deploy_artifacts',
                     'default': 'True',
                     'label':'<h3> Deploy artifacts, or not? </h3>'}}]
Clone this wiki locally