From 42a31a57edf6b731f90a792d81d568435eecabb7 Mon Sep 17 00:00:00 2001 From: Catalin Scrieciu Date: Tue, 23 Jan 2018 16:42:38 +0100 Subject: Restructuring Getting Started chapter in the User's Guide and fixing minor bugs in several other sections and documents --- .../doc/known_bugs_and_limitations.xml | 2 +- .../doc/application_development.xml | 2 +- doc/book-enea-linux-user-guide/doc/book.xml | 4 +- .../doc/getting_enea_linux.xml | 156 +++++ .../doc/prerequisites_and_requirements.xml | 101 +++ .../doc/using_enea_linux.xml | 780 +++++++++++++++++++++ 6 files changed, 1042 insertions(+), 3 deletions(-) create mode 100644 doc/book-enea-linux-user-guide/doc/getting_enea_linux.xml create mode 100644 doc/book-enea-linux-user-guide/doc/prerequisites_and_requirements.xml create mode 100644 doc/book-enea-linux-user-guide/doc/using_enea_linux.xml diff --git a/doc/book-enea-linux-release-info/doc/known_bugs_and_limitations.xml b/doc/book-enea-linux-release-info/doc/known_bugs_and_limitations.xml index 9fda0a9..2f7a41d 100644 --- a/doc/book-enea-linux-release-info/doc/known_bugs_and_limitations.xml +++ b/doc/book-enea-linux-release-info/doc/known_bugs_and_limitations.xml @@ -2,7 +2,7 @@ - Known Problems in This Release + Known Problems in this Release Open source projects are continuously working on correcting reported problems. Corrections to bugs detected by Enea are submitted upstream, and diff --git a/doc/book-enea-linux-user-guide/doc/application_development.xml b/doc/book-enea-linux-user-guide/doc/application_development.xml index c8ee28c..3458d39 100644 --- a/doc/book-enea-linux-user-guide/doc/application_development.xml +++ b/doc/book-enea-linux-user-guide/doc/application_development.xml @@ -15,7 +15,7 @@ applications as usual and get them compiled for your target. Below you see how to cross-compile from the command line. If Eclipse is installed, you can also cross-compile your code from the Eclipse IDE. For more details, - see . + see . diff --git a/doc/book-enea-linux-user-guide/doc/book.xml b/doc/book-enea-linux-user-guide/doc/book.xml index f449974..6e131b3 100644 --- a/doc/book-enea-linux-user-guide/doc/book.xml +++ b/doc/book-enea-linux-user-guide/doc/book.xml @@ -12,7 +12,9 @@ - + + + diff --git a/doc/book-enea-linux-user-guide/doc/getting_enea_linux.xml b/doc/book-enea-linux-user-guide/doc/getting_enea_linux.xml new file mode 100644 index 0000000..772d8e3 --- /dev/null +++ b/doc/book-enea-linux-user-guide/doc/getting_enea_linux.xml @@ -0,0 +1,156 @@ + + + Getting Enea Linux + + Enea Linux is available as both pre-built binary images and source + code. Both serve a specific purpose and each have their advantages. However, + using the pre-built binary images allows for getting up and running faster. + Please refer to the sections below for details on how to get Enea Linux as + pre-built binary images or source code. + +
+ Getting Pre-Built Binaries + + Enea Linux pre-built binaries are available for download on Enea + Download Portal. Log in using the credentials provided. Using the + menu, browse to the Linux section. You + will now have access to the Files section + and the Online Documentation + section. + + The Files section lists each Enea Linux distribution, one for each + version and profile, as a separate download package. Clicking on the name + of the distribution will open a new page, which presents further details + about the content of the release and a list of downloadable archives, one + for each hardware target included in the release. Each archive provides + the following content: + + + + images directory - this directory includes + the binary image files needed to boot the target with Enea Linux. This + includes the kernel, the root file system, device tree, etc. + + + + sdk directory - this directory includes the + installer for the SDK. + + + + deb directory - this directory contains all + the packages included in the distribution in deb format, which can be + installed using the package manager. + + + + For faster downloads, each archive is mirrored in several places, + geographically. Choose the archive in the region closest to you. + + The Documentation section lists all the documents delivered with the + release. +
+ +
+ Getting the Sources + + Enea Linux sources are available for cloning from a set of Git + repositories on git.enea.com. + Since Enea Linux requires multiple repositories, Google Repo tool is used + in order to manage configurations and make the cloning step simpler. + Google Repo tool uses files, known as manifests, which store a list of + tuples (repository URL, version). The Repo tool is then used to traverse + the list of tuples in the manifest file and clone the specified versions + of each repository. See https://code.google.com/p/git-repo/ + for more info. + +
+ Get access to git.enea.com + + In order to get access to git.enea.com, a ssh key is required for + Git authentication. If you don't already have such a key, follow the + steps below to generate one: + + + + Generate the ssh key pair: + + $ ssh-keygen -t rsa + + When asked for a password, just press Enter. This will create + two files in the .ssh directory in your home directory. + + id_rsa +id_rsa.pub + + + + Copy the public key into an authorized_keys file: + + $ cat id_rsa.pub >> authorized_keys + + + + Once these steps are done and you have a valid ssh key pair, send + the public key, id_rsa.pub, via email to + mailto:git_support@list.enea.se in order to get access to + git.enea.com. +
+ +
+ Get Sources + + To use the Repo tool to download the sources for Enea Linux, do + the following: + + + + Make sure that the repo tool is installed. If not, do the + following: Below is include of ID + "eltf-getting-repo-install-command" from + eltf_params_updated.xml + + + + + + Define the MACHINE from one of the + targets listed here:Below is the "machine_list" + programlisting in machine_list_generated.xml created by the make + system by extracting from the manifest + + raspberrypi3-64 + + + + + + Then use the repo command below: + + + + + + Once the source code is downloaded, the current directory will + contain a README file with instructions on how to + build the distro and boot the machine you choose. . + + It's not necessary to explicitly clone the manifest repository + since that is done automatically by the repo tool. To see the current + manifest, use the following command: + + $ repo manifest + + The UG should be updated with instructions on how to add + customizations. That section should also contain more info about the + manifest: the manifest templates, using a branch instead of the tag EL6, + etc. When this is done a reference from here should be added. +
+
+
\ No newline at end of file diff --git a/doc/book-enea-linux-user-guide/doc/prerequisites_and_requirements.xml b/doc/book-enea-linux-user-guide/doc/prerequisites_and_requirements.xml new file mode 100644 index 0000000..d560eb6 --- /dev/null +++ b/doc/book-enea-linux-user-guide/doc/prerequisites_and_requirements.xml @@ -0,0 +1,101 @@ + + + Prerequisites and Requirements + + Building Enea Linux or compiling applications requires that your git + environment be setup properly and for certain packages to be installed on + your Linux development host. The following chapter details the + configurations needed on the build environment in order to properly use Enea + Linux. + +
+ Git Configuration + + If you intend to get Enea Linux sources and build Enea Linux + yourself, you will need Git installed in your build environemtn. Please + refer to Getting + Started - First-Time Git Setup, for more details on how to set up + your git environment correctly, including how to set your identity using + the following commands: + + $ git config --global user.name "John Doe" +$ git config --global user.email johndoe@example.com +
+ +
+ Host Packages + + In order to work with Enea Linux, you need a set of tools installed + on the build machine, depending on the scenario you use. The following + chapters will describe what tools to install on the build machine. + +
+ Using Pre-Build Binaries + + Using the pre-built binaries, you can get up and running more + quickly. Since building is not required, there are not a lot of packaes + and tools that need to be installed but a few are still required: + + + + wget - for downloading the Enea Linux binaries + + + + tar - for decompressing the Enea Linux release + + + + tftpboot server - for deploying Enea Linux on target + + + + NFS server - in case you want to mount the root file system + over NFS + + +
+ +
+ Required Packages for the Host Development System + + Building Enea Linux requires a set of packages to be installed on + your Linux development host. The list of required packages is described + in the Yocto + Project reference manual. +
+
+ +
+ Default Shell Configuration + + Before installing Enea Linux, make sure that + bash is the default shell. + + To verify the default system + shell + + + + If your system runs Ubuntu, use list to verify if + /usr/bin is a symbolic link to bash: + + # ls -l /bin/sh +lrwxrwxrwx 1 root root 4 2012-03-02 11:53 /bin/sh -> bash + + + + Optionally, in case the link points to dash, + change it through the following steps: + + # ls -l /bin/sh +lrwxrwxrwx 1 root root 4 2012-03-02 11:53 /bin/sh -> dash +# sudo dpkg-reconfigure dash +Use dash as the default system shell (/bin/sh)? No + + +
+
\ No newline at end of file diff --git a/doc/book-enea-linux-user-guide/doc/using_enea_linux.xml b/doc/book-enea-linux-user-guide/doc/using_enea_linux.xml new file mode 100644 index 0000000..a880500 --- /dev/null +++ b/doc/book-enea-linux-user-guide/doc/using_enea_linux.xml @@ -0,0 +1,780 @@ + + + Using Enea Linux + +
+ Building Enea Linux + + Enea Linux is made available as sources as well. This allows + building various Enea Linux artifacts and this is detailed in the + following sections: + +
+ Building the images + + Build Enea Linux images using the following steps: + + + + Clone Enea Linux sources using Repo tool. Please refer to + chapter 3.2 in the current documebt for more details on how to do + this. + + $ mkdir enea-linux +$ cd enea-linux +$ export MACHINE=<machine> +$ repo init -u git@git.enea.com:linux/manifests/el_manifests-standard.git \ + -b refs/tags/Enea_Linux_7.0 -m $MACHINE/default.xml +$ repo sync + + + + Source the build environment + + $ cd poky +$ TEMPLATECONF=meta-el-standard/conf/template.<machine> \ +. ./oe-init-build-env <build_dir> + + + Sourcing the build environment is needed everytime a new + shell is used. However, sourcing using the + TEMPLATECONF is only needed the first time + around. Afterwards it is enough to source the build directory + created before. + + + + The build directory may reside on an NFS mount, but the + TMPDIR + (<build_dir>/tmp) may not. Either build + all on a local disk, or update TMPDIR in + conf/local.conf to point to a local + disk. + + + + + Build Enea Linux image + + # You have already initiated the build environment and are in the <build_dir> +$ bitbake <enea-image-name> +$ cd <build_dir>/tmp/deploy/images/<target>/ # Here are the build binaries + + + Some builds have restrictions on the length of the path + name. If you get a build error indicating that the length is too + long, you need to move your build to obtain a shorter path. + + + Generated images are by default saved in + <build_dir>/tmp/deploy/images/<target>, + where <build_dir> by default is the current + working directory. Images are created for emulation on host or for + booting a physical target, according to how the build environment + was set up before running bitbake. + + Depending on the number of processors and cores, the amount or + RAM, the speed of your Internet connection and other factors, the + build process can take several hours the first time you run it. + Subsequent builds run much faster since parts of the build are + cached. + + + Make sure that the user running the build has access to the + Git repositories on git.enea.com. The build process fetches + information from git.enea.com so the user running the build shall + have the ssh key properly configured. Please refer to for more details on how to get access + to Enea Linux sources. + + + +
+ +
+ Building the SDK + + If you want to rebuild a cross-compilation toolchain to be used by + in application development, use the following steps: + + + + Clone Enea Linux sources using Repo tool. Please refer to + for more details on how to do + this. + + $ mkdir enea-linux +$ cd enea-linux +$ export MACHINE=<machine> +$ repo init -u git@git.enea.com:linux/manifests/el_manifests-standard.git \ + -b refs/tags/Enea_Linux_7.0 -m $MACHINE/default.xml +$ repo sync + + + + Source the build environment + + $ cd poky +$ TEMPLATECONF=meta-el-standard/conf/template.<machine> \ +. ./oe-init-build-env <build_dir> + + + Sourcing the build environment is needed everytime a new + shell is used. However, sourcing using the + TEMPLATECONF is only needed the first time + around. Afterwards it is enough to source the build directory + created before. + + + + The build directory may reside on an NFS mount, but the + TMPDIR + (<build_dir>/tmp) may not. Either build + all on a local disk, or update TMPDIR in conf/local.conf to point + to a local disk. + + + + + Build Enea Linux image + + # You have already initiated the build environment and are in the <build_dir> +$ bitbake <enea-image-name> -c populate_sdk_ext +$ cd <build_dir>/tmp/deploy/sdk/ # Here is the SDK installer script + + + Some builds have restrictions on the length of the path + name. If you get a build error indicating that the length is too + long, you need to move your build to obtain a shorter path. + + + Generated SDK installer script is by default saved in + <build_dir>/tmp/deploy/sdk, where + <build_dir> by default is the current + working directory. + + Depending on the number of processors and cores, the amount or + RAM, the speed of your Internet connection and other factors, the + build process can take several hours the first time you run it. + Subsequent builds run much faster since parts of the build are + cached. + + For more details on how to install and use the SDK, please + refer to . + + +
+
+ +
+ Booting Enea Linux + + Regardless whether you decide to use the pre-built images or if you + choose to build your own, the end result should be similar. Once you have + the artifacts availalbe, you may proceed to booting Enea Linux on + target. + + Enea Linux supports multiple booting methods so those will be + described in the following sections. + +
+ Boot from RAM + + This example requires that a TFTP server is set up at IP address + <tftp_server_ip>, and that the server stores + the Enea Linux image files, kernel image, device tree blob and root + filesystem, in /tftpboot/<download_directory>. + Please refer to for more details on + how to install and configure the TFTP server. + + Once you have that in place, run the following commands on the + target: + + ## set tftp server IP +U-Boot> setenv serverip <tftp_server_ip> + +## tftp the image files on the target machine +U-Boot> tftpboot 0x01000000 Image +U-Boot> tftpboot 0x02000000 Image-bcm2837-rpi-3-b.dtb +U-Boot> tftpboot 0x03000000 enea-image-standard-raspberrypi3-64.ext2.gz.u-boot + +## add any other bootargs values if necessary +U-Boot> setenv bootargs "8250.nr_uarts=1 root=/dev/ram rw ramdisk_size=500000 ip=dhcp \ +console=ttyS0,115200" + +## Start boot sequence +U-Boot> booti 0x01000000 0x03000000 0x02000000 +
+ +
+ Boot from SD card + + Copy the + enea-image-standard-raspberrypi3-64.rpi-sdimg image + to the SD card using the Linux dd tool or Win32DiskImager in Windows, + and insert it into the RPi. The Raspberry Pi will not start without a + properly formatted SD Card, containing the bootloader, kernel image and + rootfs. + + Below you can find two methods of how to format an SD Card: + + + + Format and copy images to the SD card + using the Linux dd command line + + The dd command copies a file, converting + the format of the data in the process, according to the operands + specified: + + sudo dd bs=4M if=enea-image-standard-sdk-raspberrypi3-64.rpi-sdimg of=/dev/sdg + + + Use dd cautiously - improper usage or + entering the wrong values could inadvertently wipe, destroy, or + overwrite the data on your hard drive. + + + + + Format the SD card using the + Win32DiskImager program + + + + Download and unzip Win32DiskImager + + + + Run Win32DiskImager.exe + + + + Select the drive of your SD card + + + + Select the image + enea-image-standard-raspberrypi3-64.rpi-sdimg + + + + Click "Write" and wait for the write to complete + + + + Exit the imager and eject the SD Card + + + + Plug the card into your Raspberry Pi + + + + + Be careful to select the correct drive. If you choose the + wrong one you may destroy your HDD data. If you are using an SD + Card slot and can't see the drive in the Win32DiskImager window, + try using an affordable external adapter in a USB slot. + + + +
+
+ +
+ Customizing Enea Linux + +
+ Layers and Adaptations + + Bitbake allows a modular approach of Metadata, by building images + for the layers listed in the conf/bblayers.conf file from your build + directory. + + To avoid polluting the build with unnecessary packages, before + adding a new layer, it is recommended to check if the Metadata you need + is already available in the enabled layers, in which case, for the + intended configuration, it may require less modification. + + To ease further use of the layer, try to follow as many best + practices as possible when creating it: + + + + Use names starting with the meta prefix (although this is not + a requirement) + + + + + + Place your layer under poky + + + + + + Isolate different customizations by layer + + + + + + Assign the layer to a repository (to easily have access to + maintenance) + + + + To enable a layer, its top path must be specified in the + BBLAYERS variable, as follows: + + # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + /path/to/poky/meta \ + /path/to/poky/meta-el-common \ + /path/to/poky/meta-el-standard \ + /path/to/poky/meta-enea-bsp-common \ + /path/to/poky/meta-enea-bsp-<arch> \ + /path/to/poky/meta-fsl-<arch> \ + /path/to/poky/meta-openembedded/meta-oe \ + /path/to/poky/meta-openembedded/meta-networking \ + /path/to/poky/meta-openembedded/meta-filesystems \ + /path/to/poky/meta-openembedded/meta-python \ + /path/to/poky/meta-poky \ + /path/to/poky/meta-<layer> \ + " + + Before adding an extra layer, please keep in mind that the order + of layers is important (due to BitBake parsing conf/layer.conf as + specified in BBLAYERS). To add an extra layer, you + can modify the build/conf/bblayers.conf file in the + source code editor you prefer, as described above, or use one of the + specially designed Yocto tools. + + To do such, you can simply modify the build/conf/bblayers.conf + file in the source code editor you prefer, as described above, or use + one of the specially designed Yocto tools. + + For instance, in addition to the above, the Yocto Bitbake layers + utility ensures a very useful checking of some basic layer requirements. + Bitbake layers are available, as most of the BitBake tools, when + sourcing oe-init-build-env. Therefore, to enable a custom meta layer, + you should simply run the following from the build directory: + + bitbake-layers add-layer <meta-layer> + + If the specified layer doesn't contain a + conf/layer.conf file, you should add one with the + needed configuration. Also, to make sure the layer insertion is done in + the right metadata, the utility looks for the bblayers.conf + configuration file in the corresponding path, which should be satisfied + if running the command from the generated build directory. + + For further information on this or on other utilities belonging to + the same suite, run: + + bitbake-layers -h + + As a result, BBLAYERS shall be extended with + the bsp-layer/s layer for your target and any other additional layer/s. + For details on how to do this, see the Yocto + 2.3 Dev Manual, section <Understanding and Creating + Layers> . If needed replace the Yocto version. + + Layers can be added when you initialize the build environment. The + layers required for each target are specified in the build commands in + the Enea Linux distribution's Release Information. + + Each Enea Linux customer is advised to add a custom layer for + customer-specific additions and customizations, instead of modifying + existing layers. + + The recommended way to modify a package is to edit directly in the + recipe file. Utilizing the devshell, bitbake -c devshell + <image_name>, when constructing or modifying recipes is + really handy when experimenting, but do not forget to make the final + updates directly in the recipe file. It is difficult to keep track of + exactly what in the user environment is "dirty" and not in sync with + current recipes. Therefore, always make sure to bitbake -c + clean <image_name> after finishing up a devshell + session, and adapt recipes accordingly to ensure a shareable and + repeatable build environment. +
+ +
+ Adding a Recipe + + Study the Hello + World recipe in the Yocto Project Development Manual. If + needed replace the example version (2.3) with the Yocto version in your + Enea Linux distribution. +
+ +
+ Configuring Packages via Recipes + + The default configuration produces a standard Linux installation, + but it is often desirable to configure specific packages in more detail. + Different packages implement their configuration in different ways, and + there is no single method that is valid for all packages. As always, in + a collaborative development environment, the developer should make sure + that the recipes in the custom layer are upgraded accordingly when a + reconfiguration of a specific package is done. + + In subsequent sections you find examples on how to configure some + common packages. + +
+ The Linux Kernel + + The Linux kernel provides a vast array of configuration options, + managed using its own configuration system. The kernel package can be + supplied from different providers, and this example uses the + virtual/kernel package name to refer to the kernel used in the + build: + + $ bitbake -c menuconfig virtual/kernel + + + menuconfig requires Ncurses. If the terminal that pops up + immediately closes instead of showing the menuconfig interface, + check that the Ncurses development library is installed. + + + First build the kernel: + + $ bitbake -f -c compile -c install -c deploy virtual/kernel + + Then build the whole distribution: + + $ bitbake enea-image-<name> +
+ +
+ Busybox + + Busybox uses the same configuration system as the Linux kernel + and is therefore invoked similarly. In contrast to the kernel, there + is generally only one variant of busybox in a distribution and we can + therefore refer to it by the package name alone: + + $ bitbake -c menuconfig busybox +
+
+ +
+ Building with Commercial Licenses + + + Adding commercial-licensed packages might pose distribution + problems due to license agreements or patents. + + + Commercial-licensed packages are not provided with Enea Linux. + Depending on your use case, you might need to extend the initial image + with more packages by adding recipes and updating the image definition, + always in accordance with the license conditions. To succeed with + building the customized image, you might need to solve dependencies by + adding even more packages. + + Below is an example with steps on how to add a package with a + commercial license. The configuration is updated in two places and the + recipes are selected for the packages and any dependencies. + + + This is only an illustrating example, the exact configuration + may differ between different packages. Some packages could require + other defines added to local.conf and some packages might need an + added DEPENDS in the *.inc file, or other + particular changes. + + + + + Append the package name to the + IMAGE_INSTALL definition, used in the recipe + corresponding to the image you will build, as in one of the examples + below: + + + + If you need the package in a set of images, to avoid + defining it in each recipe, add the following line to + IMAGE_INSTALL in + meta-el-common/images/enea-image-common.inc + + package_name \ + + + + If you have specific images in which you need the package, + add the following line in the corresponding recipes in + meta-el-<profile>/images/enea-image-<profile>.bb + + IMAGE_INSTALL += " \ + package_name \ + " + + + + + + Add the required license to the + LICENSE_FLAGS_WHITELIST definition. This can be + done by adding script lines in the corresponding + scripts/conf_setup.sh file, which appends + LICENSE_FLAGS_WHITELIST += + "<suitable-license> to + conf/local.conf. + + + + To mitigate the build errors caused by packages with + commercial licenses, you might also need to append the generic + license LICENSE_FLAGS_WHITELIST += "commercial" + in the same way as above. + + + + Select the needed recipes for the packages and add these to + the build configuration. + + + + Select the needed recipes to resolve dependencies for the new + packages and add these to the build configuration. + + + + More information about recipes can be found here: + + + + http://git.openembedded.org/ + + + + + + https://wiki.yoctoproject.org/wiki/Building_your_own_recipes_from_first_principles + + + + + + http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#new-recipe-writing-a-new-recipe + + +
+
+ +
+ Installing the Enea Linux SDK + + Before cross-compiling applications for your target, you need to + install the Software Development Kit (SDK) - which contains the + cross-compilation toolchain - and set up the cross-compilation environment + on your host. The toolchain for each supported target contains a 64-bit + library for gcc. The toolchain and the environment-setup script are + wrapped together inside a toolchain installer in the form of a shell + script. + + The cross-compilation toolchain is packaged as follows: + + + + The <target> toolchain contains the lib64 (64-bit) + library. + + + + The <target> installer has an environment-setup script + which will select the lib64 to be used by gcc. This way, a 64-bit + application can be cross-compiled. + + + + Do as in the example below to install the SDK and set up the + cross-compilation environment: + + + + The fastest alternative is to use a precompiled + cross-compilation toolchain installer for your host and target. + + Please refer to the Release Information document, in section 1.1 + Provided Contents, for more details on where to find the pre-compiled + SDK installer. + + + + Run the installer to unpack the cross-compilation toolchain and + the environment-setup script: + + $ chmod 770 enea-*-toolchain-<version>.sh +$ ./enea-*-toolchain-<version>.sh + + When prompted, select to install the SDK in the desired + directory, referred to as <sdkdir>. The default path where the + SDK will be installed, will be shown in the prompt. The installer + unpacks the environment setup script in <sdkdir> and the + toolchain under <sdkdir>/sysroots. + + + Choose a unique directory for each toolchain. Installing a + second toolchain of any type (buildtools toolchain or + cross-compilation toolchain) in the same directory as a previously + installed one will break the $PATH variable of the first one. + + + + + Setup the toolchain environment for your target by sourcing the + environment-setup script: + + $ . <sdkdir>/environment-setup-<arch>-enea-linux + + Example: + + $ . /opt/enea/environment-setup-aarch64-enea-linux + + + + Once the cross-compilation toolchain is in place and the environment + set up, you can proceed with Cross-Compiling Applications from Command + Line (4.1) or, if Eclipse is installed, Cross-Compiling from Eclipse + (5.4.1). +
+ +
+ Using Package Management + + A Package Management System (PMS) can be used to customize your + image in a consistent way, e.g. to install, upgrade, or delete packages + considering the dependencies. The package management systems supported by + Enea Linux are described in this section. More information about PMS can + be found in the Yocto 2.3 document Yocto + Project Mega Manual. If needed replace the Yocto version in the + link. + +
+ APT Package Management (DEB Packages) + + Enea Linux provides DEB packages on linux.enea.com site, + in directory + <release>/<target>/deb/. + + The application for performing runtime package management of DEB + packages on the target is called apt-get. + + Use the apt-get command to install, upgrade, or + remove packages. Before using any apt-get options that require network + access, please check that the network is configured and working + properly. + + The apt-get command is by default included in + Enea Linux images. + +
+ Configuring + + APT relies on the concept of repositories in order to find + packages and resolve dependencies. + + Any number of additional repositories can be added to APT's + configuration files (.list extension) located in sources.list.d + directory (e.g: + /etc/apt/sources.list.d/repos.list) and then be + queried by APT. + + # touch /etc/apt/sources.list.d/repos.list +# echo "deb [trusted=yes] http://server-address/path/to/the/package/directory ./" | \ +tee -a /etc/apt/sources.list.d/repos.list + + Run apt-get update to fetch information from + the new repository: + + # apt-get update +
+ +
+ Installing + + DEB packages typically have file names like + foo-1.0.1-r0.0_arm64.deb The file name includes the package name + (foo), version (1.0.1), revison (r0.0), and architecture (arm64). To + install a package, log in as root and type the following command at a + shell prompt: + + # apt-get install foo + + The apt-get install command will install one + or more packages in the system. +
+ +
+ Upgrading + + The apt-get upgrade command will upgrade one + or more packages which are currently installed in the system. If no + packages are given, all installed packages will be checked. + + # apt-get upgrade foo +
+ +
+ Removing + + The apt-get remove command will remove one or + more packages which are currently installed in the system. + Example: + + # apt-get remove ptest-runner +Reading package lists... Done +Building dependency tree +Reading state information... Done +The following packages were automatically installed and are no longer required: + libc6-dbg libc6-dev libc6-extra-nss libc6-thread-db libcidn1 + linux-libc-headers-dev +Use 'apt autoremove' to remove them. +The following packages will be REMOVED: + ptest-runner +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +After this operation, 0 B of additional disk space will be used. +Do you want to continue? [Y/n] y +(Reading database ... 5766 files and directories currently installed.) +Removing ptest-runner (2.0.2+git0+6d2872116c-r0.0) ... + +
+ +
+ Searching + + The apt-cache search allows searching for the + given expressions in the name, summary and description of known + packages. Example: + + # apt-cache search ptest-runner +ptest-runner - A C program to run all installed ptests +ptest-runner-dbg - A C program to run all installed ptests - Debugging files +ptest-runner-dev - A C program to run all installed ptests - Development files +
+
+
+
\ No newline at end of file -- cgit v1.2.3-54-g00ecf