From patchwork Tue Mar 3 15:46:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: naresh.bhat@linaro.org X-Patchwork-Id: 45371 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CDBB221416 for ; Tue, 3 Mar 2015 15:48:18 +0000 (UTC) Received: by wghl18 with SMTP id l18sf29442601wgh.3 for ; Tue, 03 Mar 2015 07:48:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list; bh=wrD0UVzQIgerGpewmu80K4NIN7J2kaZWc1zp0aYGzSU=; b=W4LME+C7V6gq0zkNZObvMzT4Ha/VNZpPk1InONfYjWuByybgFwF3e9KvDSdtHAtXWk 9KVW9SMP1mnXYOGNIa/bCcq71dlSstBU1VdouNseqI5ncm02ii2FBgrUFADJ0zFI6z1y avKrceedvUzHrWGe/liiEQT+dE2aaYdLRRNqtCEN/2YQ/P3LrmRHGc0Rofr4I6AsuvzG 0RktVCMI5RqZMfvwhMa0cNIQkzvdWv6omR54Bf2DxskSxbUvsY96GCIfmatZYHdG3G+E xEeRO6cw0nkcFxAnbc4JU/UOHZBVA1aa2JMx232pvlg2x0ubD/oKPzHrYiHseIlFX5sS hHMw== X-Gm-Message-State: ALoCoQkwmpKcpF/ezgHLR4LNPzJO9VTe4jmfynolSe5pPCW5obHjI5lVrmOS6SlUipnYNDqZE/Tx X-Received: by 10.112.77.101 with SMTP id r5mr4776867lbw.4.1425397698062; Tue, 03 Mar 2015 07:48:18 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.228.136 with SMTP id si8ls62094lac.11.gmail; Tue, 03 Mar 2015 07:48:17 -0800 (PST) X-Received: by 10.112.64.2 with SMTP id k2mr30161873lbs.54.1425397697914; Tue, 03 Mar 2015 07:48:17 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id w10si777963lbp.44.2015.03.03.07.48.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Mar 2015 07:48:17 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbiz12 with SMTP id z12so15085782lbi.5 for ; Tue, 03 Mar 2015 07:48:17 -0800 (PST) X-Received: by 10.112.118.211 with SMTP id ko19mr29783443lbb.19.1425397697587; Tue, 03 Mar 2015 07:48:17 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp648361lbj; Tue, 3 Mar 2015 07:48:16 -0800 (PST) X-Received: by 10.70.130.108 with SMTP id od12mr56375997pdb.18.1425397695780; Tue, 03 Mar 2015 07:48:15 -0800 (PST) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id ev2si1557076pdb.74.2015.03.03.07.48.14; Tue, 03 Mar 2015 07:48:15 -0800 (PST) Received-SPF: none (google.com: openembedded-core-bounces@lists.openembedded.org does not designate permitted sender hosts) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id A8F79738AA; Tue, 3 Mar 2015 15:48:05 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-yh0-f44.google.com (mail-yh0-f44.google.com [209.85.213.44]) by mail.openembedded.org (Postfix) with ESMTP id D339D6013D for ; Tue, 3 Mar 2015 15:46:52 +0000 (UTC) Received: by yhot59 with SMTP id t59so1996265yho.5 for ; Tue, 03 Mar 2015 07:46:54 -0800 (PST) X-Received: by 10.236.198.179 with SMTP id v39mr30961416yhn.70.1425397613978; Tue, 03 Mar 2015 07:46:53 -0800 (PST) Received: from Latitude-E6430.caveonetworks.com ([111.93.218.67]) by mx.google.com with ESMTPSA id n22sm831796yho.1.2015.03.03.07.46.51 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Mar 2015 07:46:52 -0800 (PST) From: Naresh Bhat To: openembedded-core@lists.openembedded.org Date: Tue, 3 Mar 2015 21:16:24 +0530 Message-Id: <1425397584-5154-5-git-send-email-naresh.bhat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1425397584-5154-1-git-send-email-naresh.bhat@linaro.org> References: <1425397584-5154-1-git-send-email-naresh.bhat@linaro.org> Subject: [OE-core] [OE-core Yocto PATCH 4/4] grub: Update grub git recipe X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: naresh.bhat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Update the grub git recipe with the following actions for native and non-native - Base class extend to native - do_configure_prepand - do_install_append - do_mkimage native - do_deploy Signed-off-by: Naresh Bhat Reviewed-by: Graeme Gregory Reviewed-by: Matt Fleming --- meta/recipes-bsp/grub/grub_git.bb | 51 ++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb index 3ab675b..a2abe01 100644 --- a/meta/recipes-bsp/grub/grub_git.bb +++ b/meta/recipes-bsp/grub/grub_git.bb @@ -8,6 +8,7 @@ DEFAULT_PREFERENCE_arm = "1" PV = "2.00+${SRCPV}" SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e" SRC_URI = "git://git.savannah.gnu.org/grub.git \ + file://cfg \ file://grub-2.00-fpmath-sse-387-fix.patch \ file://autogen.sh-exclude-pc.patch \ file://grub-2.00-add-oe-kernel.patch \ @@ -18,7 +19,7 @@ S = "${WORKDIR}/git" COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)' -inherit autotools gettext texinfo +inherit autotools gettext texinfo deploy PACKAGECONFIG ??= "" PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" @@ -31,24 +32,62 @@ GRUBPLATFORM_arm = "uboot" GRUBPLATFORM_aarch64 = "efi" GRUBPLATFORM ??= "pc" +CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN=" EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \ --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" +B = "${S}" + +export ac_cv_path_HELP2MAN="" + do_configure_prepend() { - ( cd ${S} - ${S}/autogen.sh ) + ./autogen.sh +} + +do_install_append_class-native() { + install -d ${D}${bindir} + install -m 755 grub-mkimage ${D}${bindir} } -do_install_append () { +do_install_append_class-target() { + # Search for the grub.cfg on the local boot media by using the + # built in cfg file provided via this recipe + grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \ + -O ${GRUB_TARGET}-${GRUBPLATFORM} -o ./${GRUB_IMAGE} \ + boot linux ext2 fat serial part_msdos part_gpt \ + normal efi_gop iso9660 search efinet tftp all_video chain \ + gfxmenu jpeg gfxterm + install -d ${D}${sysconfdir}/grub.d - + install -m 0755 ${B}/${GRUB_IMAGE} ${D}${bindir} +} + +GRUB_TARGET_aarch64 = "arm64" +GRUB_IMAGE_aarch64 = "grubaa64.efi" + +do_mkimage_class-native() { + : +} + +do_deploy() { + install -d ${DEPLOYDIR} + install -m 0755 ${B}/${GRUB_IMAGE} ${DEPLOYDIR} } +do_deploy_class-native() { + : +} + +addtask deploy after do_install before do_build + # debugedit chokes on bare metal binaries INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -RDEPENDS_${PN} = "diffutils freetype" +RDEPENDS_${PN}_class-target = "diffutils freetype" FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug" INSANE_SKIP_${PN} = "arch" INSANE_SKIP_${PN}-dbg = "arch" + +DEPENDS_class-target += "grub-native" +BBCLASSEXTEND = "native"