From 9a98f403bd4f6fac7f88e43c820519dc9fc644b2 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 3 Apr 2013 08:04:31 -0700 Subject: ref-manual, dev-manual: Review comments applied to package repository Changes are the review comments from Paul Eggleton regarding setting up the optional package repository on the host that can be used by Smart. These changes reflect the fact that the task is not package-type dependent or host web server dependent. (From yocto-docs rev: 779989878bcc9501ddc4570519d93325442a8493) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 165 ++++++++++----------- documentation/ref-manual/ref-classes.xml | 43 +++--- 2 files changed, 100 insertions(+), 108 deletions(-) (limited to 'documentation') diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index e6fd4fb363..6ad61d633a 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -606,27 +606,27 @@ EXTRA_IMAGE_FEATURES - Ultimately, you might want to add extra image features to the + Ultimately, you might want to add extra image features to the set by using the IMAGE_FEATURES variable. To create these features, the best reference is - meta/classes/core-image.bbclass, which + meta/classes/core-image.bbclass, which shows how you can add features. In summary, the file looks at the contents of the - IMAGE_FEATURES variable and then maps those + IMAGE_FEATURES variable and then maps those contents into a set of tasks or packages. Based on this information, the build system automatically - generates the + generates the IMAGE_INSTALL variable. - You can add extra features by extending the class or creating a - custom class for use with specialized image + You can add extra features by extending the class or creating a + custom class for use with specialized image .bb files. You can also add more features by configuring the EXTRA_IMAGE_FEATURES - variable in the local.conf file found in - the local.conf file, which is located in + variable in the local.conf file found in + the local.conf file, which is located in the Build Directory. @@ -634,25 +634,25 @@ Choosing the SSH Server - The Yocto Project ships with two SSH servers you can use + The Yocto Project ships with two SSH servers you can use with your images: Dropbear and OpenSSH. - Dropbear is a minimal SSH server appropriate for - resource-constrained environments, while OpenSSH is a + Dropbear is a minimal SSH server appropriate for + resource-constrained environments, while OpenSSH is a well-known standard SSH server implementation. - By default, the core-image-sato image + By default, the core-image-sato image is configured to use Dropbear. - The core-image-basic and - core-image-lsb images both + The core-image-basic and + core-image-lsb images both include OpenSSH. - The core-image-minimal image does not + The core-image-minimal image does not contain an SSH server. You can customize your image and change these defaults. Edit IMAGE_FEATURES variable - so that it configures the image you are working with to - include ssh-server-dropbear or + so that it configures the image you are working with to + include ssh-server-dropbear or ssh-server-openssh. @@ -661,24 +661,24 @@ Creating a Read-Only Root Filesystem - Another example of customizing your image could be setting + Another example of customizing your image could be setting up a read-only filesystem. - Suppose, for security reasons, you need to disable the + Suppose, for security reasons, you need to disable the your target device's root filesystem's write permisions (i.e. you need a read-only root filesystem). Or, perhaps you are running the device's operating system from a read-only storage device. - For either case, you can customize your image for + For either case, you can customize your image for that behavior. - To create a read-only root filesystem, simply add the + To create a read-only root filesystem, simply add the "read-only-rootfs" feature to your image. - Using either of the following statements in your - image recipe or from within the - local.conf file found in the Build - Directory causes the build system to create a + Using either of the following statements in your + image recipe or from within the + local.conf file found in the Build + Directory causes the build system to create a read-only root filesystem: IMAGE_FEATURES = "read-only-rootfs" @@ -2320,16 +2320,16 @@ It is easiest to have something to start with when creating your own distribution. - You can use the Yocto Project out-of-the-box to create the + You can use the Yocto Project out-of-the-box to create the poky-tiny distribution. - Ulitmately, you will want to make changes in your own - distribution that are likely modeled after + Ulitmately, you will want to make changes in your own + distribution that are likely modeled after poky-tiny. - To use poky-tiny in your build, - set the DISTRO variable in your - local.conf file to "poky-tiny" - as described in the + To use poky-tiny in your build, + set the DISTRO variable in your + local.conf file to "poky-tiny" + as described in the "Creating Your Own Distribution" section. @@ -2344,7 +2344,7 @@ Dynamic memory contains memory that is allocated at runtime, stacks, hash tables, and so forth. Temporary memory is recovered after the boot process. - This memory consists of memory used for decompressing + This memory consists of memory used for decompressing the kernel and for the __init__ functions. @@ -2560,7 +2560,7 @@ Look for Other Ways to Minimize Size - Depending on your particular circumstances, other areas that you + Depending on your particular circumstances, other areas that you can trim likely exist. The key to finding these areas is through tools and methods described here combined with experimentation and iteration. @@ -2570,35 +2570,35 @@ In general, follow this process: Remove eglibc - features from + features from DISTRO_FEATURES that you think you don't need. Build your distribution. - If the build fails due to missing - symbols in a package, determine if you can - reconfigure the package to not need those + If the build fails due to missing + symbols in a package, determine if you can + reconfigure the package to not need those features. - For example, change the configuration to not - support wide character support as is done for + For example, change the configuration to not + support wide character support as is done for ncurses. - Or, if support for those characters is needed, - determine what eglibc - features provide the support and restore the + Or, if support for those characters is needed, + determine what eglibc + features provide the support and restore the configuration. Rebuild and repeat the process. busybox: - For BusyBox, use a process similar as described for + For BusyBox, use a process similar as described for eglibc. - A difference is you will need to boot the resulting - system to see if you are able to do everything you + A difference is you will need to boot the resulting + system to see if you are able to do everything you expect from the running system. You need to be sure to integrate configuration fragments - into Busybox because BusyBox handles its own core - features and then allows you to add configuration + into Busybox because BusyBox handles its own core + features and then allows you to add configuration fragments on top. @@ -3126,8 +3126,9 @@ Setting Up Runtime Package Management - It is possible to set up a repository that is a host-based - package feed from which you can install packages on the + For RPM, IPK, and DEB package formats, it is possible to set + up a repository that is a host-based + package feed from which you can install packages on the target system during runtime. Doing so is optional and depends on the following: @@ -3135,14 +3136,14 @@ You take specific steps to set up the feed. - When you build your image, you select to use the - RPM package manager by setting the + When you build your image, you select to use the + appropriate package manager by setting the PACKAGE_CLASSES variable. - You have Apache 2 installed and configured on the - development host. + You have a supported web server, such as Apache 2, + installed and configured on the development host. You have createrepo installed on @@ -3152,14 +3153,16 @@ - Here are the steps to set up this optional package feed: + Following are the steps to set up the optional repository. + This examples assumes you are using RPM and the Apache 2 + server: Add the directory to your Apache configuration, which - you can find at + you can find at /etc/httpd/conf/httpd.conf. Use commands similar to these on the development system. - These example commands assume a top-level + These example commands assume a top-level Source Directory named poky in your home directory: @@ -3169,7 +3172,7 @@ <Directory "~/poky/build/tmp/deploy/rpm"> Options +Indexes </Directory> - </VirtualHost> + </VirtualHost> @@ -3177,35 +3180,23 @@ For all commands, be sure you have root privileges. - If your development system is using Fedora or + If your development system is using Fedora or CentOS, use the following: - - - Note to Self: Paul says that - some of the distros (Fedora and CentOS in - particular) might have different commands based - on the distro version. - We need links for the reader to follow for the - specifics. - We don't want to have to document all this - distro-specific stuff. - - - - service httpd reload - - For Ubuntu, use the following: - + + service httpd reload + + For Ubuntu, use the following: + /etc/init.d/apache2 reload - - For OpenSUSE, use the following: - + + For OpenSUSE, use the following: + /etc/init.d/apache2 reload - + Change your working directory to - tmp/deploy/rpm in the + tmp/deploy/rpm in the Build Directory. @@ -3217,13 +3208,13 @@ - If you're updating, add + If you're updating, add ‐‐update to save some time. If you are using Security-Enhanced Linux (SELinux), - you need to label the files as being accessible + you need to label the files as being accessible through Apache. Use the following command from the development host: @@ -3232,14 +3223,14 @@ On the target machine, add the repository to Smart. - For somealias, provide a local + For somealias, provide a local alias for the repository: smart channel ‐‐add <somealias> type=rpm-md baseurl=http://server.name/rpm - Also from the target machine, fetch the repository + Also from the target machine, fetch the repository information using this command: smart update @@ -3249,9 +3240,9 @@ - After taking these steps and making sure that the other + After taking these steps and making sure that the other requirements mentioned at the beginning of the section are met, - reboot the target device to take advantage of runtime package + reboot the target device to take advantage of runtime package installations. diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml index e2f1611b5b..a03a68b6e9 100644 --- a/documentation/ref-manual/ref-classes.xml +++ b/documentation/ref-manual/ref-classes.xml @@ -327,52 +327,53 @@ The first class listed in this variable is used for image generation. + + If you take the optional step to set up a repository (package feed) + on the development host that can be used by Smart, you can + install packages from the feed while you are running the image + on the target (i.e. runtime installation of packages). + For information on how to set up this repository, see the + "Setting Up Runtime Package Management" + in the Yocto Project Development Manual. + + The package class you choose can affect build-time performance and has space ramifications. In general, building a package with IPK takes about thirty percent less time as compared to using RPM to build the same or similar package. - This comparison takes into account a complete build of the package with + This comparison takes into account a complete build of the package with all dependencies previously built. - The reason for this discrepancy is because the RPM package manager - creates and processes more - Metadata than the + The reason for this discrepancy is because the RPM package manager + creates and processes more + Metadata than the IPK package manager. Consequently, you might consider setting PACKAGE_CLASSES to "package_ipk" if you are building smaller systems. - Before making your decision on package manager, however, you should + Before making your decision on package manager, however, you should consider some further things about using RPM: RPM starts to provide more abilities than IPK due to the fact that it processes more metadata. - For example, this information includes individual file types, - file checksum generation and evaluation on install, sparse file - support, conflict detection and resolution for Multilib systems, + For example, this information includes individual file types, + file checksum generation and evaluation on install, sparse file + support, conflict detection and resolution for Multilib systems, ACID style upgrade, and repackaging abilities for rollbacks. - For smaller systems, the extra space used for the Berkley - Database and the amount of metadata when using RPM can affect + For smaller systems, the extra space used for the Berkley + Database and the amount of metadata when using RPM can affect your ability to perform on-device upgrades. - - If you take the steps to set up a repository (package feed) - on the development host that can be used by Smart, you can - install packages from the feed while you are running the image - on the target (i.e. runtime installation of packages). - For information on how to set up this repository, see the - "Setting Up Runtime Package Management" - in the Yocto Project Development Manual. - - + - You can find additional information on the effects of the package + You can find additional information on the effects of the package class at these two Yocto Project mailing list links: -- cgit v1.2.3-54-g00ecf