Write a BitBake recipe for Parrot #894

Open
leto opened this Issue Dec 20, 2012 · 6 comments

Comments

Projects
None yet
4 participants
@leto
Member

leto commented Dec 20, 2012

This will allow us to submit the recipe to Poky Linux (which used to be called OpenEmbedded), so we can run Parrot on many, many kinds of embedded devices, mobile phones and probably sentient toasters.

http://www.pokylinux.org/

@ghost ghost assigned rurban Dec 20, 2012

@jkeenan

This comment has been minimized.

Show comment
Hide comment
@jkeenan

jkeenan Dec 21, 2012

Contributor

On 12/20/12 6:08 PM, leto wrote:

We need to teach Configure.pl to detect if qemu is available. This is related to #173 and will allow us to emulate the cross-compilation of Parrot under qemu.

If qemu is found, it's version number should also be printed in the Configure.pl .

For the qemu-ignorant amongst us (e.g, me), can you provide (a) a
rationale for this detection; (b) link to qemu's documentation; and (c)
particularly link to its API?

The latter will enable us how to write a probe for it.

Thank you very much.
jimk


Reply to this email directly or view it on GitHub:
#894

Contributor

jkeenan commented Dec 21, 2012

On 12/20/12 6:08 PM, leto wrote:

We need to teach Configure.pl to detect if qemu is available. This is related to #173 and will allow us to emulate the cross-compilation of Parrot under qemu.

If qemu is found, it's version number should also be printed in the Configure.pl .

For the qemu-ignorant amongst us (e.g, me), can you provide (a) a
rationale for this detection; (b) link to qemu's documentation; and (c)
particularly link to its API?

The latter will enable us how to write a probe for it.

Thank you very much.
jimk


Reply to this email directly or view it on GitHub:
#894

@rurban

This comment has been minimized.

Show comment
Hide comment
@rurban

rurban Dec 22, 2012

Member

Detecting qemu is IMHO worthless.
We should detect if we are running under an open embedded cross-compilation bb recipe.
qemu just simulates hw and compiling remotely does not care if done via qemu/kvm/real hw
or ssh/ttyS0 connected hosts.

But we need to detect the bitbake/oe-init-build-env environment, which does an actual cross-compilation.
I'm trying to add a parrot.bb recipe, currently there is only one for perl (enabling cross compiling).

What I see are two distinct env variables being set:

BB_ENV_EXTRAWHITE=MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER SCREENDIR
BUILDDIR=/opt/poky/build

BUILDDIR must end in build
PATH must have bitbake/bin included.

Member

rurban commented Dec 22, 2012

Detecting qemu is IMHO worthless.
We should detect if we are running under an open embedded cross-compilation bb recipe.
qemu just simulates hw and compiling remotely does not care if done via qemu/kvm/real hw
or ssh/ttyS0 connected hosts.

But we need to detect the bitbake/oe-init-build-env environment, which does an actual cross-compilation.
I'm trying to add a parrot.bb recipe, currently there is only one for perl (enabling cross compiling).

What I see are two distinct env variables being set:

BB_ENV_EXTRAWHITE=MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER SCREENDIR
BUILDDIR=/opt/poky/build

BUILDDIR must end in build
PATH must have bitbake/bin included.

@leto

This comment has been minimized.

Show comment
Hide comment
@leto

leto Jan 3, 2013

Member

@rurban what you are describing was my intent for this issue. The last time I looked, the Emacs BitBake recipe used qemu to cross-compile, which is what I want to emulate for Parrot.

I have read the BB recipe for Perl 5 (a while ago) and when I looked, it did many many source modifications to enable cross-compiling, which is not something I want to emulate.

Can you put your parrot.bb in a branch of parrot.git, maybe somewhere in the ports/ directory ?

Member

leto commented Jan 3, 2013

@rurban what you are describing was my intent for this issue. The last time I looked, the Emacs BitBake recipe used qemu to cross-compile, which is what I want to emulate for Parrot.

I have read the BB recipe for Perl 5 (a while ago) and when I looked, it did many many source modifications to enable cross-compiling, which is not something I want to emulate.

Can you put your parrot.bb in a branch of parrot.git, maybe somewhere in the ports/ directory ?

@ScottGarman

This comment has been minimized.

Show comment
Hide comment
@ScottGarman

ScottGarman Jan 3, 2013

It's unlikely that Parrot will get included upstream in the openembedded-core or poky repositories directly. However what you can do is create a Parrot "layer" which would allow Parrot support to be easily added to build configurations based on oe-core or poky (what is now known as the Yocto Project from an organizational point of view).

The layer would then be referenced here:

http://www.openembedded.org/wiki/LayerIndex

so that people will know of its existence and can make use of it.

Here is some documentation on creating layers for use with the Yocto Project:

http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers

I'm happy to answer questions or review the layer once you get going on it.

Scott (Yocto Project core team developer)

It's unlikely that Parrot will get included upstream in the openembedded-core or poky repositories directly. However what you can do is create a Parrot "layer" which would allow Parrot support to be easily added to build configurations based on oe-core or poky (what is now known as the Yocto Project from an organizational point of view).

The layer would then be referenced here:

http://www.openembedded.org/wiki/LayerIndex

so that people will know of its existence and can make use of it.

Here is some documentation on creating layers for use with the Yocto Project:

http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers

I'm happy to answer questions or review the layer once you get going on it.

Scott (Yocto Project core team developer)

@leto

This comment has been minimized.

Show comment
Hide comment
@leto

leto Jan 3, 2013

Member

Thanks @ScottGarman ! Do you have any suggestions for an already existing meta-layer that we could emulate? Is meta-ruby a good example?

http://cgit.openembedded.org/meta-openembedded/tree/meta-ruby?id=master

Member

leto commented Jan 3, 2013

Thanks @ScottGarman ! Do you have any suggestions for an already existing meta-layer that we could emulate? Is meta-ruby a good example?

http://cgit.openembedded.org/meta-openembedded/tree/meta-ruby?id=master

@ScottGarman

This comment has been minimized.

Show comment
Hide comment
@ScottGarman

ScottGarman Jan 5, 2013

Yes, meta-ruby looks like a great layer to model yours from - it's as minimal as possible.

Yes, meta-ruby looks like a great layer to model yours from - it's as minimal as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment