Skip to content

Commit

Permalink
Cleanup README
Browse files Browse the repository at this point in the history
- Update repo tool installation link.
- Remove FSBL & ZSBL wording and clarify that FSBL is U-Boot SPL.
- Move setup.sh step after build tools installation to avoid issues with host
  tools being wrong.

Signed-off-by: David Abdurachmanov <[email protected]>
  • Loading branch information
David Abdurachmanov committed Sep 24, 2020
1 parent 7db970e commit 349c56a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ The new experimental Freedom Unleashed (FU) SDK is based on OpenEmbedded (OE). I
- build predefined disk images for QEMU and [SiFive HiFive Unleashed](https://www.sifive.com/boards/hifive-unleashed) development board (incl. [HiFive Unleashed Expansion Board](https://www.crowdsupply.com/microsemi/hifive-unleashed-expansion-board) from Microsemi);
- build custom disk images with additional software packages from various third-party OE layers;
- quickly launch QEMU VM instance with your built disk image;
- build bootloader binaries (ZSBL, FSBL, OpenSBI, U-Boot);
- build bootloader binaries (OpenSBI, U-Boot, U-Boot SPL);
- build Device Tree Binary (DTB);
- build Linux kernel images;
- easily modify disk partition layout.

> [Berkeley Boot Loader (BBL)](https://github.com/riscv/riscv-pk) is replaced by [OpenSBI](https://github.com/riscv/opensbi) and uSD (microSD) disk images now also incl. [FSBL](https://github.com/sifive/freedom-u540-c000-bootloader). ZSBL is also built, but it's not possible to use it as it resides in ROM.
> [Berkeley Boot Loader (BBL)](https://github.com/riscv/riscv-pk) is replaced by [OpenSBI](https://github.com/riscv/opensbi) and uSD (microSD) disk images now also incl. FSBL (U-Boot SPL).
For more information on particular release see `ReleaseNotes` directory in [freedom-u-sdk](https://github.com/sifive/freedom-u-sdk) repository on GitHub.

Expand All @@ -28,7 +28,7 @@ For advanced OE usage we advice to look into the following third-party manuals:

## Quick Start

Install `repo` command from Google if not available on your host system. Please follow [the official instructions](https://source.android.com/setup/downloading#installing-repo) by Google.
Install `repo` command from Google if not available on your host system. Please follow [the official instructions](https://source.android.com/setup/develop#installing-repo) by Google.

Then install a number of packages for BitBake (OE build tool) to work properly on your host system. BitBake itself depends on Python 3. Once you have Python 3 installed BitBake should be able to tell you most of the missing packages.

Expand Down Expand Up @@ -64,12 +64,6 @@ repo sync
repo rebase
```

### Setting up Build Environment

```bash
. ./meta-sifive/setup.sh
```

### Getting Build Tools (optional)

OpenEmbedded-Core requires GCC 6 or newer to be available on the host system. Your host system might have an older version of GCC if you use LTS (Long Term Support) Linux distribution (e.g. Ubuntu 16.04.6 has GCC 5.4.0). You could solve this issue by installing build tools. This requires less than 400MB of disk space. You can download pre-built one or build your own build tools.
Expand Down Expand Up @@ -114,6 +108,16 @@ Finally you should be able to use your build tools:
. $BUILDDIR/../openembedded-core/buildtools/environment-setup-x86_64-oesdk-linux
```

### Setting up Build Environment

This step has to be done after you modify your environment with toolchain you want to use otherwise wrong host tools might be available in the package build environment. For example, `gcc` from host system will be used for building `*-native` packages.

```bash
. ./meta-sifive/setup.sh
```

> You can verify and fix your host tools by checking symlinks in `$BUILDDIR/tmp-glibc/hosttools` directory.
### Configuring BitBake Parallel Number of Tasks/Jobs

There are 3 variables that control the number of parallel tasks/jobs BitBake will use: `BB_NUMBER_PARSE_THREADS`, `BB_NUMBER_THREADS` and `PARALLEL_MAKE`. The last two are the most important, and both are set to number of cores available on the system. You can set them in your `$BUILDDIR/conf/local.conf` or in your shell environment similar to how `MACHINE` is used (see next section). Example:
Expand Down

0 comments on commit 349c56a

Please sign in to comment.