From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6916819860201668608 X-Received: by 2002:a05:600c:2057:: with SMTP id p23mr3887871wmg.109.1610463183724; Tue, 12 Jan 2021 06:53:03 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a7b:cbd5:: with SMTP id n21ls1437738wmi.3.gmail; Tue, 12 Jan 2021 06:53:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdQvoZLhSEXNMVnJzOAROTFM7snNdUgTLXxYewDzalpOO/JusiJxiUnO3u+OEAhrzesIel X-Received: by 2002:a1c:9dd8:: with SMTP id g207mr3967322wme.15.1610463182834; Tue, 12 Jan 2021 06:53:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610463182; cv=pass; d=google.com; s=arc-20160816; b=iIU4biU9627+LVcx1+DrNyfZPXFw6h0pDNx/TgspzHGIfMCGnBVs+gQsJ2HHktUCiN aJXBRW5El0NtJyErpx3lPcgyUt2iHsJ8vEWhbkC18Xf3vpd22kfJZ7qByjLXGPNDD38S qLGGKK+KUXB15tuqFOELvB/l+JiKn+Irs5ALnw6XpU78Z3G57GDPUQSc7IdFyy08kNbM Vi54y4w3MrHNb0GhKek5mtoMVUro7Vs1BSFeud91S071VjDaJPOFEMAmLl0USFVRQVZ5 x0VxclJEE35zfOTmuU1UOQVi3HapFMDm2W+bUGWKeEG+iHnLS9NVOKHnXqDeP6uAXv1o u28Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-language:content-transfer-encoding:in-reply-to :user-agent:date:message-id:from:references:cc:to:subject :dkim-signature; bh=+oej+bYS8SMYVP6hKVm/6U1+kqIXgBLMQRagkU1Ja3o=; b=vB6z6jRWH+KVbqtr4b17XEj6qmcXnYJGQKhLWHTkomdLUua7alxGWuOYGFuWGYwxmf 4tAZMTgWzT9sXqZXEdiGgqKYtXhing7vzeFsoUeJvq/ss/1VQ81ZdMkUgwYYfTBNaM9F ry5M5hWvgV48j5NXZYn2gmDN5xg8bQnpLAuyKdfYGKbM4Z0Q9Y4gumXP4w85fyUDnG9k DnzSkkVQ9Y6auItp37LtJ2zZPJdFJXQ/opn56bVEvZ0tmqcJhnEK9eHxJR8EYOLr3vmY U1aogTnnj8OShqzRoVnpqfebA92fHp+U02ZO6Yull/IR+uPhDH1Ie7IRlbyco1LFi7Er uajw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.onmicrosoft.com header.s=selector1-siemens-onmicrosoft-com header.b=a7zQK3Mq; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of silvano.cirujano-cuesta@siemens.com designates 40.107.6.64 as permitted sender) smtp.mailfrom=silvano.cirujano-cuesta@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60064.outbound.protection.outlook.com. [40.107.6.64]) by gmr-mx.google.com with ESMTPS id x12si182578wmk.1.2021.01.12.06.53.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jan 2021 06:53:02 -0800 (PST) Received-SPF: pass (google.com: domain of silvano.cirujano-cuesta@siemens.com designates 40.107.6.64 as permitted sender) client-ip=40.107.6.64; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.onmicrosoft.com header.s=selector1-siemens-onmicrosoft-com header.b=a7zQK3Mq; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of silvano.cirujano-cuesta@siemens.com designates 40.107.6.64 as permitted sender) smtp.mailfrom=silvano.cirujano-cuesta@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CFxe7tMFjgzMe3lXBWCB20/9CZ30t2E+5x7Io8tpgnoNuCgCMMbOhLDg0S/X71TaCAPlynwRKConsTsG9U29d+S1FN5qEyRgjX/4u8XmfkpPZS6AtCrC7XMLjJirAnwHMHVMlDA6DYH33S6G0aM+HZ6Bw30gHQ/HyJDf8J7IpcPOzHIlVzVoRvirVdZcN2VD8ecTuJvZ9QRZ1MoY0+tmpwuNVhThqmDHU2xeF1Qic8cQe3uVHfT44Da7gSyFh3B4bDMMHTtZLfOX4+/TTlw03OssoFfBfciBefNZc3b8gaj05vM4x7kPKty1I8Q7+Qde/aDb90tPWfLm/X7GzB8ERw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+oej+bYS8SMYVP6hKVm/6U1+kqIXgBLMQRagkU1Ja3o=; b=nEVdgv91STWuwqtStJp/OoqaKNbRR7YJnNPRDx8Kj6/0euKVZd+GL1Ffd+DU/G398RoUhkmRwcmrI2YRmc5yJhgToRMXZI2ALUEry5sYC4ePYk24/zzoFsav6dZLHQAj16VF+Vqm776Ozi35UEtcN3w6niW53n16GCgBfGM3Et7aAEu0XT2Rv/t9bpsqosUoHsX+IkaWW6P3sk/VK21ioAa2tVY/a8oWvXPWLym1Ou952BNOfutEetsSRbn0aiFRdiDNaNJ48J7kaTh9Gtq7un5RD8hUIHGsFXLZGL2CRc53qfkW5Rqc1/+jEl4GBTljcoH+2LNNERwDj5laY8bOYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.onmicrosoft.com; s=selector1-siemens-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+oej+bYS8SMYVP6hKVm/6U1+kqIXgBLMQRagkU1Ja3o=; b=a7zQK3Mq9ga3oSC9yJth8cNtkd8QURmKICXbkZa6S9S0mg3Ei85smlgYBy+zA2z0IO2MBwvObohJsAZYRboyzJStg55DU8xkXIZqFGrnNhlvcRcD6QcVVqvzcUEuiVFJMhyCqotcfYDhkvKuCG3QIAhhmbs07vFXAeRSos7/rmQ= Authentication-Results: googlegroups.com; dkim=none (message not signed) header.d=none;googlegroups.com; dmarc=none action=none header.from=siemens.com; Received: from AM0PR10MB2708.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:12a::30) by AM0PR10MB3123.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:18b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 12 Jan 2021 14:53:02 +0000 Received: from AM0PR10MB2708.EURPRD10.PROD.OUTLOOK.COM ([fe80::c035:62d1:fd79:1bc8]) by AM0PR10MB2708.EURPRD10.PROD.OUTLOOK.COM ([fe80::c035:62d1:fd79:1bc8%5]) with mapi id 15.20.3742.012; Tue, 12 Jan 2021 14:53:02 +0000 Subject: Re: [RFC PATCH 2/2] docs: document usage of sdk container images To: Henning Schild Cc: isar-users@googlegroups.com References: <20210112103338.14712-1-silvano.cirujano-cuesta@siemens.com> <20210112103338.14712-3-silvano.cirujano-cuesta@siemens.com> <20210112124021.5a9f44ce@md1za8fc.ad001.siemens.net> <20210112131814.5a3cf85a@md1za8fc.ad001.siemens.net> From: Silvano Cirujano Cuesta Message-ID: <134bd608-0319-7649-52a4-a5e647740d50@siemens.com> Date: Tue, 12 Jan 2021 15:52:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 In-Reply-To: <20210112131814.5a3cf85a@md1za8fc.ad001.siemens.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [2001:a61:3ba9:3102:e458:f9ae:a68a:ac3d] X-ClientProxiedBy: AM0PR10CA0098.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::15) To AM0PR10MB2708.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:12a::30) Return-Path: silvano.cirujano-cuesta@siemens.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2001:a61:3ba9:3102:e458:f9ae:a68a:ac3d] (2001:a61:3ba9:3102:e458:f9ae:a68a:ac3d) by AM0PR10CA0098.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9 via Frontend Transport; Tue, 12 Jan 2021 14:53:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6debb708-331c-4458-4993-08d8b709c297 X-MS-TrafficTypeDiagnostic: AM0PR10MB3123: X-LD-Processed: 38ae3bcd-9579-4fd4-adda-b42e1495d55a,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tHOIBmN2yTW75LJ17RM2B9+HVUISDKhQMggyFeC8JSV75oF865ojE6cZuNSMUlMNm5DaeVqCYXPXc7o2LBgUaPfStU/Sjh5my0eigCmGPtwwYGSWkhlXCVFzml7ggDdxS0JsghVbeIE8XaqyBlWrKSlp+X+/f4pmsaSeRBahUUc5NzUNXrRZAhGj5r9tIMr7CPsRw4KGn7lYWI60IlQlt3LDzcqaC18OuO4FpIa2Y9TZyprhzNeirD4ir2D1Kjtknwg/DYOj2p6WI8ZusD8KMc1UTpbB/Yw7RMi6ICbTrCBA7jS2HVYbDsgE90moYVTv3Bnjzb6RzqxWBuh8DtHhW48VyNilYB9nYeri53Xm4beUNbE40S6ElzIpQRwZVmB5bgRTYNXe1ryeL62oZtPX4LrZKuVN8yr/gFCHsdrJa3xP76HevOQI4PjY555E+B1aRRtFJozbNL40/OfihYJKXe7ryu9zLVYkXJRGUVFVj+hetJdmg0CSx7LlGRfb56FA8HX0FSJnWvs5f/JutzUSjZsSxDe3NCT+GLHIusq1KyN68kX1C8P9NKiQKAUxLBYw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR10MB2708.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(376002)(366004)(136003)(346002)(396003)(53546011)(31686004)(478600001)(316002)(6862004)(8676002)(8936002)(66556008)(66476007)(66946007)(37006003)(86362001)(6636002)(2616005)(4326008)(6486002)(6666004)(16526019)(31696002)(36756003)(5660300002)(45080400002)(186003)(2906002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?dVVSQ1dBNElONU04bVlHalVCaXhBdVR0UVFYdUppNnRHTjEwS3NGcjQvbUV1?= =?utf-8?B?c2lndk5XNTZzM2ZERWwrY1MvUUJpKzFHWkpaWWtRVlREcUEyVWdXUFpmdTFR?= =?utf-8?B?aFRoMElUWEpsd1o5ZXBzYkNPNHhWRXRwRjFtckt4bU9xMnNsd1VaY0txMEpJ?= =?utf-8?B?cE4rT2g0VkY1TWtOZm1yd0RHQzRHMm1OZDBySDZhRmRBdDNLZXh5ZzB3UU9o?= =?utf-8?B?azExMXE2Zm9kUzkwRUhpWkF3NkxuYmJtNk01c1JwdHN1ZjdDWGltc21GSTRz?= =?utf-8?B?SDRtNG93U1N5d1RFZjBPOUVweHl4V3JON3VNR29JenM5NXhEYStMMERicnhE?= =?utf-8?B?RVVUY1FVYkxyRWtoYktvc0Y2TjNDQnZPeW9MWmd1MEt3MGZROXRadW1Fa09Z?= =?utf-8?B?QkRzY0pvWmRsbWNmRWIzK3JLVFRIVG02cVRrTzRsbEdKZkxGRmdROEMzSTIw?= =?utf-8?B?MjN0VlZUZ25pWHFzM3hvMm5hR294WGRydXp3VGRZMlNWa05BSGhuZi9SK01q?= =?utf-8?B?Ym5wSFNXbk1lZjBpTisza0xacUxJOExrcUF0R2Z6QThndm5JU1JjRkRIR1ph?= =?utf-8?B?Q1hDRG5adTUvUGtDZTVveUZQcHZyRlhQbk9rMS8xSFBza1JNK0lxRURXRWkw?= =?utf-8?B?K1k3UXJBcllNSjF3OENOTWdndzZBU3RReDZXMmFrUUQzcXJTU3dqbHVyOVQz?= =?utf-8?B?U0E3YUg4Q0dybHBqdlJoaXI4N0pTT1VZY0tqQ0RNMmszYVBNcEFJT2ZUOTBM?= =?utf-8?B?L2hTOWxlRG9BNDhRbFIxTjV3dU53eDBUaGNYSVo1cEtXVlBiVzMxdzErYXJt?= =?utf-8?B?RVd4cnkrMlpMZUpSdWVGcFZqTDVnTkxUTE5vVzRReHRMOXYxOXFrVUpIR240?= =?utf-8?B?bXNQVjJMTjZHSjRsMmh3Rzk1bE83M1VnODVrVzNXZDl1MTV2NmoxMlhtaEdI?= =?utf-8?B?YzlCNXNuUW1lc1QvTEwxTFhYcFVIL1FGZU96REpvYUZkUkc0V3dwUlM2RUlv?= =?utf-8?B?dWY0U2h5REM1VTdMZ2hXcmQwaDFNbkJoc1Z0Z0VBWmdsUVVzQmZuZGVRbFRq?= =?utf-8?B?T1ZMMHRCdXlwQUlIVFdhc3RIclBJeWNpMmN1T3JtaTF6YnBVNzBGMUpoazdD?= =?utf-8?B?cW4yanlMeVFPMXZQa3Q2VjdOaUtTTi93Y2tmKzZOUmNTRldIYVF3aFltMEti?= =?utf-8?B?ZFlGTlJmVmVOaDUraGZ5OGMzM1VkRjk4S2x6QmdyTjdSMjJJdytySS9rMzZE?= =?utf-8?B?TXJhL0RBdktCNERHalpRRVRuN000c0dOMGxldWlRaDlMM0N2SUtvaHFIb2NM?= =?utf-8?B?WjZXZ1JZbnM5TkpiZDJ3RzI3WGhIMGRKSzhleDhCZ0xQK1ZnakRMRVdYcFRF?= =?utf-8?B?SnY1Q29WTkRaSUNxZ2ZONUJ2RzUrelYyN25ORlNMYzJGNlBudStYeFVOZFNh?= =?utf-8?Q?aZwg3/ra?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB2708.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2021 14:53:01.9309 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-Network-Message-Id: 6debb708-331c-4458-4993-08d8b709c297 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: I2GQ6uP4VqQwHnaGOwayt4Spebp0jZvtFss0hnQ6lv0xYN27g5Z+oBSmvC8hx/DjJBfb58Bwh3rDiEfvQxu6d0ApGzKsSBmCFJpB6Y2F+DFDYVNL5/PPkG5ZxRyDC4X9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR10MB3123 X-TUID: RKb1B4K04s+W On 12/01/2021 13:18, Henning Schild wrote: > Am Tue, 12 Jan 2021 13:03:18 +0100 > schrieb Silvano Cirujano Cuesta : > >> On 12/01/2021 12:40, Henning Schild wrote: >>> Am Tue, 12 Jan 2021 11:33:38 +0100 >>> schrieb "[ext] Silvano Cirujano Cuesta" >>> : >>> >>>> Signed-off-by: Silvano Cirujano Cuesta >>>> --- >>>> doc/user_manual.md | 70 >>>> ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 >>>> insertions(+) >>>> >>>> diff --git a/doc/user_manual.md b/doc/user_manual.md >>>> index a4f3d1d..ff779b1 100644 >>>> --- a/doc/user_manual.md >>>> +++ b/doc/user_manual.md >>>> @@ -834,6 +834,76 @@ ii crossbuild-essential-armhf 12.3 >>>> all Inf ~# >>>> ``` >>>> >>>> +## Create a "containerized" ISAR SDK root filesystem >>>> + >>>> +### Motivation >>>> + >>>> +Distributing and using the SDK root filesystem created following >>>> the instructions in "[Create an ISAR SDK root >>>> filesystem](#create-an-isar-sdk-root-filesystem)" becomes easier >>>> using container images (at least for those using containers anyway) >>>> +A "containerized" SDK adds to those advantages of a normal SDK >>>> root filesystem the comfort of container images. + +### Approach + >>>> +Create container image with SDK root filesystem with installed >>>> cross-toolchain for target architecture and ability to install >>>> already prebuilt target binary artifacts. +Developer: >>>> + - runs a container based on the resulting container image >>>> mounting the source code to be built, >>>> + - develops applications for target platform on the container and >>>> + - leaves the container getting the results on the mounted >>>> directory. + >>>> +### Solution >>>> + >>>> +User specifies the variable `SDK_FORMAT` providing a >>>> space-separated list of SDK formats to generate. +Supported >>>> formats are: >>>> + - `tar`: is the 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 >>>> import`](https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.docker.com%2Fengine%2Freference%2Fcommandline%2Fimport%2F&data=04%7C01%7Csilvano.cirujano-cuesta%40siemens.com%7C2e13fa7588f34212393508d8b6f43140%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637460507195377080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oevvzWybG30IG2D1fMNPQRcfsfuvYSj1afdrIUF1ABw%3D&reserved=0) >>>> + - `docker-daemon`: (not supported from inside of a container) >>>> resulting container image is made available on the local Docker >>>> Daemon >>>> + - `containers-storage`: (not supported from inside of a >>>> container) 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 + >>> Maybe a script to postprocess the one tarball we have would be a >>> better option. I do not understand why skopeo can not be used >>> inside docker or podman, but we _really_ should not motivate anyone >>> to run isar plain. Otherwise i agree that a bitbake task is a good >>> idea and much better than postprocessing outside of the build >>> system. >> What do you mean by post-processing? I mean, a Docker image is >> nothing else but a couple of JSON and TAR files using a fixed file >> tree structure, with SHAs... But anyway writing something that does >> it is like reinventing the wheel, that's what tools like Umoci, >> Skopeo,... are for. > I mean some sort of script that needs to be called after bitbake. Not > nice but can be done outside of a container. Hmmm, obviously, but seems to be so obvious for me isn't that obvious :-) The additions DON'T NEED to run in a container, but CAN be run in a container (e.g. kas-container). If running bitbake OUTSIDE of a container (e.g. VM), then the formats "docker-daemon" and "containers-storage" should work like a charm. If running bitbake INSIDE of a container (e.g. kas-container), then the formats "docker-daemon" and "containers-storage" won't work. I don't know if doc/user_manual.md is the right place for all the clarifications that appear to be missing (this one and the dependency on skopeo and umoci), but they are clearly needed. > >> My first PoC was in fact just a shell script post-processing the TAR >> file. Technically feasible, but it doesn't feel like a comfortable >> workflow... > Doing that in bitbake is for sure the best solution, given it works. Of course, it works! ;-) > >> The initial idea was from Jan Kiszka (I forgot to add a >> "Suggested-by" to the commits) and after some discussion about the >> convenience of integrating it, I agreed that the workflow feels much >> better this way. >> >> Skopeo can be used inside of Docker or Podman, it's in fact what I'm >> doing. What doesn't work is adding the container image to a Docker >> Daemon (unless you pass the Docker socket to the container, what I >> wouldn't do) or containers/storage system (mounting the storage >> directory, what I wouldn't do). IMO the target users should know how >> to handle docker-archives (I can add that "docker load" has to be >> used). > Maybe i am just confused by the two "(not supported from inside of a > container)". Does this mean one can not create the images, or not use > ... or not both? > The answer should probably made more clear in the docs. > > If creation works and only use fails, that is all fine. If creation > inside a container does not work ... i would refrain from writing that > code in bitbake and go post-process (extra shell script or only doc) > with it. As mentioned above, running bitbake for building the SDK container image can be run from inside and outside of a container. The only difference is that running in a container the host shouldn't be reachable and therefore the formats "docker-daemon" and "containers-storage" shouldn't work. If SDK_FORMAT = "tar", then only the currently existing format (tarballed root filesystem) gets generated. If SDK_FORMAT = "tar docker-archive", then you get both the old format and a docker image archive that can be loaded on any Docker installation. Possible scenarios (probably too much information for the documentation): - Project A has a build system that generates a SDK container running bitbake without a container selecting SDK_FORMAT="docker-daemon". After finalizing pushes the SDK docker image to a container image registry (docker push ...). Developers pull the SDK container image from the container image registry (docker pull ...), start a container based on the image and mounting the directory with the source code, edit the source code on the host IDE and build in the container with the provided SDK. - Project B has a build system that generates a SDK container running bitbake with a container selecting SDK_FORMAT="tar docker-archive". Since the project doesn't have any container image registry, it distributes the container image using a network share. Team B1 do have a container image registry and distributes the image internally using it. BTW, without Team B1 project B wouldn't need anything but "tar". Clearer now?   Silvano > > Henning > >>   Silvano >> >>> Henning >>> >>>> +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`. +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 formats are archived into >>>> `tmp/deploy/images/${MACHINE}/sdk-${DISTRO}-${DISTRO_ARCH}-${sdk_format}.tar.xz` >>>> (being `sdk_format` each one of the formats specified in >>>> `SDK_FORMATS`). +The SDK container directory `/isar-apt` contains a >>>> copy of isar-apt repo with locally prebuilt target debian packages >>>> (for ). +One may get into an SDK container and install >>>> required target packages with the help of `apt-get install >>>> :` command. +The directory with the >>>> source code to develop on should be mounted on the container (with >>>> `--volume :`) to be able to >>>> edit files in the host with an IDE and build in the container. + >>>> +### Example + >>>> + - Make the SDK formats to generate available to the task >>>> + >>>> +For one-shot builds (use `local.conf` otherwise): >>>> + >>>> +``` >>>> +export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SDK_FORMATS" >>>> +export SDK_FORMATS="docker-archive" >>>> +``` >>>> + >>>> + - Trigger creation of SDK root filesystem >>>> + >>>> +``` >>>> +bitbake -c do_populate_sdk mc:qemuarm-buster:isar-image-base >>>> +``` >>>> + >>>> + - Load the SDK container image into the Docker Daemon >>>> + >>>> +``` >>>> +xzcat >>>> build/tmp/deploy/images/qemuarm/sdk-debian-buster-armhf-docker-archive.tar.xz >>>> | docker load +``` + >>>> + - Run a container using the SDK container image (following >>>> commands starting with `#~:` are to be run in the container) + >>>> +``` >>>> +docker run --rm -ti --volume "$(pwd):/build" >>>> isar-sdk-buster-armhf:latest +``` >>>> + >>>> + - Check that cross toolchains are installed >>>> + >>>> +``` >>>> +:~# dpkg -l | grep crossbuild-essential-armhf >>>> +ii crossbuild-essential-armhf 12.3 >>>> all Informational list of cross-build-essential packages +``` >>>> + >>>> ## Creation of local apt repo caching upstream Debian packages >>>> >>>> ### Motivation -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux