From patchwork Tue Oct 8 17:43:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 281630 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 7447B2C00CD for ; Wed, 9 Oct 2013 07:37:35 +1100 (EST) Received: from localhost ([::1]:38240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTbm1-0003cp-4L for incoming@patchwork.ozlabs.org; Tue, 08 Oct 2013 14:12:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTbe1-00053I-0c for qemu-devel@nongnu.org; Tue, 08 Oct 2013 14:04:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTbdt-0007Vy-HY for qemu-devel@nongnu.org; Tue, 08 Oct 2013 14:04:28 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43009 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTbdt-0007Uj-81 for qemu-devel@nongnu.org; Tue, 08 Oct 2013 14:04:21 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6D1EDA531D; Tue, 8 Oct 2013 19:45:02 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 8 Oct 2013 19:43:59 +0200 Message-Id: <1381254296-3203-2-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1381254296-3203-1-git-send-email-afaerber@suse.de> References: <1381254296-3203-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paul Brook Subject: [Qemu-devel] [PULL 01/58] 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 From: Peter Maydell 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 Signed-off-by: Andreas Färber --- 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");