[edk2-devel] [PATCH v2 0/3] jansson edk2 port

Abner Chang posted 3 patches 3 years, 4 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
.gitmodules                                   |    3 +
ReadMe.rst                                    |    1 +
.../Include/Library/JanssonJsonLibMapping.h   |   63 +
RedfishPkg/Include/Library/JsonLib.h          |  767 ++++++++++++
.../Library/JsonLib/JanssonCrtLibSupport.c    |  705 +++++++++++
.../Library/JsonLib/JanssonCrtLibSupport.h    |  198 +++
RedfishPkg/Library/JsonLib/JsonLib.c          |  960 ++++++++++++++
RedfishPkg/Library/JsonLib/JsonLib.inf        |  103 ++
RedfishPkg/Library/JsonLib/JsonUtilities.c    |  417 +++++++
RedfishPkg/Library/JsonLib/JsonUtilities.h    |   69 +
RedfishPkg/Library/JsonLib/Readme.txt         |   40 +
RedfishPkg/Library/JsonLib/assert.h           |   16 +
RedfishPkg/Library/JsonLib/errno.h            |   16 +
RedfishPkg/Library/JsonLib/jansson            |    1 +
RedfishPkg/Library/JsonLib/jansson_config.h   |   60 +
.../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                |    1 +
RedfishPkg/RedfishPkg.ci.yaml                 |   33 +-
RedfishPkg/RedfishPkg.dec                     |    5 +
RedfishPkg/RedfishPkg.dsc                     |    1 +
31 files changed, 4743 insertions(+), 1 deletion(-)
create mode 100644 RedfishPkg/Include/Library/JanssonJsonLibMapping.h
create mode 100644 RedfishPkg/Include/Library/JsonLib.h
create mode 100644 RedfishPkg/Library/JsonLib/JanssonCrtLibSupport.c
create mode 100644 RedfishPkg/Library/JsonLib/JanssonCrtLibSupport.h
create mode 100644 RedfishPkg/Library/JsonLib/JsonLib.c
create mode 100644 RedfishPkg/Library/JsonLib/JsonLib.inf
create mode 100644 RedfishPkg/Library/JsonLib/JsonUtilities.c
create mode 100644 RedfishPkg/Library/JsonLib/JsonUtilities.h
create mode 100644 RedfishPkg/Library/JsonLib/Readme.txt
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
[edk2-devel] [PATCH v2 0/3] jansson edk2 port
Posted by Abner Chang 3 years, 4 months ago
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: 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: Nickle Wang <nickle.wang@hpe.com>
Cc: Peter O'Hanley <peter.ohanley@hpe.com>

Abner Chang (3):
  edk2: jansson submodule for edk2 JSON library
  RedfishPkg/library: EDK2 port of jansson library
  RedfishPkg: Add EDK2 port of jansson library to build

 .gitmodules                                   |    3 +
 ReadMe.rst                                    |    1 +
 .../Include/Library/JanssonJsonLibMapping.h   |   63 +
 RedfishPkg/Include/Library/JsonLib.h          |  767 ++++++++++++
 .../Library/JsonLib/JanssonCrtLibSupport.c    |  705 +++++++++++
 .../Library/JsonLib/JanssonCrtLibSupport.h    |  198 +++
 RedfishPkg/Library/JsonLib/JsonLib.c          |  960 ++++++++++++++
 RedfishPkg/Library/JsonLib/JsonLib.inf        |  103 ++
 RedfishPkg/Library/JsonLib/JsonUtilities.c    |  417 +++++++
 RedfishPkg/Library/JsonLib/JsonUtilities.h    |   69 +
 RedfishPkg/Library/JsonLib/Readme.txt         |   40 +
 RedfishPkg/Library/JsonLib/assert.h           |   16 +
 RedfishPkg/Library/JsonLib/errno.h            |   16 +
 RedfishPkg/Library/JsonLib/jansson            |    1 +
 RedfishPkg/Library/JsonLib/jansson_config.h   |   60 +
 .../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                |    1 +
 RedfishPkg/RedfishPkg.ci.yaml                 |   33 +-
 RedfishPkg/RedfishPkg.dec                     |    5 +
 RedfishPkg/RedfishPkg.dsc                     |    1 +
 31 files changed, 4743 insertions(+), 1 deletion(-)
 create mode 100644 RedfishPkg/Include/Library/JanssonJsonLibMapping.h
 create mode 100644 RedfishPkg/Include/Library/JsonLib.h
 create mode 100644 RedfishPkg/Library/JsonLib/JanssonCrtLibSupport.c
 create mode 100644 RedfishPkg/Library/JsonLib/JanssonCrtLibSupport.h
 create mode 100644 RedfishPkg/Library/JsonLib/JsonLib.c
 create mode 100644 RedfishPkg/Library/JsonLib/JsonLib.inf
 create mode 100644 RedfishPkg/Library/JsonLib/JsonUtilities.c
 create mode 100644 RedfishPkg/Library/JsonLib/JsonUtilities.h
 create mode 100644 RedfishPkg/Library/JsonLib/Readme.txt
 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68114): https://edk2.groups.io/g/devel/message/68114
Mute This Topic: https://groups.io/mt/78625517/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v2 0/3] jansson edk2 port
Posted by Laszlo Ersek 3 years, 4 months ago
On 12/01/20 03:25, Abner Chang wrote:
> 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.

I'd like to defer this review to the other stewards.

Thanks
Laszlo

> 
> * 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: 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: Nickle Wang <nickle.wang@hpe.com>
> Cc: Peter O'Hanley <peter.ohanley@hpe.com>
> 
> Abner Chang (3):
>   edk2: jansson submodule for edk2 JSON library
>   RedfishPkg/library: EDK2 port of jansson library
>   RedfishPkg: Add EDK2 port of jansson library to build
> 
>  .gitmodules                                   |    3 +
>  ReadMe.rst                                    |    1 +
>  .../Include/Library/JanssonJsonLibMapping.h   |   63 +
>  RedfishPkg/Include/Library/JsonLib.h          |  767 ++++++++++++
>  .../Library/JsonLib/JanssonCrtLibSupport.c    |  705 +++++++++++
>  .../Library/JsonLib/JanssonCrtLibSupport.h    |  198 +++
>  RedfishPkg/Library/JsonLib/JsonLib.c          |  960 ++++++++++++++
>  RedfishPkg/Library/JsonLib/JsonLib.inf        |  103 ++
>  RedfishPkg/Library/JsonLib/JsonUtilities.c    |  417 +++++++
>  RedfishPkg/Library/JsonLib/JsonUtilities.h    |   69 +
>  RedfishPkg/Library/JsonLib/Readme.txt         |   40 +
>  RedfishPkg/Library/JsonLib/assert.h           |   16 +
>  RedfishPkg/Library/JsonLib/errno.h            |   16 +
>  RedfishPkg/Library/JsonLib/jansson            |    1 +
>  RedfishPkg/Library/JsonLib/jansson_config.h   |   60 +
>  .../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                |    1 +
>  RedfishPkg/RedfishPkg.ci.yaml                 |   33 +-
>  RedfishPkg/RedfishPkg.dec                     |    5 +
>  RedfishPkg/RedfishPkg.dsc                     |    1 +
>  31 files changed, 4743 insertions(+), 1 deletion(-)
>  create mode 100644 RedfishPkg/Include/Library/JanssonJsonLibMapping.h
>  create mode 100644 RedfishPkg/Include/Library/JsonLib.h
>  create mode 100644 RedfishPkg/Library/JsonLib/JanssonCrtLibSupport.c
>  create mode 100644 RedfishPkg/Library/JsonLib/JanssonCrtLibSupport.h
>  create mode 100644 RedfishPkg/Library/JsonLib/JsonLib.c
>  create mode 100644 RedfishPkg/Library/JsonLib/JsonLib.inf
>  create mode 100644 RedfishPkg/Library/JsonLib/JsonUtilities.c
>  create mode 100644 RedfishPkg/Library/JsonLib/JsonUtilities.h
>  create mode 100644 RedfishPkg/Library/JsonLib/Readme.txt
>  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
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68128): https://edk2.groups.io/g/devel/message/68128
Mute This Topic: https://groups.io/mt/78625517/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-