From patchwork Tue Sep 26 16:02:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 818725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y1m1F5vbRz9tX4 for ; Wed, 27 Sep 2017 02:02:09 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3y1m1F3cpzzDsPK for ; Wed, 27 Sep 2017 02:02:09 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=redhat.com (client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lvivier@redhat.com; receiver=) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3y1m196ZSRzDsPC for ; Wed, 27 Sep 2017 02:02:05 +1000 (AEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 236534ACA4 for ; Tue, 26 Sep 2017 16:02:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 236534ACA4 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lvivier@redhat.com Received: from thinkpad.redhat.com (ovpn-116-104.ams2.redhat.com [10.36.116.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BA656F7EF; Tue, 26 Sep 2017 16:02:01 +0000 (UTC) From: Laurent Vivier To: slof@lists.ozlabs.org Date: Tue, 26 Sep 2017 18:02:01 +0200 Message-Id: <20170926160201.28817-1-lvivier@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 26 Sep 2017 16:02:03 +0000 (UTC) Subject: [SLOF] [PATCH] Use input-device and output-device X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" QEMU can now set environment variables from the command line (with -prom-env). By this means, we can set the output-device and input-device variables, and SLOF can read it and set stdout and stdin accordingly. Signed-off-by: Laurent Vivier Tested-by: Nikunj A Dadhania --- board-qemu/slof/OF.fs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs index 0169c35..4e04b84 100644 --- a/board-qemu/slof/OF.fs +++ b/board-qemu/slof/OF.fs @@ -257,6 +257,20 @@ romfs-base 400000 0 ' claim CATCH IF ." claim failed!" cr 2drop THEN drop THEN THEN THEN + + s" input-device" evaluate dup IF + ." User selected input-device console: " 2dup type cr + input + ELSE + 2drop + THEN + + s" output-device" evaluate dup IF + ." User selected output-device console: " 2dup type cr + output + ELSE + 2drop + THEN ; set-default-console