thesofproject / sof-docs

Documentation for SOF
Other
16 stars 72 forks source link

.gitmodules instead of asking for additional repo clone steps on source? #474

Closed felakuti4life closed 11 months ago

felakuti4life commented 12 months ago

In the instructions for building SOF from source, devs are asked to clone alsa-lib, alsa-utils, xtensa-overlay, and crosstool-ng into the SOF_WORKSPACE directory. is there no reason we don't just have these as submodules with something like this? It would greatly reduce the complexity of the "build from source" instructions.

[submodule "alsa-lib"]
        path = alsa-lib
        url = git://git.alsa-project.org/alsa-lib
[submodule "alsa-utils"]
        path = alsa-utils
        url = git://git.alsa-project.org/alsa-utils
[submodule "xtensa-overlay"]
        path = xtensa-overlay
        url = https://github.com/thesofproject/xtensa-overlay
        branch = sof-gcc10.2
[submodule "crosstool-ng"]
        path = crosstool-ng
        url = https://github.com/thesofproject/crosstool-ng
        branch = sof-gcc10x
lgirdwood commented 12 months ago

@felakuti4life most vendors are now in the process of moving to Zephyr as the RTOS for SOF which manages all of it's dependecies with west (which has proven easier to work with vs git submodules). I would follow Zephyr instructions if building for Intel or NXP targets today.

If building for xtos (non Zephyr) RTOS based targets, then compiler bianries can be downloaded from here https://github.com/thesofproject/crosstool-ng/releases.

ALSA builds may not be needed if using a recent 23.04 distro as IIRC all ALSA required patches should be upstream (a topology build failure would indicate you need latest ALSA git rather than distro version)

There is also a docker container that can be used to reduce effort for xtos based targets (it builds ALSA and CC).

felakuti4life commented 11 months ago

Got it, makes sense, thanks.