-d, --docker DOCKER_FILE The URL/path of the Docker image, which defaults to https://repo.openeuler.org/openEuler-20.03-LTS-SP1/docker_img/aarch64/openEuler-docker.aarch64.tar.xz
-n, --name IMAGE_NAME The board image name to be built.
-k, --kernel KERNEL_URL The URL of kernel source's repository, which defaults to https://gitee.com/openeuler/rockchip-kernel.git.
-b, --branch KERNEL_BRANCH The branch name of kernel source's repository, which defaults to openEuler-22.03-LTS-SP3.
-c, --config KERNEL_DEFCONFIG The name/path of defconfig file when compiling kernel, which defaults to openeuler_rockchip_defconfig.
-r, --repo REPO_INFO Required! The URL/path of target repo file or list of repo's baseurls which should be a space separated list.
-s, --spec SPEC The image's specification: headless, xfce, ukui, dde or the file path of rpmlist. The default is headless.
--cores N The number of cpu cores to be used during making.
-h, --help Show command help.
"
help()
{
echo"$__usage"
exit$1
}
parseargs()
{
if["x$#"=="x0"];then
return0
fi
while["x$#" !="x0"];
do
if["x$1"=="x-h" -o "x$1"=="x--help"];then
return1
elif["x$1"=="x"];then
shift
elif["x$1"=="x--board"];then
board=`echo$2`
shift
shift
elif["x$1"=="x-d" -o "x$1"=="x--docker"];then
docker_file=`echo$2`
shift
shift
elif["x$1"=="x-n" -o "x$1"=="x--name"];then
name=`echo$2`
shift
shift
elif["x$1"=="x-k" -o "x$1"=="x--kernel"];then
kernel_url=`echo$2`
shift
shift
elif["x$1"=="x-b" -o "x$1"=="x--branch"];then
branch=`echo$2`
shift
shift
elif["x$1"=="x-c" -o "x$1"=="x--config"];then
default_defconfig=`echo$2`
shift
shift
elif["x$1"=="x-r" -o "x$1"=="x--repo"];then
repo_file=`echo$2`
shift
shift
elif["x$1"=="x-s" -o "x$1"=="x--spec"];then
spec_param=`echo$2`
shift
shift
elif["x$1"=="x--cores"];then
make_cores=`echo$2`
shift
shift
else
echo`date` - ERROR, UNKNOWN params "$@"
return2
fi
done
}
ERROR(){
echo`date` - ERROR, $*| tee -a ${log_dir}/${builddate}.log
}
LOG(){
echo`date` - INFO, $*| tee -a ${log_dir}/${builddate}.log