diff --git a/README.md b/README.md index cbde03ae74fb..9cf28784389f 100644 --- a/README.md +++ b/README.md @@ -10,41 +10,97 @@ See [docs](https://thesofproject.github.io/latest/index.html) ### Prerequisites * Docker +* CMake (version >= 3.10) ### Build Instructions -1. Run `autogen.sh` +1. Create directory in checked out repo for build files: +``` +mkdir build && cd build +``` + +2. Run configuration for your toolchain: + +Baytrail: + +``` +cmake -DTOOLCHAIN=xtensa-byt-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-byt-elf .. +``` + +Cherrytrail: + +``` +cmake -DTOOLCHAIN=xtensa-cht-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-cht-elf .. +``` + +Haswell / Broadwell: + +``` +cmake -DTOOLCHAIN=xtensa-hsw-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-hsw-elf .. +``` + +Apollolake: + +``` +cmake -DTOOLCHAIN=xtensa-apl-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-apl-elf .. +``` + +Cannonlake: + +``` +cmake -DTOOLCHAIN=xtensa-cnl-elf -DROOT_DIR=`pwd`/../../xtensa-root/xtensa-cnl-elf .. +``` + +3. Apply default config for your platform. -2. Build and install the rimage ELF image creator and signing tool +Baytrail: ``` -./configure --enable-rimage -make -sudo make install +make baytrail_defconfig ``` -3. Run the following configure based on your platform. +Cherrytrail: -Baytrail :- +``` +make cherrytrail_defconfig +``` -```./configure --with-arch=xtensa --with-platform=baytrail --with-root-dir=$PWD/../xtensa-root/xtensa-byt-elf --host=xtensa-byt-elf``` +Haswell: -Cherrytrail :- +``` +make haswell_defconfig +``` -```./configure --with-arch=xtensa --with-platform=cherrytrail --with-root-dir=$PWD/../xtensa-root/xtensa-byt-elf --host=xtensa-byt-elf``` +Broadwell: -Library for Host Platform :- -If building library for host platform, run the following configure. Please modify -the --prefix option to choose the directory for installing the library files and -headers +``` +make broadwell_defconfig +``` -`./configure --with-arch=host --enable-library=yes --host=x86_64-unknown-linux-gnu --prefix=$PWD/../host-root/` +Apollolake: -4. `make` +``` +make apollolake_defconfig +``` -5. `make bin` +Cannonlake: -End with an example of getting some data out of the system or using it for a little demo +``` +make cannonlake_defconfig +``` + +4. (Optional) Customize your configuration + +``` +make menuconfig +``` + +5. Build firmware + +``` +make bin +# or `make bin -j` for parallel build +``` ## Running the tests @@ -52,11 +108,11 @@ See [unit testing documentation](https://thesofproject.github.io/latest/develope ## Deployment -Add additional notes about how to deploy this on a live system +TODO: Add additional notes about how to deploy this on a live system ## Contributing -TODO? +See [Contributing to the Project](https://thesofproject.github.io/latest/contribute/index.html) ## License