GithubHelp home page GithubHelp logo

isabella232 / meta-snappy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from morphis/meta-snappy

0.0 0.0 0.0 344 KB

Snappy for Yocto/OpenEmbedded

License: MIT License

BlitzBasic 6.18% BitBake 93.82%

meta-snappy's Introduction

OpenEmbedded/Yocto layer for Ubuntu Snappy support

This meta layer adds support for Ubuntu Snappy for all OpenEmbedded/Yocto based devices.

This meta layer mainly contains the following components which are required for Snappy:

  • snapd
  • libseccomp

The layer currently supports Yocto 2.6.x Thud release.

Aside from OE-core, meta-snappy also depends on meta-openembedded and meta-filesystems.

Try it!

  1. Follow the Yocto Quickstart guide to get your build host properly setup: https://www.yoctoproject.org/docs/latest/yocto-project-qs/yocto-project-qs.html

  2. Download latest yocto release

 $ git clone git://git.yoctoproject.org/poky
 $ cd poky
 $ git checkout thud
  1. Fetch meta-openembedded layer:
 $ git clone git://git.openembedded.org/meta-openembedded
 $ cd meta-openembedded
 $ git checkout thud
  1. Fetch meta-snappy layer
 $ git clone https://github.com/morphis/meta-snappy.git
  1. Prepare the build environment
 $ source oe-init-build-env

Now add meta-snappy to your conf/bblayers.conf so that it looks similar to this

 BBLAYERS ?= " \
   ...
   /tmp/poky/meta-snappy \
   /tmp/meta-openembedded/meta-oe \
   /tmp/meta-openembedded/meta-filesystems \
  "
  1. Modify your conf/local.conf

Enable support for systemd which is mandatory for snapd. See https://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#using-systemd-exclusively for more details.

cat<<EOF >> conf/local.conf
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
EOF

The snap-confine tool assumes that the home directory of root is /root. Make sure we do not break this assumption, otherwise snaps mount namespace setup will fail early in the process. To use /root', set ROOT_HOME like this:

cat <<EOF >> conf/local.conf
ROOT_HOME = "/root"
EOF

(Optional) The build can take up a huge amount of disk space, inheriting rm_work class will help deal with that (see https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref-classes-rm-work for details):

INHERIT += "rm_work"
# exclude snapd in case you want to develop snapd recipes
RM_WORK_EXCLUDE += "snapd"
  1. Finally you can now build the Snappy demo image via
 $ bitbake snapd-demo-image

Depending on your host system the build will take a while.

The snapd-demo-image set IMAGE_ROOTFS_SIZE ?= "819200", this the resulting image is > 800MB in size. When building custom images make sure to add room for storing snaps by either setting IMAGE_ROOTFS_EXTRA_SPACE or tuning IMAGE_ROOTFS_SIZE

  1. Once the build is done you can boot the image with QEMU with the following command:
 $ runqemu qemux86
  1. When the system has fully booted login with root and no password. Afterwards you can use the the snap system as normal.
 $ snap install hello-world
 $ /snap/bin/hello-world.shell
 # path to /snap/bin is automatically addded to user's environment
 $ hello-world

Contributions & support

Please submit any issues or pull requests on out github project at http://github.com/morphis/meta-snappy

Head out to https://forum.snapcraft.io/ for support and questions about snapd.

meta-snappy's People

Contributors

morphis avatar bboozzoo avatar oberstet avatar om26er avatar xerusial avatar hacpa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.