From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6686392527042379776 X-Received: by 2002:a5d:52ce:: with SMTP id r14mr2581735wrv.224.1556797075058; Thu, 02 May 2019 04:37:55 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:f310:: with SMTP id q16ls596509wmq.3.gmail; Thu, 02 May 2019 04:37:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhzcwxG3wDL+uSLvF6Bf2rLTLti4e4je7FLHjYZaSH236xWzW+Dn1N/mnis17itIhp+res X-Received: by 2002:a1c:a945:: with SMTP id s66mr2063263wme.51.1556797074550; Thu, 02 May 2019 04:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556797074; cv=none; d=google.com; s=arc-20160816; b=Mvd1OLsSm2eMHJPZdbcRLrNubrh3LsDI5RGUeXcsOdQv7oUOwdIlLRLeHZU3YKeIU8 ZqDUUA8mRkS2oLDlwP27MMOD5upGIHb8tVwNSv7zQcWUppOkWkbPY+q+d7heTxx3JZiF XCw8mEXQUTkMP8GdF40Gkq0WCpGqp4s/iXrG/wXU/qQ7V0poZ6sIY4yht/RDw22LaL0B Y17ZbJDfE5Ez4wNRb/EyoTLMhvjnvG3RD4K4+mRoZQ2dVdZBNOuX6NgsuNxJWP1+MFNX Li3LV3zolu7M/zU9SB8V1CbkU3+34h2N67lniiAw5zkOm3Be4mpqls51rrPBK3peg5NN 82sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=7yfF9otSRhydcGRjhjlH7tbj0vIB+FagUkYH1XG+lI0=; b=m6sRl0DSxudQVQwgEafQcKNnWgl6Hy/irsXEPg8oZSMjC8YHRRJUcoCUrbqPus4Lyk C5mD9bStV+wqhlgHSAhqrJfk1xIXzQWmz9LYdwdG6/Oh9igXp3lnWwy68jszvht5vMU6 q/wGp7PNdq6UuvVKDvp8LV90Vi+VOlek3pUerReGBmMH3UWp8aEADUtRv1k0Ht/DyTwL QUVFOyrjJDNWTw++slYDVUzpoc+07S+EkCKQ1x1CtffQPwUwFd9RS0hQO3T9YHaZqxk1 6o+l83+ZWJ1iYidhBEd1HixfdT38wu5x9RADxFZGURVKT3NDQO3G6Re40Jiib8moyHuG 6xlw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id u2si411986wri.2.2019.05.02.04.37.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2019 04:37:54 -0700 (PDT) Received-SPF: pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id x42BbsAP019248 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 2 May 2019 13:37:54 +0200 Received: from localhost.localdomain (golem.ppmd.siemens.net [139.25.69.122]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id x42BbrOU027767; Thu, 2 May 2019 13:37:54 +0200 From: "Andreas J. Reichel" To: isar-users@googlegroups.com Cc: Andreas Reichel Subject: [PATCH v10 5/6] docs: Update user_manual.md Date: Thu, 2 May 2019 13:37:43 +0200 Message-Id: <20190502113744.31753-6-andreas.reichel.ext@siemens.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190502113744.31753-1-andreas.reichel.ext@siemens.com> References: <20190502113744.31753-1-andreas.reichel.ext@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: jUvnqqcWrJ9q From: Andreas Reichel Explain DISTRO_BOOTSTRAP_KEYS and THIRD_PARTY_APT_KEYS. Give an example on how to use the variables to include docker-ce. Signed-off-by: Andreas Reichel --- doc/user_manual.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/doc/user_manual.md b/doc/user_manual.md index ba57319..eb877b1 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -321,6 +321,7 @@ Some other variables include: - `HOST_DISTRO_APT_SOURCES` - List of apt source files for SDK root filesystem. This variable is optional. - `HOST_DISTRO_APT_PREFERENCES` - List of apt preference files for SDK root filesystem. This variable is optional. - `DISTRO_APT_PREMIRRORS` - The preferred mirror (append it to the default URI in the format `ftp.debian.org my.preferred.mirror`. This variable is optional. + - `THIRD_PARTY_APT_KEYS` - List of gpg key URIs used to verify apt repos for apt installation after bootstrapping - `CFG_ROOT_PW` - The encrypted root password to be set. To encrypt password use `mkpasswd`. You find `mkpasswd` in the `whois` package of Debian. If the variable is empty, root login is passwordless. - `CFG_ROOT_LOCKED` - If set to `1` the root account will be locked. @@ -368,10 +369,12 @@ Isar can generate various images types for specific machine. The type of the ima The distro is defined by the set of the following variables: - `DISTRO_APT_SOURCES` - List of apt source files - - `DISTRO_APT_KEYS` - List of gpg key URIs used to verify apt repos + - `DISTRO_BOOTSTRAP_KEYS` - List of gpg key URIs used to verify apt bootstrap repo - `DISTRO_APT_PREFERENCES` - List of apt preference files - `DISTRO_KERNELS` - List of supported kernel suffixes +The first entry of DISTRO_APT_SOURCES is used for bootstrapping. + Below is an example for Raspbian Stretch: ``` DISTRO_APT_SOURCES += "conf/distro/raspbian-stretch.list" @@ -783,3 +786,39 @@ bitbake multiconfig:qemuarm-stretch:isar-image-base ### Limitation Files fetched with the `SRC_URI` protocol "apt://" are not yet cached. + +## Add foreign packages from other repositories to the generated image + +### Motivation + +When building embedded systems with Isar, one might want to include packages that are not provided by debian by default. One example is docker-ce. + +### Approach/Solution + +Add a new sources list entry to fetch the package from, i.e. include a new apt source mirror. Then add the needed apt key for the third party repository. Add the wanted package to the IMAGE_PREINSTALL variable. + +### Example + +Add docker-ce from arm64: + +Create a new layer containing `conf/distro/docker-stretch.list` with the following content: + +``` +deb [arch=arm64] https://download.docker.com/linux/debian stretch stable +``` + +Include the layer in your project. + +To the local.conf add: + +``` +IMAGE_PREINSTALL += "docker-ce" +THIRD_PARTY_APT_KEYS_append = " https://download.docker.com/linux/debian/gpg;md5sum=1afae06b34a13c1b3d9cb61a26285a15" +DISTRO_APT_SOURCES_append = " conf/distro/docker-stretch.list" +``` + +And build the corresponding image target: + +``` +bitbake multiconfig:qemuarm64-stretch:isar-image-base +``` -- 2.21.0