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:52]
mick
developers:env_prepare [2018/12/28 16:45]
mick Add infos on multi-lib / newlib-based toolchain
Line 48: Line 48:
 ==== Your preferences ==== ==== Your preferences ====
  
-Git allows you to use your favourite tools, in this example we'll use more for pager, nano for editor and meld for diff/merge. In order to use meld instead of the pager for displaying ​d+Git allows you to use your favourite tools, in this example we'll use more for pager, nano for editor and meld for diff/merge. In order to use meld instead of the pager for displaying ​diffs. Note that for using the external tool for diff/merge you should use the git difftool/​mergetool command instead of git diff.
  
 <​code>​ <​code>​
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
Line 115: Line 123:
 </​code>​ </​code>​
  
-You should ​have the following commands ​available+You should ​now be able to execute the toolchain binaries directly, here is an example of the available ​commands:
  
 <​code>​ <​code>​
developers/env_prepare.txt · Last modified: 2019/04/10 20:30 by mick