Skip to contentSkip to conversation

Do not assume working from $HOME

PATCH New Michael Opdenacker 1 participant 1 message Mar 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not assume working from $HOME

In the "Yocto Project Quick Build" instructions
(https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html#)
there is an inconsistency that impacts several documents...

People are first instructed to clone the poky git repository, but not mentioning from which directory. Then, it's consistent to instruct people to run "cd poky/".

However, later in the instructions, readers are instructed to run "cd ~/poky", which assumes that cloning poky was done from the home directory. Many other places in the documentation make such an assumption.

This change fixes this, and makes no assumption on where people have chosen to store their data, in particular where they cloned the "poky" repository.

This also fixes a few whitespace issues.

---
 documentation/README                          |  2 +-
 documentation/brief-yoctoprojectqs/index.rst  |  8 ++--
 documentation/dev-manual/common-tasks.rst     | 20 ++++----
 documentation/dev-manual/qemu.rst             |  4 +-
 documentation/dev-manual/start.rst            |  2 +-
 documentation/kernel-dev/common.rst           | 47 +++++++++----------
 documentation/ref-manual/terms.rst            | 11 ++---
 documentation/sdk-manual/appendix-obtain.rst  |  4 +-
 documentation/sdk-manual/extensible.rst       |  2 +-
 documentation/toaster-manual/reference.rst    |  2 +-
 .../toaster-manual/setup-and-use.rst          | 10 ++--
 11 files changed, 54 insertions(+), 58 deletions(-)
documentation/README +1 -1
index be03bb119..15623ce6c 100644
@@ -222,7 +222,7 @@ For example, the following .rst content will produce the 'expected'
 content:
 
   .. code-block::
-      $ mkdir ~/poky-&DISTRO;
+      $ mkdir poky-&DISTRO;
       or
       $ git clone &YOCTO_GIT_URL;/git/poky -b &DISTRO_NAME_NO_CAP;
 
documentation/brief-yoctoprojectqs/index.rst +4 -4
index 63083cb13..11c67bc35 100644
@@ -176,7 +176,7 @@ an entire Linux distribution, including the toolchain, from source.
 
    .. code-block:: shell
 
-      $ cd ~/poky
+      $ cd poky
       $ source oe-init-build-env
       You had no conf/local.conf file. This configuration file has therefore been
       created for you with some default values. You may wish to edit it to, for
@@ -293,7 +293,7 @@ Follow these steps to add a hardware layer:
 
    .. code-block:: shell
 
-      $ cd ~/poky
+      $ cd poky
       $ git clone https://github.com/kraj/meta-altera.git
       Cloning into 'meta-altera'...
       remote: Counting objects: 25170, done.
@@ -337,7 +337,7 @@ Follow these steps to add a hardware layer:
 
    .. code-block:: shell
 
-      $ cd ~/poky/build
+      $ cd poky/build
       $ bitbake-layers add-layer ../meta-altera
       NOTE: Starting bitbake server...
       Parsing recipes: 100% |##################################################################| Time: 0:00:32
@@ -374,7 +374,7 @@ The following commands run the tool to create a layer named
 
 .. code-block:: shell
 
-   $ cd ~/poky
+   $ cd poky
    $ bitbake-layers create-layer meta-mylayer
    NOTE: Starting bitbake server...
    Add your new layer with 'bitbake-layers add-layer meta-mylayer'
documentation/dev-manual/common-tasks.rst +10 -10
index b7b59c172..820b8314d 100644
@@ -3007,7 +3007,7 @@ The following steps describe how to set up the AUH utility:
    running the AUH utility:
    ::
 
-      $ cd ~/poky
+      $ cd poky
       $ source oe-init-build-env your_AUH_build_directory
 
    Re-using an existing build directory and its configurations is not
@@ -5956,8 +5956,8 @@ the existing kernel, and then inserts a new kernel:
    kernel:
    ::
 
-      $ wic cp ~/poky_sdk/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+git999-r0/linux-yocto-4.12.12+git999/arch/x86/boot/bzImage \
-               ~/poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz
+      $ wic cp poky_sdk/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+git999-r0/linux-yocto-4.12.12+git999/arch/x86/boot/bzImage \
+               poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz
 
    Once the new kernel is added back into the image, you can use the
    ``dd`` command or :ref:`bmaptool
@@ -6956,7 +6956,7 @@ variable to specify the format:
 
 1. Open the ``local.conf`` file inside your
    :term:`Build Directory` (e.g.
-   ``~/poky/build/conf/local.conf``).
+   ``poky/build/conf/local.conf``).
 
 2. Select the desired package format as follows:
    ::
@@ -7048,11 +7048,11 @@ From within the build directory where you have built an image based on
 your packaging choice (i.e. the
 :term:`PACKAGE_CLASSES`
 setting), simply start the server. The following example assumes a build
-directory of ``~/poky/build/tmp/deploy/rpm`` and a ``PACKAGE_CLASSES``
+directory of ``poky/build/tmp/deploy/rpm`` and a ``PACKAGE_CLASSES``
 setting of "package_rpm":
 ::
 
-   $ cd ~/poky/build/tmp/deploy/rpm
+   $ cd poky/build/tmp/deploy/rpm
    $ python3 -m http.server
 
 Target Setup
@@ -8409,7 +8409,7 @@ that queries the Git repository and prints just the differences that
 might be significant in human-readable form. Here is an example:
 ::
 
-   $ ~/poky/poky/scripts/buildhistory-diff . HEAD^
+   $ poky/poky/scripts/buildhistory-diff . HEAD^
    Changes to images/qemux86_64/glibc/core-image-minimal (files-in-image.txt):
       /etc/anotherpkg.conf was added
       /sbin/anotherpkg was added
@@ -10738,7 +10738,7 @@ been followed:
    are ``create-pull-request`` and ``send-pull-request``. You can find
    these scripts in the ``scripts`` directory within the
    :term:`Source Directory` (e.g.
-   ``~/poky/scripts``).
+   ``poky/scripts``).
 
    Using these scripts correctly formats the requests without
    introducing any whitespace or HTML formatting. The maintainer that
@@ -10752,7 +10752,7 @@ been followed:
    line in the created patch files:
    ::
 
-      $ ~/poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README"
+      $ poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README"
 
    Running this script forms ``*.patch`` files in a folder named
    ``pull-``\ `PID` in the current directory. One of the patch files is a
@@ -10766,7 +10766,7 @@ been followed:
    list:
    ::
 
-      $ ~/poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t [email protected]
+      $ poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t [email protected]
 
    You need to follow the prompts as the script is interactive.
 
documentation/dev-manual/qemu.rst +2 -2
index 766691b97..c6bb9e977 100644
@@ -58,7 +58,7 @@ available. Follow these general steps to run QEMU:
       environment script (i.e. :ref:`structure-core-script`):
       ::
 
-         $ cd ~/poky
+         $ cd poky
          $ source oe-init-build-env
 
    -  If you installed a cross-toolchain, you can run the script that
@@ -66,7 +66,7 @@ available. Follow these general steps to run QEMU:
       the initialization script from the default ``poky_sdk`` directory:
       ::
 
-         . ~/poky_sdk/environment-setup-core2-64-poky-linux
+         . poky_sdk/environment-setup-core2-64-poky-linux
 
 3. *Ensure the Artifacts are in Place:* You need to be sure you have a
    pre-built kernel that will boot in QEMU. You also need the target
documentation/dev-manual/start.rst +1 -1
index 03061a79f..efe369c75 100644
@@ -768,7 +768,7 @@ Follow these steps to create a local version of the upstream
    exists on your system and by default, it is checked out:
    ::
 
-      $ cd ~/poky
+      $ cd poky
       $ git status
       On branch master
       Your branch is up-to-date with 'origin/master'.
documentation/kernel-dev/common.rst +23 -24

182 lines not on this page · raw message

documentation/ref-manual/terms.rst +4 -7
index bf4614887..32bb75b27 100644
@@ -28,7 +28,7 @@ universal, the list includes them just in case:
       to allow for matching recipe names. For example, suppose you have an
       append file named as follows:
       ::
-      
+
          busybox_1.21.%.bbappend
 
       That append file
@@ -76,7 +76,7 @@ universal, the list includes them just in case:
 
             .. code-block:: shell
 
-               $ cd $HOME/poky
+               $ cd poky
                $ source oe-init-build-env
 
          -  Create the Build Directory inside your home directory and
@@ -84,19 +84,16 @@ universal, the list includes them just in case:
 
             .. code-block:: shell
 
-               $ cd $HOME
                $ source poky/oe-init-build-env test-builds
 
          -  Provide a directory path and specifically name the Build
             Directory. Any intermediate folders in the pathname must exist.
             This next example creates a Build Directory named
-            ``YP-&POKYVERSION;`` in your home directory within the existing
-            directory ``mybuilds``:
+            ``YP-&POKYVERSION;`` within the existing directory ``mybuilds``:
 
             .. code-block:: shell
 
-               $ cd $HOME
-               $ source $HOME/poky/oe-init-build-env $HOME/mybuilds/YP-&POKYVERSION;
+               $ source poky/oe-init-build-env mybuilds/YP-&POKYVERSION;
 
       .. note::
 
documentation/sdk-manual/appendix-obtain.rst +2 -2
index f158c244a..395102c3b 100644
@@ -173,7 +173,7 @@ build the SDK installer. Follow these steps:
    ``tmp/deploy/sdk`` in the Build Directory. Following is an example:
    ::
 
-      $ cd ~/poky/build/tmp/deploy/sdk
+      $ cd poky/build/tmp/deploy/sdk
       $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
 
    During execution of the script, you choose the root location for the
@@ -249,7 +249,7 @@ Follow these steps to extract the root filesystem:
    ":ref:`sdk-manual/appendix-obtain:locating pre-built sdk installers`" section:
    ::
 
-      $ source ~/poky_sdk/environment-setup-core2-64-poky-linux
+      $ source poky_sdk/environment-setup-core2-64-poky-linux
 
 3. *Extract the Root Filesystem:* Use the ``runqemu-extract-sdk``
    command and provide the root filesystem image.
documentation/sdk-manual/extensible.rst +1 -1
index 5962e9460..d2ed9a9b8 100644
@@ -118,7 +118,7 @@ architecture. The example assumes the SDK installer is located in
    $ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh
    Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5
    ==========================================================================
-   Enter target directory for SDK (default: ~/poky_sdk):
+   Enter target directory for SDK (default: poky_sdk):
    You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed [Y/n]? Y
    Extracting SDK..............done
    Setting it up...
documentation/toaster-manual/reference.rst +1 -1
index d2ab14c8e..8ef58182e 100644
@@ -554,7 +554,7 @@ example that assumes default repository and build directory names:
 
 .. code-block:: shell
 
-   $ cd ~/poky/build
+   $ cd poky/build
    $ python ../bitbake/lib/toaster/manage.py buildslist
 
 If your Toaster database had only one build, the above
documentation/toaster-manual/setup-and-use.rst +5 -5
index ded771e79..cabf0250c 100644
@@ -155,7 +155,7 @@ superuser by following these steps:
    is the :term:`Build Directory`,
    invoke the ``createsuperuser`` command from ``manage.py``::
 
-      $ cd ~/poky/build
+      $ cd poky/build
       $ ../bitbake/lib/toaster/manage.py createsuperuser
 
 #. Django prompts you for the username, which you need to provide.
@@ -417,13 +417,13 @@ Perform the following steps to install Toaster:
 
       [Unit]
       Description=Toaster runbuilds
-      
+
       [Service]
       Type=forking User=toaster
       ExecStart=/usr/bin/screen -d -m -S runbuilds /var/www/toaster/poky/bitbake/lib/toaster/runbuilds-service.sh start
       ExecStop=/usr/bin/screen -S runbuilds -X quit
       WorkingDirectory=/var/www/toaster/poky
-      
+
       [Install]
       WantedBy=multi-user.target
 
@@ -433,11 +433,11 @@ Perform the following steps to install Toaster:
     up executable permissions::
 
       #!/bin/bash
-      
+
       #export http_proxy=http://proxy.host.com:8080
       #export https_proxy=http://proxy.host.com:8080
       #export GIT_PROXY_COMMAND=$HOME/bin/gitproxy
-      cd ~/poky/
+      cd poky/
       source ./oe-init-build-env build
       source ../bitbake/bin/toaster $1 noweb
       [ "$1" == 'start' ] && /bin/bash
Signature · 1 line
2.25.1