starfive-tech / VisionFive2

445 stars 79 forks source link

Create Dockerfile for build environment #50

Open sbates130272 opened 1 year ago

sbates130272 commented 1 year ago

It seems people are having some issues building this very complex project and I suspect some of that is due to dependencies in the build packages. To ensure a consistent build environment include a Dockerfile that generates a build platform we know works because we also include a CI component that builds the required artifacts before allowing merges into master.

Thoughts and feedbacks on this most welcome. I am quite happy to have a go at this in my spare time if someone from starfive-tech can give me some input on their preferred base docker image (I always like Ubuntu most recent LTS myself).

andyhu-stf commented 1 year ago

@sbates130272 , it would be great if you can help to create the Dockerfile to generate a docker build environment. We had compiled the SDK ok on ubuntu 16.04/18.04/20.04/22.04. Currently we perfer to use the Ubuntu 20.04 LTS as the docker image.

sbates130272 commented 1 year ago

Thanks @andyhu-stf . Is there a major reason for not using 22.04 LTS? I would prefer to use the most recent LTS if at all possible.

andyhu-stf commented 1 year ago

Thanks @andyhu-stf . Is there a major reason for not using 22.04 LTS? I would prefer to use the most recent LTS if at all possible.

This is mainly due to the consideration that most of our developers does not use the most recent LTS version as the building enviroment. Also, it is better if you can give option to select 20.4 or 22.04 in your script.

sbates130272 commented 1 year ago

I seem to be having some issues getting the builds to work on both 22.04 and 20.04. Will try and attach the error log soon.

rpe2101 commented 1 year ago

Broken also on Ubuntu 23.04 x86_64. Submitted Issue #57. Agree on the complicated comment.

Those attempting to troubleshoot the SDK build system could benefit from a high level explanation of how the SDK build system is supposed to work from StarFive. From what I can see, the repository appears to download/build its own cross compiling build environment, which then builds native riscv targets. So far the brokenness I've come across appears to be the buildroot packages attempting to build.