From patchwork Tue Sep 24 00:01:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 20550 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B9CF225E03 for ; Tue, 24 Sep 2013 00:01:43 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id j7sf3114551qaq.7 for ; Mon, 23 Sep 2013 17:01:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=agVK+x7iIYK9W/QTi5tbSv+J6hri99CySRv3RHS3u6E=; b=l2QZn7r5NhY8gxSVnxAR8tEqbJyxB/AHcemlP7wHlUXCjNKA8vHs1U1PoIDD7IpJHr h3OCZ8VDm2FbFToVQOrmiJna5aMFGA888d98L62TMROuAhnRvwGPhBHLZbWZFReKultO 0o94O4OYWK0UrVuRJ53RCZt43mw0vFAxmwU7t3dzRaXVVDQ2OGuVyvkkqqfUL3pvvwvf 7uBVCp2DxOTec0vanO4FWaZ/upDBCWvNabgu4+GEHoEC5XDkzHmnEHdRDPadgMQZfP+/ LgDjlBztZCHLC5gxy48M7y/wtFWVNCqhe0FjRqEzCR83Lta0PYqTAGAD8EVwGF317icB nvkA== X-Gm-Message-State: ALoCoQlIkOGLsZTdWbc2dTNts2+bKdX3jSsYXXSLzdjvt/fHunyUg4vx/3FJxGOztIA5lXqVdhxi X-Received: by 10.224.51.68 with SMTP id c4mr2835520qag.7.1379980903457; Mon, 23 Sep 2013 17:01:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.76.100 with SMTP id j4ls1535224qew.29.gmail; Mon, 23 Sep 2013 17:01:43 -0700 (PDT) X-Received: by 10.58.12.39 with SMTP id v7mr1364739veb.47.1379980903387; Mon, 23 Sep 2013 17:01:43 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id d9si7594385vee.123.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Sep 2013 17:01:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 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.179; Received: by mail-ve0-f179.google.com with SMTP id c14so3036983vea.10 for ; Mon, 23 Sep 2013 17:01:43 -0700 (PDT) X-Received: by 10.52.0.235 with SMTP id 11mr1138952vdh.68.1379980903303; Mon, 23 Sep 2013 17:01:43 -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.174.196 with SMTP id u4csp210362vcz; Mon, 23 Sep 2013 17:01:42 -0700 (PDT) X-Received: by 10.205.22.71 with SMTP id qv7mr20068594bkb.20.1379980900253; Mon, 23 Sep 2013 17:01:40 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id a9si10393378bko.44.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Sep 2013 17:01:40 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1VOG4P-0005Xh-4N; Tue, 24 Sep 2013 01:01:37 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Grant Likely Subject: [PATCH 1/2] hw/arm/boot: Make user not specifying a kernel not an error Date: Tue, 24 Sep 2013 01:01:36 +0100 Message-Id: <1379980897-21277-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1379980897-21277-1-git-send-email-peter.maydell@linaro.org> References: <1379980897-21277-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 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: , Typically ARM boards will have some kind of flash which might contain a boot ROM; it's therefore a valid use case to provide only an image for the boot ROM and not require QEMU's internal boot loader at all. Remove the fatal error if -kernel isn't specified. Signed-off-by: Peter Maydell --- hw/arm/boot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 1e313af..583ec79 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -354,8 +354,10 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) /* Load the kernel. */ if (!info->kernel_filename) { - fprintf(stderr, "Kernel image must be specified\n"); - exit(1); + /* If no kernel specified, do nothing; we will start from address 0 + * (typically a boot ROM image) in the same way as hardware. + */ + return; } info->dtb_filename = qemu_opt_get(qemu_get_machine_opts(), "dtb");