From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 28 Jun 2021 08:42:05 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lxky5-0001Sm-0y for lore@lore.pengutronix.de; Mon, 28 Jun 2021 08:42:05 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxky3-00037X-Hj for lore@pengutronix.de; Mon, 28 Jun 2021 08:42:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qI1rGOyXiMoBiu6EfJb4d+PNPtF+vdQrNrWb0MIspVE=; b=rhgPxyZpEnRMpc OvY3IyZaoG7kg0ccAmbCaNCMOuFq8/iJ8SwEZlCmZOUS6MfkEGF2tzqb2H+rQwbW7zSKokRAPpDa1 jlse/wY62W4EESjwBETxjvuQACqRl9gwOS/3InhHYqvg6INBU+GnX3l6oEkZILxLfagqNW3sVy9cD a1JKGz8xjV6xai/sqMAS9ZfOtL33TqKoje1Ng+QFqqwZFZCAdlTO1+q63lhc4f8xMBXntoNNGFpNO 6X9SEBqd76n5cCfJ66vHaQ4gTEYODYU04d9xs+Y7ltGrsHzGeaUoRdUZhQVBdowv6dpHQXjH7OvF/ zSXldl1vMdS4fXlzi8Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxkwr-0073DQ-Jz; Mon, 28 Jun 2021 06:40:49 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxkwi-0073Ac-N6 for barebox@lists.infradead.org; Mon, 28 Jun 2021 06:40:42 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxkwg-0002hq-9H; Mon, 28 Jun 2021 08:40:38 +0200 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lxkwg-0006zN-0Z; Mon, 28 Jun 2021 08:40:38 +0200 From: Ahmad Fatoum To: barebox@lists.infradead.org Cc: Bastian Krause , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Ahmad Fatoum Date: Mon, 28 Jun 2021 08:40:32 +0200 Message-Id: <20210628064036.25991-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210627_234040_971044_FA0BE5F2 X-CRM114-Status: GOOD ( 25.11 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:e::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-4.7 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 1/5] common: machine_id: support /chosen/barebox, machine-id-path override X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) VGhlIEtjb25maWcgb3B0aW9uIGFscmVhZHkgd2FybnMgdGhhdCB0aGUgY3VycmVudCBiZWhhdmlv ciBvZgptYWNoaW5lX2lkX3NldF9oYXNoYWJsZSgpIG92ZXJyaWRpbmcgcHJldmlvdXMgY2FsbHMg Y2FuIGxlYWQgdG8gdGhlCm1hY2hpbmUtaWQgY2hhbmdpbmcgb3ZlciB1cGRhdGVzLiBXZSBkb24n dCB5ZXQgaGF2ZSB0aGlzIHByb2JsZW0gaW4KcHJhY3RpY2UsIGJlY2F1c2UgdGhlIG9ubHkgdHdv IHVwc3RyZWFtIHVzZXJzIGFyZSBmb3IgYnNlYyBhbmQgb2NvdHAsCndoaWNoIGFyZSBlZnVzZSBk cml2ZXJzIGZvciBkaWZmZXJlbnQgU29Dcy4gT24gdGhlIG90aGVyIGhhbmQsIHVzZXJzCm1heSB3 YW50IHRvIGdldCB0aGUgdW5pcXVlIElEIGZyb20gYW4gRUVQUk9NIGFuZCB3aXRoIGRlZXAgcHJv YmUKc3VwcG9ydCwgdGhlIGluaXRjYWxsIG9yZGVyaW5nIHdpbGwgYmUgaW5kZXBlbmRlbnQgb2Yg dGhlIGFjdHVhbCBwcm9iZQpvcmRlci4KCldvcmsgYXJvdW5kIHRoaXMgaXNzdWUgYnkgaW50cm9k dWNpbmcgYSB3YXkgZm9yIGVhY2ggYm9hcmQgdG8gZXhwbGljaXRseQpyZWZlcmVuY2UgYSBudm1l bSBjZWxsIHRoYXQgc2hvdWxkIGJlIGhhc2hlZCB0byBwcm9kdWNlIHRoZSBtYWNoaW5lL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