BRANCH problem fixed and some clean up

This commit is contained in:
Igor Pečovnik 2015-12-09 14:39:27 +01:00
parent 98031a50cb
commit a3aa5e4046

View file

@ -155,25 +155,31 @@ compile_sunxi_tools (){
compile_kernel (){
#--------------------------------------------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------------------------------------------
# Compile kernel
#--------------------------------------------------------------------------------------------------------------------------------
display_alert "Compiling kernel" "@host" "info"
sleep 2
#---------------------------------------------------------------------------------------------------------------------------------
if [ -d "$SOURCES/$LINUXSOURCEDIR" ]; then
local branch="${BRANCH//default/}"
[[ -n "$branch" ]] && branch="-"$branch
# read kernel version to variable $VER
grab_version "$SOURCES/$LINUXSOURCEDIR"
display_alert "Compiling kernel" "@host" "info"
cd $SOURCES/$LINUXSOURCEDIR/
# delete previous creations
# adding custom firmware to kernel source
if [[ -n "$FIRMWARE" ]]; then unzip -o $SRC/lib/$FIRMWARE -d $SOURCES/$LINUXSOURCEDIR/firmware; fi
# use proven config
if [ "$KERNEL_KEEP_CONFIG" != "yes" ] || [ ! -f $SOURCES/$LINUXSOURCEDIR/.config ]; then cp $SRC/lib/config/$LINUXCONFIG.config $SOURCES/$LINUXSOURCEDIR/.config; fi
if [ "$KERNEL_KEEP_CONFIG" != "yes" ] || [ ! -f $SOURCES/$LINUXSOURCEDIR/.config ]; then
cp $SRC/lib/config/$LINUXCONFIG.config $SOURCES/$LINUXSOURCEDIR/.config;
fi
# hacks for banana
if [[ $BOARD == banana* || $BOARD == orangepi* || $BOARD == lamobo* ]] ; then
# hacks for banana family
if [[ $LINUXFAMILY == "banana" ]] ; then
sed -i 's/CONFIG_GMAC_CLK_SYS=y/CONFIG_GMAC_CLK_SYS=y\nCONFIG_GMAC_FOR_BANANAPI=y/g' .config
fi
@ -182,7 +188,7 @@ cp $SRC/lib/patch/misc/headers-debian-byteshift.patch /tmp
export LOCALVERSION="-"$LINUXFAMILY
# this way of compilation is much faster. We can use multi threading here but not later
# We can use multi threading here but not later since it's not working. This way of compilation is much faster.
if [ "$KERNEL_CONFIGURE" != "yes" ]; then
if [ "$BRANCH" = "default" ]; then
make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- silentoldconfig
@ -191,10 +197,9 @@ if [ "$KERNEL_CONFIGURE" != "yes" ]; then
fi
else
make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- oldconfig
make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
fi
if [ "$KERNEL_CONFIGURE" = "yes" ]; then make $CTHREADS ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig; fi
eval 'make $CTHREADS ARCH=arm CROSS_COMPILE="$CCACHE arm-linux-gnueabihf-" zImage modules 2>&1' \
${USE_DIALOG_LOGGING:+' | tee -a $DEST/debug/compilation.log'} ${USE_DIALOG:+' | dialog --backtitle "$backtitle" --progressbox "Compiling kernel..." 20 80'}
@ -211,12 +216,6 @@ if [ ${PIPESTATUS[0]} -ne 0 ]; then
fi
if [[ $BRANCH == "next" ]] ; then
KERNEL_BRACH="-next"
else
KERNEL_BRACH=""
fi
# different packaging for 4.3+ // probably temporaly soution
KERNEL_PACKING="deb-pkg"
IFS='.' read -a array <<< "$VER"
@ -231,7 +230,7 @@ DEBEMAIL="$MAINTAINERMAIL" CROSS_COMPILE="$CCACHE arm-linux-gnueabihf-" 2>&1 | d
# we need a name
CHOOSEN_KERNEL=linux-image"$KERNEL_BRACH"-"$CONFIG_LOCALVERSION$LINUXFAMILY"_"$REVISION"_armhf.deb
CHOOSEN_KERNEL=linux-image"$branch"-"$CONFIG_LOCALVERSION$LINUXFAMILY"_"$REVISION"_armhf.deb
cd ..
mv *.deb $DEST/debs/ || exit
else