All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add Newlib as a C library for baremetal
@ 2018-05-23 23:09 Alejandro Enedino Hernandez Samaniego
  2018-05-23 23:09 ` [PATCH 1/3] newlib: Adds newlib and libgloss recipes Alejandro Enedino Hernandez Samaniego
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alejandro Enedino Hernandez Samaniego @ 2018-05-23 23:09 UTC (permalink / raw)
  To: openembedded-core

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-25  4:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 23:09 [PATCH 0/3] Add Newlib as a C library for baremetal Alejandro Enedino Hernandez Samaniego
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.