2023-05-31 12:47:22 +00:00
|
|
|
#!/usr/bin/env bash
|
2018-01-31 13:45:02 +00:00
|
|
|
|
2023-04-14 13:12:57 +00:00
|
|
|
cd $(dirname $0)
|
|
|
|
|
2023-05-31 12:47:22 +00:00
|
|
|
BUILDVH=$(realpath ../../tools/build_vendorheader)
|
|
|
|
BINCTL=$(realpath ../../tools/headertool.py)
|
|
|
|
|
|
|
|
MODELS=(T2T1 T2B1)
|
|
|
|
|
|
|
|
for MODEL in ${MODELS[@]}; do
|
|
|
|
cd $MODEL
|
|
|
|
# construct all vendor headers
|
|
|
|
for fn in *.json; do
|
|
|
|
name=$(echo $fn | sed 's/vendor_\(.*\)\.json/\1/')
|
|
|
|
$BUILDVH vendor_${name}.json vendor_${name}.toif vendorheader_${name}_unsigned.bin
|
|
|
|
done
|
2018-01-31 13:45:02 +00:00
|
|
|
|
2023-05-31 12:47:22 +00:00
|
|
|
# sign dev and QA vendor header
|
|
|
|
for name in unsafe qa_DO_NOT_SIGN; do
|
|
|
|
cp -a vendorheader_${name}_unsigned.bin vendorheader_${name}_signed_dev.bin
|
|
|
|
$BINCTL -D vendorheader_${name}_signed_dev.bin
|
|
|
|
done
|
|
|
|
cd ..
|
2023-03-02 15:15:15 +00:00
|
|
|
done
|