Skip to content

Commit 392d1ff

Browse files
committed
scripts/toolchain: update toolchain doc and build env sample
Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent 55fccfb commit 392d1ff

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

scripts/toolchain/README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ for glibc.
2929

3030
## Prepare source code
3131

32+
> We don't provide any support for these scripts, the best way to use it is to take a look at the script itself.
33+
3234
If you want to build this toolchain, you can clone source code like this below:
3335

3436
~~~shell
3537
# used by outside to build toolchain only
36-
# the branch to be build, select nuclei/2023
38+
# the branch to be build, select nuclei/2024-gcc13
3739
# For nuclei engineer, you can change the url to nuclei internal gito server url
3840
# you can change the https url to ssh url, if you have setup ssh keys of github/gitee/gito
39-
git clone -b nuclei/2023 --depth 1 https://github.com/riscv-mcu/riscv-gnu-toolchain.git
41+
git clone -b nuclei/2024-gcc13 --depth 1 https://github.com/riscv-mcu/riscv-gnu-toolchain.git
4042
cd riscv-gnu-toolchain
4143
# clone and update submodule
4244
# FORCE_SUBMODULE=0: if you have already clone the correct branch and prepared submodule source code
@@ -63,8 +65,8 @@ PULLFIRST=1 ./scripts/toolchain/docker.sh linux64
6365
# If you want to build win32 toolchain, please make sure the same linx64 version is built first
6466
# or you need to set PATH to include your linux toolchain path first.
6567
# such as below:
66-
# for glibc: export PATH=/work/LocalInstall/linux64/glibc/2023.04-eng1/gcc/bin:$PATH
67-
# for newlibc: export PATH=/work/LocalInstall/linux64/newlibc/2023.04-eng1/gcc/bin:$PATH
68+
# for glibc: export PATH=/work/LocalInstall/linux64/glibc/2024.07-eng1/gcc/bin:$PATH
69+
# for newlibc: export PATH=/work/LocalInstall/linux64/newlibc/2024.07-eng1/gcc/bin:$PATH
6870
~~~
6971

7072
Now you should be in docker environment now.
@@ -85,13 +87,16 @@ cp scripts/toolchain/buildenv.sample mybuild.env
8587
# Then use the build environment file like this
8688
BUILDENV=mybuild.env source ./scripts/toolchain/setup_env.sh
8789
# Now you can build toolchain now, and overwrite some variables during build like this
88-
## eg. I want to change the toolchain version TOOLVER to 2023.04-test1, use 32 jobs
90+
## eg. I want to change the toolchain version TOOLVER to 2024.07-test1, use 32 jobs
8991
## And it will save build environment file to savebuild_<toolhost>_<tooltype>.env
90-
TOOLVER=2023.04-test1 JOBS=32 ./scripts/toolchain/build.sh
92+
TOOLVER=2024.07-test1 JOBS=32 ./scripts/toolchain/build.sh
9193
# If DOCLEAN=1, then when toolchain is built successfully, the toolchain build folder will be cleanup,
9294
# if failed, the build folder will not be cleaned, you can rebuilt it without reconfigure it by add DOREBUILD=1
93-
DOREBUILD=1 TOOLVER=2023.04-test1 JOBS=32 ./scripts/toolchain/build.sh
94-
# And you can also directly cd to the build folder, and cd to its subfolder to build one of stages
95+
DOREBUILD=1 TOOLVER=2024.07-test1 JOBS=32 ./scripts/toolchain/build.sh
96+
# If you don't want to rebuild all this repo, you just want to build one of the repo
97+
# you can also directly cd to the build folder, and cd to its subfolder to build one of stages
98+
# The build folder will be displayed in the console, please take care, you can refer $toolbuilddir in the scripts/toolchain/build.sh
99+
# to see how it works and you also need to refer to the Makefile.in to see what commands are really executed during each step
95100
~~~
96101

97102
### Cleanup toolchain
@@ -103,8 +108,8 @@ toolchain version.
103108

104109
~~~shell
105110
# If you want to clean up installed local toolchain version please pass export CLEANINSTALL=1
106-
# eg. cleanup tool version 2023.04-eng1 linux64 newlibc
107-
TOOLVER=2023.04-eng1 TOOLHOST=linux64 TOOLTYPE=newlibc ./scripts/toolchain/cleanup.sh
111+
# eg. cleanup tool version 2024.07-eng1 linux64 newlibc
112+
TOOLVER=2024.07-eng1 TOOLHOST=linux64 TOOLTYPE=newlibc ./scripts/toolchain/cleanup.sh
108113
~~~
109114

110115
## Release toolchain
@@ -114,6 +119,6 @@ TOOLVER=2023.04-eng1 TOOLHOST=linux64 TOOLTYPE=newlibc ./scripts/toolchain/clean
114119
If you want to sync successfully built toolchain to internal share location, you can run it like this.
115120

116121
~~~shell
117-
# Assume you want to sync tool version 2023.04-eng1 linux64 newlibc
118-
TOOLVER=2023.04-eng1 TOOLHOST=linux64 TOOLTYPE=newlibc ./scripts/toolchain/release.sh
122+
# Assume you want to sync tool version 2024.07-eng1 linux64 newlibc
123+
TOOLVER=2024.07-eng1 TOOLHOST=linux64 TOOLTYPE=newlibc ./scripts/toolchain/release.sh
119124
~~~

scripts/toolchain/buildenv.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TOOLTYPE=newlibc
55
# toolchain host: win32 or linux64
66
#TOOLHOST=linux64
77
# toolchain version, / or \ isnot allowed, such as 2023.04-devbuild or 2023.04.10
8-
TOOLVER=2023.08
8+
TOOLVER=2024.06
99
# arguments passed to --with-multilib-generator
1010
# if not empty, it will enable multilib build
1111
# customized version: Zc + Xxldsp + Zb

scripts/toolchain/buildenv_muslc.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TOOLTYPE=muslc
55
# toolchain host: win32 or linux64
66
#TOOLHOST=linux64
77
# toolchain version, / or \ isnot allowed, such as 2023.04-devbuild or 2023.04.10
8-
TOOLVER=2023.08
8+
TOOLVER=2024.06
99
# arguments passed to --with-multilib-generator
1010
# if not empty, it will enable multilib build
1111
# customized version: Zc + Xxldsp + Zb

0 commit comments

Comments
 (0)