Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Platform] linux(arm64) #34030

Open
hassan-xy opened this issue Jun 20, 2024 · 10 comments
Open

[Platform] linux(arm64) #34030

hassan-xy opened this issue Jun 20, 2024 · 10 comments

Comments

@hassan-xy
Copy link

Reproduction steps

I run the command ./gn_build.sh
It builds and takes a space of around 30GB while my linux arm64 dev board has only 8 GB. Any ideas as to how I can cross-compile and resolve the issue.

Platform

other

Platform Version(s)

No response

Type

Manually tested with SDK

(Optional) If manually tested please explain why this is only manually tested

No response

Anything else?

No response

@bzbarsky-apple
Copy link
Contributor

bzbarsky-apple commented Jun 20, 2024

./gn_build.sh builds a whole bunch of different example apps and configurations. It's supposed to be a "build and test everything" kind of thing, not appropriate for anything like a constrained device.

@hassan-xy What are you actually trying to build?

@hassan-xy
Copy link
Author

I am trying to build chip-tool firstly.
Later I would want to test example codes for Linux arm64 arch.
If there is a way to only build for my arch then that would be great.

@bzbarsky-apple
Copy link
Contributor

If you want to just build chip-tool, I would recommend either

scripts/examples/gn_build_example.sh examples/chip-tool place/to/put/binary

or

./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-chip-tool"

All the builds ./gn_build.sh does are for your arch, but it does them with different compilers/settings...

@hassan-xy
Copy link
Author

image
Well I am running on the x86 desktop for my target board.

@bzbarsky-apple
Copy link
Contributor

@andy31415 what's the right way to build just chip-tool while cross-compiling?

@andy31415
Copy link
Contributor

Only clang can cross-compile, hence the error there saying due to rule ONLY IF -(clang|nodeps)`.

The target should be linux-arm64-chip-tool-clang

@hassan-xy
Copy link
Author

hassan-xy commented Jun 24, 2024

Hi @andy31415
I tried and I got a diffrent error this time.
image
image
I have tried different combinations like --out-prefix, --clean but still the same error.

Edit: I am also trying to build on my board by inserting the 64GB SD card. But I am getting some errors due to python.
I had python 3.6 while pulling the recursive git files then updated to python 3.8.0.
Let me know if you have any suggestions for this as well.
image

Thanks guys

@bzbarsky-apple
Copy link
Contributor

@hassan-xy You want

./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-arm64-chip-tool-clang build"

@hassan-xy
Copy link
Author

Well...
image
I am cross-compiling for arm64 environment on x86_64 ubuntu 20.04 desktop.

I am also parallely trying to build on the dev board by building inside of a sd card. I am also facing the same python dependencies. Do you guys have a list of all the python packages or versions necessary for build to succeed?

@bzbarsky-apple
Copy link
Contributor

The sysroot env var presumably needs to be set to the relevant sysroot for the cross-compile that has the other-arhc compilers, libraries, etc? That's about as much as I know about the cross-compiling bits, which are badly under-documented....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants