All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core v1 PATCH 0/5] aarch64 changes for meta layer
@ 2015-03-13 14:55 Naresh Bhat
  2015-03-13 14:55 ` [OE-core v1 PATCH 1/5] bootimg: Add support to install Image Naresh Bhat
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Naresh Bhat @ 2015-03-13 14:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: matt.fleming

I am adding the support of aarch64 to LUV OS Distribution project.
The luv-yocto project is based on poky distribution.

https://01.org/linux-uefi-validation

While adding support I find that these are the few meta layer changes,
which I have been asked to upstream. If we merge these changes into
openembedded-core it will be more helpful to maintain the minimum set
patches at dependency projects like luv-yocto.

Changes since V0:[RFC series]
- Include all the chages suggested by Bernhard Reutner-Fischer
- Add grub recipe changes suggested by Burton Ross

Naresh Bhat (5):
  bootimg: Add support to install Image
  syslinux: Remove bootimg dependency on aarch64
  bootimg: Skip build iso image for aarch64
  grub: Update grub git recipe
  grub-efi: Add to support to install grubaa64 efi

 meta/classes/bootimg.bbclass      |   17 ++++++++++---
 meta/classes/grub-efi.bbclass     |   17 ++++++++-----
 meta/classes/syslinux.bbclass     |   10 +++++++-
 meta/recipes-bsp/grub/grub_git.bb |   48 +++++++++++++++++++++++++++++++------
 4 files changed, 75 insertions(+), 17 deletions(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [OE-core v1 PATCH 1/5] bootimg: Add support to install Image
  2015-03-13 14:55 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
@ 2015-03-13 14:55 ` Naresh Bhat
  2015-03-13 14:55 ` [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency on aarch64 Naresh Bhat
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Naresh Bhat @ 2015-03-13 14:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: matt.fleming

Add support to install kernel image for aarch64

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 meta/classes/bootimg.bbclass |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index b1c03ba..ed7b32f 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -64,10 +64,17 @@ inherit ${EFI_CLASS}
 
 populate() {
 	DEST=$1
-	install -d ${DEST}
+
+	SRC_KERNEL_IMAGE=bzImage
+	DEST_KERNEL_IMAGE=vmlinuz
+
+	if [ "${TARGET_ARCH}" = "aarch64" ]; then
+		SRC_KERNEL_IMAGE=Image
+		DEST_KERNEL_IMAGE=Image
+	fi
 
 	# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
-	install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage ${DEST}/vmlinuz
+	install -m 0644 -D ${STAGING_KERNEL_DIR}/${SRC_KERNEL_IMAGE} ${DEST}/${DEST_KERNEL_IMAGE}
 	
 	# initrd is made of concatenation of multiple filesystem images
 	if [ -n "${INITRD}" ]; then
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency on aarch64
  2015-03-13 14:55 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
  2015-03-13 14:55 ` [OE-core v1 PATCH 1/5] bootimg: Add support to install Image Naresh Bhat
@ 2015-03-13 14:55 ` Naresh Bhat
  2015-03-13 15:59   ` Richard Purdie
  2015-03-13 14:55 ` [OE-core v1 PATCH 3/5] bootimg: Skip build iso image for aarch64 Naresh Bhat
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Naresh Bhat @ 2015-03-13 14:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: matt.fleming

Remove the bootimg dependency as syslinux for aarch64. The reason to skip the syslinux package
- syslinux package contains x86 assembly code. Hence it cannot be compiled on aarch64.
- There is no BIOS on aarch64 to answer syscalls.

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 meta/classes/syslinux.bbclass |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index d6498d9..7bd8fed 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -17,7 +17,15 @@
 # ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot argument
 # ${SYSLINUX_KERNEL_ARGS} - Add additional kernel arguments
 
-do_bootimg[depends] += "${MLPREFIX}syslinux:do_populate_sysroot \
+def boot_image_depends(bb, d):
+         import re
+         deps = bb.data.getVar('TARGET_PREFIX', d, True)
+         if re.search("(x86_64|i.86).*",deps):
+                 return "${MLPREFIX}syslinux:do_populate_sysroot"
+         if re.search("aarch64",deps):
+                 return ""
+BIMGDEP = "${@boot_image_depends(bb, d)}"
+do_bootimg[depends] += "${BIMGDEP} \
                         syslinux-native:do_populate_sysroot"
 
 SYSLINUXCFG  = "${S}/syslinux.cfg"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [OE-core v1 PATCH 3/5] bootimg: Skip build iso image for aarch64
  2015-03-13 14:55 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
  2015-03-13 14:55 ` [OE-core v1 PATCH 1/5] bootimg: Add support to install Image Naresh Bhat
  2015-03-13 14:55 ` [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency on aarch64 Naresh Bhat
@ 2015-03-13 14:55 ` Naresh Bhat
  2015-03-13 16:00   ` Richard Purdie
  2015-03-13 14:55 ` [OE-core v1 PATCH 4/5] grub: Update grub git recipe Naresh Bhat
  2015-03-13 14:55 ` [OE-core v1 PATCH 5/5] grub-efi: Add to support to install grubaa64 efi Naresh Bhat
  4 siblings, 1 reply; 13+ messages in thread
From: Naresh Bhat @ 2015-03-13 14:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: matt.fleming

Build iso image required syslinux package.  We have already skip the syslinux
package.  Hence just skip the iso image build too.

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 meta/classes/bootimg.bbclass |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index ed7b32f..d8c2a59 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -265,7 +265,11 @@ python do_bootimg() {
     if d.getVar("EFI", True) == "1":
         bb.build.exec_func('build_efi_cfg', d)
     bb.build.exec_func('build_hddimg', d)
-    bb.build.exec_func('build_iso', d)
+
+    if d.getVar('TARGET_ARCH', True) == "aarch64":
+            return
+    else:
+            bb.build.exec_func('build_iso', d)
 }
 
 IMAGE_TYPEDEP_iso = "ext3"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [OE-core v1 PATCH 4/5] grub: Update grub git recipe
  2015-03-13 14:55 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
                   ` (2 preceding siblings ...)
  2015-03-13 14:55 ` [OE-core v1 PATCH 3/5] bootimg: Skip build iso image for aarch64 Naresh Bhat
@ 2015-03-13 14:55 ` Naresh Bhat
  2015-03-13 16:05   ` Richard Purdie
  2015-03-13 14:55 ` [OE-core v1 PATCH 5/5] grub-efi: Add to support to install grubaa64 efi Naresh Bhat
  4 siblings, 1 reply; 13+ messages in thread
From: Naresh Bhat @ 2015-03-13 14:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: matt.fleming

Update the grub git recipe with the following actions for native and target
- Base class extend to native
- do_configure_prepend
- do_install_append
- do_mkimage native
- do_deploy

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 meta/recipes-bsp/grub/grub_git.bb |   48 +++++++++++++++++++++++++++++++------
 1 file changed, 41 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
index 3ab675b..a5ab649 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"
@@ -31,24 +32,57 @@ 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"
 
+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"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [OE-core v1 PATCH 5/5] grub-efi: Add to support to install grubaa64 efi
  2015-03-13 14:55 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
                   ` (3 preceding siblings ...)
  2015-03-13 14:55 ` [OE-core v1 PATCH 4/5] grub: Update grub git recipe Naresh Bhat
@ 2015-03-13 14:55 ` Naresh Bhat
  4 siblings, 0 replies; 13+ messages in thread
From: Naresh Bhat @ 2015-03-13 14:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: matt.fleming

Add support to install grubaa64 efi image.  By default GRUB_IMAGE contains
the bootia32.efi image.  Depending on the architecture type the variable is
being updated to bootia64.efi or grubaa64.efi

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
---
 meta/classes/grub-efi.bbclass |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 47bd35e..cded1a0 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -31,15 +31,20 @@ efi_populate() {
 	# nested under a top level directory.
 	DEST=$1
 
-	install -d ${DEST}${EFIDIR}
-
 	GRUB_IMAGE="bootia32.efi"
-	if [ "${TARGET_ARCH}" = "x86_64" ]; then
+
+	case ${TARGET_ARCH} in
+		x86_64 )
 		GRUB_IMAGE="bootx64.efi"
-	fi
-	install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
+		;;
+		aarch64 )
+		GRUB_IMAGE="grubaa64.efi"
+		;;
+	esac
+
+	install -m 0644 -D ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
 
-	install -m 0644 ${GRUBCFG} ${DEST}${EFIDIR}
+	install -m 0644 -D ${GRUBCFG} ${DEST}${EFIDIR}
 }
 
 efi_iso_populate() {
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency on aarch64
  2015-03-13 14:55 ` [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency on aarch64 Naresh Bhat
@ 2015-03-13 15:59   ` Richard Purdie
  2015-03-13 17:03     ` Naresh Bhat
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2015-03-13 15:59 UTC (permalink / raw)
  To: Naresh Bhat; +Cc: matt.fleming, openembedded-core

On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:
> Remove the bootimg dependency as syslinux for aarch64. The reason to skip the syslinux package
> - syslinux package contains x86 assembly code. Hence it cannot be compiled on aarch64.
> - There is no BIOS on aarch64 to answer syscalls.
> 
> Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
> ---
>  meta/classes/syslinux.bbclass |   10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
> index d6498d9..7bd8fed 100644
> --- a/meta/classes/syslinux.bbclass
> +++ b/meta/classes/syslinux.bbclass
> @@ -17,7 +17,15 @@
>  # ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot argument
>  # ${SYSLINUX_KERNEL_ARGS} - Add additional kernel arguments
>  
> -do_bootimg[depends] += "${MLPREFIX}syslinux:do_populate_sysroot \
> +def boot_image_depends(bb, d):
> +         import re
> +         deps = bb.data.getVar('TARGET_PREFIX', d, True)
> +         if re.search("(x86_64|i.86).*",deps):
> +                 return "${MLPREFIX}syslinux:do_populate_sysroot"
> +         if re.search("aarch64",deps):
> +                 return ""
> +BIMGDEP = "${@boot_image_depends(bb, d)}"
> +do_bootimg[depends] += "${BIMGDEP} \
>                          syslinux-native:do_populate_sysroot"

How about something simpler like:

EXTRABOOTIMGDEPS = ""
EXTRABOOTIMGDEPS_x86 = "${MLPREFIX}syslinux:do_populate_sysroot"
EXTRABOOTIMGDEPS_x86-64 = "${MLPREFIX}syslinux:do_populate_sysroot"

?

Cheers,

Richard



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core v1 PATCH 3/5] bootimg: Skip build iso image for aarch64
  2015-03-13 14:55 ` [OE-core v1 PATCH 3/5] bootimg: Skip build iso image for aarch64 Naresh Bhat
@ 2015-03-13 16:00   ` Richard Purdie
  2015-03-13 17:17     ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2015-03-13 16:00 UTC (permalink / raw)
  To: Naresh Bhat; +Cc: matt.fleming, openembedded-core

On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:
> Build iso image required syslinux package.  We have already skip the syslinux
> package.  Hence just skip the iso image build too.
> 
> Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
> ---
>  meta/classes/bootimg.bbclass |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
> index ed7b32f..d8c2a59 100644
> --- a/meta/classes/bootimg.bbclass
> +++ b/meta/classes/bootimg.bbclass
> @@ -265,7 +265,11 @@ python do_bootimg() {
>      if d.getVar("EFI", True) == "1":
>          bb.build.exec_func('build_efi_cfg', d)
>      bb.build.exec_func('build_hddimg', d)
> -    bb.build.exec_func('build_iso', d)
> +
> +    if d.getVar('TARGET_ARCH', True) == "aarch64":
> +            return
> +    else:
> +            bb.build.exec_func('build_iso', d)

Its minor but the else: here is redundant after a return.

Cheers,

Richard





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core v1 PATCH 4/5] grub: Update grub git recipe
  2015-03-13 14:55 ` [OE-core v1 PATCH 4/5] grub: Update grub git recipe Naresh Bhat
@ 2015-03-13 16:05   ` Richard Purdie
  2015-03-16 11:59     ` Naresh Bhat
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2015-03-13 16:05 UTC (permalink / raw)
  To: Naresh Bhat; +Cc: matt.fleming, openembedded-core

On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:
> Update the grub git recipe with the following actions for native and target
> - Base class extend to native
> - do_configure_prepend
> - do_install_append
> - do_mkimage native
> - do_deploy
> 
> Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
> ---
>  meta/recipes-bsp/grub/grub_git.bb |   48 +++++++++++++++++++++++++++++++------
>  1 file changed, 41 insertions(+), 7 deletions(-)

This commit message isn't up to the job. You listed some things you
changed but didn't say why these are necessary or how this helps. Some
of the changes in here may be better split up a bit too, there seems to
be a lot going on.

> diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/grub_git.bb
> index 3ab675b..a5ab649 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

Why do we need brokensep? It appears to work at the moment?

>  PACKAGECONFIG ??= ""
>  PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
> @@ -31,24 +32,57 @@ 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"
>  
> +export ac_cv_path_HELP2MAN=""
> +

You need both an export and a CACHED_CONFIGUREVARS?

>  do_configure_prepend() {
> -    ( cd ${S}
> -      ${S}/autogen.sh )
> +      ./autogen.sh
> +}

This is probably why you now need brokensep. Why change the above?

> +
> +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"

What about the x86 case?

> +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

Why do we need to start deploying grub?

>  # 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"

Why?

> +BBCLASSEXTEND = "native"

Cheers,

Richard



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency on aarch64
  2015-03-13 15:59   ` Richard Purdie
@ 2015-03-13 17:03     ` Naresh Bhat
  0 siblings, 0 replies; 13+ messages in thread
From: Naresh Bhat @ 2015-03-13 17:03 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Matt Fleming, oe-core

[-- Attachment #1: Type: text/plain, Size: 1902 bytes --]

On 13 March 2015 at 21:29, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:
> > Remove the bootimg dependency as syslinux for aarch64. The reason to
> skip the syslinux package
> > - syslinux package contains x86 assembly code. Hence it cannot be
> compiled on aarch64.
> > - There is no BIOS on aarch64 to answer syscalls.
> >
> > Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
> > ---
> >  meta/classes/syslinux.bbclass |   10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/syslinux.bbclass
> b/meta/classes/syslinux.bbclass
> > index d6498d9..7bd8fed 100644
> > --- a/meta/classes/syslinux.bbclass
> > +++ b/meta/classes/syslinux.bbclass
> > @@ -17,7 +17,15 @@
> >  # ${SYSLINUX_SERIAL_TTY} - Set alternate console=tty... kernel boot
> argument
> >  # ${SYSLINUX_KERNEL_ARGS} - Add additional kernel arguments
> >
> > -do_bootimg[depends] += "${MLPREFIX}syslinux:do_populate_sysroot \
> > +def boot_image_depends(bb, d):
> > +         import re
> > +         deps = bb.data.getVar('TARGET_PREFIX', d, True)
> > +         if re.search("(x86_64|i.86).*",deps):
> > +                 return "${MLPREFIX}syslinux:do_populate_sysroot"
> > +         if re.search("aarch64",deps):
> > +                 return ""
> > +BIMGDEP = "${@boot_image_depends(bb, d)}"
> > +do_bootimg[depends] += "${BIMGDEP} \
> >                          syslinux-native:do_populate_sysroot"
>
> How about something simpler like:
>
> EXTRABOOTIMGDEPS = ""
> EXTRABOOTIMGDEPS_x86 = "${MLPREFIX}syslinux:do_populate_sysroot"
> EXTRABOOTIMGDEPS_x86-64 = "${MLPREFIX}syslinux:do_populate_sysroot"
>
> ?
>
Thank you very much.  Yes, it is more simple. I will test the same
implementation and make the changes in the next series.

>
> Cheers,
>
> Richard
>
>

[-- Attachment #2: Type: text/html, Size: 2756 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core v1 PATCH 3/5] bootimg: Skip build iso image for aarch64
  2015-03-13 16:00   ` Richard Purdie
@ 2015-03-13 17:17     ` Bernhard Reutner-Fischer
  2015-03-16  7:53       ` Naresh Bhat
  0 siblings, 1 reply; 13+ messages in thread
From: Bernhard Reutner-Fischer @ 2015-03-13 17:17 UTC (permalink / raw)
  To: Richard Purdie, Naresh Bhat; +Cc: matt.fleming, openembedded-core

On March 13, 2015 5:00:15 PM GMT+01:00, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
>On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:
>> Build iso image required syslinux package.  We have already skip the
>syslinux
>> package.  Hence just skip the iso image build too.
>> 
>> Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
>> ---
>>  meta/classes/bootimg.bbclass |    6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>> 
>> diff --git a/meta/classes/bootimg.bbclass
>b/meta/classes/bootimg.bbclass
>> index ed7b32f..d8c2a59 100644
>> --- a/meta/classes/bootimg.bbclass
>> +++ b/meta/classes/bootimg.bbclass
>> @@ -265,7 +265,11 @@ python do_bootimg() {
>>      if d.getVar("EFI", True) == "1":
>>          bb.build.exec_func('build_efi_cfg', d)
>>      bb.build.exec_func('build_hddimg', d)
>> -    bb.build.exec_func('build_iso', d)
>> +
>> +    if d.getVar('TARGET_ARCH', True) == "aarch64":
>> +            return
>> +    else:
>> +            bb.build.exec_func('build_iso', d)
>
>Its minor but the else: here is redundant after a return.

As previously asked, why does this only affect aarch64 and not all not COMPATIBLE_HOST ?
Shouldn't you instead set NOISO to 1 for !COMPATIBLE_HOST ?

Thanks,




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core v1 PATCH 3/5] bootimg: Skip build iso image for aarch64
  2015-03-13 17:17     ` Bernhard Reutner-Fischer
@ 2015-03-16  7:53       ` Naresh Bhat
  0 siblings, 0 replies; 13+ messages in thread
From: Naresh Bhat @ 2015-03-16  7:53 UTC (permalink / raw)
  To: Bernhard Reutner-Fischer; +Cc: Matt Fleming, oe-core

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

On 13 March 2015 at 22:47, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
wrote:

> On March 13, 2015 5:00:15 PM GMT+01:00, Richard Purdie <
> richard.purdie@linuxfoundation.org> wrote:
> >On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:
> >> Build iso image required syslinux package.  We have already skip the
> >syslinux
> >> package.  Hence just skip the iso image build too.
> >>
> >> Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
> >> ---
> >>  meta/classes/bootimg.bbclass |    6 +++++-
> >>  1 file changed, 5 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/meta/classes/bootimg.bbclass
> >b/meta/classes/bootimg.bbclass
> >> index ed7b32f..d8c2a59 100644
> >> --- a/meta/classes/bootimg.bbclass
> >> +++ b/meta/classes/bootimg.bbclass
> >> @@ -265,7 +265,11 @@ python do_bootimg() {
> >>      if d.getVar("EFI", True) == "1":
> >>          bb.build.exec_func('build_efi_cfg', d)
> >>      bb.build.exec_func('build_hddimg', d)
> >> -    bb.build.exec_func('build_iso', d)
> >> +
> >> +    if d.getVar('TARGET_ARCH', True) == "aarch64":
> >> +            return
> >> +    else:
> >> +            bb.build.exec_func('build_iso', d)
> >
> >Its minor but the else: here is redundant after a return.
>
> As previously asked, why does this only affect aarch64 and not all not
> COMPATIBLE_HOST ?
> Shouldn't you instead set NOISO to 1 for !COMPATIBLE_HOST ?
>
Thank you very much.  I will try it out and update in my next series.

>
> Thanks,
>
>
>

[-- Attachment #2: Type: text/html, Size: 2416 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core v1 PATCH 4/5] grub: Update grub git recipe
  2015-03-13 16:05   ` Richard Purdie
@ 2015-03-16 11:59     ` Naresh Bhat
  0 siblings, 0 replies; 13+ messages in thread
From: Naresh Bhat @ 2015-03-16 11:59 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Matt Fleming, oe-core

[-- Attachment #1: Type: text/plain, Size: 4865 bytes --]

Hi Richard,

Thank you very much.

On 13 March 2015 at 21:35, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:
> > Update the grub git recipe with the following actions for native and
> target
> > - Base class extend to native
> > - do_configure_prepend
> > - do_install_append
> > - do_mkimage native
> > - do_deploy
> >
> > Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
> > ---
> >  meta/recipes-bsp/grub/grub_git.bb |   48
> +++++++++++++++++++++++++++++++------
> >  1 file changed, 41 insertions(+), 7 deletions(-)
>
> This commit message isn't up to the job. You listed some things you
> changed but didn't say why these are necessary or how this helps.


My apologies, I will try to update more description.


> Some
> of the changes in here may be better split up a bit too, there seems to
> be a lot going on.
>
I will appreciate if you point me to the changes which needs to be split
up.  I will definitely try to split up in my next series.

>
> > diff --git a/meta/recipes-bsp/grub/grub_git.bb b/meta/recipes-bsp/grub/
> grub_git.bb
> > index 3ab675b..a5ab649 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
>
> Why do we need brokensep? It appears to work at the moment?
>
> >  PACKAGECONFIG ??= ""
> >  PACKAGECONFIG[grub-mount] =
> "--enable-grub-mount,--disable-grub-mount,fuse"
> > @@ -31,24 +32,57 @@ 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"
> >
> > +export ac_cv_path_HELP2MAN=""
> > +
>
> You need both an export and a CACHED_CONFIGUREVARS?
>

I am not very sure.  I will check and update. Thanks for pointing.


> >  do_configure_prepend() {
> > -    ( cd ${S}
> > -      ${S}/autogen.sh )
> > +      ./autogen.sh
> > +}
>
> This is probably why you now need brokensep. Why change the above?
>
Yes, this is the reason I need brokensep.  The recipe fails to build on our
luvOS distribution.

>
> > +
> > +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"
>
> What about the x86 case?
>
Right now the recipe builds for PC on x86 architecture. On x86 architecture
it is required to update.

>
> > +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
>
> Why do we need to start deploying grub?
>
Probably I need to split up here.  Let me check

>
> >  # 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"
>
> Why?
>
My mistake, If I understand properly the native recipe get build in first
place.  There is no need to add depends.

>
> > +BBCLASSEXTEND = "native"
>
> Cheers,
>
> Richard
>
>

[-- Attachment #2: Type: text/html, Size: 7625 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-03-16 11:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13 14:55 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
2015-03-13 14:55 ` [OE-core v1 PATCH 1/5] bootimg: Add support to install Image Naresh Bhat
2015-03-13 14:55 ` [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency on aarch64 Naresh Bhat
2015-03-13 15:59   ` Richard Purdie
2015-03-13 17:03     ` Naresh Bhat
2015-03-13 14:55 ` [OE-core v1 PATCH 3/5] bootimg: Skip build iso image for aarch64 Naresh Bhat
2015-03-13 16:00   ` Richard Purdie
2015-03-13 17:17     ` Bernhard Reutner-Fischer
2015-03-16  7:53       ` Naresh Bhat
2015-03-13 14:55 ` [OE-core v1 PATCH 4/5] grub: Update grub git recipe Naresh Bhat
2015-03-13 16:05   ` Richard Purdie
2015-03-16 11:59     ` Naresh Bhat
2015-03-13 14:55 ` [OE-core v1 PATCH 5/5] grub-efi: Add to support to install grubaa64 efi Naresh Bhat

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.