Skip to contentSkip to conversation

A kernel recipe fix for meta-skeleton layer

PATCH Superseded [email protected] 4 participants 9 messages Apr 11, 2014 – Apr 18, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 meta-skeleton: linux-yocto-custom.bb: use machine overrides

In reply to [email protected]

From: Nitin A Kamble <[email protected]>

Use machine overrides for variables for this skeleton recipe so that people following skeleton do it right at the beginning.

The machine overrides for the variables reduces pollution of name space and avoid unintentional influences on other layers.

---
 meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +4 -4
index c329106..76457ca 100644
@@ -46,10 +46,10 @@ require recipes-kernel/linux/linux-yocto.inc
 
 # Override SRC_URI in a bbappend file to point at a different source
 # tree if you do not want to build from Linus' tree.
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
+SRC_URI_machine = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
 
-LINUX_VERSION ?= "3.4"
-LINUX_VERSION_EXTENSION ?= "-custom"
+LINUX_VERSION_machine ?= "3.4"
+LINUX_VERSION_EXTENSION_machine ?= "-custom"
 
 # Override SRCREV to point to a different commit in a bbappend file to
 # build a different release of the Linux kernel.
@@ -61,4 +61,4 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 
 # Override COMPATIBLE_MACHINE to include your machine in a bbappend
 # file. Leaving it empty here ensures an early explicit build failure.
-COMPATIBLE_MACHINE = "(^$)"
+COMPATIBLE_MACHINE_machine = "(^$)"
Signature · 1 line
1.8.1.4
#0 lore raw

cover A kernel recipe fix for meta-skeleton layer

From: Nitin A Kamble <[email protected]>

The kernel variables in kernel bbappend recipes such as LINUX_VERSION should always use machine overrides to unintentionally influencing kernel variables in other layers. Adding missing overrides to the kernel recipe in the meta-skeleton layer, so people who use it to make their own recipes, start the right way.

Thanks,
Nitin

The following changes since commit 863cc7483f5ee43189537940de8ee5c0964d24cc:

poky.conf: Post release version bump (2014-04-10 18:03:07 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib nitin/misc
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (1):
meta-skeleton: linux-yocto-custom.bb: use machine overrides

 meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.1.4
#2 lore raw

Re: [PATCH 1/1] meta-skeleton: linux-yocto-custom.bb: use machine overrides

In reply to [email protected]
Quoted 37 lines · Nitin A

From: Nitin A Kamble <[email protected]>

Use machine overrides for variables for this skeleton recipe so that people following skeleton do it right at the beginning.

The machine overrides for the variables reduces pollution of name space and avoid unintentional influences on other layers.

---
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8 ++++----

1 file changed, 4 insertions(+), 4 deletions(-)
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +0 -1
index c329106..76457ca 100644
@@ -46,10 +46,10 @@ require recipes-kernel/linux/linux-yocto.inc
 
 # Override SRC_URI in a bbappend file to point at a different source
 # tree if you do not want to build from Linus' tree.
-SRC_URI = 

"git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol =git;nocheckout=1;name=machine"
+SRC_URI_machine = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol =git;nocheckout=1;name=machine"

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +2 -2
-LINUX_VERSION ?= "3.4"
-LINUX_VERSION_EXTENSION ?= "-custom"
+LINUX_VERSION_machine ?= "3.4"
+LINUX_VERSION_EXTENSION_machine ?= "-custom"

# Override SRCREV to point to a different commit in a bbappend file to

# build a different release of the Linux kernel.

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb PV = "${LINUX_VERSION}+git${SRCPV}" · line 64

Quoted 5 lines
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +1 -1
@@ -61,4 +61,4 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 
 # Override COMPATIBLE_MACHINE to include your machine in a bbappend
 # file. Leaving it empty here ensures an early explicit build failure.
-COMPATIBLE_MACHINE = "(^$)"
+COMPATIBLE_MACHINE_machine = "(^$)"

Might as well change this to:

COMPATIBLE_MACHINE_machine = "machine"

And then add a comment at the top to remind people to replace "machine" with their BSP name.

Signature · 2 lines
Darren Hart					Open Source Technology Center
[email protected]				            Intel Corporation
#3 lore raw

Re: [PATCH 1/1] meta-skeleton: linux-yocto-custom.bb: use machine overrides

In reply to [email protected]
Quoted 18 lines · On 14-04-11 01:05 PM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

Use machine overrides for variables for this skeleton recipe so that people following skeleton do it right at the beginning.

The machine overrides for the variables reduces pollution of name space and avoid unintentional influences on other layers.

---
  meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +0 -0
index c329106..76457ca 100644

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc · line 52

Quoted 10 lines
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +3 -3
@@ -46,10 +46,10 @@ require recipes-kernel/linux/linux-yocto.inc
 
  # Override SRC_URI in a bbappend file to point at a different source
  # tree if you do not want to build from Linus' tree.
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
+SRC_URI_machine = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"
 
-LINUX_VERSION ?= "3.4"
-LINUX_VERSION_EXTENSION ?= "-custom"
+LINUX_VERSION_machine ?= "3.4"
+LINUX_VERSION_EXTENSION_machine ?= "-custom"

For some reason, I thought you meant ${MACHINE} instead of _machine .. which is what I use for machine specific overrides.

But assuming this works, i have no objections.

Bruce

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb PV = "${LINUX_VERSION}+git${SRCPV}" · line 64

Quoted 10 lines
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +1 -1
  # Override SRCREV to point to a different commit in a bbappend file to
  # build a different release of the Linux kernel.
@@ -61,4 +61,4 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 
  # Override COMPATIBLE_MACHINE to include your machine in a bbappend
  # file. Leaving it empty here ensures an early explicit build failure.
-COMPATIBLE_MACHINE = "(^$)"
+COMPATIBLE_MACHINE_machine = "(^$)"

z

#4 lore raw

Re: [PATCH 1/1] meta-skeleton: linux-yocto-custom.bb: use machine overrides

Quoted 27 lines · Bruce Ashfield
Quoted 26 lines · On 14-04-11 01:05 PM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

Use machine overrides for variables for this skeleton recipe so that people following skeleton do it right at the beginning.

The machine overrides for the variables reduces pollution of name space and avoid unintentional influences on other layers.

---
  meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +0 -1
index c329106..76457ca 100644
@@ -46,10 +46,10 @@ require recipes-kernel/linux/linux-yocto.inc
 
  # Override SRC_URI in a bbappend file to point at a different source
  # tree if you do not want to build from Linus' tree.
-SRC_URI = 

"git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine" +SRC_URI_machine = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protocol=git;nocheckout=1;name=machine"

Quoted 7 lines

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc · line 52

Quoted 4 lines
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +2 -2
-LINUX_VERSION ?= "3.4"
-LINUX_VERSION_EXTENSION ?= "-custom"
+LINUX_VERSION_machine ?= "3.4"
+LINUX_VERSION_EXTENSION_machine ?= "-custom"

For some reason, I thought you meant ${MACHINE} instead of _machine .. which is what I use for machine specific overrides.

I think macros can not used as overrides.
Nitin

Quoted 16 lines

But assuming this works, i have no objections.

Bruce

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb PV = "${LINUX_VERSION}+git${SRCPV}" · line 64

Quoted 10 lines

# Override SRCREV to point to a different commit in a bbappend file to

  # build a different release of the Linux kernel.
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +1 -1
@@ -61,4 +61,4 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 
  # Override COMPATIBLE_MACHINE to include your machine in a bbappend
  # file. Leaving it empty here ensures an early explicit build failure.
-COMPATIBLE_MACHINE = "(^$)"
+COMPATIBLE_MACHINE_machine = "(^$)"

z

#5 lore raw

Re: [PATCH 1/1] meta-skeleton: linux-yocto-custom.bb: use machine overrides

Quoted 40 lines · Nitin A
Quoted 31 lines · Bruce Ashfield
Quoted 30 lines · On 14-04-11 01:05 PM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

Use machine overrides for variables for this skeleton recipe so that people following skeleton do it right at the beginning.

The machine overrides for the variables reduces pollution of name space and avoid unintentional influences on other layers.

---

  meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +0 -1
index c329106..76457ca 100644
@@ -46,10 +46,10 @@ require recipes-kernel/linux/linux-yocto.inc
 
  # Override SRC_URI in a bbappend file to point at a different source
  # tree if you do not want to build from Linus' tree.
 
-SRC_URI =

"git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protoco l=git;nocheckout=1;name=machine" +SRC_URI_machine = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protoco l=git;nocheckout=1;name=machine"

Quoted 7 lines

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc · line 52

Quoted 4 lines
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +2 -2
-LINUX_VERSION ?= "3.4"
-LINUX_VERSION_EXTENSION ?= "-custom"
+LINUX_VERSION_machine ?= "3.4"
+LINUX_VERSION_EXTENSION_machine ?= "-custom"

For some reason, I thought you meant ${MACHINE} instead of _machine .. which is what I use for machine specific overrides.

Quoted 1 line

I think macros can not used as overrides.

Variable references can be used in overrides, provided the expansion happens at the right time. However, it would not be appropriate to use ${MACHINE} here because if it were used verbatim in the recipe, it would not have the desired effect - the value of ${MACHINE} would change with whatever MACHINE was set to, and since ${MACHINE} is always in OVERRIDES it would always be applied.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#6 lore raw

Re: [PATCH 1/1] meta-skeleton: linux-yocto-custom.bb: use machine overrides

Quoted 58 lines · Paul Eggleton
Quoted 45 lines · Nitin A
Quoted 7 lines · Bruce Ashfield
Quoted 6 lines · On 14-04-11 01:05 PM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

Use machine overrides for variables for this skeleton recipe so that people following skeleton do it right at the beginning.

The machine overrides for the variables reduces pollution of name

space

Quoted 6 lines
Quoted 6 lines

and avoid unintentional influences on other layers.

---

  meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8

++++----

Quoted 10 lines

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc · line 47

Quoted 10 lines
  1 file changed, 4 insertions(+), 4 deletions(-)
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +0 -0
index c329106..76457ca 100644
@@ -46,10 +46,10 @@ require recipes-kernel/linux/linux-yocto.inc
 
  # Override SRC_URI in a bbappend file to point at a different

source

Quoted 4 lines

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc · line 53

Quoted 4 lines
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +0 -1
  # tree if you do not want to build from Linus' tree.
 
-SRC_URI =
 

"git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protoco

Quoted 2 lines
Quoted 2 lines

l=git;nocheckout=1;name=machine" +SRC_URI_machine =

"git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protoco

Quoted 9 lines

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc · line 52

Quoted 6 lines

l=git;nocheckout=1;name=machine"

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +2 -2
-LINUX_VERSION ?= "3.4"
-LINUX_VERSION_EXTENSION ?= "-custom"
+LINUX_VERSION_machine ?= "3.4"
+LINUX_VERSION_EXTENSION_machine ?= "-custom"

For some reason, I thought you meant ${MACHINE} instead of _machine .. which is what I use for machine specific overrides.

Quoted 1 line

I think macros can not used as overrides.

Variable references can be used in overrides, provided the expansion happens
at the right time. However, it would not be appropriate to use ${MACHINE} here
because if it were used verbatim in the recipe, it would not have the desired
effect - the value of ${MACHINE} would change with whatever MACHINE was set to,
and since ${MACHINE} is always in OVERRIDES it would always be applied.

Quoted 8 lines

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre

I think we should just drop the overrides. The overrides are needed with linux-yocto bbappends so we don't pollute the namespace, but here there is nothing to polute. This is the only recipe, you don't use bbappends with it. It needs some documentation, but we should just drop all the overrides in this recipe.

Signature · 2 lines
Darren Hart					Open Source Technology Center
[email protected]				            Intel Corporation
#7 lore raw

Re: [PATCH 1/1] meta-skeleton: linux-yocto-custom.bb: use machine overrides

Quoted 67 lines · Darren
Quoted 56 lines · Paul Eggleton
Quoted 53 lines · Nitin A
Quoted 7 lines · Bruce Ashfield
Quoted 6 lines · On 14-04-11 01:05 PM, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

Use machine overrides for variables for this skeleton recipe so that people following skeleton do it right at the beginning.

The machine overrides for the variables reduces pollution of name

space

Quoted 6 lines
Quoted 6 lines

and avoid unintentional influences on other layers.

---

  meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | 8

++++----

Quoted 10 lines

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc · line 47

Quoted 10 lines
  1 file changed, 4 insertions(+), 4 deletions(-)
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +0 -0
index c329106..76457ca 100644
@@ -46,10 +46,10 @@ require recipes-kernel/linux/linux-yocto.inc
 
  # Override SRC_URI in a bbappend file to point at a different

source

Quoted 3 lines

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc

Quoted 3 lines
meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +0 -1
  # tree if you do not want to build from Linus' tree.
 
-SRC_URI =

"git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protoco

Quoted 1 line
Quoted 1 line

l=git;nocheckout=1;name=machine" +SRC_URI_machine =

"git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;protoco

Quoted 9 lines

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb require recipes-kernel/linux/linux-yocto.inc · line 52

Quoted 6 lines

l=git;nocheckout=1;name=machine"

meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb +2 -2
-LINUX_VERSION ?= "3.4"
-LINUX_VERSION_EXTENSION ?= "-custom"
+LINUX_VERSION_machine ?= "3.4"
+LINUX_VERSION_EXTENSION_machine ?= "-custom"

For some reason, I thought you meant ${MACHINE} instead of _machine .. which is what I use for machine specific overrides.

Quoted 1 line

I think macros can not used as overrides.

Quoted 9 lines

Variable references can be used in overrides, provided the expansion happens
at the right time. However, it would not be appropriate to use ${MACHINE} here
because if it were used verbatim in the recipe, it would not have the desired
effect - the value of ${MACHINE} would change with whatever MACHINE was set to,
and since ${MACHINE} is always in OVERRIDES it would always be applied.

Quoted 5 lines

I think we should just drop the overrides. The overrides are needed with linux-yocto bbappends so we don't pollute the namespace, but here there is nothing to polute. This is the only recipe, you don't use bbappends with it. It needs some documentation, but we should just drop all the overrides in this recipe.

I think you're probably right with the way this recipe is intended to be used, yes.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#8 lore raw

Re: [PATCH 1/1] meta-skeleton: linux-yocto-custom.bb: use machine overrides

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines

Variable references can be used in overrides, provided the expansion happens at the right time. However, it would not be appropriate to use ${MACHINE} here because if it were used verbatim in the recipe, it would not have the desired effect - the value of ${MACHINE} would change with whatever MACHINE was set to, and since ${MACHINE} is always in OVERRIDES it would always be applied.

Quoted 9 lines
Quoted 5 lines

I think we should just drop the overrides. The overrides are needed with linux-yocto bbappends so we don't pollute the namespace, but here there is nothing to polute. This is the only recipe, you don't use bbappends with it. It needs some documentation, but we should just drop all the overrides in this recipe.

I think you're probably right with the way this recipe is intended to be used, yes.

So shall we leave this recipe unchanged? As the commit was made to avoid the unwanted recipe variable pollution across layers, which is not the case.

Nitin

Quoted 7 lines

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre