Skip to contentSkip to conversation

in kernel manual, should pick another example for KMACHINE

DISCUSSION Robert P. J. Day 4 participants 7 messages Mar 5, 2015 – Mar 6, 2015

lore
Share & tools
lore
#0 lore raw

in section 3.2 of the kernel dev manual, there is a discussion of
KMACHINE and how it is *typically* set to the same value as MACHINE, but there are cases where that might not be true; however, the example used to demonstrate this -- emenlow and emenlow-noemgd -- doesn't seem appropriate as there is no "emenlow" machine definition file anymore in meta-intel. AFAICT, all of those non-noemgd machine definitions are gone.

in all the layers i have checked out, the only layer where i see
KMACHINE covering a number of MACHINE values is meta-xilinx (zynq-based machines). it sounds picky but, when demonstrating some concept, i think it's important that examples used actually exist in the code base in case people want to check.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 9 lines · Robert P. J. Day

in section 3.2 of the kernel dev manual, there is a discussion of
KMACHINE and how it is *typically* set to the same value as MACHINE, but there are cases where that might not be true; however, the example used to demonstrate this -- emenlow and emenlow-noemgd -- doesn't seem appropriate as there is no "emenlow" machine definition file anymore in meta-intel. AFAICT, all of those non-noemgd machine definitions are gone.

Quoted 5 lines

in all the layers i have checked out, the only layer where i see
KMACHINE covering a number of MACHINE values is meta-xilinx (zynq-based machines). it sounds picky but, when demonstrating some concept, i think it's important that examples used actually exist in the code base in case people want to check.

It comes around a bit due to the nature of different types of hardware. You will find that amongst most of the meta-* bsp layers there exists two types of MACHINE. You have the layers like meta-xilinx, meta-ti, etc which have machines for each board. And then there are the layers like meta-intel which have machines for each platform or SoC. There are a number of reasons for each way.

At least for Zynq, the kernel can (if you ignore that it has FPGA logic) be configured and built the same way for all the boards with device trees handling the differences. And as such the configuration is setup for the SoC instead of the board. The reason that you actually see KMACHINE differences in meta-xilinx is that the layer uses the linux-yocto build flow as well as providing an in layer config cache for its targeted KMACHINE's. Which I believe is rarely done in bsp layers that inherit linux-yocto for their kernels (or bbappend to linux-yocto).

You could re-word the documentation to cover this case with something like:
"This variable is typically set to the same value as the MACHINE variable however in some cases may instead refer to the underlying platform of the MACHINE."

Regards,
Nathan

Quoted 17 lines

rday

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday

========================================================================
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#2 lore raw

I like Nathan's suggestion for the text. Can someone explain to me though why emenlow is not a good example here? In the linux-yocto_3.14.bbappend file, KMACHINE_emenlow-noemgd is set equal to "emenlow". Isn't this equating emenlow-noemgd and emenlow? I am probably mis-understanding it so I could use some further explanation.

Thanks,
Scott

Quoted 78 lines

-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Nathan Rossi
Sent: Thursday, March 05, 2015 5:48 AM
To: Robert P. J. Day
Cc: Yocto discussion list
Subject: Re: [yocto] in kernel manual, should pick another example for KMACHINE

Quoted 5 lines · Robert P. J. Day

in section 3.2 of the kernel dev manual, there is a discussion of
KMACHINE and how it is *typically* set to the same value as MACHINE, but there are cases where that might not be true; however, the example used to demonstrate this -- emenlow and emenlow-noemgd -- doesn't

seem

Quoted 9 lines

appropriate as there is no "emenlow" machine definition file anymore in meta-intel. AFAICT, all of those non-noemgd machine definitions are gone.

in all the layers i have checked out, the only layer where i see
KMACHINE covering a number of MACHINE values is meta-xilinx (zynq-based machines). it sounds picky but, when demonstrating some concept, i think it's important that examples used actually exist in the code base in case people want to check.

It comes around a bit due to the nature of different types of hardware. You will find that amongst most of the meta-* bsp layers there exists two types of MACHINE. You have the layers like meta-xilinx, meta-ti, etc which have machines for each board. And then there are the layers like meta-intel which have machines for each platform or SoC. There are a number of reasons for each way.

At least for Zynq, the kernel can (if you ignore that it has FPGA logic) be configured and built the same way for all the boards with device trees handling the differences. And as such the configuration is setup for the SoC instead of the board. The reason that you actually see KMACHINE differences in meta-xilinx is that the layer uses the linux-yocto build flow as well as providing an in layer config cache for its targeted KMACHINE's. Which I believe is rarely done in bsp layers that inherit linux-yocto for their kernels (or bbappend to linux-yocto).

You could re-word the documentation to cover this case with something like:
"This variable is typically set to the same value as the MACHINE variable however in some cases may instead refer to the underlying platform of the MACHINE."

Regards,
Nathan

Quoted 6 lines

rday

--

===========================================================
=============

Quoted 6 lines

Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday

===========================================================
===========

Quoted 6 lines

==
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#3 lore raw
Quoted 2 lines · Scott M

I like Nathan's suggestion for the text. Can someone explain to me though why emenlow is not a good example here? In the linux-yocto_3.14.bbappend file, KMACHINE_emenlow-noemgd is set equal to "emenlow". Isn't this equating emenlow-noemgd and emenlow? I am probably mis-understanding it so I could use some further explanation.

The example was a good one, the issue that is being mentioned is simply that meta-intel has removed the emlow* machine definitions, so there's no code to use as a concrete addition to the docs.

Bruce

Quoted 81 lines

Thanks,
Scott

Quoted 78 lines

-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Nathan Rossi
Sent: Thursday, March 05, 2015 5:48 AM
To: Robert P. J. Day
Cc: Yocto discussion list
Subject: Re: [yocto] in kernel manual, should pick another example for KMACHINE

Quoted 5 lines · Robert P. J. Day

in section 3.2 of the kernel dev manual, there is a discussion of
KMACHINE and how it is *typically* set to the same value as MACHINE, but there are cases where that might not be true; however, the example used to demonstrate this -- emenlow and emenlow-noemgd -- doesn't

seem

Quoted 9 lines

appropriate as there is no "emenlow" machine definition file anymore in meta-intel. AFAICT, all of those non-noemgd machine definitions are gone.

in all the layers i have checked out, the only layer where i see
KMACHINE covering a number of MACHINE values is meta-xilinx (zynq-based machines). it sounds picky but, when demonstrating some concept, i think it's important that examples used actually exist in the code base in case people want to check.

It comes around a bit due to the nature of different types of hardware. You will find that amongst most of the meta-* bsp layers there exists two types of MACHINE. You have the layers like meta-xilinx, meta-ti, etc which have machines for each board. And then there are the layers like meta-intel which have machines for each platform or SoC. There are a number of reasons for each way.

At least for Zynq, the kernel can (if you ignore that it has FPGA logic) be configured and built the same way for all the boards with device trees handling the differences. And as such the configuration is setup for the SoC instead of the board. The reason that you actually see KMACHINE differences in meta-xilinx is that the layer uses the linux-yocto build flow as well as providing an in layer config cache for its targeted KMACHINE's. Which I believe is rarely done in bsp layers that inherit linux-yocto for their kernels (or bbappend to linux-yocto).

You could re-word the documentation to cover this case with something like:
"This variable is typically set to the same value as the MACHINE variable however in some cases may instead refer to the underlying platform of the MACHINE."

Regards,
Nathan

Quoted 6 lines

rday

--

===========================================================
=============

Quoted 6 lines

Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday

===========================================================
===========

Quoted 6 lines

==
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#4 lore raw
In reply to Rifenbark, Scott M
Quoted 6 lines · Scott M

I like Nathan's suggestion for the text. Can someone explain to me though why emenlow is not a good example here? In the linux-yocto_3.14.bbappend file, KMACHINE_emenlow-noemgd is set equal to "emenlow". Isn't this equating emenlow-noemgd and emenlow? I am probably mis-understanding it so I could use some further explanation.

normally, yes, but there *is* only the emenlow-noemgd machine, there
is no longer an emenlow machine. AIUI, there *used* to be both machines, both using the same KMACHINE value, and that would have been a perfect example.

personally, i think it would be more informative if you had two or
more actual machines mapping to the same KMACHINE value, but that's just me.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#5 lore raw

So I was digging in the meta-xilinx layer and down in recipes-kernel/linux/linux-zynqmp-mainline_3.19.bb there are two KMACHINE lines:

KMACHINE_ep108-zynqmp ?= "zynqmp"
KMACHINE_qemuzynqmp ?= "zynqmp"

Given these two lines, this is a good example that shows two machines mapping to the same KMACHINE value?

Scott

Quoted 37 lines

-----Original Message-----
From: Robert P. J. Day [mailto:[email protected]]
Sent: Thursday, March 05, 2015 9:15 AM
To: Rifenbark, Scott M
Cc: Nathan Rossi; Yocto discussion list
Subject: RE: [yocto] in kernel manual, should pick another example for KMACHINE

Quoted 5 lines · Scott M

I like Nathan's suggestion for the text. Can someone explain to me though why emenlow is not a good example here? In the linux-yocto_3.14.bbappend file, KMACHINE_emenlow-noemgd is set equal to "emenlow". Isn't this equating emenlow-noemgd and emenlow? I am probably mis-understanding it so I could use some further explanation.

normally, yes, but there *is* only the emenlow-noemgd machine, there is
no longer an emenlow machine. AIUI, there *used* to be both machines, both using the same KMACHINE value, and that would have been a perfect example.

personally, i think it would be more informative if you had two or more actual
machines mapping to the same KMACHINE value, but that's just me.

rday

--

===========================================================
=============
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday

===========================================================
=============

#6 lore raw

Probably worth looking over the "Using Kernel Metadata in a Recipe" section (http://www.yoctoproject.org/docs/1.8/kernel-dev/kernel.dev.html#using-kernel-metadata-in-a-recipe). There have been several small areas touched that have affected what sample code is being talked about, etc.

Quoted 66 lines

-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Rifenbark, Scott M
Sent: Thursday, March 05, 2015 9:48 AM
To: Robert P. J. Day
Cc: Yocto discussion list
Subject: Re: [yocto] in kernel manual, should pick another example for KMACHINE

So I was digging in the meta-xilinx layer and down in recipes- kernel/linux/linux-zynqmp-mainline_3.19.bb there are two KMACHINE lines:

KMACHINE_ep108-zynqmp ?= "zynqmp"
KMACHINE_qemuzynqmp ?= "zynqmp"

Given these two lines, this is a good example that shows two machines mapping to the same KMACHINE value?

Scott

Quoted 8 lines

-----Original Message-----
From: Robert P. J. Day [mailto:[email protected]]
Sent: Thursday, March 05, 2015 9:15 AM
To: Rifenbark, Scott M
Cc: Nathan Rossi; Yocto discussion list
Subject: RE: [yocto] in kernel manual, should pick another example for KMACHINE

Quoted 5 lines
Quoted 3 lines · Scott M

I like Nathan's suggestion for the text. Can someone explain to me though why emenlow is not a good example here? In the linux-yocto_3.14.bbappend file, KMACHINE_emenlow-noemgd is set

equal

Quoted 10 lines
Quoted 2 lines

to "emenlow". Isn't this equating emenlow-noemgd and emenlow? I am probably mis-understanding it so I could use some further explanation.

normally, yes, but there *is* only the emenlow-noemgd machine, there
is no longer an emenlow machine. AIUI, there *used* to be both machines, both using the same KMACHINE value, and that would have been a perfect example.

personally, i think it would be more informative if you had two or
more actual machines mapping to the same KMACHINE value, but that's just

me.

Quoted 6 lines

rday

--

==========================================================

=

Quoted 7 lines

=============
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday

==========================================================

=

Quoted 1 line

=============

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto