[OE-core] [PATCH 1/2] baremetal-helloworld: Create recipe for baremetal examples on QEMU

Alejandro Enedino Hernandez Samaniego alejandro at enedino.org
Mon Jan 27 21:27:50 UTC 2020


Hey guys,

On Mon, Jan 27, 2020, 1:11 PM Paul Barker <pbarker at konsulko.com> wrote:

> On Mon, 27 Jan 2020 at 15:42, Alejandro Enedino Hernandez Samaniego
> <alejandro at enedino.org> wrote:
> >
> > Hey Paul,
> >
> >
> >
> > On Mon, Jan 27, 2020, 2:09 AM Paul Barker <pbarker at konsulko.com> wrote:
> >>
> >> On Mon, 27 Jan 2020 at 10:00, Alejandro Enedino Hernandez Samaniego
> >> <alejandro at enedino.org> wrote:
> >> >
> >> > Create HelloWorld examples that run on several of the QEMU
> architectures
> >> > supported by the build system.
> >> >
> >> > This recipe can be used by anyone to understand how baremetal
> applications
> >> > can be built using OpenEmbedded and how the wiring to set them up
> could be.
> >> >
> >> > This should also facilitate creating/extending the OE testing
> infrastructure
> >> > to allow baremetal applications or RTOSs to be tested in the same way
> that
> >> > Linux currently is.
> >> >
> >> > This can easily be extended to work on other MACHINES in the future.
> >> >
> >> > To run this example:
> >> >
> >> > # Source the oe environment as usual
> >> > $ source oe-init-buildenv
> >> >
> >> > # Set TCLIBC to either newlib or baremetal
> >> > $ echo "TCLIBC = \"newlib\"" >> ./conf/local.conf
> >> >
> >> > # Use one of the supported architectures (qemuarm64, qemuarm or
> qemuarmv5)
> >> > $ echo "MACHINE = \"qemuarm64\"" >> ./conf/local.conf
> >> >
> >> > # Build
> >> > $ bitbake baremetal-helloworld
> >> >
> >> > # Launch QEMU
> >> > $ runqemu
> >> >
> >> > runqemu - INFO - Running bitbake -e ...
> >> > runqemu - INFO - Continuing with the following parameters:
> >> > KERNEL:
> [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.bin]
> >> > MACHINE: [qemuarm64]
> >> > FSTYPE: [bin]
> >> > ROOTFS:
> [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.bin]
> >> > CONFFILE:
> [tmp/deploy/images/qemuarm64/baremetal-helloworld-qemuarm64.qemuboot.conf]
> >> >
> >> > Hello OpenEmbedded!
> >> >
> >> > Signed-off-by: Alejandro Enedino Hernandez Samaniego <
> alejandro at enedino.org>
> >> > ---
> >> >  .../baremetal-examples/baremetal-helloworld_git.bb | 114
> +++++++++++++++++++++
> >> >  1 file changed, 114 insertions(+)
> >> >  create mode 100644 meta/recipes-extended/baremetal-examples/
> baremetal-helloworld_git.bb
> >> >
> >> > diff --git a/meta/recipes-extended/baremetal-examples/
> baremetal-helloworld_git.bb b/meta/recipes-extended/baremetal-examples/
> baremetal-helloworld_git.bb
> >> > new file mode 100644
> >> > index 0000000..aab48b1
> >> > --- /dev/null
> >> > +++ b/meta/recipes-extended/baremetal-examples/
> baremetal-helloworld_git.bb
> >> > @@ -0,0 +1,114 @@
> >> > +SUMMARY = "Baremetal examples to work with the several QEMU
> architectures supported on OpenEmbedded"
> >> > +HOMEPAGE = "https://github.com/aehs29/baremetal-helloqemu"
> >> > +LICENSE = "CC-BY-SA-4.0"
> >>
> >> I've raised https://github.com/aehs29/baremetal-helloqemu/issues/1 as
> >> CC licenses aren't recommended for software.
> >>
> >>
> >
> > I do agree, I originally had it as MIT, although I did base this on the
> original work of someone who made it work for the versatile architecture
> and they licensed that with CC-BY-SA and as I was reading I have to use the
> same license as them.
> >
> > I thought about it and for the Hello OpenEmbedded examples it would be
> ok since they should serve mostly as basis for the wiring that users can
> use to build, run and test their baremetal apps on OE, so the license
> wouldn't affect them, but I'm open to suggestions here.
>
> A bad license choice in a sample recipe is just going to encourage
> others to use it though. I'd recommend reviewing
> https://wiki.creativecommons.org/wiki/ShareAlike_compatibility:_GPLv3
> to see if you can use GPLv3 instead if you've got CC-BY-SA inputs. You
> could also contact the original author and ask about licensing the
> code more cleanly.
>

Agreed, I took a look at that already and it looks like the compatibility
starts with CC-BY-SA 4 which didn't exist when the original code was
written, but that's why I chose v4 because it was compatible with the older
ones and people that use this can use GPLv3 if they want to since this is
CC-BY-SA v4, again this wasn't my first choice either.

I tried contacting the author already but it's been a while and he hasn't
replied yet.

Alejandro

>
> Thanks,
> Paul
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20200127/5ee6c840/attachment.html>


More information about the Openembedded-core mailing list