mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-08-04 21:05:29 +00:00
build: build-docker.sh: drop --skip-legacy and --skip-core options
This commit is contained in:
parent
18b88a12f0
commit
bd342b3ab7
2
.github/workflows/common.yml
vendored
2
.github/workflows/common.yml
vendored
@ -139,7 +139,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- run: git checkout ${{ github.head_ref || github.ref_name }}
|
- run: git checkout ${{ github.head_ref || github.ref_name }}
|
||||||
- run: ./build-docker.sh ${{ matrix.model == 'T1B1' && '--skip-core' || '--skip-legacy' }} --models ${{ matrix.model }} --targets bootloader,firmware,prodtest ${{ github.head_ref || github.ref_name }}
|
- run: ./build-docker.sh --models ${{ matrix.model }} --targets bootloader,firmware,prodtest ${{ github.head_ref || github.ref_name }}
|
||||||
- name: Show fingerprints
|
- name: Show fingerprints
|
||||||
run: |
|
run: |
|
||||||
for file in build/*/*/*.fingerprint; do
|
for file in build/*/*/*.fingerprint; do
|
||||||
|
@ -50,11 +50,9 @@ function help_and_die() {
|
|||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --skip-bitcoinonly - do not build bitcoin-only firmwares"
|
echo " --skip-bitcoinonly - do not build bitcoin-only firmwares"
|
||||||
echo " --skip-normal - do not build regular firmwares"
|
echo " --skip-normal - do not build regular firmwares"
|
||||||
echo " --skip-core - do not build core"
|
|
||||||
echo " --skip-legacy - do not build legacy"
|
|
||||||
echo " --repository path/to/repo - checkout the repository from the given path/url"
|
echo " --repository path/to/repo - checkout the repository from the given path/url"
|
||||||
echo " --no-init - do not recreate docker environments"
|
echo " --no-init - do not recreate docker environments"
|
||||||
echo " --models - comma-separated list of models. default: --models T2B1,T2T1,T3T1"
|
echo " --models - comma-separated list of models. default: --models T1B1,T2B1,T2T1,T3T1"
|
||||||
echo " --targets - comma-separated list of targets for core build. default: --targets boardloader,bootloader,firmware"
|
echo " --targets - comma-separated list of targets for core build. default: --targets boardloader,bootloader,firmware"
|
||||||
echo " --help"
|
echo " --help"
|
||||||
echo
|
echo
|
||||||
@ -64,12 +62,10 @@ function help_and_die() {
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
OPT_BUILD_CORE=1
|
|
||||||
OPT_BUILD_LEGACY=1
|
|
||||||
OPT_BUILD_NORMAL=1
|
OPT_BUILD_NORMAL=1
|
||||||
OPT_BUILD_BITCOINONLY=1
|
OPT_BUILD_BITCOINONLY=1
|
||||||
INIT=1
|
INIT=1
|
||||||
MODELS=(T2B1 T2T1 T3T1)
|
MODELS=(T1B1 T2B1 T2T1 T3T1)
|
||||||
CORE_TARGETS=(boardloader bootloader firmware)
|
CORE_TARGETS=(boardloader bootloader firmware)
|
||||||
|
|
||||||
REPOSITORY="file:///local"
|
REPOSITORY="file:///local"
|
||||||
@ -87,14 +83,6 @@ while true; do
|
|||||||
OPT_BUILD_NORMAL=0
|
OPT_BUILD_NORMAL=0
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--skip-core)
|
|
||||||
OPT_BUILD_CORE=0
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--skip-legacy)
|
|
||||||
OPT_BUILD_LEGACY=0
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--repository)
|
--repository)
|
||||||
REPOSITORY="$2"
|
REPOSITORY="$2"
|
||||||
shift 2
|
shift 2
|
||||||
@ -133,15 +121,7 @@ if [ "$OPT_BUILD_BITCOINONLY" -eq 1 ]; then
|
|||||||
variants+=(1)
|
variants+=(1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VARIANTS_core=()
|
VARIANTS=("${variants[@]}")
|
||||||
VARIANTS_legacy=()
|
|
||||||
|
|
||||||
if [ "$OPT_BUILD_CORE" -eq 1 ]; then
|
|
||||||
VARIANTS_core=("${variants[@]}")
|
|
||||||
fi
|
|
||||||
if [ "$OPT_BUILD_LEGACY" -eq 1 ]; then
|
|
||||||
VARIANTS_legacy=("${variants[@]}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
TAG="$1"
|
TAG="$1"
|
||||||
COMMIT_HASH="$(git rev-parse "$TAG")"
|
COMMIT_HASH="$(git rev-parse "$TAG")"
|
||||||
@ -266,7 +246,10 @@ DIR=$(pwd)
|
|||||||
# build core
|
# build core
|
||||||
|
|
||||||
for TREZOR_MODEL in ${MODELS[@]}; do
|
for TREZOR_MODEL in ${MODELS[@]}; do
|
||||||
for BITCOIN_ONLY in ${VARIANTS_core[@]}; do
|
if [ "$TREZOR_MODEL" = "T1B1" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
for BITCOIN_ONLY in ${VARIANTS[@]}; do
|
||||||
|
|
||||||
DIRSUFFIX=${BITCOIN_ONLY/1/-bitcoinonly}
|
DIRSUFFIX=${BITCOIN_ONLY/1/-bitcoinonly}
|
||||||
DIRSUFFIX=${DIRSUFFIX/0/}
|
DIRSUFFIX=${DIRSUFFIX/0/}
|
||||||
@ -320,7 +303,8 @@ done
|
|||||||
|
|
||||||
# build legacy
|
# build legacy
|
||||||
|
|
||||||
for BITCOIN_ONLY in ${VARIANTS_legacy[@]}; do
|
if echo "${MODELS[@]}" | grep -q T1B1 ; then
|
||||||
|
for BITCOIN_ONLY in ${VARIANTS[@]}; do
|
||||||
|
|
||||||
DIRSUFFIX=${BITCOIN_ONLY/1/-bitcoinonly}
|
DIRSUFFIX=${BITCOIN_ONLY/1/-bitcoinonly}
|
||||||
DIRSUFFIX=${DIRSUFFIX/0/}
|
DIRSUFFIX=${DIRSUFFIX/0/}
|
||||||
@ -362,7 +346,8 @@ EOF
|
|||||||
--init \
|
--init \
|
||||||
"$SNAPSHOT_NAME" \
|
"$SNAPSHOT_NAME" \
|
||||||
/nix/var/nix/profiles/default/bin/nix-shell --run "bash /local/build/$SCRIPT_NAME"
|
/nix/var/nix/profiles/default/bin/nix-shell --run "bash /local/build/$SCRIPT_NAME"
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Docker image retained as $SNAPSHOT_NAME"
|
echo "Docker image retained as $SNAPSHOT_NAME"
|
||||||
|
@ -31,21 +31,21 @@ After the build finishes the firmware images are located in:
|
|||||||
|
|
||||||
You can speed up the build process by adding options to the script:
|
You can speed up the build process by adding options to the script:
|
||||||
|
|
||||||
* `--skip-core` if you are only building for Trezor One,
|
* `--models=A,B,C` to only build for specific model(s) which are not Trezor One.
|
||||||
* `--skip-legacy --models=A,B,C` to only build for specific model(s) which are not Trezor One.
|
|
||||||
|
|
||||||
The following models are supported:
|
The following models are supported:
|
||||||
|
|
||||||
* **`T`** - Trezor Model T
|
* **`T1B1`** - Trezor One
|
||||||
* **`R`** - Trezor Safe 3 rev.A
|
* **`T2T1`** - Trezor Model T
|
||||||
|
* **`T2B1`** - Trezor Safe 3 rev.A
|
||||||
* **`T3B1`** - Trezor Safe 3 rev.B
|
* **`T3B1`** - Trezor Safe 3 rev.B
|
||||||
* **`T3T1`** - Trezor Safe 5
|
* **`T3T1`** - Trezor Safe 5
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bash build-docker.sh --skip-core legacy/v1.10.3 # build only for Trezor One
|
bash build-docker.sh --models=T1B1 legacy/v1.10.3 # build only for Trezor One
|
||||||
bash build-docker.sh --skip-legacy --models=T3T1 core/v2.8.3 # build only for Trezor Safe 5
|
bash build-docker.sh --models=T3T1 core/v2.8.3 # build only for Trezor Safe 5
|
||||||
```
|
```
|
||||||
|
|
||||||
## Verifying
|
## Verifying
|
||||||
|
Loading…
Reference in New Issue
Block a user