From patchwork Wed Feb 19 19:10:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 321989 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 3E5332C00C7 for ; Thu, 20 Feb 2014 06:10:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 80A7593CA5; Wed, 19 Feb 2014 19:10:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lX5qeXXVHctb; Wed, 19 Feb 2014 19:10:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2600693C8A; Wed, 19 Feb 2014 19:10:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C77CB1CE9C1 for ; Wed, 19 Feb 2014 19:10:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C18FD8BCD2 for ; Wed, 19 Feb 2014 19:10:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FrghkWcX6Afw for ; Wed, 19 Feb 2014 19:10:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by whitealder.osuosl.org (Postfix) with ESMTP id 9ABBA8BF52 for ; Wed, 19 Feb 2014 19:10:27 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 26F148A0; Wed, 19 Feb 2014 20:10:26 +0100 (CET) Received: from localhost (AToulouse-651-1-98-40.w109-222.abo.wanadoo.fr [109.222.65.40]) by mail.free-electrons.com (Postfix) with ESMTPSA id D4CDD7BB; Wed, 19 Feb 2014 20:10:25 +0100 (CET) From: Thomas Petazzoni To: Buildroot List Date: Wed, 19 Feb 2014 20:10:20 +0100 Message-Id: <1392837022-15771-4-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392837022-15771-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1392837022-15771-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCH v3 3/5] gummiboot: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Thomas Petazzoni Signed-off-by: Christophe Vu-Brugier --- boot/Config.in | 1 + boot/gummiboot/Config.in | 28 ++++++++++++++++++++++++++++ boot/gummiboot/buildroot.conf | 4 ++++ boot/gummiboot/gummiboot.mk | 42 ++++++++++++++++++++++++++++++++++++++++++ boot/gummiboot/loader.conf | 2 ++ 5 files changed, 77 insertions(+) create mode 100644 boot/gummiboot/Config.in create mode 100644 boot/gummiboot/buildroot.conf create mode 100644 boot/gummiboot/gummiboot.mk create mode 100644 boot/gummiboot/loader.conf diff --git a/boot/Config.in b/boot/Config.in index c410d12..54760b9 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -7,6 +7,7 @@ source "boot/barebox/Config.in" source "boot/boot-wrapper-aarch64/Config.in" source "boot/grub/Config.in" source "boot/grub2/Config.in" +source "boot/gummiboot/Config.in" source "boot/lpc32xxcdl/Config.in" source "boot/mxs-bootlets/Config.in" source "boot/syslinux/Config.in" diff --git a/boot/gummiboot/Config.in b/boot/gummiboot/Config.in new file mode 100644 index 0000000..8d70680 --- /dev/null +++ b/boot/gummiboot/Config.in @@ -0,0 +1,28 @@ +config BR2_TARGET_GUMMIBOOT + bool "gummiboot" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_GNU_EFI + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + depends on BR2_LARGEFILE # util-linux + depends on BR2_USE_WCHAR # util-linux + help + gummiboot is a simple UEFI boot manager which executes + configured EFI images. The default entry is selected by a + configured pattern (glob) or an on-screen menu. + + gummiboot operates on the EFI System Partition (ESP) + only. Configuration file fragments, kernels, initrds, other + EFI images need to reside on the ESP. Linux kernels need to + be built with CONFIG_EFI_STUB to be able to be directly + executed as an EFI image. + + See the Grub2 help text for details on preparing an EFI + capable disk image using Gummiboot: the instructions are + exactly the same, except that the Gummiboot configuration + files will be located in /loader/ inside the EFI partition. + + http://freedesktop.org/wiki/Software/gummiboot/ + +comment "gummiboot needs a toolchain w/ largefile, wchar" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) diff --git a/boot/gummiboot/buildroot.conf b/boot/gummiboot/buildroot.conf new file mode 100644 index 0000000..8a6f02e --- /dev/null +++ b/boot/gummiboot/buildroot.conf @@ -0,0 +1,4 @@ +title Buildroot +version 1 +linux /bzImage +options console=ttyS0 root=/dev/sda2 diff --git a/boot/gummiboot/gummiboot.mk b/boot/gummiboot/gummiboot.mk new file mode 100644 index 0000000..165a1b0 --- /dev/null +++ b/boot/gummiboot/gummiboot.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# gummiboot +# +################################################################################ + +GUMMIBOOT_SITE = git://anongit.freedesktop.org/gummiboot +GUMMIBOOT_VERSION = 43 +GUMMIBOOT_LICENSE = LGPLv2.1+ +GUMMIBOOT_LICENSE_FILES = LICENSE + +# The git archive does not have the autoconf/automake stuff generated. +GUMMIBOOT_AUTORECONF = YES +GUMMIBOOT_DEPENDENCIES = gnu-efi host-pkgconf util-linux +GUMMIBOOT_INSTALL_TARGET = NO +GUMMIBOOT_INSTALL_IMAGES = YES + +ifeq ($(BR2_i386),y) +GUMMIBOOT_IMGARCH = ia32 +else ifeq ($(BR2_x86_64),y) +GUMMIBOOT_IMGARCH = x64 +endif + +GUMMIBOOT_CONF_OPT = \ + --host=$(BR2_ARCH) \ + --with-efi-libdir=$(STAGING_DIR)/usr/lib \ + --with-efi-ldsdir=$(STAGING_DIR)/usr/lib \ + --with-efi-includedir=$(STAGING_DIR)/usr/include \ + --disable-manpages + +define GUMMIBOOT_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0644 $(@D)/gummiboot$(GUMMIBOOT_IMGARCH).efi \ + $(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(GUMMIBOOT_IMGARCH).efi + echo "boot$(GUMMIBOOT_IMGARCH).efi" > \ + $(BINARIES_DIR)/efi-part/startup.nsh + $(INSTALL) -D -m 0644 boot/gummiboot/loader.conf \ + $(BINARIES_DIR)/efi-part/loader/loader.conf + $(INSTALL) -D -m 0644 boot/gummiboot/buildroot.conf \ + $(BINARIES_DIR)/efi-part/loader/entries/buildroot.conf +endef + +$(eval $(autotools-package)) diff --git a/boot/gummiboot/loader.conf b/boot/gummiboot/loader.conf new file mode 100644 index 0000000..93b77b8 --- /dev/null +++ b/boot/gummiboot/loader.conf @@ -0,0 +1,2 @@ +timeout 3 +default buildroot