one definitions file per device

Signed-off-by: BigfootACA <bigfoot@classfun.cn>
This commit is contained in:
BigfootACA 2021-07-27 00:10:01 +08:00
parent eb6568fb18
commit 8cf5a83b33
3 changed files with 7 additions and 24 deletions

View File

@ -6,14 +6,8 @@ $Config=Join-Path `
-Path $Configs ` -Path $Configs `
-ChildPath (-Join ($CodeName,".txt")) -ChildPath (-Join ($CodeName,".txt"))
If( -Not (Test-Path -Path $Config)){ If( -Not (Test-Path -Path $Config)){
Write-Output "warning: your model has no definition file, use default" Write-Output "ERROR: your model has no definition file, please check"
$Config=Join-Path ` exit 1
-Path $Configs `
-ChildPath (-Join ($DefConfig,".txt"))
if( -Not (Test-Path -Path $Config)){
Write-Output "default definition file not found"
exit 1
}
} }
If(Test-Path -Path output){ If(Test-Path -Path output){
Remove-Item ` Remove-Item `

View File

@ -8,17 +8,11 @@ then
fi fi
cd "$(dirname "$0")" cd "$(dirname "$0")"
CONFIGS=definitions CONFIGS=definitions
DEF=sdm845-generic
CONFIG="${CONFIGS}/${1}.txt" CONFIG="${CONFIGS}/${1}.txt"
if ! [ -f "${CONFIG}" ] if ! [ -f "${CONFIG}" ]
then then
echo "warning: your model has no definition file, use default" >&2 echo "ERROR: your model has no definition file, please check!" >&2
CONFIG="${CONFIGS}/${DEF}.txt" exit 1
if ! [ -f "${CONFIG}" ]
then
echo "default definition file not found"
exit 1
fi
fi fi
rm -rf ./output rm -rf ./output
echo "copying drivers..." echo "copying drivers..."

View File

@ -8,18 +8,13 @@ then
fi fi
cd "$(dirname "$0")" cd "$(dirname "$0")"
CONFIGS=definitions CONFIGS=definitions
DEF=sdm845-generic
CONFIG="${CONFIGS}/${1}.txt" CONFIG="${CONFIGS}/${1}.txt"
if ! [ -f "${CONFIG}" ] if ! [ -f "${CONFIG}" ]
then then
echo "warning: your model has no definition file, use default" >&2 echo "ERROR: your model has no definition file, please check!" >&2
CONFIG="${CONFIGS}/${DEF}.txt" exit 1
if ! [ -f "${CONFIG}" ]
then
echo "default definition file not found"
exit 1
fi
fi fi
rm -rf ./output
echo "copying drivers..." echo "copying drivers..."
while read -r line while read -r line
do do