Removed references to outdated SOURCE_COMPILE variable

Removed obsolete choosing_kernel function
Start patching process only if we are compiling anything
This commit is contained in:
zador-blood-stained 2015-12-19 17:35:43 +03:00
parent ec58358a1e
commit 1d51322057
3 changed files with 9 additions and 46 deletions

View File

@ -41,8 +41,7 @@ while [[ $k1 -lt ${#MYARRAY1[@]} ]]
echo "$BOARD $RELEASE $BRANCH $BUILD_DESKTOP $LINUXFAMILY"
source $SRC/lib/main.sh
fi # kernel only
SOURCE_COMPILE="yes"
k1=$[$k1+2]
l1=$[$l1+2]
done

View File

@ -170,37 +170,6 @@ grab_version ()
VER=${VER//#/.}; VER=${VER%.}; VER=${VER//.-/-}
}
choosing_kernel (){
#--------------------------------------------------------------------------------------------------------------------------------
# Choose which kernel to use
#--------------------------------------------------------------------------------------------------------------------------------
IFS=";"
cd $DEST"/debs/"
if [[ $BRANCH == "next" ]]; then
MYARRAY=($(ls -1 linux-image* | awk '/next/' | sed ':a;N;$!ba;s/\n/;/g'))
else
MYARRAY=($(ls -1 linux-image* | awk '!/next/' | sed ':a;N;$!ba;s/\n/;/g'))
fi
# if there are no precompiled kernels proceed with compilation
if [[ ${#MYARRAY[@]} == "0" ]]; then
SOURCE_COMPILE="yes"
fi
MYPARAMS=( --title "Choose a kernel" --backtitle $backtitle --menu "\n Prebuild packages:" 25 60 16 )
i=0
while [[ $i -lt ${#MYARRAY[@]} ]]
do
MYPARAMS+=( "${MYARRAY[$i]}" " -" )
i=$[$i+1]
done
whiptail "${MYPARAMS[@]}" 2>results
CHOOSEN_KERNEL=$(<results)
rm results
unset MYARRAY
}
fingerprint_image (){
#--------------------------------------------------------------------------------------------------------------------------------
# Saving build summary to the image

21
main.sh
View File

@ -262,24 +262,19 @@ CHOOSEN_KERNEL=linux-image"$branch"-"$CONFIG_LOCALVERSION$LINUXFAMILY"_"$REVISIO
CHOOSEN_ROOTFS=linux-"$RELEASE"-root"$branch"-"$BOARD"_"$REVISION"_armhf
HEADERS_CACHE="${CHOOSEN_KERNEL/image/cache}"
# Choosing kernel if debs are present
#if [[ $BRANCH == "next" ]]; then
# MYARRAY=($(ls -1 $DEST/debs/linux-image* | awk '/next/' | sed ':a;N;$!ba;s/\n/;/g'))
# else
# MYARRAY=($(ls -1 $DEST/debs/linux-image* | awk '!/next/' | sed ':a;N;$!ba;s/\n/;/g'))
#fi
#if [[ ${#MYARRAY[@]} != "0" && $KERNEL_ONLY != "yes" ]]; then choosing_kernel; fi
for option in $(tr ',' ' ' <<< "$CLEAN_LEVEL"); do
[ "$option" != "sources" ] && cleaning "$option"
done
# patching sources
patching_sources
[ ! -f "$DEST/debs/$CHOOSEN_UBOOT" ] && local needs_uboot=yes
[ ! -f "$DEST/debs/$CHOOSEN_KERNEL" ] && local needs_kernel=yes
# Compile source if packed not exits
[ ! -f "$DEST/debs/$CHOOSEN_UBOOT" ] && compile_uboot
[ ! -f "$DEST/debs/$CHOOSEN_KERNEL" ] && compile_kernel
# patching sources if we need to compile u-boot or kernel
[[ $needs_uboot == yes || $needs_kernel == yes ]] && patching_sources
# Compile source if packed not exists
[ "$needs_uboot" = "yes" ] && compile_uboot
[ "$needs_kernel" = "yes" ] && compile_kernel
if [ "$KERNEL_ONLY" == "yes" ]; then
[[ -n "$RELEASE" ]] && create_board_package