From patchwork Wed Mar 18 11:27:09 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: 45937 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6F9642153C for ; Wed, 18 Mar 2015 11:28:20 +0000 (UTC) Received: by lbiz11 with SMTP id z11sf6794932lbi.2 for ; Wed, 18 Mar 2015 04:28:19 -0700 (PDT) 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:cc: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=EhRm1PE6sT3r2c/wgKqRRFEFSwLxNLmJUGWXwSPq89I=; b=hzOejIhGU5IqFHRpHj/9dGXwAazHK5loDOB6EGmuN1OOrMcTa+zmWdrG45TnkkCIoB 2xNTP2OMue62B40GF8cr+nRrMtYlUei6OZfkP/FeqDGcLK3pgkhcQ3pwTi5Hvr2GCxKV Gs3UA7Ywi6/0JSZf4izcVJTUCkNk6GBpxTy55EXK85f0mXbYGnGeoWiHBm7/sTgGnCDH YlFWq6rFxyHtVg3cfAQLAfajx4RjgrqguISCjWLPFL0Pjfd8SeX3TrbaCUXvid/PqeT0 NaChYpoMCLfSuX8qjdJ2EDdzy3dND+qIC/L2jMhaDa6iKRYMO1hBU4DsNfw5DaJQZn8F s3uA== X-Gm-Message-State: ALoCoQmeyMB39rK63U0EeE4g1uUdRWaNTcNvkY9RHebLL4laoCwW/kNEC/mz2lnNeQ2lhjAQXmGN X-Received: by 10.112.198.34 with SMTP id iz2mr10944216lbc.22.1426678099341; Wed, 18 Mar 2015 04:28:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.201 with SMTP id m9ls148657lah.6.gmail; Wed, 18 Mar 2015 04:28:19 -0700 (PDT) X-Received: by 10.112.63.165 with SMTP id h5mr62902247lbs.16.1426678099076; Wed, 18 Mar 2015 04:28:19 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id j8si12667514lag.163.2015.03.18.04.28.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 04:28:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by labjg1 with SMTP id jg1so33198254lab.2 for ; Wed, 18 Mar 2015 04:28:19 -0700 (PDT) X-Received: by 10.112.211.200 with SMTP id ne8mr63086564lbc.73.1426678098960; Wed, 18 Mar 2015 04:28:18 -0700 (PDT) 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 h5csp1090867lbj; Wed, 18 Mar 2015 04:28:17 -0700 (PDT) X-Received: by 10.67.7.10 with SMTP id cy10mr157856291pad.151.1426678096721; Wed, 18 Mar 2015 04:28:16 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id st4si35416335pab.159.2015.03.18.04.28.15; Wed, 18 Mar 2015 04:28:16 -0700 (PDT) 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 ED1BF73954; Wed, 18 Mar 2015 11:28:05 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by mail.openembedded.org (Postfix) with ESMTP id CBD2973979 for ; Wed, 18 Mar 2015 11:27:39 +0000 (UTC) Received: by pdbop1 with SMTP id op1so40508821pdb.2 for ; Wed, 18 Mar 2015 04:27:41 -0700 (PDT) X-Received: by 10.70.130.97 with SMTP id od1mr46875809pdb.0.1426678061384; Wed, 18 Mar 2015 04:27:41 -0700 (PDT) Received: from Latitude-E6430.domain.name ([119.82.123.224]) by mx.google.com with ESMTPSA id x1sm27111518pdr.17.2015.03.18.04.27.38 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Mar 2015 04:27:40 -0700 (PDT) From: Naresh Bhat To: openembedded-core@lists.openembedded.org Date: Wed, 18 Mar 2015 16:57:09 +0530 Message-Id: <1426678029-19516-6-git-send-email-naresh.bhat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1426678029-19516-1-git-send-email-naresh.bhat@linaro.org> References: <1426678029-19516-1-git-send-email-naresh.bhat@linaro.org> Cc: matt.fleming@intel.com Subject: [OE-core] [OE-core v2 PATCH 5/5] 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.215.44 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 target - Base class extend to native This is required because on aarch64 we need native recipe to be compiled for host architecture and generate grub-mkimage, which is executed on host machine to generate grubaa64.efi binary for target architecture. In the case of x86/x86_64 architecture it does not make any difference because host=target. The flow on aarch64 is as below grub-native compile for host (generates grub-mkimage) ==> do_install_append_class-target() generates grubaa64.efi binary by executing host executable binary grub-mkimage ==> do_deploy() deploy the grubaa64.efi Hence add the below lines +DEPENDS_class-target += "grub-native" +BBCLASSEXTEND = "native" - Add autotools-brokensep The recipe is fails to work (because B!=S) when I have add this recipe to luvOS, hence inherit autotools-brokensep instead of autotools. May be this needs to be fixed. - On x86 architecture the recipe builds only for PC, It may be required to extend this recipe. Signed-off-by: Naresh Bhat --- meta/recipes-bsp/grub/grub_git.bb | 47 +++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb index 3ab675b..1ac99f9 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-brokensep gettext texinfo deploy PACKAGECONFIG ??= "" PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse" @@ -34,21 +35,53 @@ GRUBPLATFORM ??= "pc" EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \ --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no" +export ac_cv_path_HELP2MAN="" + do_configure_prepend() { - ( cd ${S} - ${S}/autogen.sh ) + ./autogen.sh +} + +do_install_append_class-native() { + install -m 755 -D grub-mkimage ${D}${bindir} } -do_install_append () { - install -d ${D}${sysconfdir}/grub.d - +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 -m 0755 -D ${B}/${GRUB_IMAGE} ${D}${bindir} +} + +GRUB_TARGET_aarch64 = "arm64" +GRUB_IMAGE_aarch64 = "grubaa64.efi" + +do_mkimage_class-native() { + : } +do_deploy() { + install -m 0755 -D ${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"