From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 305DFC433F5 for ; Thu, 10 Mar 2022 19:36:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6BFEC83AE9; Thu, 10 Mar 2022 20:36:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ly4c7Xko"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0BE9183ADE; Thu, 10 Mar 2022 20:36:27 +0100 (CET) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 04BB283AE9 for ; Thu, 10 Mar 2022 20:36:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ej1-x62a.google.com with SMTP id p15so14381728ejc.7 for ; Thu, 10 Mar 2022 11:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=jekbjZPr4wVOglQZEiw5RCrwfSv1dsNL5r09bKFmcqM=; b=ly4c7Xko3mQZAAoyp13G3R3PNGWGtQseMKxbiId882Sghh3IQTp8r1Tqh7tRzrbfC2 n0EDZIJ7YH0zPzNXqDd96mMOFyzFNVOkqGH7ZZ5wB/b6XCi4gdi7XsYGakzGPRKwGFs9 74qHppKinMUr2ibvODRTItSROPxZ4g2pP1uKD36zdDgrfNs5PI+KxSqcAzwBpvufxe/a FxQVLzPTRnHP+ghZRRYhzfDaOGpBO77FDdq4H0zXK8KCj2N+6gtqJWtV+1988PvtP5zj k+IJw5ILg5Z4X1KqxhWLwaGzR68/ncRPlhhA+CbQZi2gRbgOKbOahbvsON5nFt05RzR8 Ox4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=jekbjZPr4wVOglQZEiw5RCrwfSv1dsNL5r09bKFmcqM=; b=bWLZVBiWU3oMAPq6QxFNiAyBerIQla4zZAFVrFYj3Ta8Uff2C95EANDvf61tIUC3qq 2qvp4MIJMBdCZ9prORAX6NzW07NmoPe9v7O0rPTxzq867xx5kgM3oZ4D4n2c3DxGWCJv Op2FHcZNcZ0KR11kZm0StLkuEhE8xc5f5Z1JDcjJ878piCfHgpti/43+CdbHs28fW4z7 aj78EIEnNqQb1QHPD7XpK8feF0WBD88gjxbC5oi8Q33sfrd+bGLkD4BrnRljOzgNs5cq SdH+qJvtM9335PUDMbfe6NgBO/n9z4HsE6AtViuuL583FkAuXXrwBU+RdB+mHyINB3Lf Gang== X-Gm-Message-State: AOAM531vLRgIxH47UU83jhMh99bLUKXc+D5VXpjGy3Bp6FXt5cp2l6bD NXcA7oG7dz99dF+MpCO1J3Jb45ZW5FQ= X-Google-Smtp-Source: ABdhPJz37zr+4k2ima/5kc1kDHq51Qzlhity2OVlLOE3n+NB0OQRcRSlCrl3UzqAq9e6kLiNKr8KhQ== X-Received: by 2002:a17:906:c053:b0:6b5:fde8:af2 with SMTP id bm19-20020a170906c05300b006b5fde80af2mr5580731ejb.642.1646940980637; Thu, 10 Mar 2022 11:36:20 -0800 (PST) Received: from [192.168.0.74] ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id f3-20020a1709067f8300b006ce051bf215sm2155153ejr.192.2022.03.10.11.36.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Mar 2022 11:36:19 -0800 (PST) Message-ID: Date: Thu, 10 Mar 2022 22:30:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: Alper Nebi Yasak Subject: Re: [PATCH v2 14/25] binman: Allow mkimage to use a non-zero fake-blob size To: Simon Glass Cc: Ivan Mikhaylov , Tom Rini , Philippe Reynes , huang lin , Jeffy Chen , Kever Yang , U-Boot Mailing List References: <20220223230040.159317-1-sjg@chromium.org> <20220223230040.159317-15-sjg@chromium.org> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 06/03/2022 06:08, Simon Glass wrote: > On Thu, 3 Mar 2022 at 14:16, Alper Nebi Yasak wrote: >>> def ObtainContents(self): >>> + # Use a non-zero size for any fake files to keep mkimage happy >>> data, input_fname, uniq = self.collect_contents_to_file( >>> - self._mkimage_entries.values(), 'mkimage') >>> + self._mkimage_entries.values(), 'mkimage', 1024) >> >> I kind of want to say that mkimage-the-etype should be able to handle >> here whatever it gets from subentries (maybe by writing a single-byte >> file itself), and mkimage-the-executable should be able to handle >> zero-size files, but I'm not confident in those opinions. > > Well the entry has no problem with missing files, so that should be OK. What I meant is when the non-faked input data ends up being zero-sized. A bit contrived, but this still triggers the error: mkimage { args = ...; blob-ext { filename = "/dev/null"; /* or any other zero-size file */ }; }; which might end up happening e.g. via tee-os with TEE=/dev/null, I remember someone doing that for one of the blobs in a mail but can't find it or recall any details. > For mkimage I agree it is a strange restriction. Perhaps we should > just change it? I don't see what problem it could create. I don't know either.