Patchwork [RFC,1/6] qemuarm.conf: provide a common qemuarm machine configuration

login
register
mail settings
Submitter Bian Naimeng
Date July 29, 2013, 4:02 a.m.
Message ID <51F5E948.4070107@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/54653/
State New
Headers show

Comments

Bian Naimeng - July 29, 2013, 4:02 a.m.
qemux86.conf: provide a common qemux86 machine configuration, 
so developer/distributor can customize their specific one.

Although, we can modify the meta/conf/machine/qemux86.conf to customize our 
configuration, but it's uncomfortable for developer/distributor maintaining
their branch.
After applying this patch, developer can tell poky using their machine
configuration by prepending their layer to BBPATH(Of course,
the bblayers.conf should be adapted to it).

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
---
 meta/conf/machine/include/qemux86.inc |   24 ++++++++++++++++++++++++
 meta/conf/machine/qemux86.conf        |   25 ++-----------------------
 2 files changed, 26 insertions(+), 23 deletions(-)
 create mode 100644 meta/conf/machine/include/qemux86.inc
Phil Blundell - July 29, 2013, 3:36 p.m.
On Mon, 2013-07-29 at 12:02 +0800, Bian Naimeng wrote:
> qemux86.conf: provide a common qemux86 machine configuration, 
> so developer/distributor can customize their specific one.
> 
> Although, we can modify the meta/conf/machine/qemux86.conf to customize our 
> configuration, but it's uncomfortable for developer/distributor maintaining
> their branch.
> After applying this patch, developer can tell poky using their machine
> configuration by prepending their layer to BBPATH(Of course,
> the bblayers.conf should be adapted to it).

I don't really understand the purpose of this patch.  Surely there is
nothing to stop you from shipping an overlay qemux86.conf in some other
layer today, right?  What exactly is the advantage of this extra
indirection through an .inc file?

Also, as a side note, your patches 1/6, 2/6 and 6/6 all said
"qemuarm.conf" in the subject lines but only the last of them actually
contained changes to qemuarm.conf.

Also also, the patches in this form are quite hard to follow.  Did you
use "git format-patch -M" when creating them?

p.
Bian Naimeng - July 30, 2013, 1:51 a.m.
said the following on 2013-7-29 23:36:, Phil Blundell wrote:
> On Mon, 2013-07-29 at 12:02 +0800, Bian Naimeng wrote:
>> qemux86.conf: provide a common qemux86 machine configuration, 
>> so developer/distributor can customize their specific one.
>>
>> Although, we can modify the meta/conf/machine/qemux86.conf to customize our 
>> configuration, but it's uncomfortable for developer/distributor maintaining
>> their branch.
>> After applying this patch, developer can tell poky using their machine
>> configuration by prepending their layer to BBPATH(Of course,
>> the bblayers.conf should be adapted to it).
> 
> I don't really understand the purpose of this patch.  Surely there is
> nothing to stop you from shipping an overlay qemux86.conf in some other
> layer today, right?  What exactly is the advantage of this extra
> indirection through an .inc file?
> 

What my purpose is that make it easy to implement the below case.
 1. I want inherit all the configuration item of qemux86.conf.
 2. I want add some new items to my qemux86.conf.
 3. If there're changes to qemux86.conf, i want merge them to my qemux86.conf

Yes, we can implement this case today.
 1. Copy the meta/conf/machine/qemux86.conf to my layer.
 2. Add new items to my qemux86.conf
 3. Rewrite my qemux86.conf to merge community changes.

However, if applying these patches, it becomes easy.
 1. add "require conf/machine/include/qemux86.inc" to my qemux86.conf
 2. add new items to my qemux86.conf
 3. modify qemux86.inc to update qemux86 configration at community, 
    so all community changes will be merged to my qemux86.conf automatically
    when merging the mainline.

> Also, as a side note, your patches 1/6, 2/6 and 6/6 all said
> "qemuarm.conf" in the subject lines but only the last of them actually
> contained changes to qemuarm.conf.

Sorry for my mistake. The correct one is following.
1/6: qemux86.conf.
2/6: qemux86-64.conf

> 
> Also also, the patches in this form are quite hard to follow.  Did you
> use "git format-patch -M" when creating them?

Yes, I used "git format-patch -M" to create them.
I will check them by linux/scripts/checkpatch.pl next time.

Thanks
 bian

> 
> p.
> 
>
Martin Jansa - July 30, 2013, 8:15 a.m.
On Tue, Jul 30, 2013 at 09:51:54AM +0800, Bian Naimeng wrote:
> 
> said the following on 2013-7-29 23:36:, Phil Blundell wrote:
> > On Mon, 2013-07-29 at 12:02 +0800, Bian Naimeng wrote:
> >> qemux86.conf: provide a common qemux86 machine configuration, 
> >> so developer/distributor can customize their specific one.
> >>
> >> Although, we can modify the meta/conf/machine/qemux86.conf to customize our 
> >> configuration, but it's uncomfortable for developer/distributor maintaining
> >> their branch.
> >> After applying this patch, developer can tell poky using their machine
> >> configuration by prepending their layer to BBPATH(Of course,
> >> the bblayers.conf should be adapted to it).
> > 
> > I don't really understand the purpose of this patch.  Surely there is
> > nothing to stop you from shipping an overlay qemux86.conf in some other
> > layer today, right?  What exactly is the advantage of this extra
> > indirection through an .inc file?
> > 
> 
> What my purpose is that make it easy to implement the below case.
>  1. I want inherit all the configuration item of qemux86.conf.
>  2. I want add some new items to my qemux86.conf.
>  3. If there're changes to qemux86.conf, i want merge them to my qemux86.conf
> 
> Yes, we can implement this case today.
>  1. Copy the meta/conf/machine/qemux86.conf to my layer.
>  2. Add new items to my qemux86.conf
>  3. Rewrite my qemux86.conf to merge community changes.
> 
> However, if applying these patches, it becomes easy.
>  1. add "require conf/machine/include/qemux86.inc" to my qemux86.conf
>  2. add new items to my qemux86.conf
>  3. modify qemux86.inc to update qemux86 configration at community, 
>     so all community changes will be merged to my qemux86.conf automatically
>     when merging the mainline.

Without patches
1. add require ${COREBASE}/meta/conf/machine/qemux86.conf at the
beginning of your qemux86.conf copy
2. add new items

> 
> > Also, as a side note, your patches 1/6, 2/6 and 6/6 all said
> > "qemuarm.conf" in the subject lines but only the last of them actually
> > contained changes to qemuarm.conf.
> 
> Sorry for my mistake. The correct one is following.
> 1/6: qemux86.conf.
> 2/6: qemux86-64.conf
> 
> > 
> > Also also, the patches in this form are quite hard to follow.  Did you
> > use "git format-patch -M" when creating them?
> 
> Yes, I used "git format-patch -M" to create them.
> I will check them by linux/scripts/checkpatch.pl next time.
> 
> Thanks
>  bian
> 
> > 
> > p.
> > 
> > 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Bian Naimeng - July 30, 2013, 8:55 a.m.
said the following on 2013-7-30 16:15:, Martin Jansa wrote:
> On Tue, Jul 30, 2013 at 09:51:54AM +0800, Bian Naimeng wrote:
>>
>> said the following on 2013-7-29 23:36:, Phil Blundell wrote:
>>> On Mon, 2013-07-29 at 12:02 +0800, Bian Naimeng wrote:
>>>> qemux86.conf: provide a common qemux86 machine configuration, 
>>>> so developer/distributor can customize their specific one.
>>>>
>>>> Although, we can modify the meta/conf/machine/qemux86.conf to customize our 
>>>> configuration, but it's uncomfortable for developer/distributor maintaining
>>>> their branch.
>>>> After applying this patch, developer can tell poky using their machine
>>>> configuration by prepending their layer to BBPATH(Of course,
>>>> the bblayers.conf should be adapted to it).
>>>
>>> I don't really understand the purpose of this patch.  Surely there is
>>> nothing to stop you from shipping an overlay qemux86.conf in some other
>>> layer today, right?  What exactly is the advantage of this extra
>>> indirection through an .inc file?
>>>
>>
>> What my purpose is that make it easy to implement the below case.
>>  1. I want inherit all the configuration item of qemux86.conf.
>>  2. I want add some new items to my qemux86.conf.
>>  3. If there're changes to qemux86.conf, i want merge them to my qemux86.conf
>>
>> Yes, we can implement this case today.
>>  1. Copy the meta/conf/machine/qemux86.conf to my layer.
>>  2. Add new items to my qemux86.conf
>>  3. Rewrite my qemux86.conf to merge community changes.
>>
>> However, if applying these patches, it becomes easy.
>>  1. add "require conf/machine/include/qemux86.inc" to my qemux86.conf
>>  2. add new items to my qemux86.conf
>>  3. modify qemux86.inc to update qemux86 configration at community, 
>>     so all community changes will be merged to my qemux86.conf automatically
>>     when merging the mainline.
> 
> Without patches
> 1. add require ${COREBASE}/meta/conf/machine/qemux86.conf at the
> beginning of your qemux86.conf copy
> 2. add new items
> 

You are right. ^_^

Thanks
 Bian

>>
>>> Also, as a side note, your patches 1/6, 2/6 and 6/6 all said
>>> "qemuarm.conf" in the subject lines but only the last of them actually
>>> contained changes to qemuarm.conf.
>>
>> Sorry for my mistake. The correct one is following.
>> 1/6: qemux86.conf.
>> 2/6: qemux86-64.conf
>>
>>>
>>> Also also, the patches in this form are quite hard to follow.  Did you
>>> use "git format-patch -M" when creating them?
>>
>> Yes, I used "git format-patch -M" to create them.
>> I will check them by linux/scripts/checkpatch.pl next time.
>>
>> Thanks
>>  bian
>>
>>>
>>> p.
>>>
>>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/conf/machine/include/qemux86.inc b/meta/conf/machine/include/qemux86.inc
new file mode 100644
index 0000000..a5ef314
--- /dev/null
+++ b/meta/conf/machine/include/qemux86.inc
@@ -0,0 +1,24 @@ 
+#@DESCRIPTION: Common x86 machine configuration.
+
+PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
+PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
+PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
+PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/tune-i586.inc
+
+KERNEL_IMAGETYPE = "bzImage"
+
+SERIAL_CONSOLE = "115200 ttyS0"
+
+XSERVER = "xserver-xorg \
+           mesa-driver-swrast \
+           xf86-input-vmmouse \
+           xf86-input-keyboard \
+           xf86-input-evdev \
+           xf86-video-vmware"
+
+MACHINE_FEATURES += "x86"
+
+MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index 5f107be..fb183eb 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -1,26 +1,5 @@ 
 #@TYPE: Machine
 #@NAME: common_pc
 #@DESCRIPTION: Machine configuration for running a common x86
-
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
-
-require conf/machine/include/qemu.inc
-require conf/machine/include/tune-i586.inc
-
-KERNEL_IMAGETYPE = "bzImage"
-
-SERIAL_CONSOLE = "115200 ttyS0"
-
-XSERVER = "xserver-xorg \
-           mesa-driver-swrast \
-           xf86-input-vmmouse \
-           xf86-input-keyboard \
-           xf86-input-evdev \
-           xf86-video-vmware"
-
-MACHINE_FEATURES += "x86"
-
-MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
+#
+require conf/machine/include/qemux86.inc