public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Adriaan Schmidt <adriaan.schmidt@siemens.com>
To: <henning.schild@siemens.com>, <isar-users@googlegroups.com>
Cc: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Subject: [PATCH] sdk: make SDK and image
Date: Wed, 15 Dec 2021 07:41:58 +0100	[thread overview]
Message-ID: <20211215064158.3313004-1-adriaan.schmidt@siemens.com> (raw)

This derives the SDK from image.bbclass (currently it only
inherits rootfs), removing the awkward and custom tar-xz'ing.
Note that because there is not tarxz-img IMAGE_TYPE, we switch
the SDK type to targz-img. This is only temporary, until we have
the OE-inspired imagetypes.

API change: SDK is now no longer built using `bitbake my_image
    -cpopulate_sdk`, but using `bitbake isar-sdk`. We could of course
    keep the old commands working, but I could not find any
    connection between the target image and the contents of the SDK
    (while building the SDK using the target image recipe confusingly
    makes it look like there is such a connection).
API change: to get the container-sdk, you need to set SDK_FORMAT
    to `container-img` and CONTAINER_FORMATS to the desired container
    type (just like you would for any other image).

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 doc/user_manual.md                            |  43 +++---
 meta/classes/image-sdk-extension.bbclass      |  87 ------------
 meta/classes/image.bbclass                    |   1 -
 meta/classes/targz-img.bbclass                |   3 +-
 .../{sdkchroot => isar-sdk}/files/README.sdk  |   0
 .../files/configscript.sh                     |   0
 .../files/gcc-sysroot-wrapper.sh              |   0
 .../files/relocate-sdk.sh                     |   0
 meta/recipes-devtools/isar-sdk/isar-sdk.bb    | 126 ++++++++++++++++++
 meta/recipes-devtools/sdkchroot/sdkchroot.bb  |  78 -----------
 testsuite/build_test/build_test.py            |   8 +-
 11 files changed, 154 insertions(+), 192 deletions(-)
 delete mode 100644 meta/classes/image-sdk-extension.bbclass
 rename meta/recipes-devtools/{sdkchroot => isar-sdk}/files/README.sdk (100%)
 rename meta/recipes-devtools/{sdkchroot => isar-sdk}/files/configscript.sh (100%)
 rename meta/recipes-devtools/{sdkchroot => isar-sdk}/files/gcc-sysroot-wrapper.sh (100%)
 rename meta/recipes-devtools/{sdkchroot => isar-sdk}/files/relocate-sdk.sh (100%)
 create mode 100644 meta/recipes-devtools/isar-sdk/isar-sdk.bb
 delete mode 100644 meta/recipes-devtools/sdkchroot/sdkchroot.bb

diff --git a/doc/user_manual.md b/doc/user_manual.md
index c81c6e4..3da2f69 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -978,12 +978,12 @@ 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 mc:${MACHINE}-${DISTRO}:isar-image-base`.
+User manually triggers creation of SDK root filesystem for his target platform by building the recipe `isar-sdk`, e.g.,
+`bitbake mc:${MACHINE}-${DISTRO}:isar-sdk`.
 Packages that should be additionally installed into the SDK can be appended to `SDK_PREINSTALL` (external repositories) and `SDK_INSTALL` (self-built).
 
-The resulting SDK rootfs is archived into `tmp/deploy/images/${MACHINE}/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz`.
-It is additionally available for direct use under `tmp/deploy/images/${MACHINE}/sdk-${DISTRO}-${DISTRO_ARCH}/`.
+The resulting SDK rootfs is archived into `tmp/deploy/images/${MACHINE}/isar-sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz`.
+It is additionally available for direct use under `tmp/deploy/images/${MACHINE}/isar-sdk-${DISTRO}-${DISTRO_ARCH}/`.
 The SDK rootfs directory `/isar-apt` contains a copy of isar-apt repo with locally prebuilt target debian packages (for <HOST_DISTRO>).
 One may chroot into the SDK and install required target packages with the help of `apt-get install <package_name>:<DISTRO_ARCH>` command.
 
@@ -992,7 +992,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 mc:qemuarm-buster:isar-image-base
+bitbake mc:qemuarm-buster:isar-sdk
 ```
 
  - Mount the following directories in chroot by passing resulting rootfs as an argument to the script `mount_chroot.sh`:
@@ -1010,14 +1010,14 @@ mount devtmpfs $1/dev     -t devtmpfs -o mode=0755,nosuid
 mount devpts   $1/dev/pts -t devpts   -o gid=5,mode=620
 mount tmpfs    $1/dev/shm -t tmpfs    -o rw,seclabel,nosuid,nodev
 
-$ sudo scripts/mount_chroot.sh ../build/tmp/deploy/images/qemuarm/sdk-debian-buster-armhf
+$ sudo scripts/mount_chroot.sh ../build/tmp/deploy/sdkchroot/debian-buster-armhf
 
 ```
 
  - chroot to isar SDK rootfs:
 
 ```
-$ sudo chroot build/tmp/deploy/images/qemuarm/sdk-debian-buster-armhf
+$ sudo chroot build/tmp/deploy/sdkchroot/debian-buster-armhf
 ```
  - Check that cross toolchains are installed
 
@@ -1082,26 +1082,27 @@ User specifies the variable `SDK_FORMATS` providing a space-separated list of
 SDK formats to generate.
 
 Supported formats are:
- - `tar-xz`: (default) is the non-containerized format that results from 
+ - `targz-img`: (default) is the non-containerized format that results from 
    following the instructions in 
    "[Create an ISAR SDK root filesystem](#create-an-isar-sdk-root-filesystem)"
- - `docker-archive`: an archive containing a Docker image that can be imported 
-   with 
-   [`docker load`](https://docs.docker.com/engine/reference/commandline/load)
- - `docker-daemon`: resulting container image is made available on the local 
-   Docker Daemon
- - `containers-storage`: resulting container image is made available to tools 
-   using containers/storage back-end (e.g. Podman, CRIO, buildah,...)
- - `oci-archive`: an archive containing an OCI image, mostly for archiving as 
-   seed for any of the above formats
+ - `container-img`: select the container formats by setting `CONTAINER_FORMATS`:
+   - `docker-archive`: an archive containing a Docker image that can be imported 
+     with 
+     [`docker load`](https://docs.docker.com/engine/reference/commandline/load)
+   - `docker-daemon`: resulting container image is made available on the local 
+     Docker Daemon
+   - `containers-storage`: resulting container image is made available to tools 
+     using containers/storage back-end (e.g. Podman, CRIO, buildah,...)
+   - `oci-archive`: an archive containing an OCI image, mostly for archiving as 
+     seed for any of the above formats
 
 User manually triggers creation of SDK formats for his target platform by 
-launching the task `do_populate_sdk` for target image, f.e.
-`bitbake -c do_populate_sdk mc:${MACHINE}-${DISTRO}:isar-image-base`.
+building the recipe `isar-sdk` for target image, e.g.,
+`bitbake mc:${MACHINE}-${DISTRO}:isar-sdk`.
 Packages that should be additionally installed into the SDK can be appended to 
 `SDK_PREINSTALL` (external repositories) and `SDK_INSTALL` (self-built).
 
-Following formats don't work if running `bitbake -c do_populate_sdk ...` (to 
+Following formats don't work if running `bitbake isar-sdk` (to 
 generate the containerized SDK) from inside of a container (e.g. using 
 `kas-container`): `docker-daemon` and `containers-storage`.
 It's technically possible, but requires making host resources (e.g. the Docker 
@@ -1133,7 +1134,7 @@ export SDK_FORMATS="docker-archive"
  - Trigger creation of SDK root filesystem
 
 ```
-bitbake -c do_populate_sdk mc:qemuarm-buster:isar-image-base
+bitbake mc:qemuarm-buster:isar-sdk
 ```
 
  - Load the SDK container image into the Docker Daemon
diff --git a/meta/classes/image-sdk-extension.bbclass b/meta/classes/image-sdk-extension.bbclass
deleted file mode 100644
index 426b925..0000000
--- a/meta/classes/image-sdk-extension.bbclass
+++ /dev/null
@@ -1,87 +0,0 @@
-# This software is a part of ISAR.
-# Copyright (C) Siemens AG, 2019
-#
-# SPDX-License-Identifier: MIT
-#
-# This class extends the image.bbclass to supply the creation of a sdk
-
-SDK_INCLUDE_ISAR_APT ?= "0"
-SDK_FORMATS ?= "tar-xz"
-
-sdk_tar_xz() {
-    # Copy mount_chroot.sh for convenience
-    sudo cp ${SCRIPTSDIR}/mount_chroot.sh ${SDKCHROOT_DIR}
-
-    # Create SDK archive
-    cd -P ${SDKCHROOT_DIR}/..
-    sudo tar --transform="s|^rootfs|sdk-${DISTRO}-${DISTRO_ARCH}|" \
-        -c rootfs | xz -T0 > ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz
-    bbdebug 1 "SDK rootfs available in ${DEPLOY_DIR_IMAGE}/sdk-${DISTRO}-${DISTRO_ARCH}.tar.xz"
-}
-
-do_populate_sdk[stamp-extra-info] = "${DISTRO}-${MACHINE}"
-do_populate_sdk[depends] = "sdkchroot:do_build"
-do_populate_sdk[vardeps] += "SDK_INCLUDE_ISAR_APT SDK_FORMATS"
-do_populate_sdk() {
-    local sdk_container_formats=""
-
-    if [ "${SDK_INCLUDE_ISAR_APT}" = "1" ]; then
-        # Copy isar-apt with deployed Isar packages
-        sudo cp -Trpfx ${REPO_ISAR_DIR}/${DISTRO} ${SDKCHROOT_DIR}/isar-apt
-    else
-        # Remove isar-apt repo entry
-        sudo rm -f ${SDKCHROOT_DIR}/etc/apt/sources.list.d/isar-apt.list
-    fi
-
-    sudo umount -R ${SDKCHROOT_DIR}/dev || true
-    sudo umount ${SDKCHROOT_DIR}/proc || true
-    sudo umount -R ${SDKCHROOT_DIR}/sys || true
-
-    # Remove setup scripts
-    sudo rm -f ${SDKCHROOT_DIR}/chroot-setup.sh ${SDKCHROOT_DIR}/configscript.sh
-
-    # Make all links relative
-    for link in $(find ${SDKCHROOT_DIR}/ -type l); do
-        target=$(readlink $link)
-
-        if [ "${target#/}" != "${target}" ]; then
-            basedir=$(dirname $link)
-            new_target=$(realpath --no-symlinks -m --relative-to=$basedir ${SDKCHROOT_DIR}/${target})
-
-            # remove first to allow rewriting directory links
-            sudo rm $link
-            sudo ln -s $new_target $link
-        fi
-    done
-
-    # Set up sysroot wrapper
-    for tool_pattern in "gcc-[0-9]*" "g++-[0-9]*" "cpp-[0-9]*" "ld.bfd" "ld.gold"; do
-        for tool in $(find ${SDKCHROOT_DIR}/usr/bin -type f -name "*-linux-gnu*-${tool_pattern}"); do
-            sudo mv "${tool}" "${tool}.bin"
-            sudo ln -sf gcc-sysroot-wrapper.sh ${tool}
-        done
-    done
-
-    # separate SDK formats: TAR and container formats
-    for sdk_format in ${SDK_FORMATS} ; do
-        case ${sdk_format} in
-            "tar-xz")
-                sdk_tar_xz
-                ;;
-            "docker-archive" | "oci" | "oci-archive" | "docker-daemon" | "containers-storage")
-                sdk_container_formats="${sdk_container_formats} ${sdk_format}"
-                ;;
-            *)
-                die "unsupported SDK format specified: ${sdk_format}"
-                ;;
-        esac
-    done
-
-    # generate the SDK in all the desired container formats
-    if [ -n "${sdk_container_formats}" ] ; then
-        bbnote "Generating SDK container in ${sdk_container_formats} format"
-        containerize_rootfs "${SDKCHROOT_DIR}" "sdk-${DISTRO}-${DISTRO_ARCH}" "${sdk_container_formats}"
-    fi
-}
-
-addtask populate_sdk after do_rootfs
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index d757256..0d0e60f 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -78,7 +78,6 @@ ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}"
 ROOTFS_POSTPROCESS_COMMAND_prepend = "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-deb-src', 'cache_deb_src', '', d)} "
 
 inherit rootfs
-inherit image-sdk-extension
 inherit image-tools-extension
 inherit image-postproc-extension
 inherit image-locales-extension
diff --git a/meta/classes/targz-img.bbclass b/meta/classes/targz-img.bbclass
index bf94af0..f90e9fb 100644
--- a/meta/classes/targz-img.bbclass
+++ b/meta/classes/targz-img.bbclass
@@ -4,10 +4,11 @@
 # SPDX-License-Identifier: MIT
 
 TARGZ_IMAGE_FILE = "${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.tar.gz"
+TAR_OPTIIONS ?= ""
 
 do_targz_image() {
     rm -f ${TARGZ_IMAGE_FILE}
-    sudo tar -cvzf ${TARGZ_IMAGE_FILE} --one-file-system -C ${IMAGE_ROOTFS} .
+    sudo tar ${TAR_OPTIIONS} -cvzf ${TARGZ_IMAGE_FILE} --one-file-system -C ${IMAGE_ROOTFS} .
     sudo chown $(id -u):$(id -g) ${TARGZ_IMAGE_FILE}
 }
 
diff --git a/meta/recipes-devtools/sdkchroot/files/README.sdk b/meta/recipes-devtools/isar-sdk/files/README.sdk
similarity index 100%
rename from meta/recipes-devtools/sdkchroot/files/README.sdk
rename to meta/recipes-devtools/isar-sdk/files/README.sdk
diff --git a/meta/recipes-devtools/sdkchroot/files/configscript.sh b/meta/recipes-devtools/isar-sdk/files/configscript.sh
similarity index 100%
rename from meta/recipes-devtools/sdkchroot/files/configscript.sh
rename to meta/recipes-devtools/isar-sdk/files/configscript.sh
diff --git a/meta/recipes-devtools/sdkchroot/files/gcc-sysroot-wrapper.sh b/meta/recipes-devtools/isar-sdk/files/gcc-sysroot-wrapper.sh
similarity index 100%
rename from meta/recipes-devtools/sdkchroot/files/gcc-sysroot-wrapper.sh
rename to meta/recipes-devtools/isar-sdk/files/gcc-sysroot-wrapper.sh
diff --git a/meta/recipes-devtools/sdkchroot/files/relocate-sdk.sh b/meta/recipes-devtools/isar-sdk/files/relocate-sdk.sh
similarity index 100%
rename from meta/recipes-devtools/sdkchroot/files/relocate-sdk.sh
rename to meta/recipes-devtools/isar-sdk/files/relocate-sdk.sh
diff --git a/meta/recipes-devtools/isar-sdk/isar-sdk.bb b/meta/recipes-devtools/isar-sdk/isar-sdk.bb
new file mode 100644
index 0000000..1e33743
--- /dev/null
+++ b/meta/recipes-devtools/isar-sdk/isar-sdk.bb
@@ -0,0 +1,126 @@
+# SDK Root filesystem
+#
+# This software is a part of ISAR.
+# Copyright (C) 2015-2018 ilbers GmbH
+
+DESCRIPTION = "Isar SDK Root filesystem"
+
+LICENSE = "gpl-2.0"
+LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = " \
+    file://configscript.sh \
+    file://relocate-sdk.sh \
+    file://gcc-sysroot-wrapper.sh \
+    file://README.sdk"
+PV = "0.1"
+
+SDK_INSTALL ?= ""
+SDK_FORMATS ?= "targz-img"
+
+DEPENDS += "${SDK_INSTALL}"
+
+DEPENDS_append_riscv64 = "${@' crossbuild-essential-riscv64' if d.getVar('ISAR_CROSS_COMPILE', True) == '1' and d.getVar('PN') != 'crossbuild-essential-riscv64' else ''}"
+
+TOOLCHAIN = "crossbuild-essential-${DISTRO_ARCH}"
+TOOLCHAIN_${HOST_ARCH} = "build-essential"
+TOOLCHAIN_i386 = "build-essential"
+TOOLCHAIN_append_compat-arch = " crossbuild-essential-${COMPAT_DISTRO_ARCH}"
+
+IMAGE_FSTYPES = "${SDK_FORMATS}"
+IMAGE_FULLNAME = "sdk-${DISTRO}-${DISTRO_ARCH}"
+TAR_OPTIONS += "--transform=\"s|^rootfs|sdk-${DISTRO}-${DISTRO_ARCH}|\""
+
+inherit image
+ROOTFS_ARCH = "${HOST_ARCH}"
+ROOTFS_DISTRO = "${HOST_DISTRO}"
+ROOTFSDIR = "${S}"
+ROOTFS_PACKAGES = "${SDK_PREINSTALL} ${SDK_INSTALL} ${TOOLCHAIN}"
+ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status"
+ROOTFS_MANIFEST_DEPLOY_DIR = "${DEPLOY_DIR_SDKCHROOT}"
+ROOTFS_DPKGSTATUS_DEPLOY_DIR = "${DEPLOY_DIR_SDKCHROOT}"
+
+# Override settings from image.bbclass: SDK is not MACHINE-specific
+WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}/${PV}-${PR}"
+STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}/${PV}-${PR}"
+STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}/*-*"
+
+
+SDK_PREINSTALL += " \
+    debhelper \
+    autotools-dev \
+    dpkg \
+    locales \
+    docbook-to-man \
+    apt \
+    automake \
+    devscripts \
+    equivs"
+
+SDK_INCLUDE_ISAR_APT ?= "0"
+
+S = "${WORKDIR}/rootfs"
+
+ROOTFS_CONFIGURE_COMMAND += "rootfs_configure_isar_apt_dir"
+rootfs_configure_isar_apt_dir() {
+    if [ "${SDK_INCLUDE_ISAR_APT}" = "1" ]; then
+        # Copy isar-apt with deployed Isar packages
+        sudo cp -Trpfx ${REPO_ISAR_DIR}/${DISTRO} ${SDKCHROOT_DIR}/isar-apt
+    else
+        # Remove isar-apt repo entry
+        sudo rm -f ${SDKCHROOT_DIR}/etc/apt/sources.list.d/isar-apt.list
+    fi
+}
+
+ROOTFS_POSTPROCESS_COMMAND =+ "sdk_install_files"
+sdk_install_files() {
+    # Configure root filesystem
+    sudo install -m 644 ${WORKDIR}/README.sdk ${S}
+    sudo install -m 755 ${WORKDIR}/relocate-sdk.sh ${S}
+    sudo install -m 755 ${WORKDIR}/gcc-sysroot-wrapper.sh ${S}/usr/bin
+    sudo install -m 755 ${WORKDIR}/configscript.sh ${S}
+    sudo chroot ${S} /configscript.sh  ${DISTRO_ARCH}
+}
+
+ROOTFS_POSTPROCESS_COMMAND += "sdk_finalize"
+sdk_finalize() {
+    sudo umount -R ${SDKCHROOT_DIR}/dev || true
+    sudo umount ${SDKCHROOT_DIR}/proc || true
+    sudo umount -R ${SDKCHROOT_DIR}/sys || true
+
+    # Remove setup scripts
+    sudo rm -f ${SDKCHROOT_DIR}/chroot-setup.sh ${SDKCHROOT_DIR}/configscript.sh
+
+    # Make all links relative
+    for link in $(find ${SDKCHROOT_DIR}/ -xdev -type l); do
+        target=$(readlink $link)
+
+        if [ "${target#/}" != "${target}" ]; then
+            basedir=$(dirname $link)
+            new_target=$(realpath --no-symlinks -m --relative-to=$basedir ${SDKCHROOT_DIR}/${target})
+
+            # remove first to allow rewriting directory links
+            sudo rm $link
+            sudo ln -s $new_target $link
+        fi
+    done
+
+    # Set up sysroot wrapper
+    for tool_pattern in "gcc-[0-9]*" "g++-[0-9]*" "cpp-[0-9]*" "ld.bfd" "ld.gold"; do
+        for tool in $(find ${SDKCHROOT_DIR}/usr/bin -xdev -type f -name "*-linux-gnu*-${tool_pattern}"); do
+            sudo mv "${tool}" "${tool}.bin"
+            sudo ln -sf gcc-sysroot-wrapper.sh ${tool}
+        done
+    done
+}
+
+do_sdk_deploy[dirs] = "${DEPLOY_DIR_SDKCHROOT}"
+do_sdk_deploy() {
+    ln -Tfsr "${ROOTFSDIR}" "${SDKCHROOT_DIR}"
+}
+addtask sdk_deploy before do_build after do_rootfs
+
+CLEANFUNCS = "clean_deploy"
+clean_deploy() {
+    rm -f "${SDKCHROOT_DIR}"
+}
diff --git a/meta/recipes-devtools/sdkchroot/sdkchroot.bb b/meta/recipes-devtools/sdkchroot/sdkchroot.bb
deleted file mode 100644
index e367eae..0000000
--- a/meta/recipes-devtools/sdkchroot/sdkchroot.bb
+++ /dev/null
@@ -1,78 +0,0 @@
-# SDK Root filesystem
-#
-# This software is a part of ISAR.
-# Copyright (C) 2015-2018 ilbers GmbH
-
-DESCRIPTION = "Isar SDK Root filesystem"
-
-LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI = " \
-    file://configscript.sh \
-    file://relocate-sdk.sh \
-    file://gcc-sysroot-wrapper.sh \
-    file://README.sdk"
-PV = "0.1"
-
-SDK_INSTALL ?= ""
-
-DEPENDS += "${SDK_INSTALL}"
-
-DEPENDS_append_riscv64 = "${@' crossbuild-essential-riscv64' if d.getVar('ISAR_CROSS_COMPILE', True) == '1' and d.getVar('PN') != 'crossbuild-essential-riscv64' else ''}"
-
-TOOLCHAIN = "crossbuild-essential-${DISTRO_ARCH}"
-TOOLCHAIN_${HOST_ARCH} = "build-essential"
-TOOLCHAIN_i386 = "build-essential"
-TOOLCHAIN_append_compat-arch = " crossbuild-essential-${COMPAT_DISTRO_ARCH}"
-
-inherit rootfs
-ROOTFS_ARCH = "${HOST_ARCH}"
-ROOTFS_DISTRO = "${HOST_DISTRO}"
-ROOTFSDIR = "${S}"
-ROOTFS_PACKAGES = "${SDK_PREINSTALL} ${SDK_INSTALL} ${TOOLCHAIN}"
-ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status"
-ROOTFS_MANIFEST_DEPLOY_DIR = "${DEPLOY_DIR_SDKCHROOT}"
-ROOTFS_DPKGSTATUS_DEPLOY_DIR = "${DEPLOY_DIR_SDKCHROOT}"
-
-SDK_PREINSTALL += " \
-    debhelper \
-    autotools-dev \
-    dpkg \
-    locales \
-    docbook-to-man \
-    apt \
-    automake \
-    devscripts \
-    equivs"
-
-SDK_INCLUDE_ISAR_APT ?= "0"
-
-S = "${WORKDIR}/rootfs"
-
-ROOTFS_CONFIGURE_COMMAND += "${@'rootfs_configure_isar_apt_dir' if d.getVar('SDK_INCLUDE_ISAR_APT') == '1' else ''}"
-rootfs_configure_isar_apt_dir() {
-    # Copy isar-apt instead of mounting:
-    sudo cp -Trpfx ${REPO_ISAR_DIR}/${DISTRO} ${ROOTFSDIR}/isar-apt
-}
-
-ROOTFS_POSTPROCESS_COMMAND =+ "sdkchroot_install_files"
-sdkchroot_install_files() {
-    # Configure root filesystem
-    sudo install -m 644 ${WORKDIR}/README.sdk ${S}
-    sudo install -m 755 ${WORKDIR}/relocate-sdk.sh ${S}
-    sudo install -m 755 ${WORKDIR}/gcc-sysroot-wrapper.sh ${S}/usr/bin
-    sudo install -m 755 ${WORKDIR}/configscript.sh ${S}
-    sudo chroot ${S} /configscript.sh  ${DISTRO_ARCH}
-}
-
-do_sdkchroot_deploy[dirs] = "${DEPLOY_DIR_SDKCHROOT}"
-do_sdkchroot_deploy() {
-    ln -Tfsr "${ROOTFSDIR}" "${SDKCHROOT_DIR}"
-}
-addtask sdkchroot_deploy before do_build after do_rootfs
-
-CLEANFUNCS = "clean_deploy"
-clean_deploy() {
-    rm -f "${SDKCHROOT_DIR}"
-}
diff --git a/testsuite/build_test/build_test.py b/testsuite/build_test/build_test.py
index a957cdc..fd95871 100644
--- a/testsuite/build_test/build_test.py
+++ b/testsuite/build_test/build_test.py
@@ -99,9 +99,9 @@ class SdkTest(CIBaseTest):
     :avocado: tags=sdk,fast,full
     """
     def test_sdk(self):
-        targets = ['mc:qemuarm-stretch:isar-image-base']
+        targets = ['mc:qemuarm-stretch:isar-sdk']
 
-        self.perform_build_test(targets, 1, 'do_populate_sdk')
+        self.perform_build_test(targets, 1)
 
 class NoCrossTest(CIBaseTest):
 
@@ -215,6 +215,6 @@ class ContainerSdkTest(CIBaseTest):
     """
     @skipUnless(UMOCI_AVAILABLE and SKOPEO_AVAILABLE, 'umoci/skopeo not found')
     def test_container_sdk(self):
-        targets = ['mc:container-amd64-stretch:isar-image-base']
+        targets = ['mc:container-amd64-stretch:isar-sdk']
 
-        self.perform_container_test(targets, 'do_populate_sdk')
+        self.perform_container_test(targets)
-- 
2.30.2


             reply	other threads:[~2021-12-15  6:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  6:41 Adriaan Schmidt [this message]
2021-12-15  7:51 ` Jan Kiszka
2021-12-15  8:07   ` Schmidt, Adriaan
2021-12-15  8:38     ` Jan Kiszka
2021-12-15  8:43       ` Henning Schild
2021-12-15  9:20         ` Jan Kiszka
2021-12-15  9:35           ` Schmidt, Adriaan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211215064158.3313004-1-adriaan.schmidt@siemens.com \
    --to=adriaan.schmidt@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox