SiliconLabs / wisun-br-linux

Silicon Labs Wi-SUN Linux border router reference implementation
https://www.silabs.com/wireless/wi-sun
Other
37 stars 14 forks source link

Require step/procedure for Cross Compilation #3

Closed krunalchauhan637 closed 1 year ago

krunalchauhan637 commented 2 years ago

Want to integrate wisun-br-linux in RB-i.MX 6UL. Capture (1)

Can I know procedure or step to intrgrate wisun-br-linux ?

If any details require from our end let me know

krunalchauhan637 commented 2 years ago

Is there any positive update ?

MarcDorval commented 2 years ago

Hi,

Did you follow the readme? How far have you been in this?

Regards, Marc

krunalchauhan637 commented 2 years ago

Yes, I have gone through It. But I did not get much idea.

Board : Phytec RB-i.MX 6UL Task: Want to cross compile wisun-br-linux code for above board. For compilation I am using my Linux PC.

Can I know procedure ? Can you help me out ?

jerome-pouiller commented 2 years ago

It seems you are using Yocto. Refer to the Yocto documentation to know how to create recipes (I think that inheriting from cmake should be sufficient).

krunalchauhan637 commented 2 years ago

Can I know cross compilation steps ?

jerome-pouiller commented 2 years ago

wsbrd cross-compiles as usual cmake projects, using --toolchain argument. Check out cmake.bbclass in your Yocto distribution for more information.

krunalchauhan637 commented 2 years ago

Thanks for guidance. I have some progress on cross compilation. I have write my own makefile to compile wsbrd.

Further I need required network link library source code to cross compile. Screenshot from 2022-06-02 11-18-49

jerome-pouiller commented 2 years ago

I have googled the documentation of your BSP for you. Refer to this documentation: https://www.phytec.eu/products/software/yocto/phytec-unified-yocto-bsp-release/ which refer to this one: https://www.yoctoproject.org/docs/2.4.2/yocto-project-qs/yocto-project-qs.html

krunalchauhan637 commented 2 years ago

@jerome-pouiller Thanks for quick reply. I am directly cross compile using makefile.

I have cross compile mbedtls 3.0.0 Library & integrate. Same thing also done for pcap & systemd.

But I cant find proper network link library source code.

Makefile.txt

jerome-pouiller commented 2 years ago

I have to enable libnl in your BSP.

jerome-pouiller commented 2 years ago

BTW, I still suggest the use of the Yoco official recipes to cross-compile.

krunalchauhan637 commented 2 years ago

Okay. Do you think that will work with minimal changes ?

jerome-pouiller commented 2 years ago

You can try to hack tun.c, but I can't guarantee the result.

krunalchauhan637 commented 2 years ago

Thats what I am saying. I need to confirm that, If I go with Yoco official recipes to cross-compile. Will it work staright forward for phytec board or that have also dependency ? Becuase we are plan this board as production.

Or you can suggest me better way for it

jerome-pouiller commented 2 years ago

libnl is a part of openembedded-core and has no exotic dependencies. If your recipe depends on libnl, everything will build straight right.

krunalchauhan637 commented 2 years ago

Yes. I think It's better to go with yocto reicipe. Thanks for it. Will check and share result

krunalchauhan637 commented 2 years ago

Just want to know Are you compile and run application in which board ? On Same board ?

jerome-pouiller commented 2 years ago

Compile wsbrd on your host through Yocto. Then, you can run it on your Phytec board.

Sorry to be a bit harsh in my answers, but this issue is not related to wsbrd. I think you will get better answers if you ask to your board vendor (Phytec).

krunalchauhan637 commented 2 years ago

Not an issue. Thank you @jerome-pouiller for your support.