Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 76 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,109 @@ 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are missing a cd .. here, the make xyz-defconfig doesn't work from the build directory

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have mkdir build && cd build in first step. From there you build/configure etc. It's working dir for your configuration. It's CMake convention.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind, I missed a step here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are missing a cd .. here, the make xyz-defconfig doesn't work from the build directory

Yup. With this, it works for me. Can you update the docs?

Also, just curious. What was the reason to switch to cmake instead of the good old autotools? :)

@lgirdwood lgirdwood Jan 23, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbaluta def_configs and menus, makes it easy to select what to build in, module or not build etc.


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<jobs>` for parallel build
```

## Running the tests

See [unit testing documentation](https://thesofproject.github.io/latest/developer_guides/unit_tests.html)

## 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

Expand Down