Build Atmel ARM9 board Board Support Packets
guowenxue
2024-05-22 0cbd8d5295b862f60a12e888a0218ae2329f6adb
Add top build shell script
1 files added
38 ■■■■■ changed files
build.sh 38 ●●●●● patch | view | raw | blame | history
build.sh
New file
@@ -0,0 +1,38 @@
#!/bin/bash
# this project absolute path
PRJ_PATH=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
SRC="bootloader kernel images"
#+-------------------------+
#| Shell script functions  |
#+-------------------------+
function pr_error() {
    echo -e "\033[40;31m $1 \033[0m"
}
function pr_warn() {
    echo -e "\033[40;33m $1 \033[0m"
}
function pr_info() {
    echo -e "\033[40;32m $1 \033[0m"
}
if [[ $# == 1 && $1 == -c ]] ;then
    pr_warn "start clean BSP project"
    task=-c
fi
for dir in $SRC ; do
    if [ ! -x build.sh ] ; then
        continue
    fi
    cd $dir
    ./build.sh $task
    cd $PRJ_PATH
done