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: 277326 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8D98F2C00C1 for ; Tue, 24 Sep 2013 10:02:31 +1000 (EST) Received: from localhost ([::1]:42801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOG5F-0006og-C5 for incoming@patchwork.ozlabs.org; Mon, 23 Sep 2013 20:02:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOG4n-0006io-Rv for qemu-devel@nongnu.org; Mon, 23 Sep 2013 20:02:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOG4Y-0007TT-Oi for qemu-devel@nongnu.org; Mon, 23 Sep 2013 20:02:01 -0400 Received: from 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]:44069 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOG4Y-0007R4-I3 for qemu-devel@nongnu.org; Mon, 23 Sep 2013 20:01:46 -0400 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 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-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Grant Likely , =?UTF-8?q?Andreas=20F=C3=A4rber?= , patches@linaro.org Subject: [Qemu-devel] [PATCH 1/2] hw/arm/boot: Make user not specifying a kernel not an error 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 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");