From patchwork Mon Jul 4 09:33:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 9212073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5848E60572 for ; Mon, 4 Jul 2016 09:35:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BEC127B16 for ; Mon, 4 Jul 2016 09:35:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DFD32861C; Mon, 4 Jul 2016 09:35:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C294F27B16 for ; Mon, 4 Jul 2016 09:35:16 +0000 (UTC) Received: from localhost ([::1]:46142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK0Hb-0008IR-QC for patchwork-qemu-devel@patchwork.kernel.org; Mon, 04 Jul 2016 05:35:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK0GL-0007fP-Eu for qemu-devel@nongnu.org; Mon, 04 Jul 2016 05:33:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK0GH-00022d-HA for qemu-devel@nongnu.org; Mon, 04 Jul 2016 05:33:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK0GH-000225-9s for qemu-devel@nongnu.org; Mon, 04 Jul 2016 05:33:53 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E507FC05B1E5 for ; Mon, 4 Jul 2016 09:33:52 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-35.ams2.redhat.com [10.36.116.35]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u649XpRB009926; Mon, 4 Jul 2016 05:33:52 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 3E3DD82097; Mon, 4 Jul 2016 11:33:51 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 4 Jul 2016 11:33:40 +0200 Message-Id: <1467624822-25974-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1467624822-25974-1-git-send-email-kraxel@redhat.com> References: <1467624822-25974-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 04 Jul 2016 09:33:52 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/4] bios: Add fast variant of SeaBIOS for use with -kernel on x86. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Richard W.M. Jones" , Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Richard W.M. Jones" This commit adds a fast variant of SeaBIOS called 'bios-fast.bin'. It's designed to be the fastest (also the smallest, but that's not the main aim) SeaBIOS that is just enough to boot a Linux kernel using the -kernel option on i686 and x86_64. This commit does not modify the -kernel option to use this. You have to specify it by doing something like this: -kernel vmlinuz -bios bios-fast.bin Signed-off-by: Richard W.M. Jones Acked-by: Stefan Hajnoczi Signed-off-by: Gerd Hoffmann --- Makefile | 3 ++- roms/Makefile | 4 +++- roms/config.seabios-fast | 27 +++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 roms/config.seabios-fast diff --git a/Makefile b/Makefile index 9d12dc6..7bfb8b4 100644 --- a/Makefile +++ b/Makefile @@ -408,7 +408,8 @@ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ bepo cz ifdef INSTALL_BLOBS -BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ +BLOBS=bios.bin bios-256k.bin bios-fast.bin \ +sgabios.bin vgabios.bin vgabios-cirrus.bin \ vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \ acpi-dsdt.aml \ ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \ diff --git a/roms/Makefile b/roms/Makefile index 7bd1252..26b0586 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -61,9 +61,11 @@ default: @echo " slof -- update slof.bin" @echo " u-boot.e500 -- update u-boot.e500" -bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k +bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k \ + build-seabios-config-seabios-fast cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin cp seabios/builds/seabios-256k/bios.bin ../pc-bios/bios-256k.bin + cp seabios/builds/seabios-fast/bios.bin ../pc-bios/bios-fast.bin seavgabios: $(patsubst %,seavgabios-%,$(vgabios_variants)) diff --git a/roms/config.seabios-fast b/roms/config.seabios-fast new file mode 100644 index 0000000..045693e --- /dev/null +++ b/roms/config.seabios-fast @@ -0,0 +1,27 @@ +# The fastest SeaBIOS that can boot Linux using -kernel. +# NB: Since we are using -kernel, we don't need SeaBIOS itself +# to do any boot drive detection, boot ordering, etc. + +# general stuff +CONFIG_QEMU=y +CONFIG_ROM_SIZE=0 +CONFIG_WRITABLE_UPPERMEMORY=y +CONFIG_RELOCATE_INIT=n + +# no input, no boot menu +CONFIG_MOUSE=n +CONFIG_KEYBOARD=n +CONFIG_BOOTMENU=n +CONFIG_BOOTSPLASH=n +CONFIG_BOOTORDER=n + +# hardware support we don't need +CONFIG_LPT=n +CONFIG_SERIAL=n +CONFIG_USB=n +CONFIG_DRIVES=n +CONFIG_TCGBIOS=n +CONFIG_VGAHOOKS=n + +# no logging +CONFIG_DEBUG_LEVEL=0