From patchwork Fri Jun 1 01:16:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peter A. G. Crosthwaite" X-Patchwork-Id: 162253 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BD042B7004 for ; Fri, 1 Jun 2012 11:16:44 +1000 (EST) Received: from localhost ([::1]:53459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SaGTq-00023D-G5 for incoming@patchwork.ozlabs.org; Thu, 31 May 2012 21:16:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SaGTc-0001vT-3z for qemu-devel@nongnu.org; Thu, 31 May 2012 21:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SaGTa-0001dS-1r for qemu-devel@nongnu.org; Thu, 31 May 2012 21:16:27 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:39081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SaGTZ-0001cg-RQ for qemu-devel@nongnu.org; Thu, 31 May 2012 21:16:25 -0400 Received: by pbbro12 with SMTP id ro12so2433715pbb.4 for ; Thu, 31 May 2012 18:16:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=0OCApypOKYkPQteMpCsnzBVQ3zN4goEiyROdhM71exA=; b=RvHqUnCXQwqf7K/LN1B/1udljs0atDItHJSahU4sTGzLVo+ZRpcj1c9uKvkmK4ZZN8 AjOoT8FlcFlCAWYKLSzr00j4rBFCBh3b7XhAOfiHnchtBffZWzNKRHqqhKLNDRX+gliY 8sWziW7l3ovVIQWVZkBs950YHmtLAeqj8+G7dWM0jdS6yA33x4dSp/6Dyu/m5PvKHBKm Ikii30kSU7B5f0BXlb8qakZW7PraJwCmYRpoEHQOZTyHTdbICpuXtWhV5Yw8kNbnggg1 2JIUYccsawdXlDz+Y9lCaZDUakkCtQ4AKMfEB/npMwyfRWptdULwwZNxNvB6fvBA3udJ MpYg== Received: by 10.68.190.131 with SMTP id gq3mr5154073pbc.17.1338513383221; Thu, 31 May 2012 18:16:23 -0700 (PDT) Received: from localhost ([124.148.20.9]) by mx.google.com with ESMTPS id qn1sm881191pbc.9.2012.05.31.18.16.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 31 May 2012 18:16:22 -0700 (PDT) From: "Peter A. G. Crosthwaite" To: edgar.iglesias@gmail.com, qemu-devel@nongnu.org Date: Fri, 1 Jun 2012 11:16:11 +1000 Message-Id: X-Mailer: git-send-email 1.7.3.2 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkHtVjdeic4xawuKclbyBnEgkNItvseS3gFRNfVaI6MvJJ3x6t+zIZ3qG+gdyOImAtbtx/i X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: peter.crosthwaite@petalogix.com, peter.maydell@linaro.org, john.williams@petalogix.com Subject: [Qemu-devel] [RFC PATCH V1 1/2] arm_boot: added linux switch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Added a switch to tell the bootloader that the image is linux and should be bootstrapped as such. This is needed to boot an elf that is linux. Syntax would be: qemu-system-arm ... -kernel linux.elf -machine linux=on Signed-off-by: Peter A. G. Crosthwaite --- hw/arm_boot.c | 1 + qemu-config.c | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/arm_boot.c b/hw/arm_boot.c index 7447f5c..8e25873b 100644 --- a/hw/arm_boot.c +++ b/hw/arm_boot.c @@ -320,6 +320,7 @@ void arm_load_kernel(CPUARMState *env, struct arm_boot_info *info) machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0); if (machine_opts) { info->dtb_filename = qemu_opt_get(machine_opts, "dtb"); + is_linux = qemu_opt_get_bool(machine_opts, "linux", 0) ? 1 : 0; } else { info->dtb_filename = NULL; } diff --git a/qemu-config.c b/qemu-config.c index be84a03..0ee781c 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -582,6 +582,10 @@ static QemuOptsList qemu_machine_opts = { .name = "dtb", .type = QEMU_OPT_STRING, .help = "Linux kernel device tree file", + }, { + .name = "linux", + .type = QEMU_OPT_BOOL, + .help = "Bootstrap Linux", }, { /* End of list */ } },