From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web08.5079.1607409593196587057 for ; Mon, 07 Dec 2020 22:39:54 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 08 Dec 2020 14:39:44 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Sean Brogan'" , "'Bret Barkelew'" , "'Andrew Fish'" , "'Laszlo Ersek'" , "'Leif Lindholm'" , "'Michael D Kinney'" , "'Nickle Wang'" , "'Peter O'Hanley'" References: <20201208021048.9104-1-abner.chang@hpe.com> In-Reply-To: <20201208021048.9104-1-abner.chang@hpe.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHY1IDAvNl0gamFuc3NvbiBlZGsyIHBvcnQ=?= Date: Tue, 8 Dec 2020 14:39:45 +0800 Message-ID: <008a01d6cd2c$eb0a1550$c11e3ff0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKkLOZuLovEk1vLn9DUkBPmPDW976hR9tFg Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Abner: I have minor comments on the library header file.=20 1. JasonLib.h & BaseUcs2Utf8Lib.h. They don't need to include the addition= al header files, such as Uefi.h and BaseLib.h, because the library header fil= e doesn't depend on the definitions from BaseLib. 2. CrtLib.inf needs to list the required library class: BaseMemoryLib & PrintLib. Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: bounce+27952+68426+4905953+8761045@groups.io > =B4=FA=B1=ED Abner Chang > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA12=D4=C28=C8=D5 10:11 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Sean Brogan ; Bret Barkelew > ; Andrew Fish ; Laszlo > Ersek ; Leif Lindholm ; Michael D > Kinney ; Liming Gao > ; Nickle Wang ; Peter > O'Hanley > =D6=F7=CC=E2: [edk2-devel] [PATCH v5 0/6] jansson edk2 port >=20 > In v5, move BaseUcs2Utf8Lib to under RedfishPkg. > 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. >=20 > In v3, Add jansson library as the required submoudle in > CiSettings.py for CI test. > In v2, JsonLib is moved to under RedfishPkg. >=20 > 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). >=20 > 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 environmen= t, > Redfish project consumes jansson to achieve JSON operations. >=20 > * Jansson version on edk2: 2.13.1 >=20 > * EDKII jansson library wrapper: > - JsonLib.h: > This is the denifitions of EDKII JSON APIs which are mapped to > jannson funcitons accordingly. >=20 > - 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. >=20 > *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 >=20 > Signed-off-by: Abner Chang >=20 > Cc: Sean Brogan > Cc: Bret Barkelew > Cc: Andrew Fish > Cc: Laszlo Ersek > Cc: Leif Lindholm > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Nickle Wang > Cc: Peter O'Hanley >=20 > Abner Chang (6): > RedfishPkg/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 >=20 > .gitmodules | 3 + > .pytool/CISettings.py | 2 + > ReadMe.rst | 1 + > RedfishPkg/Include/JanssonJsonMapping.h | 63 + > RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h | 69 + > RedfishPkg/Include/Library/CrtLib.h | 195 +++ > RedfishPkg/Include/Library/JsonLib.h | 768 ++++++++++++ > .../Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.c | 417 +++++++ > .../BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.inf | 31 + > 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 | 3 + > RedfishPkg/RedfishPkg.ci.yaml | 33 + > RedfishPkg/RedfishPkg.dec | 15 + > RedfishPkg/RedfishPkg.dsc | 3 + > 34 files changed, 4811 insertions(+) > create mode 100644 RedfishPkg/Include/JanssonJsonMapping.h > create mode 100644 RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h > create mode 100644 RedfishPkg/Include/Library/CrtLib.h > create mode 100644 RedfishPkg/Include/Library/JsonLib.h > create mode 100644 > RedfishPkg/Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.c > create mode 100644 > RedfishPkg/Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.inf > 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 >=20 > -- > 2.17.1 >=20 >=20 >=20 >=20 >=20