linux and yocto and what package to install for lshw

Yocto Project Quick Starting time


Welcome!

Welcome to the Yocto Projection! The Yocto Project is an open-source collaboration project focused on embedded Linux developers. Among other things, the Yocto Project uses a build system based on the OpenEmbedded (OE) projection, which uses the BitBake tool, to construct complete Linux images. The BitBake and OE components are combined together to course Poky, a reference build system.

If y'all don't accept a system that runs Linux and you want to give the Yocto Projection a examination run, you might consider using the Yocto Project Build Appliance. The Build Apparatus allows you to build and boot a custom embedded Linux image with the Yocto Projection using a non-Linux development system. Encounter the Yocto Project Build Apparatus for more information.

On the other mitt, if yous know all about open up-source evolution, Linux development environments, Git source repositories and the like and you simply desire some quick information that lets you try out the Yocto Project on your Linux organization, skip right to the "Super User" section at the end of this quick start.

For the remainder of y'all, this short document will give you some basic data about the surround and allow you experience it in its simplest course. Later reading this document, yous volition accept a basic understanding of what the Yocto Projection is and how to use some of its core components. This certificate steps you lot through a simple example showing you how to build a small image and run it using the Quick EMUlator (QEMU emulator).

For more detailed information on the Yocto Project, you should check out these resources:

  • Website: The Yocto Project Website provides the latest builds, breaking news, full development documentation, and a rich Yocto Project Development Community into which you can tap.

  • FAQs: Lists usually asked Yocto Project questions and answers. You tin can find 2 FAQs: Yocto Project FAQ on a wiki, and the "FAQ" chapter in the Yocto Projection Reference Manual.

  • Developer Screencast: The Getting Started with the Yocto Projection - New Developer Screencast Tutorial provides a 30-infinitesimal video created for users unfamiliar with the Yocto Project but familiar with Linux build systems. While this screencast is somewhat dated, the introductory and cardinal concepts are useful for the beginner.

Introducing the Yocto Project Evolution Environment

The Yocto Project through the OpenEmbedded build system provides an open source development environment targeting the ARM, MIPS, PowerPC and x86 architectures for a variety of platforms including x86-64 and emulated ones. You lot can utilize components from the Yocto Project to blueprint, develop, build, debug, simulate, and test the complete software stack using Linux, the 10 Window System, GTK+ frameworks, and Qt frameworks.

Here are some highlights for the Yocto Projection:

  • Provides a recent Linux kernel forth with a fix of system commands and libraries suitable for the embedded environment.

  • Makes available organisation components such every bit X11, GTK+, Qt, Clutter, and SDL (among others) so you can create a rich user feel on devices that have display hardware. For devices that practise not have a display or where you lot wish to employ culling UI frameworks, these components need not be installed.

  • Creates a focused and stable core compatible with the OpenEmbedded project with which y'all can easily and reliably build and develop.

  • Fully supports a wide range of hardware and device emulation through the QEMU Emulator.

The Yocto Project can generate images for many kinds of devices. However, the standard example machines target QEMU full-system emulation for x86, x86-64, ARM, MIPS, and PPC-based architectures as well every bit specific hardware such as the Intel® Desktop Board DH55TC. Because an image adult with the Yocto Project tin boot inside a QEMU emulator, the development environment works nicely as a test platform for developing embedded software.

Another important Yocto Project feature is the Sato reference User Interface. This optional UI that is based on GTK+ is intended for devices with restricted screen sizes. The UI sits neatly on summit of a device using the GTK+ stack and provides a well-defined user experience. Implemented in its own layer, information technology makes it articulate to developers how they can implement their own user interface on top of a Linux paradigm created with the Yocto Projection.

What Y'all Need and How Y'all Go It

You need these things to develop projects in the Yocto Project environment:

  • A host organization with a minimum of 50 Gbytes of free deejay space that is running a supported Linux distribution (i.e. recent releases of Fedora, openSUSE, CentOS, Debian, or Ubuntu). If the host organization supports multiple cores and threads, you lot tin can configure the Yocto Project build system to significantly decrease the time needed to build images.

  • Appropriate packages installed on the system you are using for builds.

  • A release of the Yocto Project.

The Linux Distribution

The Yocto Project team is continually verifying more and more Linux distributions with each release. In general, if you have the electric current release minus one of the post-obit distributions yous should have no bug.

  • Ubuntu

  • Fedora

  • openSUSE

  • CentOS

  • Debian

For a more than detailed list of distributions that support the Yocto Projection, see the "Supported Linux Distributions" section in the Yocto Projection Reference Transmission.

The OpenEmbedded build system should be able to run on any modern distribution that has the post-obit versions for Git, tar, and Python.

  • Git one.vii.viii or greater

  • tar i.24 or greater

  • Python 2.vii.3 or greater excluding Python 3.x, which is not supported.

Earlier releases of Python are known to not piece of work and the system does not back up Python three at this time. If your organisation does not come across any of these 3 listed version requirements, yous can accept steps to prepare the system so that yous tin can still use the build organization. See the "Required Git, tar, and Python Versions" department in the Yocto Projection Reference Manual for information.

This certificate assumes you lot are running one of the previously noted distributions on your Linux-based host systems.

Note

If you attempt to use a distribution not in the above listing, you may or may not accept success. Yocto Project releases are tested against the stable Linux distributions listed in the "Supported Linux Distributions" section of the Yocto Project Reference Manual. If yous see problems, please go to Yocto Project Bugzilla and submit a bug. Nosotros are interested in hearing nigh your experience.

The Packages

Packages and bundle installation vary depending on your development system and on your intent. For example, if you desire to build an prototype that tin can run on QEMU in graphical mode (a minimal, basic build requirement), then the number of packages is different than if you want to build an prototype on a headless arrangement or build out the Yocto Project documentation set. Collectively, the number of required packages is large if you want to be able to cover all cases.

Note

In general, y'all need to have root access and and then install the required packages. Thus, the commands in the following section may or may not work depending on whether or not your Linux distribution has sudo installed.

The next few sections list, past supported Linux Distributions, the required packages needed to build an image that runs on QEMU in graphical way (eastward.thou. essential plus graphics back up).

For lists of required packages for other scenarios, run across the "Required Packages for the Host Evolution System" section in the Yocto Project Reference Manual.

Ubuntu and Debian

The essential and graphical support packages yous need for a supported Ubuntu or Debian distribution are shown in the post-obit command:

                $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \      build-essential chrpath socat libsdl1.2-dev xterm              

Notation

If your build system has the oss4-dev package installed, you might feel QEMU build failures due to the parcel installing its ain custom /usr/include/linux/soundcard.h on the Debian organization. If you encounter this situation, either of the post-obit solutions exist:

                  $ sudo apt-get build-dep qemu      $ sudo apt-get remove oss4-dev                

Fedora

The essential and graphical packages you demand for a supported Fedora distribution are shown in the following control:

                $ sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \      diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \      ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \      findutils which SDL-devel xterm              

OpenSUSE

The essential and graphical packages yous need for a supported OpenSUSE distribution are shown in the following command:

                $ sudo zypper install python gcc gcc-c++ git chrpath brand wget python-xml \      diffstat makeinfo python-curses patch socat libSDL-devel xterm              

CentOS

The essential and graphical packages you demand for a supported CentOS distribution are shown in the post-obit command:

                $ sudo yum install gawk make wget tar bzip2 gzip python unzip perl patch \      diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat SDL-devel xterm              

Note

Depending on the CentOS version you are using, other requirements and dependencies might exist. For details, you should look at the CentOS sections on the Poky/GettingStarted/Dependencies wiki page.

Yocto Project Release

It is recommended that you get the latest Yocto Project files by setting upwards (cloning in Git terms) a local copy of the poky Git repository on your host development system. Doing so allows y'all to contribute back to the Yocto Project projection. For information on how to get set using this method, see the "Yocto Project Release" item in the Yocto Project Development Manual.

You can also become the Yocto Project Files past downloading Yocto Project releases from the Yocto Project website. From the website, you merely click "Downloads" in the navigation pane to the left to display all Yocto Project downloads. Current and archived releases are bachelor for download. Nightly and developmental builds are also maintained at http://autobuilder.yoctoproject.org/pub/nightly/. One last site you can visit for information on Yocto Projection releases is the Releases wiki. However, for this certificate a released version of Yocto Project is used.

A Quick Test Run

Now that y'all have your organisation requirements in club, you can requite the Yocto Project a endeavor. This section presents some steps that permit you do the post-obit:

  • Build an prototype and run it in the QEMU emulator.

  • Apply a pre-built image and run it in the QEMU emulator.

Note

This section does not provide item, just rather provides minimal, working commands and examples designed to just become you lot started. For more details, see the appropriate manuals in the Yocto Project manual set.

Edifice an Paradigm

In the development environment you volition need to build an image whenever you change hardware back up, add or change system libraries, or add or modify services that have dependencies.

Apply the following commands to build your prototype. The OpenEmbedded build process creates an entire Linux distribution, including the toolchain, from source.

Annotation about Network Proxies

By default, the build process searches for source code using a pre-determined lodge through a set up of locations. If you are working behind a firewall and your build organisation is not set up upwards for proxies, y'all could encounter problems with the build process when fetching source code (e.g. fetcher failures or Git failures).

If you practise not know your proxy settings, consult your local network infrastructure resources and get that information. A good starting signal could also exist to cheque your web browser settings. Finally, y'all can find more information on using the Yocto Project behind a firewall in the Yocto Projection Reference Manual FAQ and on the "Working Behind a Network Proxy" wiki folio.

              $ git clone http://git.yoctoproject.org/git/poky      $ cd poky      $ git checkout -b fido origin/fido      $ source oe-init-build-env            

Tip

To help conserve disk space during builds, you can add the following statement to your project's configuration file, which for this example is poky/build/conf/local.conf. Calculation this argument deletes the piece of work directory used for edifice a package once the bundle is built.

                INHERIT += "rm_work"              
  • In the previous example, the get-go command uses Git to create a local repository named poky that is a clone of the upstream Yocto Project poky repository.

  • The third command checks out the electric current Yocto Project release into a local branch whose proper noun matches the release (i.e. fido). The local branch tracks the upstream co-operative of the same proper noun. Creating your own co-operative based on the released branch ensures you are using the latest files for that release.

  • The final control runs the Yocto Project oe-init-build-env environment setup script. Running this script defines OpenEmbedded build surroundings settings needed to consummate the build. The script also creates the Build Directory, which is build in this case and is located in the Source Directory. After the script runs, your electric current working directory is set to the Build Directory. Later, when the build completes, the Build Directory contains all the files created during the build.

Take some time to examine your local.conf file in your projection's configuration directory, which is found in the Build Directory. The defaults in that file should work fine. Nonetheless, there are some variables of involvement at which y'all might wait.

By default, the target architecture for the build is qemux86, which produces an epitome that can be used in the QEMU emulator and is targeted at an Intel® 32-scrap based architecture. To change this default, edit the value of the Auto variable in the configuration file before launching the build.

3 other variables of involvement are the BB_NUMBER_THREADS, PARALLEL_MAKE, and BB_NUMBER_PARSE_THREADS variables. By default, the OpenEmbedded build system sets these variables based on the number of processor cores your build host uses. Thus, you typically do not need to uncomment these variables in your local.conf file to gain optimal build times.

Another consideration before yous build is the package director used when creating the epitome. By default, the OpenEmbedded build organization uses the RPM bundle manager. You lot can control this configuration by using the PACKAGE_CLASSES variable. For boosted bundle manager option data, see the "packet*.bbclass" section in the Yocto Project Reference Manual.

Continue with the following control to build an Os image for the target, which is core-image-sato in this example. For information on the -k pick use the bitbake --help command, see the "BitBake" section in the Yocto Project Reference Manual, or come across the "BitBake Command" section in the BitBake User Manual. For data on other targets, see the "Images" chapter in the Yocto Project Reference Transmission.

              $ bitbake -1000 cadre-epitome-sato            

Notation

BitBake requires Python ii.seven. For more information on this requirement, run into the "Required Git, tar, and Python" department in the Yocto Project Reference Manual.

The final command runs the paradigm using the QEMU emulator:

              $ runqemu qemux86            

Note

Depending on the number of processors and cores, the amount of RAM, the speed of your Internet connection and other factors, the build process could take several hours the outset fourth dimension you run it. Subsequent builds run much faster since parts of the build are cached.

If you lot want to learn more about running QEMU, run across the "Using the Quick EMUlator (QEMU)" chapter in the Yocto Projection Evolution Transmission.

For information on how to use a pre-built binary, continue reading into the next section. Otherwise, you might exist interested in reading the early chapters of the Yocto Projection Development Manual.

Using Pre-Built Binaries and QEMU

If hardware, libraries and services are stable, you can get started past using a pre-congenital binary of the filesystem prototype, kernel, and toolchain and run it using the QEMU emulator. This scenario is useful for developing awarding software.

For this scenario, you need to do several things:

  • Install the appropriate stand-alone toolchain tarball.

  • Download the pre-built prototype that will boot with QEMU. You need to be sure to get the QEMU prototype that matches your target machine's compages (due east.g. x86, ARM, etc.).

  • Download the filesystem image for your target automobile's architecture.

  • Prepare up the environment to emulate the hardware and so starting time the QEMU emulator.

Installing the Toolchain

Y'all can download a tarball installer, which includes the pre-built toolchain, the runqemu script, and back up files from the appropriate directory under http://downloads.yoctoproject.org/releases/yocto/yocto-i.8/toolchain/. Toolchains are bachelor for 32-bit and 64-bit x86 development systems from the i686 and x86_64 directories, respectively. The toolchains the Yocto Project provides are based off the core-image-sato image and contain libraries advisable for developing confronting that epitome. Each type of evolution organization supports five or more target architectures.

The names of the tarball installer scripts are such that a string representing the host system appears first in the filename and and so is immediately followed past a string representing the target architecture.

                poky-glibc-                  host_system                -                  image_type                -                  arch                -toolchain-                  release_version                .sh       Where:                                  host_system                                is a string representing your evolution organization:                      i686 or x86_64.                                  image_type                                is a string representing the paradigm you wish to                 develop a Software Development Toolkit (SDK) for utilize confronting.                 The Yocto Project builds toolchain installers using the                 following BitBake command:                      bitbake core-image-sato -c populate_sdk                                  arch                                is a string representing the tuned target compages:                      i586, x86_64, powerpc, mips, armv7a or armv5te                                  release_version                                is a string representing the release number of the                 Yocto Project:                      ane.8, 1.eight+snapshot              

For example, the following toolchain installer is for a 64-flake development host system and a i586-tuned target architecture based off the SDK for core-image-sato:

                poky-glibc-x86_64-core-image-sato-i586-toolchain-ane.8.sh              

Toolchains are self-independent and past default are installed into /opt/poky. Even so, when yous run the toolchain installer, yous can cull an installation directory.

The following command shows how to run the installer given a toolchain tarball for a 64-bit x86 development host system and a 32-fleck x86 target compages. You lot must change the permissions on the toolchain installer script so that it is executable.

The example assumes the toolchain installer is located in ~/Downloads/.

Note

If you do non accept write permissions for the directory into which you are installing the toolchain, the toolchain installer notifies y'all and exits. Be sure you accept write permissions in the directory and run the installer once again.

                $ ~/Downloads/poky-glibc-x86_64-core-image-sato-i586-toolchain-i.viii.sh              

For more data on how to install tarballs, run into the "Using a Cross-Toolchain Tarball" and "Using BitBake and the Build Directory" sections in the Yocto Project Application Developer's Guide.

Downloading the Pre-Built Linux Kernel

You can download the pre-built Linux kernel suitable for running in the QEMU emulator from http://downloads.yoctoproject.org/releases/yocto/yocto-1.viii/machines/qemu. Be certain to use the kernel that matches the architecture yous want to simulate. Download areas exist for the v supported car architectures: qemuarm, qemumips, qemuppc, qemux86, and qemux86-64.

Most kernel files have one of the following forms:

                *zImage-qemu                  arch                .bin      vmlinux-qemu                  arch                .bin       Where:                                  arch                                is a string representing the target compages:                 x86, x86-64, ppc, mips, or arm.              

You tin learn more about downloading a Yocto Projection kernel in the "Yocto Project Kernel" bulleted particular in the Yocto Projection Development Transmission.

Downloading the Filesystem

You tin also download the filesystem epitome suitable for your target architecture from http://downloads.yoctoproject.org/releases/yocto/yocto-1.8/machines/qemu. Again, exist sure to employ the filesystem that matches the compages you want to simulate.

The filesystem image has 2 tarball forms: ext3 and tar. Y'all must utilise the ext3 class when booting an paradigm using the QEMU emulator. The tar grade can be flattened out in your host development system and used for build purposes with the Yocto Project.

                core-image-                  profile                -qemu                  arch                .ext3      core-image-                  profile                -qemu                  arch                .tar.bz2       Where:                                  profile                                is the filesystem image'southward contour:                    lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato,                    sato-dev, or sato-sdk. For information on these types of paradigm                    profiles, come across the "Images"                    chapter in the Yocto Project Reference Manual.                                  arch                                is a string representing the target architecture:                 x86, x86-64, ppc, mips, or arm.              

Setting Upwardly the Environment and Starting the QEMU Emulator

Earlier yous commencement the QEMU emulator, you need to set upwardly the emulation surroundings. The following command form sets up the emulation environment.

                $ source /opt/poky/1.8/environment-setup-                  curvation                -poky-linux-                  if                                Where:                                  arch                                is a cord representing the target architecture:                 i586, x86_64, ppc603e, mips, or armv5te.                                  if                                is a string representing an embedded awarding binary interface.               Not all setup scripts include this string.              

Finally, this command course invokes the QEMU emulator

                $ runqemu                                  qemuarch                                                  kernel-image                                                  filesystem-epitome                                Where:                                  qemuarch                                is a cord representing the target architecture: qemux86, qemux86-64,                     qemuppc, qemumips, or qemuarm.                                  kernel-prototype                                is the architecture-specific kernel epitome.                                  filesystem-prototype                                is the .ext3 filesystem image.              

Continuing with the instance, the following two commands setup the emulation surroundings and launch QEMU. This instance assumes the root filesystem (.ext3 file) and the pre-built kernel image file both reside in your abode directory. The kernel and filesystem are for a 32-bit target compages.

                $ cd $HOME      $ source /opt/poky/one.eight/environment-setup-i586-poky-linux      $ runqemu qemux86 bzImage-qemux86.bin \      core-epitome-sato-qemux86.ext3              

The surround in which QEMU launches varies depending on the filesystem image and on the target architecture. For instance, if you lot source the environs for the ARM target architecture and then boot the minimal QEMU image, the emulator comes upward in a new beat out in control-line way. Notwithstanding, if y'all kicking the SDK paradigm, QEMU comes upwardly with a GUI.

Note

Booting the PPC paradigm results in QEMU launching in the same crush in command-line mode.

For more detailed information on using the Yocto Project for paradigm and application develop, the all-time place to continue reading is in the Yocto Projection Development Manual.

Super User

This department [ane] gives you a minimal clarification of how to apply the Yocto Projection to build images for Beaglebone hardware starting from scratch. The steps were performed on a 64-bit Ubuntu 12.04 system that has four cores.

Getting the Yocto Project

Prepare up your Source Directory by using Git to clone the poky repository and so check out the release branch:

              $ cd ~      $ git clone git://git.yoctoproject.org/poky      $ cd poky      $ git checkout -b fido origin/fido            

Setting Up Your Host

Yous demand some packages for everything to work. Rather than duplicate them here, look at the "The Packages" department before in this quick start.

Initializing the Build Environment

From the root directory of your Source Directory, initialize your surroundings and provide a meaningful Build Directory proper noun:

              $ source oe-init-build-env mybuilds            

At this signal, the mybuilds directory has been created for yous and it is now your current working directory. If you do not provide your own directory proper noun, information technology defaults to build, which is within the Source Directory.

Configuring the local.conf File

Initializing the build environment creates a conf/local.conf configuration file in the Build Directory. You need to manually edit this file to specify the automobile you are building:

              MACHINE ?= "beaglebone"            

A practiced deal that goes into a Yocto Projection build is simply downloading all of the source tarballs. Steps exist that tin can aid yous be more than efficient with gathering source files. For instance, yous can fix local mirrors that hold your source tarballs or you tin pre-fetch all your source without initiating a build until later. For more information, come across the "Working with Source Files" department in the Yocto Project Development Manual.

Building the Image

At this point, you lot need to select an image to build for the Beaglebone hardware. If this is your beginning build using the Yocto Projection, you should attempt the smallest and simplest image:

              $ bitbake core-epitome-minimal            

Now you lot just expect for the build to finish.

By default, BitBake aborts when it encounters an fault during the build. If you want to make sure the build continues even when BitBake encounters an error, employ this variation:

              $ bitbake -k core-image-minimal            

Once y'all accept your prototype, you can take steps to load and boot it on the target hardware.

You can learn well-nigh BitBake in full general past reading the BitBake User Manual.

gonzalezhimag1974.blogspot.com

Source: https://www.yoctoproject.org/docs/1.8/yocto-project-qs/yocto-project-qs.html

0 Response to "linux and yocto and what package to install for lshw"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel