From patchwork Wed Jul 10 08:16:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 18301 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-fa0-f69.google.com (mail-fa0-f69.google.com [209.85.161.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5C0B625AC6 for ; Wed, 10 Jul 2013 08:18:18 +0000 (UTC) Received: by mail-fa0-f69.google.com with SMTP id a11sf6614076fad.4 for ; Wed, 10 Jul 2013 01:18:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=fISjM8zcMtgynptcw2nB52urVtvZ951pcKz1jeeFs+I=; b=XHuLyJMF+j6rtcbF5PaQ0zDhyHvYcFa1KfDyspMLp0i5PbRWm17pL8ClFozqSK1Cn7 NIizv3HV9g/3B2NXpMrSZfa22Eb3TvwJEi7SjZX5q77xpM9r+nUGQd0pL/H9qpMINXIb 71Qa76PCGxfNJNRwDS6UYvecNrlWh1VZ1Z2EMT/ZmVOwSPJJROucIzTxD0GGJ3ll291s vrBoZvAz+r6iCxtCa3XN9ak/+60sUjJi6ou/PW397AtczmHxupZ5tXvw1EGWfYuZSEH3 UZtXdf2bx6+PSUVU2znY5ChFATQZ26OlRZj00eZUhbIPHCp+NlG3a2OvLSWMQXJOjJe0 PLcA== X-Received: by 10.180.36.211 with SMTP id s19mr22367208wij.1.1373444297064; Wed, 10 Jul 2013 01:18:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.185.211 with SMTP id fe19ls1525730wic.49.gmail; Wed, 10 Jul 2013 01:18:16 -0700 (PDT) X-Received: by 10.180.20.228 with SMTP id q4mr34278014wie.60.1373444296570; Wed, 10 Jul 2013 01:18:16 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id q4si9813812wjq.114.2013.07.10.01.18.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Jul 2013 01:18:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id cz10so5334095veb.8 for ; Wed, 10 Jul 2013 01:18:15 -0700 (PDT) X-Received: by 10.58.128.71 with SMTP id nm7mr2732876veb.51.1373444295169; Wed, 10 Jul 2013 01:18:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.149.77 with SMTP id s13csp11971vcv; Wed, 10 Jul 2013 01:18:14 -0700 (PDT) X-Received: by 10.194.240.201 with SMTP id wc9mr17413959wjc.1.1373444294290; Wed, 10 Jul 2013 01:18:14 -0700 (PDT) Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by mx.google.com with ESMTPS id fu8si16161348wib.0.2013.07.10.01.18.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Jul 2013 01:18:14 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.174 is neither permitted nor denied by best guess record for domain of glikely@secretlab.ca) client-ip=74.125.82.174; Received: by mail-we0-f174.google.com with SMTP id q58so5598475wes.19 for ; Wed, 10 Jul 2013 01:18:13 -0700 (PDT) X-Received: by 10.180.38.37 with SMTP id d5mr34234782wik.37.1373444293828; Wed, 10 Jul 2013 01:18:13 -0700 (PDT) Received: from localhost ([193.120.41.118]) by mx.google.com with ESMTPSA id o10sm34284781wiz.5.2013.07.10.01.17.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Jul 2013 01:18:09 -0700 (PDT) Sender: Grant Likely Received: by localhost (Postfix, from userid 1000) id 754223E0EE8; Wed, 10 Jul 2013 09:16:26 +0100 (BST) From: Grant Likely To: Cc: patches@linaro.org, Grant Likely , Peter Maydell , qemu-devel@nongnu.org Subject: [PATCH v2] Make -kernel flag optional on ARM. Date: Wed, 10 Jul 2013 09:16:23 +0100 Message-Id: <1373444183-11557-1-git-send-email-grant.likely@linaro.org> X-Mailer: git-send-email 1.8.1.2 X-Gm-Message-State: ALoCoQka/4KFdvtui+ZK4yvGWnjnRstbACtBZSqKQ7R/R74ReFFPVOFuYoNT+DgQI4NM6kO4aU8s X-Original-Sender: grant.likely@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Sometimes we want to boot the system via firmware instead of loading a kernel into ram with the -kernel parameter. This patch makes the -kernel parameter optional so that a bios image provided by the -pflash flag will be executed. For example: qemu-system-arm -M vexpress-a15 -pflash Note: Currently the file must be at least the size of the emulated flash device (ie 64M for VExpress) otherwise QEMU will silently not use the data. This will be fixed in a separate patch v2: just return if the kernel filename isn't provided Signed-off-by: Grant Likely Cc: Peter Maydell Cc: qemu-devel@nongnu.org --- hw/arm/boot.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 7c0090f..e702fd7 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -361,11 +361,8 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) int big_endian; QemuOpts *machine_opts; - /* Load the kernel. */ - if (!info->kernel_filename) { - fprintf(stderr, "Kernel image must be specified\n"); - exit(1); - } + if (!info->kernel_filename) + return; machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0); if (machine_opts) {