From: Alejandro Enedino Hernandez Samaniego <alejandro.enedino.hernandez-samaniego@xilinx.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 0/3] Add Newlib as a C library for baremetal
Date: Wed, 23 May 2018 16:09:26 -0700 [thread overview]
Message-ID: <cover.1527114300.git.alejandr@xilinx.com> (raw)
Newlib is a widely used C library for embedded systems, its mainly used
for resource constrained devices which run baremetal applications.
It provides basic C library functionality, and it is meant to be extended
by design, it contains several stubs for core functions that can be later
overriden with the symbols provided from another library at linking time.
Libgloss is the BSP part of the library which follows the same principle,
where a BSP layer can override functionality or even application runtime
depending on the processor architecture.
These patches add both the libgloss and newlib recipes, provide functionality
to make them extendable by other libraries if required, and also create a
new TCLIBC variant, which can now be set to newlib to build the toolchain for
applications where its suitable.
Newlib is also usually used by vendors to provide embedded toolchains, which is
interesting since, this enables OE to build such toolchains in a somewhat
automated way.
These patches have been tested on my end in the following ways:
- meta-toolchain builds successfully on qemux86, qemux86-64, qemuarm, qemuarm64,
qemuppc, qemumips.
- A helloworld application that lays in another layer was built for qemux86, qemux86-64
qemuarm, qemuarm64, qemuppc, qemumips, and it seems to have been built correctly.
- The hardware that I have available is from Xilinx, where Xilinx already had a
baremetal application they ran on it, I was able to build the same application
with a recipe, that used the toolchain coming from these patches (TCLIBC=newlib).
I ran the application on hardware and confirmed that it was built and working correctly.
- meta-toolchain builds successfully for the previously mentioned HW MACHINE as well.
- I also have a meta-freertos (its a possibility) layer that builds a FreeRTOS application
that runs on qemuarm, and instead of using the provided ARM Embedded Toolchain, I used
the one coming from these patches and was able to obtain the same result.
- I built world for all the previously mentioned MACHINES (qemus and HW) just to make sure
that this did not affect other OE components, and it did not seem to be the case.
The following changes since commit 7897fb35a3420c2555ab59dfa438217ada4a9784:
libnss-mdns: fix postinst and postrm (2018-05-22 13:13:33 +0100)
are available in the git repository at:
git://push.yoctoproject.org/poky-contrib aehs29/newlib
Alejandro Enedino Hernandez Samaniego (3):
newlib: Adds newlib and libgloss recipes
insane.bbclass: Adds powerpc to elf headers machine dictionary
tclibc-newlib: Adds a new TCLIBC variant to build with newlib as C
library
meta/classes/cross-canadian.bbclass | 2 +-
meta/classes/insane.bbclass | 1 +
meta/conf/distro/include/tclibc-newlib.inc | 47 ++++++++++++++++++
.../newlib/libgloss/fix-rs6000-crt0.patch | 41 +++++++++++++++
.../libgloss/fix_makefile_include_arm_h.patch | 30 +++++++++++
meta/recipes-core/newlib/libgloss_3.0.0.bb | 32 ++++++++++++
meta/recipes-core/newlib/newlib.inc | 58 ++++++++++++++++++++++
meta/recipes-core/newlib/newlib_3.0.0.bb | 19 +++++++
meta/recipes-devtools/gcc/gcc-cross.inc | 1 +
meta/recipes-devtools/gcc/libgcc-common.inc | 5 ++
10 files changed, 235 insertions(+), 1 deletion(-)
create mode 100644 meta/conf/distro/include/tclibc-newlib.inc
create mode 100644 meta/recipes-core/newlib/libgloss/fix-rs6000-crt0.patch
create mode 100644 meta/recipes-core/newlib/libgloss/fix_makefile_include_arm_h.patch
create mode 100644 meta/recipes-core/newlib/libgloss_3.0.0.bb
create mode 100644 meta/recipes-core/newlib/newlib.inc
create mode 100644 meta/recipes-core/newlib/newlib_3.0.0.bb
--
2.7.4
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
next reply other threads:[~2018-05-23 23:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-23 23:09 Alejandro Enedino Hernandez Samaniego [this message]
2018-05-23 23:09 ` [PATCH 1/3] newlib: Adds newlib and libgloss recipes Alejandro Enedino Hernandez Samaniego
2018-05-23 23:09 ` [PATCH 2/3] insane.bbclass: Adds powerpc to elf headers machine dictionary Alejandro Enedino Hernandez Samaniego
2018-05-23 23:09 ` [PATCH 3/3] tclibc-newlib: Adds a new TCLIBC variant to build with newlib as C library Alejandro Enedino Hernandez Samaniego
2018-05-24 1:06 ` Andre McCurdy
2018-05-25 3:48 ` [PATCH 0/3] Add Newlib as a C library for baremetal Manjukumar Harthikote Matha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1527114300.git.alejandr@xilinx.com \
--to=alejandro.enedino.hernandez-samaniego@xilinx.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox