From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6669723628337102848 X-Received: by 2002:a2e:96ce:: with SMTP id d14mr4230859ljj.10.1555419923556; Tue, 16 Apr 2019 06:05:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:9a8b:: with SMTP id p11ls668218lji.11.gmail; Tue, 16 Apr 2019 06:05:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgMNRDxlIwUGyO8NPVuYaFptautoKFrw+QUl25nCiouokvwM2nJ0zI+S6isyfhz9UBWIIf X-Received: by 2002:a2e:2c07:: with SMTP id s7mr4142435ljs.17.1555419922981; Tue, 16 Apr 2019 06:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555419922; cv=none; d=google.com; s=arc-20160816; b=Ybm2ixCKm0taob5BWv/u/I+gZNU50hy2ShR+bY9X/tHF2CM0WEy1T8IAORdjcMIno2 FAod5ss0Zw1EcJ+oWk4H/f1yrpehHoaHJiD9AzCsb3AHUh+cX50XtQCtbjesmiZXC9wj ZZpziDp5PZUCwsh9W/mPh+tvwvSO8wMrZRAZlJR6NRT6MxLSlxHTwj8vGFTXRB8fKUBJ C9Nlhum99iYTPoba4V4G4/AEspC8Rwc/GIloUnR8CcM5YXQAgMIie0v63BMwQcBbSYyb aXx+MogRLVjFc+qObXjzEi7Zdpa2/prIp5bhNyJgr41cpdGN9JyKZ+hGExrqyUerjr1Z hIFQ== 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=QmvL/1N6KhJ4xEJ02hQZCDZ0BY4VPw9tlYPuPz+HZqfsWeP6a5WQJSM/WJphYchnax eQ8Jg535Sx9YkqDgGhmBAQv+dFJvG3JycHch+zcFTUIWgZ/Nee70UQNppSWZrI1knr9Q qqyg/t5kpTiXZAe/5A2mISAiZ4QsxU/ARztEUI79MfEBFCAXebHl5DZhDe9twpyKdKUj gGLnMvU2xeei79aG0Hl/al6Kk5QqtIdUMCYBmRn8JpiAMqAiF/x+0SUCzXC3vhUj2jR9 eou3a0km9hjjhBoQxY80jKsq5hhk0K4yXU057vjCcakD5nVr6sr8kFkDZtY9tZ/13U6M KPxQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id n20si508513lfl.4.2019.04.16.06.05.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 06:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id x3GD5MAD011403 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 16 Apr 2019 15:05:22 +0200 Received: from localhost.localdomain (golem.ppmd.siemens.net [139.25.69.122]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id x3GD5L2t003341; Tue, 16 Apr 2019 15:05:22 +0200 From: "Andreas J. Reichel" To: isar-users@googlegroups.com Cc: Andreas Reichel Subject: [PATCH v9 5/5] docs: Update user_manual.md Date: Tue, 16 Apr 2019 15:05:11 +0200 Message-Id: <20190416130511.10873-6-andreas.reichel.ext@siemens.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190416130511.10873-1-andreas.reichel.ext@siemens.com> References: <20190416130511.10873-1-andreas.reichel.ext@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: r/3GtpXAPNPm 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