public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Abner Chang" <abner.chang@hpe.com>
To: devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@microsoft.com>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>,
	Jian J Wang <jian.j.wang@intel.com>,
	Hao A Wu <hao.a.wu@intel.com>, Andrew Fish <afish@apple.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Leif Lindholm <leif@nuviainc.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Nickle Wang <nickle.wang@hpe.com>,
	Peter O'Hanley <peter.ohanley@hpe.com>
Subject: [PATCH v4 0/6] jansson edk2 port
Date: Mon,  7 Dec 2020 13:36:48 +0800	[thread overview]
Message-ID: <20201207053655.29101-1-abner.chang@hpe.com> (raw)

In v4,
       - Address review comments
       - Seperate CRT functions to a individule library CrtLib under
         RedfishPkg.
       - Seperate UCS2-UTF8 functions to a individule library
         BaseUcs2Utf8Lib under MdeModulePkg.

In v3, Add jansson library as the required submoudle in
       CiSettings.py for CI test.
In v2, JsonLib is moved to under RedfishPkg.

edk2 JSON library is based on jansson open source
(https://github.com/akheron/jansson) and wrapped as an edk2
library. edk2 JsonLib will be used by edk2 Redfish feature
drivers (not contributed yet) and the edk2 port of libredfish
library (not contributed yet) based on DMTF GitHub
(https://github.com/DMTF/libredfish).

Jansson is licensed under the MIT license(refer to ReadMe.rst under edk2).
It is used in production and its API is stable. In UEFI/EDKII environment,
Redfish project consumes jansson to achieve JSON operations.

* Jansson version on edk2: 2.13.1

* EDKII jansson library wrapper:
   - JsonLib.h:
     This is the denifitions of EDKII JSON APIs which are mapped to
     jannson funcitons accordingly.

   - JanssonJsonLibMapping.h:
     This is the wrapper file to map funcitons and definitions used in
     native jannson applications to edk2 JsonLib. This avoids the
     modifications on native jannson applications to be built under
     edk2 environment.

*Known issue:
  Build fail with jansson/src/load.c, overrride and add code in load.c
  to conditionally use stdin according to HAVE_UNISTD_H macro.
  The PR is submitted to jansson open source community.
  https://github.com/akheron/jansson/pull/558

Signed-off-by: Abner Chang <abner.chang@hpe.com>

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Peter O'Hanley <peter.ohanley@hpe.com>

Abner Chang (6):
  MdeModulePkg/Ucs2Utf8lib: UCS2 to UFT8 manipulation library
  edk2: jansson submodule for edk2 JSON library
  RedfishPkg/CrtLib: C runtime library
  RedfishPkg/library: EDK2 port of jansson library
  RedfishPkg: Add EDK2 port of jansson library to build
  .pytool: Add required submodule for JsonLib

 .gitmodules                                   |    3 +
 .pytool/CISettings.py                         |    2 +
 .../Include/Library/BaseUcs2Utf8Lib.h         |   69 +
 .../Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.c |  417 +++++++
 .../BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.inf       |   30 +
 MdeModulePkg/MdeModulePkg.dec                 |    5 +
 MdeModulePkg/MdeModulePkg.dsc                 |    2 +
 ReadMe.rst                                    |    1 +
 RedfishPkg/Include/JanssonJsonMapping.h       |   63 +
 RedfishPkg/Include/Library/CrtLib.h           |  195 +++
 RedfishPkg/Include/Library/JsonLib.h          |  768 ++++++++++++
 RedfishPkg/Library/CrtLib/CrtLib.c            |  705 +++++++++++
 RedfishPkg/Library/CrtLib/CrtLib.inf          |   37 +
 RedfishPkg/Library/JsonLib/JsonLib.c          |  961 ++++++++++++++
 RedfishPkg/Library/JsonLib/JsonLib.inf        |  101 ++
 RedfishPkg/Library/JsonLib/Readme.rst         |   40 +
 RedfishPkg/Library/JsonLib/assert.h           |   16 +
 RedfishPkg/Library/JsonLib/errno.h            |   16 +
 RedfishPkg/Library/JsonLib/jansson            |    1 +
 RedfishPkg/Library/JsonLib/jansson_config.h   |   46 +
 .../Library/JsonLib/jansson_private_config.h  |   19 +
 RedfishPkg/Library/JsonLib/limits.h           |   16 +
 RedfishPkg/Library/JsonLib/load.c             | 1111 +++++++++++++++++
 RedfishPkg/Library/JsonLib/math.h             |   16 +
 RedfishPkg/Library/JsonLib/stdarg.h           |   15 +
 RedfishPkg/Library/JsonLib/stddef.h           |   16 +
 RedfishPkg/Library/JsonLib/stdio.h            |   15 +
 RedfishPkg/Library/JsonLib/stdlib.h           |   16 +
 RedfishPkg/Library/JsonLib/string.h           |   16 +
 RedfishPkg/Library/JsonLib/sys/time.h         |   15 +
 RedfishPkg/Library/JsonLib/sys/types.h        |   15 +
 RedfishPkg/Library/JsonLib/time.h             |   15 +
 RedfishPkg/RedfishLibs.dsc.inc                |    2 +
 RedfishPkg/RedfishPkg.ci.yaml                 |   33 +
 RedfishPkg/RedfishPkg.dec                     |   11 +
 RedfishPkg/RedfishPkg.dsc                     |    2 +
 36 files changed, 4811 insertions(+)
 create mode 100644 MdeModulePkg/Include/Library/BaseUcs2Utf8Lib.h
 create mode 100644 MdeModulePkg/Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.c
 create mode 100644 MdeModulePkg/Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.inf
 create mode 100644 RedfishPkg/Include/JanssonJsonMapping.h
 create mode 100644 RedfishPkg/Include/Library/CrtLib.h
 create mode 100644 RedfishPkg/Include/Library/JsonLib.h
 create mode 100644 RedfishPkg/Library/CrtLib/CrtLib.c
 create mode 100644 RedfishPkg/Library/CrtLib/CrtLib.inf
 create mode 100644 RedfishPkg/Library/JsonLib/JsonLib.c
 create mode 100644 RedfishPkg/Library/JsonLib/JsonLib.inf
 create mode 100644 RedfishPkg/Library/JsonLib/Readme.rst
 create mode 100644 RedfishPkg/Library/JsonLib/assert.h
 create mode 100644 RedfishPkg/Library/JsonLib/errno.h
 create mode 160000 RedfishPkg/Library/JsonLib/jansson
 create mode 100644 RedfishPkg/Library/JsonLib/jansson_config.h
 create mode 100644 RedfishPkg/Library/JsonLib/jansson_private_config.h
 create mode 100644 RedfishPkg/Library/JsonLib/limits.h
 create mode 100644 RedfishPkg/Library/JsonLib/load.c
 create mode 100644 RedfishPkg/Library/JsonLib/math.h
 create mode 100644 RedfishPkg/Library/JsonLib/stdarg.h
 create mode 100644 RedfishPkg/Library/JsonLib/stddef.h
 create mode 100644 RedfishPkg/Library/JsonLib/stdio.h
 create mode 100644 RedfishPkg/Library/JsonLib/stdlib.h
 create mode 100644 RedfishPkg/Library/JsonLib/string.h
 create mode 100644 RedfishPkg/Library/JsonLib/sys/time.h
 create mode 100644 RedfishPkg/Library/JsonLib/sys/types.h
 create mode 100644 RedfishPkg/Library/JsonLib/time.h

-- 
2.17.1


             reply	other threads:[~2020-12-07  6:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07  5:36 Abner Chang [this message]
2020-12-07  5:36 ` [PATCH v4 1/6] MdeModulePkg/Ucs2Utf8lib: UCS2 to UFT8 manipulation library Abner Chang
2020-12-07  7:05   ` [edk2-devel] " Wu, Hao A
2020-12-07  7:28     ` Abner Chang
2020-12-07  7:34       ` Wu, Hao A
2020-12-07 17:20         ` Leif Lindholm
2020-12-08  0:45           ` Wu, Hao A
2020-12-08  0:50             ` Abner Chang
2020-12-08  2:59             ` Abner Chang
2020-12-08  4:45           ` 回复: " gaoliming
2020-12-07  5:36 ` [PATCH v4 1/6] MdeModulePkg/Ucs2Utf8lib: UCS " Abner Chang
2020-12-07  5:36 ` [PATCH v4 2/6] edk2: jansson submodule for edk2 JSON library Abner Chang
2020-12-07  5:36 ` [PATCH v4 3/6] RedfishPkg/CrtLib: C runtime library Abner Chang
2020-12-07  5:36 ` [PATCH v4 4/6] RedfishPkg/library: EDK2 port of jansson library Abner Chang
2020-12-07  5:36 ` [PATCH v4 5/6] RedfishPkg: Add EDK2 port of jansson library to build Abner Chang
2020-12-07  5:36 ` [PATCH v4 6/6] .pytool: Add required submodule for JsonLib Abner Chang

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-list 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=20201207053655.29101-1-abner.chang@hpe.com \
    --to=devel@edk2.groups.io \
    /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