From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6651523578180141056 X-Received: by 2002:a17:906:8296:: with SMTP id h22mr417810ejx.3.1548750280142; Tue, 29 Jan 2019 00:24:40 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:b656:: with SMTP id c22ls4648264ede.0.gmail; Tue, 29 Jan 2019 00:24:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IYgl8p327IoLq4mMLvkKZ4phD/Qj5332IXG3los/tU3DJUAo19fDeF1/oHhon5Y44Pq/X+P X-Received: by 2002:a50:fd8c:: with SMTP id o12mr447579edt.10.1548750279757; Tue, 29 Jan 2019 00:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548750279; cv=none; d=google.com; s=arc-20160816; b=n7+2Gbf/0brt/tpBSCKIwjeWm7AzMLk+/MYQJPnfA2FLMAQbTOaNC7oAQkD6E84Pc1 G5Pzq6UA9ZOZR8UOqm06ytfUJDg1Ar0Maq0MH2mMywGtpc9V13nBBQ3h1txCNaHXNOtD Hki8COcxA2G18AHXlKHWayrrRwiU935qJcmVzy3iG7APTbDeMlmU+yPk0rXBCl+A+5WV Jxk7A9XOakJ7Q9e3xvBt5lGHoplg6JtnfRhoJTARbk/4AfLq84W5OEsTRUxRqjKKnZeF q5TA7vXtNyexMmDLN9Zn7k6JTGqP76ZtdPXqZa+fGgwYfXq1H/+lFA20Pqu4/3wmtGSt jDsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:cc:to:from:subject; bh=KnXJ+XE56Dgg2AEJH3mL1CpQ5mVSo+vuD20zzPwPCYA=; b=xwd0Yaq0zaQKig9Hvr2VzbJxNMN0jUPE4dAFHuGd6TeHIhAgSHD4Nh+6iFDjK2MtpD 4ykhgj7bYUiNKEWveiD+KN/JBXdiONmsubhfj31Dyds5Yor07Cu21Uo0Aqj/k+go/QJR pxylLbqlafHpiUj7XE9q9gjr2JR3t6jq7Ol9EPU2TIVm7/OcLnBPTs1kHyZAMsY8GJuP KH+/IgIZBR/D+EU6MlhFdh13AcXL8TubhXLY3tpjuxRwM78AMiXlNCIWQEie9z288oP/ g5QiNpRjp4uxLS4iekLptDlWLq5rRji8ar1lfmlYqfmmRX/6avli06eosmGQdjGQ7ukb UBPw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=claudius.heine.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 k25si2654817edd.1.2019.01.29.00.24.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 00:24:39 -0800 (PST) Received-SPF: pass (google.com: domain of claudius.heine.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 claudius.heine.ext@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id x0T8OcKv015966 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Jan 2019 09:24:38 +0100 Received: from [139.25.69.181] (linux-ses-ext02.ppmd.siemens.net [139.25.69.181]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x0T8OcDq007548; Tue, 29 Jan 2019 09:24:38 +0100 Subject: Re: [PATCH 2/2] integrate ubifs image type From: Claudius Heine To: Henning Schild Cc: isar-users@googlegroups.com, Claudius Heine References: <20190128122821.10002-1-claudius.heine.ext@siemens.com> <20190128122821.10002-3-claudius.heine.ext@siemens.com> <20190128140344.7bc5f072@md1za8fc.ad001.siemens.net> <20190128182237.04ab656b@md1za8fc.ad001.siemens.net> <5fab2f59-9f15-713f-f2c8-15886800a3dc@siemens.com> Message-ID: <2c60f6d1-5531-c05b-b0bd-677aad52e10a@siemens.com> Date: Tue, 29 Jan 2019 09:24:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <5fab2f59-9f15-713f-f2c8-15886800a3dc@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: zsk0b3H+as5X On 29/01/2019 09.16, [ext] Claudius Heine wrote: >>>>> +do_ubifs_image[stamp-extra-info] = "${DISTRO}-${MACHINE}" >>>>> + >>>>> +# Generate ubifs filesystem image >>>>> +do_ubifs_image() { >>>>> +    rm -f ${DEPLOY_DIR_IMAGE}/${UBIFS_IMAGE_FILE} >>>>> + >>>>> +    buildchroot_do_mounts >>>>> + >>>>> +    sudo flock ${MOUNT_LOCKFILE} -c ' \ >>>>> +        mkdir -p ${BUILDROOT_DEPLOY} ${BUILDROOT_ROOTFS} >>>>> +        mount --bind ${DEPLOY_DIR_IMAGE} ${BUILDROOT_DEPLOY} >>>>> +        mount --bind ${IMAGE_ROOTFS} ${BUILDROOT_ROOTFS} >>>>> +    ' >>>> >>>> I think this mounting should also be required by a proper ext4 >>>> class. On the other hand the wic one moves the image into the final >>>> deploy folder. >>>> Not sure what is best but maybe a good idea to go for "always move" >>>> or "always mount". >>> >>> Hmm.. In OE this task would not to touch the deploy directory and >>> *copy* all artifacts in a dedicated task AFAIK. But OE has a >>> completely different image creation pipeline and infrastructure than >>> isar, so who knows how things should be done here. >> >> We currently generate and deploy in one task. The fun thing is that we >> need multiple commands and can probably end up in weird states if we >> get interrupted or fail. >> >> Changing that general pattern is a discussion of its own, since it >> would change the API. >> >> Staying in the current API i think the mount and generate directly into >> deploy ... no more chmod/chown mv ... whatever. Would be the cleanest >> way. We already have a reliable umount mechanism to clean up if things >> go wrong. >> >> If you agree: Please include that deploydir/rootfs mount into the common >> mounts and update your imager. I will do the same for wic and maybe >> ext4. > > Ok. Will do that. Hmmm... You mean mounts that are done by `buildchroot_do_mounts`? Extending that function would cause deploydir and rootfs to be mounted for every recipe. `rootfs` doesn't make sense for normal recipes and mounting `deploydir` into every recipes workspace sound bad as well... Maybe we would need a image specific mount function and then switch every image type to this. But I guess that would be a feature on its own. Claudius -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de