From patchwork Fri Mar 2 04:20:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Mendoza-Jonas X-Patchwork-Id: 880294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zsx1Z3K3Zz9sWB for ; Fri, 2 Mar 2018 15:20:50 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="GQv5KoAX"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="YVIpPzam"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zsx1Y5nWgzF1Zh for ; Fri, 2 Mar 2018 15:20:49 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="GQv5KoAX"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="YVIpPzam"; dkim-atps=neutral X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mendozajonas.com (client-ip=66.111.4.29; helo=out5-smtp.messagingengine.com; envelope-from=sam@mendozajonas.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=mendozajonas.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="GQv5KoAX"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="YVIpPzam"; dkim-atps=neutral Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zsx1P3NLzzF1rW for ; Fri, 2 Mar 2018 15:20:41 +1100 (AEDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 61D2920E92; Thu, 1 Mar 2018 23:20:39 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 01 Mar 2018 23:20:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= mendozajonas.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=OKkCQblrtrlZ66vwY KY2pA2ic1Sq1IuNAzuY09vbbN8=; b=GQv5KoAXdaCE7Uxg4Q2d7ZVy9aoHzxfgM TaNqXYMquhis2QfR+jnoC2UW1QH2uNmCkZSsZS3Mh+SBeeax/y6eI9loSrqD5LZW taPZ075pKHOK8Byoyqv0QKG7XFfsKbG5iS9hZB38DIWoG+uokiDCzzxbSqIy6BE0 uSf5cyR1ThUmeMEN9qvq6UN9FlmHM16pUHNX/ykILD0yDtOUKSbQcxUz1a1wAfyQ TPi3buw+vZbx+UxfhypyyOtmi+cMcYDDA7lqSmNPIZNmmySuo59WnUQAWgMKppUv PeYvQNnW75rjMKsiSEQThQ4+0JAvbg26QFpzBrbdLXAPz3oo3kpxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=OKkCQblrtrlZ66vwY KY2pA2ic1Sq1IuNAzuY09vbbN8=; b=YVIpPzam7mxqlF7MdevgMmbDm941xK+rF Yl7/000bdXVA8SJdM4wSppBwY4hTTzFZTQGbF4u8vNfHSJ/prJqJPwu18GDNofu/ cYD7/At87IzMYb7zZBiRXa7s8O8/snrrvTJGTZHwBCgPYs2ZVyyxiDhVo18ulg7Z CcjMljZEU0oFkIjEXS9brWx5k1bbjDQgSHd326m2UheXwGP3SRralXeYJCIuLVV0 Q7R/nXxGn69CA5/O6ltLofJMc97iWfI4w2NSmxHHwZ2KAjGrOg2bZA1lp3xO29zI IfFDSM3nkTqXCmhK99CR1+ZGB8lkaXTqB4j/Uo/lKsB6cQ5iM0jFQ== X-ME-Sender: Received: from v4.ibm.com (unknown [120.18.171.40]) by mail.messagingengine.com (Postfix) with ESMTPA id 53D4124108; Thu, 1 Mar 2018 23:20:36 -0500 (EST) From: Samuel Mendoza-Jonas To: petitboot@lists.ozlabs.org Subject: [PATCH] utils/hooks: Set stdout-path property Date: Fri, 2 Mar 2018 15:20:29 +1100 Message-Id: <20180302042029.24340-1-sam@mendozajonas.com> X-Mailer: git-send-email 2.16.2 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Mendoza-Jonas MIME-Version: 1.0 Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" The linux,stdout-path property was deprecated in favour of stdout-path in the v3.14 kernel. 'stdout-path' takes priority in newer kernels but older kernels won't be aware of it, so set both at boot time. Signed-off-by: Samuel Mendoza-Jonas --- utils/hooks/30-dtb-updates.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/hooks/30-dtb-updates.c b/utils/hooks/30-dtb-updates.c index f7de976..e3f0394 100644 --- a/utils/hooks/30-dtb-updates.c +++ b/utils/hooks/30-dtb-updates.c @@ -554,12 +554,12 @@ static int set_stdout(struct offb_ctx *ctx) return -1; } - prop = fdt_getprop(ctx->dtb, node, "linux,stdout-path", &prop_len); - if (!prop) { - fprintf(stderr, "Failed to find linux,stdout-path\n"); - return -1; - } - + /* + * linux,stdout-path is deprecated after v3.14 but we don't know + * what the next kernel will be, so set both. + */ + fdt_set_check(ctx->dtb, node, fdt_setprop_string, "stdout-path", + stdout_path); fdt_set_check(ctx->dtb, node, fdt_setprop_string, "linux,stdout-path", stdout_path);