Difference between revisions of "Shared Embedded Linux Distribution"

From eLinux.org
Jump to: navigation, search
(add link to presentation on collaboration status from Dec 2017)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
This page describes the CE Workgroup "Shared Embedded Linux Distribution" project
+
This page describes the CELP "Shared Embedded Linux Distribution" project
* This is a project to use Debian packages with the Yocto Project
+
* This is a project to use Debian packages with the Yocto Project "Poky"
 
** Goal is to share the work of maintaining long-term support for an embedded distribution, by leveraging the work of the Debian project
 
** Goal is to share the work of maintaining long-term support for an embedded distribution, by leveraging the work of the Debian project
 
* See [[Media:Poky_meets_Debian_Understanding_How_to_Make_an_Embedded_Linux_by_Using_an_Existing_Distribution%27s_Source_Code.pdf|"Poky meets Debian: Understanding How to Make an Embedded Linux by Using an Existing Distribution's Source Code"]] talk at ELC 2015 by Yoshitake Kobayashi
 
* See [[Media:Poky_meets_Debian_Understanding_How_to_Make_an_Embedded_Linux_by_Using_an_Existing_Distribution%27s_Source_Code.pdf|"Poky meets Debian: Understanding How to Make an Embedded Linux by Using an Existing Distribution's Source Code"]] talk at ELC 2015 by Yoshitake Kobayashi
 +
* See [[Media:Meta-debian handout r2.pdf|"Meta-debian handout"]] which was available at LinuxCon Japan 2015 CE Workgroup booth
  
 
== Rationale ==
 
== Rationale ==
[describe purpose of project]
+
The Deby (meta-debian layer) is a set of recipes (metadata) for the poky build system, which allows cross-building Linux images using Debian source packages.
 +
By enabling meta-debian layer, poky fetches required sources from Debian source repository and LTSI/CIP kernel repository. Deby is independent of OpenEmbedded-core recipes, so OE-Core recipes are still available after meta-debian layer is enabled. Deby is mainly intended to be used for embedded products which needs long-term support.
  
== Status ==
+
The purpose is to provide the following things
 +
* Fully customizable embedded Linux based on existed distro
 +
* Wide embedded CPU support
 +
* Stability and long-term support
 +
The meta-debian recipes follow Debian build rules by default, but sometimes customize them for embedded systems if necessary (e.g. remove dependencies). Also they re-use essential patches from OE-Core to support cross-building
  
== How to use ==
+
== Quick start ==
=== Setup repositories ===
 
<pre>$ git clone git://git.yoctoproject.org/poky.git
 
$ cd poky
 
$ git checkout daisy
 
$ git clone https://github.com/meta-debian/meta-debian.git
 
$ cd meta-debian
 
$ git checkout daisy</pre>
 
Please don't forget to install essential packages into your host system before you bitbake something.
 
See Yocto Project's web site for this information [http://www.yoctoproject.org/docs/1.6/poky-ref-manual/poky-ref-manual.html#intro-requirements]
 
  
=== Setup build directory ===
+
Install essential packages poky requires into your host system according to http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#intro-requirements
<pre>
 
$ export TEMPLATECONF=meta-debian/conf
 
$ source ./poky/oe-init-build-env
 
</pre>
 
You can change the target machine by setting MACHINE variable in local.conf to one of the following machines.
 
* qemux86, qemux86-64, qemuarm, qemuppc
 
  
=== Bitbake kernel and tiny rootfs ===
+
$ sudo apt-get install git tar python
<pre>
+
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat
$ bitbake core-image-minimal
 
</pre>
 
  
=== Run the build image on Qemu ===
+
NOTE: The following three packages have version limitation
Please run the following commands after bitbake core-image-minimal finishes.
 
<pre>
 
(qemux86)
 
$ runqemu qemux86 nographic bootparams="init=/init root=/dev/sda"
 
  
(qemux86-64)
+
    git: 1.7.8 or greater
$ runqemu qemux86-64 nographic bootparams="init=/init root=/dev/sda"
+
    tar: 1.24 or greater
 +
    python: 2.7.3 or greater not including Python 3.x
  
(qemuarm)
+
Setup repositories.
$ runqemu qemuarm nographic bootparams="init=/init console=ttyAMA0"
 
  
(qemuppc)
+
$ git clone -b morty git://git.yoctoproject.org/poky.git
$ runqemu qemuppc nographic bootparams="init=/init"
+
$ cd poky
</pre>
+
$ git clone -b morty https://github.com/meta-debian/meta-debian.git
The shell prompt appears automatically after system boots without login. "init=/init" means that kernel uses tiny-init script as the init process instead of busybox /sbin/init.
+
$ cd ..
 +
 
 +
Setup build directory.
 +
 
 +
$ export TEMPLATECONF=meta-debian/conf
 +
$ source ./poky/oe-init-build-env
 +
 
 +
You can change the target machine by setting MACHINE variable in conf/local.conf to one of the following machines.
 +
 
 +
    qemux86 (default)
 +
    qemux86-64
 +
    qemuarm
 +
    qemuarm64
 +
    qemuppc
 +
    qemumips
 +
 
 +
For example, the target machine is set to QEMU ARM by adding the following difinition to conf/local.conf.
 +
 
 +
MACHINE = "qemuarm"
 +
 
 +
Now, the build system is ready. Build Linux kernel and the minimal rootfs by the following command. It takes a while to complete (more than 30 minutes).
 +
 
 +
$ bitbake core-image-minimal
 +
 
 +
Run the built Linux on QEMU. Please replace ${MACHINE} by the target machine you selected in the above step.
 +
 
 +
$ runqemu ${MACHINE} nographic
 +
 
 +
Only if MACHINE is qemuarm, the console should be set to the correct serial device.
 +
 
 +
$ runqemu qemuarm nographic bootparams="console=ttyAMA0"
 +
 
 +
After boot, you can login as root without password.
 +
 
 +
If you'd like to reduce the time of bitbake, please refer to https://github.com/meta-debian/meta-debian-docker.
  
 
== Resources ==
 
== Resources ==
=== Project home ===
+
=== Download ===
 
* https://github.com/meta-debian/
 
* https://github.com/meta-debian/
  
Line 62: Line 81:
 
=== Presentations ===
 
=== Presentations ===
 
* [[Media:Poky_meets_Debian_Understanding_How_to_Make_an_Embedded_Linux_by_Using_an_Existing_Distribution%27s_Source_Code.pdf|"Poky meets Debian: Understanding How to Make an Embedded Linux by Using an Existing Distribution's Source Code"]] talk at ELC 2015 by Yoshitake Kobayashi
 
* [[Media:Poky_meets_Debian_Understanding_How_to_Make_an_Embedded_Linux_by_Using_an_Existing_Distribution%27s_Source_Code.pdf|"Poky meets Debian: Understanding How to Make an Embedded Linux by Using an Existing Distribution's Source Code"]] talk at ELC 2015 by Yoshitake Kobayashi
* [http://events.linuxfoundation.org/sites/events/files/slides/LinuxCon2015_meta-debian_r5.pdf|"meta-debian: Extending Yocto Project's Poky for building Debian-based embedded system"] talk at LinuxCon Japan 2015 by Kazuhiro Hayashi
+
* [[Media:LinuxCon2015 meta-debian r7.pdf|"meta-debian: Extending Yocto Project's Poky for building Debian-based embedded system"]] talk at LinuxCon Japan 2015 by Kazuhiro Hayashi
 +
* [[Media:ELCE2016_Hayashi_Deby.pdf|"Deby - Reproducible and Maintainable Embedded Linux Environment with Poky"]] talk at ELC Europe 2016 by Kazuhiro Hayashi
 +
* [[Media:MiniDebianConfJapan-Yoshi.pdf|"Generating Embedded Linux Images by Using the Debian Source Code"]] talk at Mini Debian Conference Japan 2016 by Yoshitake Kobayashi
 +
* [http://events.linuxfoundation.jp/sites/events/files/slides/ISAR-DEBY-OSSJ2017_r10.pdf|"Building Debian-Based Products: Experiences in Collaboration"] talk at Open Source Summit Japan 2017 by Baurzhan Ismagulov and Kazuhiro Hayashi (This was a collaborative work with [https://github.com/ilbers/isar ISAR].)
 +
* [https://elinux.org/images/4/42/ELBE-Isar-Deby_jamboree63_r2.pdf|"Debian + YoctoProject Based Projects: Collaboration Status"] talk at Japan Technical Jamboree 63 (Dec 2017) by Kazuhiro Hayashi
 +
 
 +
=== Similar activities for reference ===
 +
* [https://github.com/ilbers/isar ISAR] - Integration System for Automated Root filesystem generation
 +
* [https://elbe-rfs.org/ ELBE] - embedded linux build environment

Latest revision as of 06:11, 1 March 2018

This page describes the CELP "Shared Embedded Linux Distribution" project

Rationale

The Deby (meta-debian layer) is a set of recipes (metadata) for the poky build system, which allows cross-building Linux images using Debian source packages. By enabling meta-debian layer, poky fetches required sources from Debian source repository and LTSI/CIP kernel repository. Deby is independent of OpenEmbedded-core recipes, so OE-Core recipes are still available after meta-debian layer is enabled. Deby is mainly intended to be used for embedded products which needs long-term support.

The purpose is to provide the following things

  • Fully customizable embedded Linux based on existed distro
  • Wide embedded CPU support
  • Stability and long-term support

The meta-debian recipes follow Debian build rules by default, but sometimes customize them for embedded systems if necessary (e.g. remove dependencies). Also they re-use essential patches from OE-Core to support cross-building

Quick start

Install essential packages poky requires into your host system according to http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#intro-requirements

$ sudo apt-get install git tar python
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat

NOTE: The following three packages have version limitation

   git: 1.7.8 or greater
   tar: 1.24 or greater
   python: 2.7.3 or greater not including Python 3.x

Setup repositories.

$ git clone -b morty git://git.yoctoproject.org/poky.git
$ cd poky
$ git clone -b morty https://github.com/meta-debian/meta-debian.git
$ cd ..

Setup build directory.

$ export TEMPLATECONF=meta-debian/conf
$ source ./poky/oe-init-build-env

You can change the target machine by setting MACHINE variable in conf/local.conf to one of the following machines.

   qemux86 (default)
   qemux86-64
   qemuarm
   qemuarm64
   qemuppc
   qemumips

For example, the target machine is set to QEMU ARM by adding the following difinition to conf/local.conf.

MACHINE = "qemuarm"

Now, the build system is ready. Build Linux kernel and the minimal rootfs by the following command. It takes a while to complete (more than 30 minutes).

$ bitbake core-image-minimal

Run the built Linux on QEMU. Please replace ${MACHINE} by the target machine you selected in the above step.

$ runqemu ${MACHINE} nographic

Only if MACHINE is qemuarm, the console should be set to the correct serial device.

$ runqemu qemuarm nographic bootparams="console=ttyAMA0"

After boot, you can login as root without password.

If you'd like to reduce the time of bitbake, please refer to https://github.com/meta-debian/meta-debian-docker.

Resources

Download

Mailing list

Presentations

Similar activities for reference

  • ISAR - Integration System for Automated Root filesystem generation
  • ELBE - embedded linux build environment