Skip to content

Instantly share code, notes, and snippets.

@RobertCNelson
Created June 18, 2015 20:03
Show Gist options
  • Select an option

  • Save RobertCNelson/c541763cb720fbee369e to your computer and use it in GitHub Desktop.

Select an option

Save RobertCNelson/c541763cb720fbee369e to your computer and use it in GitHub Desktop.
#!/bin/bash
VERSION_MESSAGE="Version: 1.123: ubuntu wily..."
chroot_user="voodoo"
SYSTEM_BUILDER=$(uname -n)
#Download/Upload
wget_dl="wget --no-verbose --directory-prefix=/build/buildd/"
UPLOAD="curl --limit-rate 25000 --retry 5 --retry-delay 120 --ftp-create-dirs -T"
ABI_STABLE="ABI:1 STABLE"
ABI_TEST="ABI:1 TESTING"
ABI_EXP="ABI:1 EXPERIMENTAL"
setup_enviroment () {
CHROOT_DIR="/var/chroot"
local_http="http://httphost/internal/dl/kernel.org"
unset release
unset dpkg_arch
unset SUBARCH
unset LATEST
release=$(ls /tmp/deb.release* | grep "deb.release" | awk -F '.' '{print $3}')
dpkg_arch=$(ls /tmp/deb.arch* | grep "deb.arch" | awk -F '.' '{print $3}')
SUBARCH=$(ls /tmp/deb.subarch* | grep "deb.subarch" | awk -F '.' '{print $3}')
LATEST=$(ls /tmp/deb.latest* | grep "deb.latest" | awk -F '.' '{print $3}')
date
echo "${VERSION_MESSAGE}"
echo "Running on: ${SYSTEM_BUILDER}: `uname -r`: `ip addr list eth0 | grep \"inet \" |cut -d' ' -f6|cut -d/ -f1`"
}
setup_buildd () {
if [ ! -d /build/buildd/ ] ; then
sudo mkdir -p /build/buildd/
sudo chown -R ${chroot_user}:${chroot_user} /build/buildd/
fi
if [ ! -d "${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/" ] ; then
sudo mkdir -p ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/
sudo chown -R ${chroot_user}:${chroot_user} ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/
fi
cd /build/buildd/
}
cleanup_schroot () {
cd /build/buildd/
echo "***schroot***"
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ls
echo "*************"
echo "***beagle***"
ls
echo "*************"
echo "Cleaning up schroot"
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- rm defconfig >/dev/null 2>&1
rm -f ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src/linux-image* || true >/dev/null 2>&1
rm -rf ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src/ || true >/dev/null 2>&1
rm -f ./*.deb >/dev/null 2>&1 || true
rm -f ./*.diff >/dev/null 2>&1 || true
rm -f ./*.diff.gz >/dev/null 2>&1 || true
rm -f ./*.tar.gz >/dev/null 2>&1 || true
rm -rf /build/buildd/linux-src/ >/dev/null 2>&1 || true
}
update_schroot () {
echo "Updating schroot"
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- sudo dpkg --configure -a >/dev/null 2>&1
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- sudo apt-get update -o Acquire::Pdiffs=false >/dev/null 2>&1
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- sudo apt-get -y --force-yes install aptitude apt equivs
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- sudo aptitude update >/dev/null 2>&1
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- sudo aptitude -y --allow-untrusted safe-upgrade
if [ "x${release}" = "xwily" ] ; then
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- sudo aptitude -y --full-resolver safe-upgrade
fi
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- sudo apt-get clean >/dev/null 2>&1
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- gcc -v
echo "*************"
}
config_test_builtin () {
chroot_defconfig="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/defconfig"
unset config_set
unset test_config
test_config=$(grep "${config}=y" ${chroot_defconfig} || true)
if [ "x${test_config}" = "x${config}=y" ] ; then
config_set="set"
fi
}
http_dl_patch () {
#Kernel Build Patch
${wget_dl} ${local_http}/${KERNEL_TAG}-${BUILD}/patch-${KERNEL_TAG}-${BUILD}.diff
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ${wget_dl} ${local_http}/${KERNEL_TAG}-${BUILD}/defconfig
}
git_pull () {
echo "fetching stable"
git fetch git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git --tags || true
echo "pulling from kernel.org"
git pull git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master --tags || true
}
git_dl_kernel () {
echo "Fetching from git"
cd /build/buildd/
if [ ! -d /build/buildd/linux-src ] ; then
mkdir -p /build/buildd/linux-src
fi
if [ ! -d "${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src" ] ; then
mkdir -p ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src
fi
if [ ! -f /home/${chroot_user}/git_repo/linux/.git/config ] ; then
mkdir -p /home/${chroot_user}/git_repo/
cd /home/${chroot_user}/git_repo/
git clone ssh://gitolite3@repo:2300/linux.git || true
fi
cd /home/${chroot_user}/git_repo/linux
git reset --hard HEAD
git checkout master -f || true
git pull || true
git fetch --tags || true
cd ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src
git clone --shared /home/${chroot_user}/git_repo/linux ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src
git reset --hard HEAD
git checkout master -f
git tag | grep v${KERNEL_TAG} | grep -v rc >/dev/null 2>&1 || git_pull
git checkout v${KERNEL_TAG} -b v${KERNEL_TAG}-${BUILD}
git describe
git apply -v /build/buildd/patch-${KERNEL_TAG}-${BUILD}.diff
}
special_build () {
if [ "x${release}" = "xjessie" ] ; then
if [ "x${SUBARCH}" = "xomap-psp" ] ; then
echo "Jessie: omap-psp: KALLSYMS_EXTRA_PASS=1"
buildopts="KALLSYMS_EXTRA_PASS=1"
fi
fi
}
build_kernel () {
unset buildopts
special_build
echo "make ARCH=arm CROSS_COMPILE= distclean"
cd /build/buildd/linux-src
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- make ARCH=arm CROSS_COMPILE= distclean
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- cp /build/buildd/defconfig .config
MAKE_DEB_PKG="fakeroot make -j5 ARCH=arm ${buildopts} LOCALVERSION=-${BUILD} CROSS_COMPILE= KDEB_PKGVERSION=1${release} KBUILD_DEBARCH=${dpkg_arch} [email protected] DEBFULLNAME=rcn-ee deb-pkg"
echo "_______________"
echo "${MAKE_DEB_PKG}"
time schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ${MAKE_DEB_PKG}
uname_r=$(cat ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src/include/generated/utsrelease.h | awk '{print $3}' | sed 's/\"//g' )
unset DTBS
cat ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src/arch/arm/Makefile | grep "dtbs:" >/dev/null 2>&1 && DTBS=enable
if [ "x${DTBS}" = "x" ] ; then
cat ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src/arch/arm/Makefile | grep "dtbs dtbs_install:" >/dev/null 2>&1 && DTBS=enable
fi
if [ "x${DTBS}" = "xenable" ] ; then
echo "_______________"
MAKE_DTBS="fakeroot make -j1 ARCH=arm ${buildopts} LOCALVERSION=-${BUILD} CROSS_COMPILE= dtbs"
echo "${MAKE_DTBS}"
time schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ${MAKE_DTBS}
ls ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src/arch/arm/boot/* | grep dtb || unset DTBS
fi
if [ "x${DTBS}" = "xenable" ] ; then
if [ -d /tmp/dtbs ] ; then
sudo rm -rf /tmp/dtbs || true
fi
mkdir -p /tmp/dtbs
echo "_______________"
find ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/linux-src/arch/arm/boot/ -iname "*.dtb" -exec cp -v '{}' /tmp/dtbs/ \;
cd /tmp/dtbs
echo "Building ${uname_r}-dtbs.tar.gz"
tar czf /build/buildd/${uname_r}-dtbs.tar.gz *
cd -
fi
if [ -d ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/fir ] ; then
sudo rm -rf ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/fir || true
fi
mkdir -p ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/fir
MAKE_FIRMWARE="fakeroot make -j1 ARCH=arm ${buildopts} LOCALVERSION=-${BUILD} CROSS_COMPILE= firmware_install INSTALL_FW_PATH=/build/buildd/fir"
echo "_______________"
echo "${MAKE_FIRMWARE}"
time schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ${MAKE_FIRMWARE}
cd ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/fir
echo "Building ${uname_r}-firmware.tar.gz"
tar czf /build/buildd/${uname_r}-firmware.tar.gz *
cd -
sudo rm -rf ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/fir || true
cd ..
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ls
cd /build/buildd/
mv ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/*.deb /build/buildd/
echo "***builder***"
ls
}
generic_upload () {
if [ -f ${file_upload} ] ; then
echo ""
echo "uploading: ${file_upload}"
if [ -d /mnt/mirror/deb/ ] ; then
if [ ! -d /mnt/mirror/deb/${release}-${dpkg_arch}/ ] ; then
mkdir -p /mnt/mirror/deb/${release}-${dpkg_arch}/ || true
fi
if [ ! -d /mnt/mirror/deb/${release}-${dpkg_arch}/${FTPDIR}/ ] ; then
mkdir -p /mnt/mirror/deb/${release}-${dpkg_arch}/${FTPDIR}/ || true
fi
cp -v ${file_upload} /mnt/mirror/deb/${release}-${dpkg_arch}/${FTPDIR}/
sync
rm ${file_upload} >/dev/null 2>&1 || true
sleep 30
fi
else
echo ""
echo "Warn: [${file_upload}] was not built"
fi
}
cleanup_third_party () {
if [ -d /build/buildd/${package} ] ; then
rm -rf /build/buildd/${package} || true
fi
if [ -d ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package} ] ; then
rm -rf ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package} || true
fi
}
build_third_party () {
cleanup_third_party
cd ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/
git clone https://github.com/rcn-ee/${package}.git
cd ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package}
git checkout origin/${git_branch} -b tmp
cd /build/buildd/
git clone https://github.com/rcn-ee/${package}.git
cd /build/buildd/${package}
git checkout origin/${git_branch} -b tmp
cd /build/buildd/${package}/src/
}
third_party () {
file_dir="https://rcn-ee.com/deb/${release}-${dpkg_arch}/${FTPDIR}/"
if [ "x${SUBARCH}" = "xomap-psp" ] || [ "x${SUBARCH}" = "xti" ] || [ "x${SUBARCH}" = "xti-xenomai" ] || [ "x${SUBARCH}" = "xti-rt" ] ; then
package="mt7601u"
git_branch="master"
build_third_party
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ../build.sh
#make sure the module was built
file_upload="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package}/src/os/linux/mt7601Usta.ko"
if [ -f ${file_upload} ] ; then
d_dir="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd"
base_dir="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package}/"
cp -v ${base_dir}src/os/linux/mt7601Usta.ko ${base_dir}
# cp -v ${base_dir}src/RT2870STA.dat ${base_dir}
cp -v ${base_dir}src/README_STA_usb ${base_dir}
# echo "mt7601Usta" > ${base_dir}mt7601.conf
echo "Section: misc" > ${base_dir}control
echo "Priority: optional" >> ${base_dir}control
echo "Homepage: https://github.com/rcn-ee/${package}" >> ${base_dir}control
echo "Standards-Version: 3.9.6" >> ${base_dir}control
echo "" >> ${base_dir}control
echo "Package: ${package}-modules-${uname_r}" >> ${base_dir}control
echo "Version: 1${release}" >> ${base_dir}control
echo "Pre-Depends: linux-image-${uname_r}" >> ${base_dir}control
echo "Depends: linux-image-${uname_r}" >> ${base_dir}control
echo "Maintainer: Robert Nelson <[email protected]>" >> ${base_dir}control
echo "Architecture: ${dpkg_arch}" >> ${base_dir}control
echo "Readme: README_STA_usb" >> ${base_dir}control
echo "Files: mt7601Usta.ko /lib/modules/${uname_r}/kernel/drivers/net/wireless/" >> ${base_dir}control
# echo " RT2870STA.dat /etc/Wireless/RT2870STA/" >> ${base_dir}control
# echo " mt7601.conf /etc/modules-load.d/" >> ${base_dir}control
echo "Description: ${package} modules" >> ${base_dir}control
echo " Kernel modules for ${package} devices" >> ${base_dir}control
echo "" >> ${base_dir}control
cd /build/buildd/${package}/
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- equivs-build control
file_upload="${d_dir}/${package}/${package}-modules-${uname_r}_1${release}_${dpkg_arch}.deb"
generic_upload
fi
cleanup_third_party
fi
if [ "x${SUBARCH}" = "xomap-psp" ] || [ "x${SUBARCH}" = "xti" ] || [ "x${SUBARCH}" = "xti-xenomai" ] || [ "x${SUBARCH}" = "xti-rt" ] ; then
package="ti-sgx"
git_branch="ti-5.01.01.02"
build_third_party
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ../build-es8.sh
es="es8"
#make sure the module was built
file_upload="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package}/src/gfx_rel_${es}.x/pvrsrvkm.ko"
if [ -f ${file_upload} ] ; then
d_dir="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/"
base_dir="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package}/"
#modules
cp -v ${base_dir}src/gfx_rel_${es}.x/pvrsrvkm.ko ${base_dir}
cp -v ${base_dir}src/gfx_rel_${es}.x/omaplfb.ko ${base_dir}
cp -v ${base_dir}src/gfx_rel_${es}.x/bufferclass_ti.ko ${base_dir}
#readme
cp -v ${base_dir}src/GFX_Linux_KM/README ${base_dir}
echo "Section: misc" > ${base_dir}control
echo "Priority: optional" >> ${base_dir}control
echo "Homepage: https://github.com/rcn-ee/${package}" >> ${base_dir}control
echo "Standards-Version: 3.9.6" >> ${base_dir}control
echo "" >> ${base_dir}control
echo "Package: ${package}-${es}-modules-${uname_r}" >> ${base_dir}control
echo "Version: 1${release}" >> ${base_dir}control
echo "Pre-Depends: linux-image-${uname_r}" >> ${base_dir}control
echo "Depends: linux-image-${uname_r}" >> ${base_dir}control
echo "Maintainer: Robert Nelson <[email protected]>" >> ${base_dir}control
echo "Architecture: ${dpkg_arch}" >> ${base_dir}control
echo "Readme: README" >> ${base_dir}control
echo "Files: pvrsrvkm.ko /lib/modules/${uname_r}/extra/${es}.x/" >> ${base_dir}control
echo " omaplfb.ko /lib/modules/${uname_r}/extra/${es}.x/" >> ${base_dir}control
echo " bufferclass_ti.ko /lib/modules/${uname_r}/extra/${es}.x/" >> ${base_dir}control
echo "Description: ${package} ${es} modules" >> ${base_dir}control
echo " Kernel modules for ${package} ${es} devices" >> ${base_dir}control
echo "" >> ${base_dir}control
cd /build/buildd/${package}/
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- equivs-build control
file_upload="${d_dir}/${package}/${package}-${es}-modules-${uname_r}_1${release}_${dpkg_arch}.deb"
generic_upload
fi
cleanup_third_party
fi
if [ "x${SUBARCH}" = "xomap-psp" ] || [ "x${SUBARCH}" = "xti" ] || [ "x${SUBARCH}" = "xti-xenomai" ] || [ "x${SUBARCH}" = "xti-rt" ] ; then
package="ti-sgx"
git_branch="ti-5.01.01.02"
build_third_party
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- ../build-es9.sh
es="es9"
#make sure the module was built
file_upload="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package}/src/gfx_rel_${es}.x/pvrsrvkm.ko"
if [ -f ${file_upload} ] ; then
d_dir="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/"
base_dir="${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/${package}/"
#modules
cp -v ${base_dir}src/gfx_rel_${es}.x/pvrsrvkm.ko ${base_dir}
cp -v ${base_dir}src/gfx_rel_${es}.x/omaplfb.ko ${base_dir}
cp -v ${base_dir}src/gfx_rel_${es}.x/bufferclass_ti.ko ${base_dir}
#readme
cp -v ${base_dir}src/GFX_Linux_KM/README ${base_dir}
echo "Section: misc" > ${base_dir}control
echo "Priority: optional" >> ${base_dir}control
echo "Homepage: https://github.com/rcn-ee/${package}" >> ${base_dir}control
echo "Standards-Version: 3.9.6" >> ${base_dir}control
echo "" >> ${base_dir}control
echo "Package: ${package}-${es}-modules-${uname_r}" >> ${base_dir}control
echo "Version: 1${release}" >> ${base_dir}control
echo "Pre-Depends: linux-image-${uname_r}" >> ${base_dir}control
echo "Depends: linux-image-${uname_r}" >> ${base_dir}control
echo "Maintainer: Robert Nelson <[email protected]>" >> ${base_dir}control
echo "Architecture: ${dpkg_arch}" >> ${base_dir}control
echo "Readme: README" >> ${base_dir}control
echo "Files: pvrsrvkm.ko /lib/modules/${uname_r}/extra/${es}.x/" >> ${base_dir}control
echo " omaplfb.ko /lib/modules/${uname_r}/extra/${es}.x/" >> ${base_dir}control
echo " bufferclass_ti.ko /lib/modules/${uname_r}/extra/${es}.x/" >> ${base_dir}control
echo "Description: ${package} ${es} modules" >> ${base_dir}control
echo " Kernel modules for ${package} ${es} devices" >> ${base_dir}control
echo "" >> ${base_dir}control
cd /build/buildd/${package}/
schroot -c ${release}-${dpkg_arch} -u ${chroot_user} -- equivs-build control
file_upload="${d_dir}/${package}/${package}-${es}-modules-${uname_r}_1${release}_${dpkg_arch}.deb"
generic_upload
fi
cleanup_third_party
fi
touch /tmp/complete
file_upload="/tmp/complete"
generic_upload
}
kernel_upload () {
rm linux-image-*dbg*.deb >/dev/null 2>&1 || true
rm linux-libc-dev*.deb >/dev/null 2>&1 || true
KERNEL_UPLOAD=$(ls | grep linux-image*.deb)
FTP_KERNEL_IMG_REL=${KERNEL_UPLOAD/linux-image-}
FTP_KERNEL_IMG_REL=${FTP_KERNEL_IMG_REL/_*_arm*.deb}
FTPDIR=v${FTP_KERNEL_IMG_REL}
file_upload="${KERNEL_UPLOAD}"
generic_upload
file_upload=$(ls | grep linux-firmware-image*.deb)
generic_upload
file_upload=$(ls | grep firmware.tar.gz)
generic_upload
if ls /build/buildd/linux-headers*.deb >/dev/null 2>&1;then
file_upload=$(ls | grep linux-headers*.deb)
generic_upload
fi
gzip_patch=$(ls | grep patch-*.diff)
gzip ${gzip_patch}
file_upload=$(ls | grep patch-*.diff.gz)
generic_upload
mv ${CHROOT_DIR}/${release}-${dpkg_arch}/build/buildd/defconfig /build/buildd/
file_upload="defconfig"
generic_upload
KERNEL_IMG_REL=${KERNEL_UPLOAD/linux-image-}
KERNEL_IMG_REL=${KERNEL_IMG_REL/_*_arm*.deb}
if [ "x${DTBS}" = "xenable" ] ; then
file_upload="${uname_r}-dtbs.tar.gz"
generic_upload
fi
if [ "x${LATEST}" = "xunrelease" ] ; then
echo "unrelease"
else
UPDATEFILE="/build/buildd/LATEST-${SUBARCH}"
echo "Updating $LATEST repo..."
if [ -f ${UPDATEFILE} ] ; then
rm -f ${UPDATEFILE} || true
fi
${wget_dl} http://httphost/rcn-ee.net/deb/${release}-${dpkg_arch}/LATEST-${SUBARCH}
if [ "x${LATEST}" = "xexperimental" ] ; then
ABI="${ABI_EXP}"
elif [ "x${LATEST}" = "xtesting" ] ; then
ABI="${ABI_TEST}"
elif [ "x${LATEST}" = "xstable" ] ; then
ABI="${ABI_STABLE}"
fi
KERNEL_DL=$(cat ${UPDATEFILE} | grep "${ABI}" | awk '{print $3}')
KERNEL_DL_VER=$(echo ${KERNEL_DL} | awk -F'/' '{print $6}')
cat ${UPDATEFILE} | grep -v "${ABI}" > ${UPDATEFILE}-new
rm -f ${UPDATEFILE} || true
mv ${UPDATEFILE}-new ${UPDATEFILE}
echo "${ABI} https://rcn-ee.com/deb/${release}-${dpkg_arch}/${FTPDIR}/install-me.sh" >> ${UPDATEFILE}
echo ""
echo "uploading: LATEST"
cat ${UPDATEFILE}
if [ -d /mnt/mirror/deb ] ; then
if [ ! -d /mnt/mirror/deb/${release}-${dpkg_arch}/ ] ; then
mkdir -p /mnt/mirror/deb/${release}-${dpkg_arch}/ || true
fi
cp -v ${UPDATEFILE} /mnt/mirror/deb/${release}-${dpkg_arch}/
fi
rm ${UPDATEFILE} >/dev/null 2>&1 || true
sleep 30
fi
}
setup_enviroment
setup_buildd
if [ -f /mnt/mirror/.mirror ] ; then
cleanup_schroot
update_schroot
http_dl_patch
git_dl_kernel
build_kernel
if ls /build/buildd/linux-image*.deb >/dev/null 2>&1;then
kernel_upload
third_party
else
echo "deb generation failed, review log"
fi
else
echo "nfs failure"
fi
cleanup_schroot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment