From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6667603680306397184 X-Received: by 2002:a2e:c41:: with SMTP id o1mr2296985ljd.19.1552422458011; Tue, 12 Mar 2019 13:27:38 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:5289:: with SMTP id q9ls747120lfm.2.gmail; Tue, 12 Mar 2019 13:27:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkqwkn/a+RH3SBw8K33HjT3LXpQWG5hZBPOzCq0STrk2v6NPB//TPTbEdsUdKnIdd9gYAC X-Received: by 2002:a19:dc05:: with SMTP id t5mr2377578lfg.0.1552422457448; Tue, 12 Mar 2019 13:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552422457; cv=none; d=google.com; s=arc-20160816; b=QoTS3N/DicnjNhI2Doi/4QaWxmz5oPp7/7ZL2EJKfC7j0vwjdndurWgUN1Vytqdl1H O/tMryjWnSJu/4cjyCbCiDxNzXZ7abl0BibntQ6p79wjxxjJ8yuHdmgur7OkWq7hS3oZ bkAD9h3dw1quX2lndqRWJCbPXmcqp3Tq+OcUhd1JuMaR55lU9ziDl7uTeFY9ewRSRazH 2eB2G/Opv1lCixyHvTmL85FJjpv5Za43GcOyhL1cV4bN+1GIgFT2tJpTEJVbARS/NXea BN3DoQakxsTvXesEycVPg1/B5n53tKQc6lESK1mH8sS+01nXLPCQ15NaoPqcZtxNosXo bYLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from; bh=iOMoTHynfvBRtuN0f6WYYcGq5Ftt/1lgArufzwkAQxQ=; b=N7P6Y3SZPoH+s0L+sNQ4HarOwtKU8p7DVFFAo2PiSN0rnhehLI4P+wmkD3vHsQlYVj YnnuxVAVAg1cHGydY61qpen+Anvbt7R+sEnbftQna1b7gtwCMYh1zPca2MLuMnlypFw2 50Sy7nG3gQ2ntu7elIulQuBu3hZ7NqKdrPDBiMJdd7EvIeOceRAyhzRygqJUBAp+pSeM WznOKI8ezqSi3VfhuSNFbOzoV9ziI2Xt4CyeJKjh+GmUcjgaPl2uwZonHGVCYprIRukY /FvK+E+hBjXQiPY/GOmipoya+3Tp8AiiPfsdSQQ66q4zrEcn5y9IQ18j7ln96NNGEFB2 ru1A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id y1si418117lfe.1.2019.03.12.13.27.37 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 13:27:37 -0700 (PDT) Received-SPF: pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from azat.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id x2CKRDM2018345 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 12 Mar 2019 21:27:35 +0100 From: "Maxim Yu. Osipov" To: isar-users@googlegroups.com Subject: [PATCH 2/2] doc/user_manual: Update after images per machine separation Date: Tue, 12 Mar 2019 21:27:13 +0100 Message-Id: <20190312202713.18792-2-mosipov@ilbers.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190312202713.18792-1-mosipov@ilbers.de> References: <20190312202713.18792-1-mosipov@ilbers.de> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: iG15cH79stgD Signed-off-by: Maxim Yu. Osipov --- RECIPE-API-CHANGELOG.md | 23 +++++++++++++--- doc/user_manual.md | 72 +++++++++++++++++++++++++------------------------ 2 files changed, 57 insertions(+), 38 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 197ce99..92f5dce 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -96,14 +96,14 @@ layer version higher than existing release corename, use the value 'next'. ### location of image artifacts -Align with OpenEmbedded and place image artifacts in a per-machine folder placed +Align with OpenEmbedded and place image artifacts in a per-machine directory placed in tmp/deploy (to avoid collisions among other things). ### more consistent artifact names multiconfig image artifacts are all placed in tmp/deploy/images. They include kernel, initrd and ext4/wic images. A consistent naming scheme is now used: -`IMAGE-DISTRO-MACHINE.TYPE`. This scheme was already used for ext4/wic images +`IMAGE-MACHINE-DISTRO-MACHINE.TYPE`. This scheme was already used for ext4/wic images so no visible changes there. Kernel and initrd images are however affected; for instance: @@ -114,7 +114,7 @@ vmlinuz-4.9.0-8-armmp_debian-stretch-qemuarm is now ``` -isar-image-base-debian-stretch-qemuarm.vmlinuz-4.9.0-8-armmp +isar-image-base-qemuarm-debian-stretch-qemuarm.vmlinuz-4.9.0-8-armmp ``` It should be noted that the `KERNEL_IMAGE` and `INITRD_IMAGE` variables were @@ -145,3 +145,20 @@ a root password, leak that password via its script in /var/lib/dpkg/info. Instead set the CFG_ROOT_PW variable to the encrypted password and use the transient 'isar-cfg-rootpw' package (now installed as transient package per default). + +### Change syntax of bitbake multiconfig target + +Image directory gets overwritten when running for two targets +with the same pair `DISTRO` and `DISTRO_ARCH`, so images are separated +per `MACHINE` now. This leads to change of bitbake multiconfig target calling syntax +from + +``` +multiconfig:$MACHINE-$DISTRO:isar-image-base +``` + +to + +``` +multiconfig:$MACHINE-$DISTRO:isar-image-base-$MACHINE +``` diff --git a/doc/user_manual.md b/doc/user_manual.md index 6fe4d83..92fc871 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -130,15 +130,15 @@ DISTRO_ARCH ??= "armhf" Then, call `bitbake` with image names, e.g.: ``` -bitbake multiconfig:qemuarm-stretch:isar-image-base \ - multiconfig:qemuarm-stretch:isar-image-debug +bitbake multiconfig:qemuarm-stretch:isar-image-base-qemuarm \ + multiconfig:qemuarm-stretch:isar-image-debug-qemuarm ``` The following images are created: ``` -tmp/deploy/images/isar-image-base-qemuarm-debian-stretch.ext4.img -tmp/deploy/images/isar-image-debug-qemuarm-debian-stretch.ext4.img +tmp/deploy/images/isar-image-base-qemuarm-debian-stretch-qemuarm.ext4.img +tmp/deploy/images/isar-image-debug-qemuarm-debian-stretch-qemuarm.ext4.img ``` ### Building Target Images for Multiple Configurations @@ -168,33 +168,34 @@ The following command will produce `isar-image-base` images for all targets: ``` $ bitbake \ - multiconfig:qemuarm-jessie:isar-image-base \ - multiconfig:qemuarm-stretch:isar-image-base \ - multiconfig:qemuarm-buster:isar-image-base \ - multiconfig:qemuarm64-stretch:isar-image-base \ - multiconfig:qemui386-jessie:isar-image-base \ - multiconfig:qemui386-stretch:isar-image-base \ - multiconfig:qemui386-buster:isar-image-base \ - multiconfig:qemuamd64-jessie:isar-image-base \ - multiconfig:qemuamd64-stretch:isar-image-base \ - multiconfig:qemuamd64-buster:isar-image-base \ - multiconfig:rpi-jessie:isar-image-base \ - multiconfig:bananapi-stretch:isar-image-base + multiconfig:qemuarm-jessie:isar-image-base-qemuarm \ + multiconfig:qemuarm-stretch:isar-image-base-qemuarm \ + multiconfig:qemuarm-buster:isar-image-base-qeruarm \ + multiconfig:qemuarm64-stretch:isar-image-base-qemuarm64 \ + multiconfig:qemui386-jessie:isar-image-base-qemui386 \ + multiconfig:qemui386-stretch:isar-image-base-qemui386 \ + multiconfig:qemui386-buster:isar-image-base-qemui386 \ + multiconfig:qemuamd64-jessie:isar-image-base-qemuamd64 \ + multiconfig:qemuamd64-stretch:isar-image-base-qemuamd64 \ + multiconfig:qemuamd64-buster:isar-image-base-qemuamd64 \ + multiconfig:qemuamd64-buster-tgz:isar-image-base-qemuamd64 \ + multiconfig:nand-ubi-demo-buster:isar-image-ubi-nand-ubi-demo \ + multiconfig:rpi-jessie:isar-image-base-rpi ``` Created images are: ``` -tmp/deploy/images/isar-image-base-debian-jessie-qemuarm.ext4.img -tmp/deploy/images/isar-image-base-debian-stretch-qemuarm.ext4.img -tmp/deploy/images/isar-image-base-debian-stretch-qemuarm.ext4.img -tmp/deploy/images/isar-image-base-debian-stretch-qemuarm64.ext4.img -tmp/deploy/images/isar-image-base-debian-jessie-qemui386.ext4.img -tmp/deploy/images/isar-image-base-debian-stretch-qemui386.ext4.img -tmp/deploy/images/isar-image-base-debian-jessie-qemuamd64.ext4.img -tmp/deploy/images/isar-image-base-debian-stretch-qemuamd64.ext4.img -tmp/deploy/images/isar-image-base.rpi-sdimg -tmp/deploy/images/isar-image-base-debian-stretch-bananapi.wic.img +tmp/deploy/images/qemuarm/isar-image-base-qemuarm-debian-jessie-qemuarm.ext4.img +tmp/deploy/images/qemuarm/isar-image-base-qemuarm-debian-stretch-qemuarm.ext4.img +tmp/deploy/images/qemuarm/isar-image-base-qemuarm-debian-stretch-qemuarm.ext4.img +tmp/deploy/images/qemuarm64/isar-image-base-qemuarm64-debian-stretch-qemuarm64.ext4.img +tmp/deploy/images/qemui386/isar-image-base-qemui386-debian-jessie-qemui386.ext4.img +tmp/deploy/images/qemui386/isar-image-base-qemui386-debian-stretch-qemui386.ext4.img +tmp/deploy/images/qemuamd64/isar-image-base-qemuamd64-debian-jessie-qemuamd64.ext4.img +tmp/deploy/images/qemuamd64/isar-image-base-qemuamd64-debian-stretch-qemuamd64.ext4.img +tmp/deploy/images/nand-ubi-demo/isar-image-ubi-nand-ubi-demo-debian-buster-nand-ubi-demo.ubi.img +tmp/deploy/images/rpi/isar-image-base-rpi.rpi-sdimg ``` ### Generate full disk image @@ -202,9 +203,9 @@ tmp/deploy/images/isar-image-base-debian-stretch-bananapi.wic.img A bootable disk image is generated if you set IMAGE_TYPE to 'wic-img'. Behind the scenes a tool called `wic` is used to assemble the images. It is controlled by a `.wks` file which you can choose with changing WKS_FILE. Some examples in the tree use that feature already. ``` # Generate an image for the `i386` target architecture - $ bitbake multiconfig:qemui386-stretch:isar-image-base + $ bitbake multiconfig:qemui386-stretch:isar-image-base-qemui386 # Similarly, for the `amd64` target architecture, in this case EFI - $ bitbake multiconfig:qemuamd64-stretch:isar-image-base + $ bitbake multiconfig:qemuamd64-stretch:isar-image-base-qemuamd64 ``` Variables may be used in `.wks.in` files; Isar will expand them and generate a regular `.wks` file before generating the disk image using `wic`. @@ -217,9 +218,9 @@ enough to allow images to be testable under `qemu`. ``` # AMD64 image, EFI -qemu-system-x86_64 -m 256M -nographic -bios edk2/Build/OvmfX64/RELEASE_*/FV/OVMF.fd -hda tmp/deploy/images/isar-image-base-debian-stretch-qemuamd64.wic.img +qemu-system-x86_64 -m 256M -nographic -bios edk2/Build/OvmfX64/RELEASE_*/FV/OVMF.fd -hda tmp/deploy/images/qemuamd64/isar-image-base-qemuamd64-debian-stretch-qemuamd64.wic.img # i386 image -qemu-system-i386 -m 256M -nographic -hda tmp/deploy/images/isar-image-base-debian-stretch-qemui386.wic.img +qemu-system-i386 -m 256M -nographic -hda tmp/deploy/images/qemui386/isar-image-base-qemui386-debian-stretch-qemui386.wic.img ``` --- @@ -308,7 +309,7 @@ following variables define the default configuration to build for: - `DISTRO_ARCH` - The Debian architecture to build for (e.g., `armhf`). If BitBake is called with multiconfig targets (e.g., -`multiconfig:qemuarm-jessie:isar-image-base`), the following variable defines +`multiconfig:qemuarm-stretch:isar-image-base-qemuarm`), the following variable defines all supported configurations: - `BBMULTICONFIG` - The list of the complete configuration definition files. @@ -536,6 +537,7 @@ IMAGE_PREINSTALL = " \ inherit isar-image +PN .= "-${MACHINE}" ``` ### Additional Notes @@ -668,7 +670,7 @@ target binary artifacts. Developer chroots to sdk rootfs and develops applicatio ### Solution User manually triggers creation of SDK root filesystem for his target platform by launching the task `do_populate_sdk` for target image, f.e. -`bitbake -c do_populate_sdk multiconfig:${MACHINE}-${DISTRO}:isar-image-base`. +`bitbake -c do_populate_sdk multiconfig:${MACHINE}-${DISTRO}:isar-image-base-${MACHINE}`. The resulting SDK rootfs is archived into `tmp/deploy/images/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz`. It is additionally available for direct use under `tmp/deploy/images/sdk-${DISTRO}-${DISTRO_ARCH}/`. @@ -680,7 +682,7 @@ One may chroot into the SDK and install required target packages with the help o - Trigger creation of SDK root filesystem ``` -bitbake -c do_populate_sdk multiconfig:qemuarm-stretch:isar-image-base +bitbake -c do_populate_sdk multiconfig:qemuarm-stretch:isar-image-base-qemuarm ``` - Mount the following directories in chroot by passing resulting rootfs as an argument to the script `mount_chroot.sh`: @@ -760,7 +762,7 @@ BASE_REPO_KEY = "file://"' - Trigger creation of local apt caching Debian packages during image generation. ``` -bitbake -c cache_base_repo multiconfig:qemuarm-stretch:isar-image-base +bitbake -c cache_base_repo multiconfig:qemuarm-stretch:isar-image-base-qemuarm ``` - Set `ISAR_USE_CACHED_BASE_REPO` in `conf/local.conf`: @@ -779,7 +781,7 @@ sudo rm -rf tmp - Trigger again generation of image (now using local caching repo): ``` -bitbake multiconfig:qemuarm-stretch:isar-image-base +bitbake multiconfig:qemuarm-stretch:isar-image-base-qemuarm ``` ### Limitation -- 2.11.0