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

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 for aarch64
  bootimg: Skip iso image build for aarch64
  grub: Update grub git recipe
  grub-efi: Add support to install grubaa64 efi

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

-- 
1.7.9.5



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

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

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] 7+ messages in thread

* [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency for aarch64
  2015-03-09 18:31 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
  2015-03-09 18:31 ` [OE-core v1 PATCH 1/5] bootimg: Add support to install Image Naresh Bhat
@ 2015-03-09 18:31 ` Naresh Bhat
  2015-03-09 18:31 ` [OE-core v1 PATCH 3/5] bootimg: Skip iso image build " Naresh Bhat
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Naresh Bhat @ 2015-03-09 18:31 UTC (permalink / raw)
  To: openembedded-core

Remove the bootimg dependency as syslinux for aarch64. The reasons to skip the syslinux package
- syslinux package contains x86 assembly code. Hence compilation errors on aarch64.
- There is no BIOS on aarch64 to answer syscalls.

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

diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index d6498d9..2efb764 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -17,7 +17,16 @@
 # ${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"
+         if re.search("aarch64",deps):
+                 return ""
+RDEPENDS = "${@boot_image_depends(bb, d)}"
+
+do_bootimg[depends] += "${RDEPENDS}:do_populate_sysroot \
                         syslinux-native:do_populate_sysroot"
 
 SYSLINUXCFG  = "${S}/syslinux.cfg"
-- 
1.7.9.5



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

* [OE-core v1 PATCH 3/5] bootimg: Skip iso image build for aarch64
  2015-03-09 18:31 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
  2015-03-09 18:31 ` [OE-core v1 PATCH 1/5] bootimg: Add support to install Image Naresh Bhat
  2015-03-09 18:31 ` [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency for aarch64 Naresh Bhat
@ 2015-03-09 18:31 ` Naresh Bhat
  2015-03-09 18:31 ` [OE-core v1 PATCH 4/5] grub: Update grub git recipe Naresh Bhat
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Naresh Bhat @ 2015-03-09 18:31 UTC (permalink / raw)
  To: openembedded-core

To generate bootable ISO image the x86 architecture uses syslinux package (syslinux/isolinux.bin).
We have already skip the syslinux package for aarch64.  Hence skip the iso image build for aarch64.

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] 7+ messages in thread

* [OE-core v1 PATCH 4/5] grub: Update grub git recipe
  2015-03-09 18:31 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
                   ` (2 preceding siblings ...)
  2015-03-09 18:31 ` [OE-core v1 PATCH 3/5] bootimg: Skip iso image build " Naresh Bhat
@ 2015-03-09 18:31 ` Naresh Bhat
  2015-03-09 18:31 ` [OE-core v1 PATCH 5/5] grub-efi: Add support to install grubaa64 efi Naresh Bhat
  2015-03-13 14:14 ` [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
  5 siblings, 0 replies; 7+ messages in thread
From: Naresh Bhat @ 2015-03-09 18:31 UTC (permalink / raw)
  To: openembedded-core

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] 7+ messages in thread

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

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 either 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] 7+ messages in thread

* Re: [OE-core v1 PATCH 0/5] aarch64 changes for meta layer
  2015-03-09 18:31 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
                   ` (4 preceding siblings ...)
  2015-03-09 18:31 ` [OE-core v1 PATCH 5/5] grub-efi: Add support to install grubaa64 efi Naresh Bhat
@ 2015-03-13 14:14 ` Naresh Bhat
  5 siblings, 0 replies; 7+ messages in thread
From: Naresh Bhat @ 2015-03-13 14:14 UTC (permalink / raw)
  To: oe-core

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

Hi,

Please, Ignore this series for review.  I will resend the same series with
few corrections.  My apologies for noise.

Thanks and Regards
-Naresh

On 10 March 2015 at 00:01, Naresh Bhat <naresh.bhat@linaro.org> wrote:

> 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 for aarch64
>   bootimg: Skip iso image build for aarch64
>   grub: Update grub git recipe
>   grub-efi: Add support to install grubaa64 efi
>
>  meta/classes/bootimg.bbclass      |   17 ++++++++++---
>  meta/classes/grub-efi.bbclass     |   17 ++++++++-----
>  meta/classes/syslinux.bbclass     |   11 ++++++++-
>  meta/recipes-bsp/grub/grub_git.bb |   48
> +++++++++++++++++++++++++++++++------
>  4 files changed, 76 insertions(+), 17 deletions(-)
>
> --
> 1.7.9.5
>
>

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

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

end of thread, other threads:[~2015-03-13 14:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09 18:31 [OE-core v1 PATCH 0/5] aarch64 changes for meta layer Naresh Bhat
2015-03-09 18:31 ` [OE-core v1 PATCH 1/5] bootimg: Add support to install Image Naresh Bhat
2015-03-09 18:31 ` [OE-core v1 PATCH 2/5] syslinux: Remove bootimg dependency for aarch64 Naresh Bhat
2015-03-09 18:31 ` [OE-core v1 PATCH 3/5] bootimg: Skip iso image build " Naresh Bhat
2015-03-09 18:31 ` [OE-core v1 PATCH 4/5] grub: Update grub git recipe Naresh Bhat
2015-03-09 18:31 ` [OE-core v1 PATCH 5/5] grub-efi: Add support to install grubaa64 efi Naresh Bhat
2015-03-13 14:14 ` [OE-core v1 PATCH 0/5] aarch64 changes for meta layer 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.