[scripts] Introduce scripts/fetch-toolchains.py
This change introduces $LK_ROOT/toolchain as an official installation directory for toolchains, as well as a new script for conveniently installing them there (versus manual GETs + untarring). getting_started.md is updated to suggest its use.
This commit is contained in:
committed by
Travis Geiselbrecht
parent
6f24850de8
commit
1b2c449ceb
@@ -6,25 +6,23 @@
|
||||
```
|
||||
mkdir -p lk-work && cd lk-work
|
||||
```
|
||||
2- Clone the repo
|
||||
2- Clone the repo and change dir to the root
|
||||
```
|
||||
git clone https://github.com/littlekernel/lk
|
||||
```
|
||||
3- Download appropriate toolchain and extract it
|
||||
```
|
||||
wget https://newos.org/toolchains/riscv64-elf-14.2.0-Linux-x86_64.tar.xz
|
||||
cd lk
|
||||
|
||||
mkdir -p toolchain
|
||||
tar xf riscv64-elf-14.2.0-Linux-x86_64.tar.xz
|
||||
cd ..
|
||||
```
|
||||
3- Download appropriate toolchain
|
||||
```
|
||||
# Fetches the latest riscv64-elf toolchain for your host.
|
||||
scripts/fetch-toolchains.py --prefix riscv64-elf
|
||||
```
|
||||
4- Add toolchain to PATH
|
||||
```
|
||||
export PATH=$PWD/toolchain/riscv64-elf-14.2.0-Linux-x86_64/bin:$PATH
|
||||
```
|
||||
5- Change dir to lk to build and find available project
|
||||
5- Find available project
|
||||
```
|
||||
cd lk
|
||||
ls project/*
|
||||
```
|
||||
6- E.g pick `qemu-virt-riscv64-test` and build kernel
|
||||
|
||||
Reference in New Issue
Block a user