User Tools

Site Tools


developers:env_prepare

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
developers:env_prepare [2018/10/22 18:59]
mick [Your preferences]
developers:env_prepare [2018/12/28 16:45]
mick Add infos on multi-lib / newlib-based toolchain
Line 64: Line 64:
 ===== Prepare the toolchain ===== ===== Prepare the toolchain =====
  
-For building the Linux kernel on RISC-V, you'll need a recent toolchain. You may use [[https://​crosstool-ng.github.io/​docs/​ | Crosstool-NG ]] with the [[https://​github.com/​crosstool-ng/​crosstool-ng/​tree/​master/​samples/​riscv64-unknown-linux-gnu | riscv64-unknown-linux-gnu ]] sample, using source code from upstream gcc/​binutils/​glibc or using the [[https://​github.com/​riscv/​riscv-gnu-toolchain | riscv-gnu-toolchain]] repository.+For building the Linux kernel on RISC-V, you'll need a recent toolchain. You may use [[https://​crosstool-ng.github.io/​docs/​ | Crosstool-NG ]] with the [[https://​github.com/​crosstool-ng/​crosstool-ng/​tree/​master/​samples/​riscv64-unknown-linux-gnu | riscv64-unknown-linux-gnu ]] sample, using source code from upstream gcc/​binutils/​glibc or using the [[https://​github.com/​riscv/​riscv-gnu-toolchain | riscv-gnu-toolchain]] repository. Your distribution may also provide cross-toolchains,​ e.g. [[https://​packages.debian.org/​sid/​gcc-riscv64-linux-gnu | debian]].
  
 ==== Crosstool-NG how to ==== ==== Crosstool-NG how to ====
Line 108: Line 108:
 </​code>​ </​code>​
  
-==== Use the toolchain ====+<WRAP Tip> 
 +You may build a multi-lib toolchain (that can create both 32bit and 64bit binaries) by using the ''​--enable-multilib''​ argument on the configure command above. 
 +</​WRAP>​ 
 + 
 +<WRAP Info> 
 +Similar to the GNU-based toolchain, you may build a newlib-based toolchain by just typing ''​make''​ instead of ''​make linux''​ above. Make sure you use a different prefix path. 
 +</​WRAP>​ 
 + 
 +==== Using the toolchain ====
  
 Now that you are done, you should add <install directory>/​bin to your PATH Now that you are done, you should add <install directory>/​bin to your PATH
developers/env_prepare.txt · Last modified: 2019/04/10 20:30 by mick