Re: [OE-core] [PATCH 1/9] uefi.bbclass: add bbclass holding configuration for UEFI applications

2019-09-13 Thread Dmitry Eremin-Solenikov
пт, 13 сент. 2019 г. в 05:14, Ang, Chin Huat :
>
> > +image = "bootUNKNOWN.efi"
>
> It might be better to raise an error here.

Fine, I can change in v2.

>
> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org 
>  On Behalf Of 
> dbarysh...@gmail.com
> Sent: Wednesday, September 11, 2019 5:30 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Dmitry Eremin-Solenikov 
> Subject: [OE-core] [PATCH 1/9] uefi.bbclass: add bbclass holding 
> configuration for UEFI applications
>
> From: Dmitry Eremin-Solenikov 
>
> Create new bbclass defining common variables for all UEFI-related packages 
> (bootloaders, test applications, etc).
>
> Signed-off-by: Dmitry Eremin-Solenikov 
> ---
>  meta/classes/uefi.bbclass | 26 ++
>  1 file changed, 26 insertions(+)
>  create mode 100644 meta/classes/uefi.bbclass
>
> diff --git a/meta/classes/uefi.bbclass b/meta/classes/uefi.bbclass new file 
> mode 100644 index ..d3fc4b686676
> --- /dev/null
> +++ b/meta/classes/uefi.bbclass
> @@ -0,0 +1,26 @@
> +# Location of EFI files inside EFI System Partition EFIDIR ?=
> +"/EFI/BOOT"
> +
> +# Prefix where ESP is mounted inside rootfs. Set to empty if package is
> +going # to be installed to ESP directly EFI_PREFIX ?= "/boot"
> +
> +# Location inside rootfs.
> +EFI_FILES_PATH = "${EFI_PREFIX}${EFIDIR}"
> +
> +# Determine name of bootloader image
> +python __anonymous () {
> +import re
> +target = d.getVar('TARGET_ARCH')
> +if target == "x86_64":
> +image = "bootx64.efi"
> +elif re.match('i.86', target):
> +image = "bootia32.efi"
> +elif re.match('aarch64', target):
> +image = "bootaa64.efi"
> +elif re.match('arm', target):
> +image = "bootarm.efi"
> +else:
> +image = "bootUNKNOWN.efi"
> +d.setVar("EFI_BOOT_IMAGE", image)
> +}
> --
> 2.23.0
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
With best wishes
Dmitry
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/9] uefi.bbclass: add bbclass holding configuration for UEFI applications

2019-09-13 Thread Dmitry Eremin-Solenikov
пт, 13 сент. 2019 г. в 02:12, Mittal, Anuj :
>
> Hello,
>
> On Wed, 2019-09-11 at 12:29 +0300, dbarysh...@gmail.com wrote:
> > From: Dmitry Eremin-Solenikov 
> >
> > Create new bbclass defining common variables for all UEFI-related
> > packages (bootloaders, test applications, etc).
>
> Have these changes been tested using wic as well with non default
> values? There are places in there in EFI plugins where EFI/BOOT is
> hardcoded. They might have to be changed as well ...

This would be the next step. For now I wanted to consolidate code
in recipes, so that it won't be duplicated all over the repo.

-- 
With best wishes
Dmitry
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/9] uefi.bbclass: add bbclass holding configuration for UEFI applications

2019-09-12 Thread Ang, Chin Huat
> +image = "bootUNKNOWN.efi"

It might be better to raise an error here.

-Original Message-
From: openembedded-core-boun...@lists.openembedded.org 
 On Behalf Of 
dbarysh...@gmail.com
Sent: Wednesday, September 11, 2019 5:30 PM
To: openembedded-core@lists.openembedded.org
Cc: Dmitry Eremin-Solenikov 
Subject: [OE-core] [PATCH 1/9] uefi.bbclass: add bbclass holding configuration 
for UEFI applications

From: Dmitry Eremin-Solenikov 

Create new bbclass defining common variables for all UEFI-related packages 
(bootloaders, test applications, etc).

Signed-off-by: Dmitry Eremin-Solenikov 
---
 meta/classes/uefi.bbclass | 26 ++
 1 file changed, 26 insertions(+)
 create mode 100644 meta/classes/uefi.bbclass

diff --git a/meta/classes/uefi.bbclass b/meta/classes/uefi.bbclass new file 
mode 100644 index ..d3fc4b686676
--- /dev/null
+++ b/meta/classes/uefi.bbclass
@@ -0,0 +1,26 @@
+# Location of EFI files inside EFI System Partition EFIDIR ?= 
+"/EFI/BOOT"
+
+# Prefix where ESP is mounted inside rootfs. Set to empty if package is 
+going # to be installed to ESP directly EFI_PREFIX ?= "/boot"
+
+# Location inside rootfs.
+EFI_FILES_PATH = "${EFI_PREFIX}${EFIDIR}"
+
+# Determine name of bootloader image
+python __anonymous () {
+import re
+target = d.getVar('TARGET_ARCH')
+if target == "x86_64":
+image = "bootx64.efi"
+elif re.match('i.86', target):
+image = "bootia32.efi"
+elif re.match('aarch64', target):
+image = "bootaa64.efi"
+elif re.match('arm', target):
+image = "bootarm.efi"
+else:
+image = "bootUNKNOWN.efi"
+d.setVar("EFI_BOOT_IMAGE", image)
+}
--
2.23.0

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/9] uefi.bbclass: add bbclass holding configuration for UEFI applications

2019-09-12 Thread Mittal, Anuj
Hello,

On Wed, 2019-09-11 at 12:29 +0300, dbarysh...@gmail.com wrote:
> From: Dmitry Eremin-Solenikov 
> 
> Create new bbclass defining common variables for all UEFI-related
> packages (bootloaders, test applications, etc).

Have these changes been tested using wic as well with non default
values? There are places in there in EFI plugins where EFI/BOOT is
hardcoded. They might have to be changed as well ...

Thanks,

Anuj

> 
> Signed-off-by: Dmitry Eremin-Solenikov <
> dmitry_eremin-soleni...@mentor.com>
> ---
>  meta/classes/uefi.bbclass | 26 ++
>  1 file changed, 26 insertions(+)
>  create mode 100644 meta/classes/uefi.bbclass
> 
> diff --git a/meta/classes/uefi.bbclass b/meta/classes/uefi.bbclass
> new file mode 100644
> index ..d3fc4b686676
> --- /dev/null
> +++ b/meta/classes/uefi.bbclass
> @@ -0,0 +1,26 @@
> +# Location of EFI files inside EFI System Partition
> +EFIDIR ?= "/EFI/BOOT"
> +
> +# Prefix where ESP is mounted inside rootfs. Set to empty if package
> is going
> +# to be installed to ESP directly
> +EFI_PREFIX ?= "/boot"
> +
> +# Location inside rootfs.
> +EFI_FILES_PATH = "${EFI_PREFIX}${EFIDIR}"
> +
> +# Determine name of bootloader image
> +python __anonymous () {
> +import re
> +target = d.getVar('TARGET_ARCH')
> +if target == "x86_64":
> +image = "bootx64.efi"
> +elif re.match('i.86', target):
> +image = "bootia32.efi"
> +elif re.match('aarch64', target):
> +image = "bootaa64.efi"
> +elif re.match('arm', target):
> +image = "bootarm.efi"
> +else:
> +image = "bootUNKNOWN.efi"
> +d.setVar("EFI_BOOT_IMAGE", image)
> +}
> -- 
> 2.23.0
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/9] uefi.bbclass: add bbclass holding configuration for UEFI applications

2019-09-11 Thread dbaryshkov
From: Dmitry Eremin-Solenikov 

Create new bbclass defining common variables for all UEFI-related
packages (bootloaders, test applications, etc).

Signed-off-by: Dmitry Eremin-Solenikov 
---
 meta/classes/uefi.bbclass | 26 ++
 1 file changed, 26 insertions(+)
 create mode 100644 meta/classes/uefi.bbclass

diff --git a/meta/classes/uefi.bbclass b/meta/classes/uefi.bbclass
new file mode 100644
index ..d3fc4b686676
--- /dev/null
+++ b/meta/classes/uefi.bbclass
@@ -0,0 +1,26 @@
+# Location of EFI files inside EFI System Partition
+EFIDIR ?= "/EFI/BOOT"
+
+# Prefix where ESP is mounted inside rootfs. Set to empty if package is going
+# to be installed to ESP directly
+EFI_PREFIX ?= "/boot"
+
+# Location inside rootfs.
+EFI_FILES_PATH = "${EFI_PREFIX}${EFIDIR}"
+
+# Determine name of bootloader image
+python __anonymous () {
+import re
+target = d.getVar('TARGET_ARCH')
+if target == "x86_64":
+image = "bootx64.efi"
+elif re.match('i.86', target):
+image = "bootia32.efi"
+elif re.match('aarch64', target):
+image = "bootaa64.efi"
+elif re.match('arm', target):
+image = "bootarm.efi"
+else:
+image = "bootUNKNOWN.efi"
+d.setVar("EFI_BOOT_IMAGE", image)
+}
-- 
2.23.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core