OpenNetworkLinux icon indicating copy to clipboard operation
OpenNetworkLinux copied to clipboard

[Edgecore][as9516-32d] Access BMC by using libcurl

Open WillyLiu-EC opened this issue 2 years ago • 13 comments

[Edgecore][as9516-32d] Access BMC by using libcurl

  1. Modify kernel config This modification is for creating usb0 interface. And then, it can access BMC through usb0
  2. Implement the BMC curl accessing for ONL To make sure BMC response, it uses libcurl to access BMC.
  3. Fix the issus that failed with build ONL It can not build ONL for master. Need to modify the debian path for stretch.

WillyLiu-EC avatar May 31 '23 00:05 WillyLiu-EC

Thank you for your contribution.

Please fix the typos and formatting of the merge/pull request description. Please also describe the goal. Where is OpenBMCv1 installed on?

Thank you for your suggestion. About this question, maybe we modify the branch name as9516-32d_libcrul_with_openbmc_v1 to as9516-32d_libcrul_with_bmc. The main modifications is using libcurl to access bmc.

WillyLiu-EC avatar Jun 01 '23 06:06 WillyLiu-EC

In my opinion the branch name is less important than the lost discussion/comments of the merge/pull request.

Should you change it, please spell curl correctly. ;-)

paulmenzel avatar Jun 01 '23 06:06 paulmenzel

In my opinion the branch name is less important than the lost discussion/comments of the merge/pull request.

Should you change it, please spell curl correctly. ;-)

Sorry about wrong branch name. The correct branch name: as9516-32d_libcurl_with_bmc

WillyLiu-EC avatar Jun 01 '23 06:06 WillyLiu-EC

In my opinion the branch name is less important than the lost discussion/comments of the merge/pull request.

Should you change it, please spell curl correctly. ;-)

OK, we already modify it. please check it.

Best regards

WillyLiu-EC avatar Jun 01 '23 07:06 WillyLiu-EC

Thank you for the improvements. Still some requests:

  1. Please split the commit into one commit per item you mentioned with a commit message. (Answering for example the question: „Why is the usb0 interface needed for BMC?“.)
  2. Please do not indent the merge/pull request description with four spaces. Currently GitHub marks it up as a code block (monospace).

paulmenzel avatar Jun 01 '23 07:06 paulmenzel

Thank you for the improvements. Still some requests:

  1. Please split the commit into one commit per item you mentioned with a commit message. (Answering for example the question: „Why is the usb0 interface needed for BMC?“.)
  2. Please do not indent the merge/pull request description with four spaces. Currently GitHub marks it up as a code block (monospace).

Thanks for your suggestion. Please check it.

WillyLiu-EC avatar Jun 01 '23 08:06 WillyLiu-EC

Hi, I am stepping through the outstanding PRs, this one does not compile when you run "make docker" due to an issue with curl.

make[4]: warning: -jN forced in submake: disabling jobserver mode. LinkingShared[release]: libonlp-platform-defaults-module::libonlp-platform-defaults.so /usr/lib/gcc-cross/aarch64-linux-gnu/6/../../../../aarch64-linux-gnu/bin/ld: cannot find -lcurl collect2: error: ld returned 1 exit status

sonoble avatar Sep 01 '23 20:09 sonoble

Hi, I am stepping through the outstanding PRs, this one does not compile when you run "make docker" due to an issue with curl.

make[4]: warning: -jN forced in submake: disabling jobserver mode. LinkingShared[release]: libonlp-platform-defaults-module::libonlp-platform-defaults.so /usr/lib/gcc-cross/aarch64-linux-gnu/6/../../../../aarch64-linux-gnu/bin/ld: cannot find -lcurl collect2: error: ld returned 1 exit status

Hi I download(git clone)a new codebase from this branch. And the the building result is successful. Could you download(git clone) a new codebase to build again ?

Best regards, WillyLiu

WillyLiu-EC avatar Sep 11 '23 08:09 WillyLiu-EC

Hi WillyLiu,

I downloaded the repo and patched but I get the same failure.. are you running "make docker" after you clone and patch?

sonoble avatar Sep 11 '23 19:09 sonoble

Hi WillyLiu,

I downloaded the repo and patched but I get the same failure.. are you running "make docker" after you clone and patch?

Our building process

  1. docker/tools/onlbuilder -9
  2. source setup.env
  3. make amd64

WillyLiu-EC avatar Sep 12 '23 01:09 WillyLiu-EC

Hello,

So the issue is that we can't merge anything that breaks the general build, hence the "make docker" test which is the first way we check PRs.

On Mon, Sep 11, 2023, 6:49 PM WillyLiu-EC @.***> wrote:

Hi WillyLiu,

I downloaded the repo and patched but I get the same failure.. are you running "make docker" after you clone and patch?

Our building process

  1. docker/tools/onlbuilder -9
  2. source setup.env
  3. make amd64

— Reply to this email directly, view it on GitHub https://github.com/opencomputeproject/OpenNetworkLinux/pull/941#issuecomment-1714844863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP5WH443RX3X6BJ2VJBGYDXZ65SLANCNFSM6AAAAAAYUXPPTU . You are receiving this because you commented.Message ID: @.***>

sonoble avatar Sep 12 '23 02:09 sonoble

New mail: [email protected]

WillyLiu-EC avatar Mar 22 '24 02:03 WillyLiu-EC

We encountered the following error messages when running make docker.

Our implementation requires calling the curl API, which means the header #include <curl/curl.h> must be added in the C source file. To support this, we also added GLOBAL_LINK_LIBS += -lcurl in packages/base/any/onlp/src/onlplib/module/make.mk.

However, after this modification, the make docker command fails during the build process. Could you advise us on the proper way to modify the build configuration so that we can call the curl API without causing build errors?

Thank you.

message: NFO:onlpm:Rebuilding onlp:arm64... make[4]: warning: -jN forced in submake: disabling jobserver mode. LinkingShared[release]: libonlp-platform-defaults-module::libonlp-platform-defaults.so /usr/lib/gcc-cross/aarch64-linux-gnu/6/../../../../aarch64-linux-gnu/bin/ld: cannot find -lcurl collect2: error: ld returned 1 exit status /home2/willy_liu/ONL_willy/as9516-32d_make_docker/OpenNetworkLinux/sm/infra/builder/unix/toolchains/gcc-local/so.mk:46: recipe for target 'BUILD/stretch/aarch64-linux-gnu/bin/libonlp-platform-defaults.so' failed make[5]: *** [BUILD/stretch/aarch64-linux-gnu/bin/libonlp-platform-defaults.so] Error 1 /home2/willy_liu/ONL_willy/as9516-32d_make_docker/OpenNetworkLinux/make/subdirs.mk:15: recipe for target 'all' failed make[4]: *** [all] Error 1 ERROR:onlpm:'Build failed.' ERROR:onlrfs:Failed to build all required packages. /home2/willy_liu/ONL_willy/as9516-32d_make_docker/OpenNetworkLinux/make/rfs.mk:50: recipe for target 'RFS' failed make[3]: *** [RFS] Error 1 ERROR:onlpm:'Build failed.' /home2/willy_liu/ONL_willy/as9516-32d_make_docker/OpenNetworkLinux/make/pkg.mk:30: recipe for target 'pkgall' failed make[2]: *** [pkgall] Error 1 /home2/willy_liu/ONL_willy/as9516-32d_make_docker/OpenNetworkLinux/make/subdirs.mk:15: recipe for target 'all' failed make[1]: *** [all] Error 1 make[1]: Leaving directory '/home2/willy_liu/ONL_willy/as9516-32d_make_docker/OpenNetworkLinux/builds/arm64' Makefile:23: recipe for target 'arm64' failed make: *** [arm64] Error 2 make: *** [Makefile:56: docker] Error 2

WillyLiu-EC avatar Nov 19 '25 08:11 WillyLiu-EC