Hob2 related oe-core changes
Hi Richard,
This pull request is the hob2 related oe-core changes. Please help to review and pull.
Note that this pull request has dependency on the hob related bitbake changes.
Thanks,
Dongxiao
The following changes since commit 4a85312568a6bb052cc511c15b4ae842ff7f8e59:
Richard Purdie (1):
image-mklibs/package_ipk: Remove bashisms
are available in the git repository at:
git://git.pokylinux.org/poky-contrib dxu4/hob-oecore-changes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-oecore-changes
Dongxiao Xu (6):
bblayers.conf.sample: Use ?= to set BBLAYERS image.bbclass: Use ?= to set LINGUAS_INSTALL packageinfo.bbclass: add a new bbclass to pass package information hob.bb: Add a empty image template
hob-toolchain: add a new recipe hob-toolchain
layers: add a new folder to put user added layers
Shane Wang (1):
package.bbclass: set package size into pkgdata for hob2's use
layers/README | 1 + meta/classes/image.bbclass | 2 +- meta/classes/package.bbclass | 8 ++++++++ meta/classes/packageinfo.bbclass | 30 ++++++++++++++++++++++++++++++ meta/conf/bblayers.conf.sample | 2 +- meta/recipes-core/images/hob.bb | 1 + meta/recipes-core/meta/hob-toolchain.bb | 10 ++++++++++ 7 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 layers/README create mode 100644 meta/classes/packageinfo.bbclass create mode 100644 meta/recipes-core/images/hob.bb create mode 100644 meta/recipes-core/meta/hob-toolchain.bb
PATCH 1/7 bblayers.conf.sample: Use ?= to set BBLAYERS
Hob may dynamically sets BBLAYERS to bitbake server, thus we need a flexible way to load BBLAYERS value.
--- meta/conf/bblayers.conf.sample | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/conf/bblayers.conf.sample +1 -1
@@ -3,6 +3,6 @@ LCONF_VERSION = "4" BBFILES ?= "" -BBLAYERS = " \ +BBLAYERS ?= " \ ##COREBASE##/meta \ "
Signature · 1 line
1.7.0.4
PATCH 2/7 image.bbclass: Use ?= to set LINGUAS_INSTALL
In reply to Dongxiao XuHob may dynamically sets BBLAYERS to bitbake server, thus we need a flexible way to load LINGUAS_INSTALL value.
--- meta/classes/image.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/image.bbclass +1 -1
@@ -119,7 +119,7 @@ ROOTFS_POSTPROCESS_COMMAND ?= "" # some default locales IMAGE_LINGUAS ?= "de-de fr-fr en-gb" -LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', 1).split()))}" +LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', 1).split()))}" PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
Signature · 1 line
1.7.0.4
PATCH 3/7 package.bbclass: set package size into pkgdata for hob2's use
In reply to Dongxiao XuFrom: Shane Wang <[email protected]>
Write the size of a package into its pkgdata for hob2 to get the size and show on the UI for image making.
--- meta/classes/package.bbclass | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
meta/classes/package.bbclass +8 -0
@@ -1042,6 +1042,13 @@ python emit_pkgdata() { f.write('%s: %s\n' % (var, encode(val))) return + def get_directory_size(dir): + if os.listdir(dir): + size = int(os.popen('du -sk %s' % dir).readlines()[0].split('\t')[0]) + else: + size = 0 + return size + packages = d.getVar('PACKAGES', True) pkgdest = d.getVar('PKGDEST', 1) pkgdatadir = d.getVar('PKGDESTWORK', True)
@@ -1090,6 +1097,7 @@ python emit_pkgdata() { for dfile in (d.getVar('FILERDEPENDSFLIST_' + pkg, True) or "").split(): write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile) + sf.write('%s_%s: %s\n' % ('PKGSIZE', pkg, get_directory_size(pkgdest + "/%s" % pkg))) sf.close()
Signature · 1 line
1.7.0.4
PATCH 4/7 packageinfo.bbclass: add a new bbclass to pass package information
In reply to Dongxiao Xupackageinfo.bbclass is to pass the accurate package information to clients (e.g. Hob), including PN, PV, RDEPENDS, PKGSIZE, etc.
--- meta/classes/packageinfo.bbclass | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) create mode 100644 meta/classes/packageinfo.bbclass
meta/classes/packageinfo.bbclass new file +30 -0
@@ -0,0 +1,30 @@ +inherit packagedata + +python do_package_info () { + bb.build.exec_func("read_subpackage_metadata", d) + pn = d.getVar('PN', True) or "" + pv = d.getVar('PV', True) or "" + pr = d.getVar('PR', True) or "" + recipe = pn + '-' + pv + '-' + pr + + packages = d.getVar('PACKAGES', True) or "" + pkginfolist = [] + for pkg in packages.split(): + pkginfo = {} + pkginfo['pkg'] = pkg + pkginfo['pkgv'] = d.getVar('PKGV', True) or "" + pkginfo['pkgr'] = d.getVar('PKGR', True) or "" + pkginfo['pkg_rename'] = d.getVar('PKG_%s' % pkg, True) or "" + pkginfo['section'] = d.getVar('SECTION', True) or "" + pkginfo['summary'] = d.getVar('SUMMARY', True) or "" + pkginfo['rdep'] = d.getVar('RDEPENDS_%s' % pkg, True) or "" + pkginfo['rrec'] = d.getVar('RRECOMMENDS_%s' % pkg, True) or "" + pkginfo['rprov'] = d.getVar('RPROVIDES_%s' % pkg, True) or "" + pkginfo['size'] = d.getVar('PKGSIZE_%s' % pkg, True) or "" + pkginfo['allow_empty'] = d.getVar('ALLOW_EMPTY_%s' % pkg, True) or d.getVar('ALLOW_EMPTY', True) or "" + pkginfolist.append(pkginfo) + + bb.event.fire(bb.event.PackageInfo(recipe, pkginfolist), d) +} +do_package_info[nostamp] = "1" +addtask package_info after do_package_write
Signature · 1 line
1.7.0.4
Re: [PATCH 4/7] packageinfo.bbclass: add a new bbclass to pass package information
Op 6 jan. 2012, om 10:05 heeft Dongxiao Xu het volgende geschreven:
Quoted 2 lines
packageinfo.bbclass is to pass the accurate package information to clients (e.g. Hob), including PN, PV, RDEPENDS, PKGSIZE, etc.
Why not reuse buildhistory for this?
Re: [PATCH 4/7] packageinfo.bbclass: add a new bbclass to pass package information
Hi Koen,
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Koen Kooi
Sent: Friday, January 06, 2012 6:32 PM
To: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 4/7] packageinfo.bbclass: add a new bbclass to pass package information
Quoted 6 lines
Op 6 jan. 2012, om 10:05 heeft Dongxiao Xu het volgende geschreven:
Quoted 2 lines
packageinfo.bbclass is to pass the accurate package information to clients (e.g. Hob), including PN, PV, RDEPENDS, PKGSIZE, etc.
Why not reuse buildhistory for this?
I didn't aware the existence of buildhistory.bbclass when I wrote my code. I will have a look at that.
Thanks,
Dongxiao
Quoted 7 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
PATCH 5/7 hob.bb: Add a empty image template
In reply to Dongxiao XuThis recipe serves as the target when using Hob to generate image.
--- meta/recipes-core/images/hob.bb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/images/hob.bb
meta/recipes-core/images/hob.bb new file +3 -0
@@ -0,0 +1,3 @@ +LICENSE = "MIT" + +inherit image
Signature · 1 line
1.7.0.4
PATCH 6/7 hob-toolchain: add a new recipe hob-toolchain
In reply to Dongxiao XuThis is a dummy recipe to build toolchain in Hob
--- meta/recipes-core/meta/hob-toolchain.bb | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/meta/hob-toolchain.bb
meta/recipes-core/meta/hob-toolchain.bb new file +10 -0
@@ -0,0 +1,10 @@ +DESCRIPTION = "Hob toolchain" +LICENSE = "MIT" + +PR = "r0" + +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +IMAGETEST ?= "dummy" +inherit populate_sdk imagetest-${IMAGETEST}
Signature · 1 line
1.7.0.4
PATCH 7/7 layers: add a new folder to put user added layers
In reply to Dongxiao XuThis is helpful for remote users to find the available layers in the bitbake server machine.
--- layers/README | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 layers/README
layers/README new file +1 -0
@@ -0,0 +1 @@ +Please put extra layers (besides meta and meta-yocto) in this folder.
Signature · 1 line
1.7.0.4
Quoted 14 lines · Dongxiao Xu
Hi Richard,
This pull request is the hob2 related oe-core changes. Please help to review and pull.
Note that this pull request has dependency on the hob related bitbake changes.
Thanks,
DongxiaoThe following changes since commit
4a85312568a6bb052cc511c15b4ae842ff7f8e59:
Richard Purdie (1):
image-mklibs/package_ipk: Remove bashisms
Quoted 8 lines
are available in the git repository at:
git://git.pokylinux.org/poky-contribdxu4/hob-oecore-changes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-oecore-changesDongxiao Xu (6):
bblayers.conf.sample: Use ?= to set BBLAYERS
image.bbclass: Use ?= to setLINGUAS_INSTALL
I merged these.
Quoted 1 line
packageinfo.bbclass: add a new bbclass to pass package information
I still have quite a strong dislike of this code, its rather nasty to require this and I wish we could come up with a less ugly way to collect up this information.
Quoted 3 lines
hob.bb: Add a empty image template
hob-toolchain: add a new recipe hob-toolchain
layers: add a new folder to put user added layers
I don't like these three. They're horribly hob specific and IMO shouldn't be in the general metadata. If there is no way to avoid them, they should perhaps go into a meta-hob layer directory to keep them separate from the rest of the system.
I'm still puzzled how the layers directory helps. We deliberately support generic layer locations so forcing the user to place them in a particular place seems like a bit of a backwards step? :/.
Cheers,
Richard
Quoted 36 lines · Richard Purdie
Quoted 14 lines · Dongxiao Xu
Hi Richard,
This pull request is the hob2 related oe-core changes. Please help to review and pull.
Note that this pull request has dependency on the hob related bitbake changes.
Thanks,
DongxiaoThe following changes since commit
4a85312568a6bb052cc511c15b4ae842ff7f8e59:
Richard Purdie (1):
image-mklibs/package_ipk: Remove bashismsQuoted 8 lines
are available in the git repository at:
git://git.pokylinux.org/poky-contribdxu4/hob-oecore-changes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-oecore-changesDongxiao Xu (6):
bblayers.conf.sample: Use ?= to set BBLAYERS
image.bbclass: Use ?= to setLINGUAS_INSTALLI merged these.
Quoted 1 line
packageinfo.bbclass: add a new bbclass to pass package information
I still have quite a strong dislike of this code, its rather nasty to require this and I wish we could come up with a less ugly way to collect up this information.
Quoted 3 lines
hob.bb: Add a empty image template
hob-toolchain: add a new recipe hob-toolchain
layers: add a new folder to put user added layers
Quoted 8 lines
I don't like these three. They're horribly hob specific and IMO shouldn't be in the general metadata. If there is no way to avoid them, they should perhaps go into a meta-hob layer directory to keep them separate from the rest of the system.
I'm still puzzled how the layers directory helps. We deliberately support generic layer locations so forcing the user to place them in a particular place seems like a bit of a backwards step? :/.
I think the layer directory is useful for distributions based on oe-core. But I agree, it seems wrong to have it in OE-core itself -- unless there is a strong demand from the users of a "standard place" to put layers in their tree. (So far I've not heard such a request.)
--Mark
Quoted 10 lines
Cheers,
Richard
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Op 6 jan. 2012, om 17:27 heeft Richard Purdie het volgende geschreven:
Quoted 32 lines · Dongxiao Xu
Quoted 14 lines
Hi Richard,
This pull request is the hob2 related oe-core changes. Please help to review and pull.
Note that this pull request has dependency on the hob related bitbake changes.
Thanks,
DongxiaoThe following changes since commit
4a85312568a6bb052cc511c15b4ae842ff7f8e59:
Richard Purdie (1):
image-mklibs/package_ipk: Remove bashismsQuoted 8 lines
are available in the git repository at:
git://git.pokylinux.org/poky-contribdxu4/hob-oecore-changes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-oecore-changesDongxiao Xu (6):
bblayers.conf.sample: Use ?= to set BBLAYERS
image.bbclass: Use ?= to setLINGUAS_INSTALLI merged these.
Quoted 1 line
packageinfo.bbclass: add a new bbclass to pass package information
I still have quite a strong dislike of this code, its rather nasty to require this and I wish we could come up with a less ugly way to collect up this information.
Quoted 8 lines
Quoted 3 lines
hob.bb: Add a empty image template
hob-toolchain: add a new recipe hob-toolchain
layers: add a new folder to put user added layersI don't like these three. They're horribly hob specific and IMO shouldn't be in the general metadata. If there is no way to avoid them, they should perhaps go into a meta-hob layer directory to keep them separate from the rest of the system.
And I still don't get why hob can't load local.conf to load the defaults instead of ignoring it completely.
Hi Koen,
Quoted 50 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Koen Kooi
Sent: Saturday, January 07, 2012 12:42 AM
To: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 0/7][PULL] Hob2 related oe-core changesOp 6 jan. 2012, om 17:27 heeft Richard Purdie het volgende geschreven:
Quoted 7 lines · Dongxiao Xu
Quoted 6 lines
Hi Richard,
This pull request is the hob2 related oe-core changes. Please help to review and pull.
Note that this pull request has dependency on the hob related bitbake
changes.
Quoted 5 lines
Quoted 5 lines
Thanks,
DongxiaoThe following changes since commit
4a85312568a6bb052cc511c15b4ae842ff7f8e59:Quoted 25 lines
Quoted 5 lines
Richard Purdie (1):
image-mklibs/package_ipk: Remove bashismsare available in the git repository at:
Quoted 7 lines
git://git.pokylinux.org/poky-contribdxu4/hob-oecore-changes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-oecore
-changesDongxiao Xu (6):
bblayers.conf.sample: Use ?= to set BBLAYERS
image.bbclass: Use ?= to setLINGUAS_INSTALLI merged these.
Quoted 1 line
packageinfo.bbclass: add a new bbclass to pass package information
I still have quite a strong dislike of this code, its rather nasty to require this and I wish we could come up with a less ugly way to collect up this information.
Quoted 3 lines
hob.bb: Add a empty image template
hob-toolchain: add a new recipe hob-toolchain
layers: add a new folder to put user added layers
Quoted 7 lines
Quoted 4 lines
I don't like these three. They're horribly hob specific and IMO shouldn't be in the general metadata. If there is no way to avoid them, they should perhaps go into a meta-hob layer directory to keep them separate from the rest of the system.
And I still don't get why hob can't load local.conf to load the defaults instead of ignoring it completely.
The new Hob doesn't ignore local.conf, it will load all its values (except BB_NUMBER_THREADS and PARALLEL_MAKE) as the default configuration.
Thanks,
Dongxiao
Quoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 65 lines
-----Original Message-----
From: Xu, Dongxiao
Sent: Saturday, January 07, 2012 3:48 PM
To: Patches and discussions about the oe-core layer
Subject: RE: [OE-core] [PATCH 0/7][PULL] Hob2 related oe-core changesHi Koen,
Quoted 57 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Koen Kooi
Sent: Saturday, January 07, 2012 12:42 AM
To: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 0/7][PULL] Hob2 related oe-core changesOp 6 jan. 2012, om 17:27 heeft Richard Purdie het volgende geschreven:
Quoted 8 lines · Dongxiao Xu
Quoted 7 lines
Hi Richard,
This pull request is the hob2 related oe-core changes. Please help to review and pull.
Note that this pull request has dependency on the hob related bitbake
changes.
Quoted 5 lines
Quoted 5 lines
Thanks,
DongxiaoThe following changes since commit
4a85312568a6bb052cc511c15b4ae842ff7f8e59:Quoted 30 lines
Quoted 5 lines
Richard Purdie (1):
image-mklibs/package_ipk: Remove bashismsare available in the git repository at:
Quoted 8 lines
git://git.pokylinux.org/poky-contribdxu4/hob-oecore-changes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-oeco
re
-changesDongxiao Xu (6):
bblayers.conf.sample: Use ?= to set BBLAYERS
image.bbclass: Use ?= to setLINGUAS_INSTALLI merged these.
Quoted 1 line
packageinfo.bbclass: add a new bbclass to pass package information
I still have quite a strong dislike of this code, its rather nasty to require this and I wish we could come up with a less ugly way to collect up this information.
Quoted 3 lines
hob.bb: Add a empty image template
hob-toolchain: add a new recipe hob-toolchain
layers: add a new folder to put user added layersI don't like these three. They're horribly hob specific and IMO shouldn't be in the general metadata. If there is no way to avoid them, they should perhaps go into a meta-hob layer directory to keep them separate from the rest of the system.
Quoted 5 lines
Quoted 2 lines
And I still don't get why hob can't load local.conf to load the defaults instead of ignoring it completely.
The new Hob doesn't ignore local.conf, it will load all its values (except
BB_NUMBER_THREADSandPARALLEL_MAKE) as the default configuration.
Make some clarification here:
Actually new HOB will also load the BB_NUMBER_THREADS and PARALLEL_MAKE from local.conf.
But if the two values are not set in the local.conf (thus the default value is "1"), HOB will set a proper value for them according to the server's CPU information.
Thanks,
Dongxiao
Quoted 8 lines
Thanks,
DongxiaoQuoted 4 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Hi Richard,
Quoted 29 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Richard Purdie
Sent: Saturday, January 07, 2012 12:28 AM
To: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 0/7][PULL] Hob2 related oe-core changesQuoted 6 lines · Dongxiao Xu
Hi Richard,
This pull request is the hob2 related oe-core changes. Please help to review and pull.
Note that this pull request has dependency on the hob related bitbake
changes.
Quoted 5 lines
Thanks,
DongxiaoThe following changes since commit
4a85312568a6bb052cc511c15b4ae842ff7f8e59:Quoted 7 lines
Richard Purdie (1):
image-mklibs/package_ipk: Remove bashismsare available in the git repository at:
git://git.pokylinux.org/poky-contribdxu4/hob-oecore-changes
Quoted 8 lines
Quoted 6 lines
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-oecore-
changesDongxiao Xu (6):
bblayers.conf.sample: Use ?= to set BBLAYERS
image.bbclass: Use ?= to setLINGUAS_INSTALLI merged these.
Thanks!
Quoted 5 lines
Quoted 2 lines
packageinfo.bbclass: add a new bbclass to pass package information
I still have quite a strong dislike of this code, its rather nasty to require this and I wish we could come up with a less ugly way to collect up this information.
I am sorry if this patch makes you feel uncomfortable.
Actually this approach was brought out early in the HOB2 design phase, and that time I didn't get explicit objection about it. Refer to bug http://bugzilla.pokylinux.org/show_bug.cgi?id=1750, which is a M2 task.
Later we had some discussions of finding new way to dump all the available packages from server side. Due to the schedule reason, we have to put it into M3. Refer to bug http://bugzilla.pokylinux.org/show_bug.cgi?id=1871.
But I think this approach is similar with buildhistory.bbclass. (Actually I am not aware there is buildhistory.bbclass exists when I wrote my code). What the main difference is, buildhistory.bbclass writes the information into a local file, but packageinfo.bbclass emit the info as an event.
Quoted 8 lines
Quoted 4 lines
hob.bb: Add a empty image template
hob-toolchain: add a new recipe hob-toolchain
layers: add a new folder to put user added layersI don't like these three. They're horribly hob specific and IMO shouldn't be in the general metadata. If there is no way to avoid them, they should perhaps go into a meta-hob layer directory to keep them separate from the rest of the system.
If we need to support the split of client and server, there is a principle that client GUI should not access any server directories or files. Therefore HOB will not automatically generate any image bb files and copy it to meta directory.
This is the reason why we need to generate two empty image/toolchain files for the GUI to use.
If you do not like the name of hob.bb or hob-toolchain.bb, I can rename it to a generic one, like dummy-image.bb and dummy-toolchain.bb.
Actually putting them into meta-hob layer also works, but this requires the hob user to manually add meta-hob layer each time when he launches the HOB GUI. Of course we can defaultly add meta-hob layer into bblayers.conf.sample in meta-yocto layer if you think it is feasible.
Quoted 4 lines
I'm still puzzled how the layers directory helps. We deliberately support generic layer locations so forcing the user to place them in a particular place seems like a bit of a backwards step? :/.
We do not need the "layers" directory if users know where the layers are and then they can edit bblayers.conf. And in non-split HOB case, users can still put their layers anywhere. HOB supports file browser and user can add layer by that.
But one new situation is, client GUI and server may run in different machines. How could a client GUI user get the information what are the available layers in server? I definitely welcome good suggestions.
Thanks,
Dongxiao
Quoted 11 lines
Cheers,
Richard
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core