You are not logged in.
It's very decent, really. <Sith mode>Now, I'll tell you a little secret: I was looking for someone to write this wrapper script because so far I was compiling my kernel26-pf packages one by one. Rise now, Lord Skyous.</Sith mode>
Good work!
Glad to do it, please modify it to fit your needs. I've always noticed a fair bit of synergy between our packages anyway. We should stick together ![]()
The only think that sucks is you have to run though a new arch manually to get the arch-specific config file. I tried doing this w/ sed statements initially but I soon discovered that different family options invoke more than a single point change. You also need to be careful when you modify your PKGBUILD.
Anyway, post your wrapper script when you write it. I'd like to see it.
Last edited by graysky (2011-01-16 13:05:44)
Offline
Glad to do it, please modify it to fit your needs. I've always noticed a fair bit of synergy between our packages anyway. We should stick together
The only think that sucks is you have to run though a new arch manually to get the arch-specific config file. I tried doing this w/ sed statements initially but I soon discovered that different family options invoke more than a single point change. You also need to be careful when you modify your PKGBUILD.
Anyway, post your wrapper script when you write it. I'd like to see it.
Ok, here's my own version. It's way simpler since kernel26-pf is not split and its PKGBUILD takes care of package-naming internally. I slightly modified the original PKGBUILD to detect batch execution, so there's no need to modify it on the fly.
#!/bin/bash
start="$(date +%s)" # used for timer function
_builddir=/dev/shm/ # temp space for building
_arch=$(uname -m) # figure out which arch we are in and build with that
_basedir=/temp
dropbox=/temp/Dropbox/Public
cd $_builddir
rm -fr kernel26-pf
aurdownload kernel26-pf
cd kernel26-pf
_kernver=`grep --color=never ^_basekernel PKGBUILD`
kernver=`sed -e "s/_basekernel=//" <<<$_kernver`
# Try not to re-download the kernel tarball
if [[ -e $_basedir/linux-$kernver.tar.bz2 ]]; then
ln -s $_basedir/linux-$kernver.tar.bz2
fi
if [ $_arch = "x86_64" ]; then
_config="config.x86_64"
targets="CORE2 K8 ATOM PSC"
else
_config="config"
targets="ATOM PENTIUM4 PENTIUMIII PENTIUMM K7"
fi
# Use preset kernel configs
cp -f $dropbox/$_arch/config.*-$_arch .
export _BATCH=y
# Generic cpu package first
nice -n 20 makepkg
mv *.xz $dropbox/$_arch && cd $dropbox/$_arch && repo-add pfkernel.db.tar.gz *.xz
# Optimized CPU packages
for cpu in $targets; do
_cpu=`tr '[:upper:]' '[:lower:]' <<< $cpu`
cd $_builddir/kernel26-pf
echo "Building kernel26-pf-$_cpu"
rm -f src/linux-$kernver/.config
cp config.$cpu-$_arch src/linux-$kernver/.config
nice -n 20 makepkg -e
mv *.xz $dropbox/$_arch && cd $dropbox/$_arch && repo-add pfkernel.db.tar.gz *.xz
done
# calculate report build time
now="$(date +%s)"
elapsed="$(expr $now - $start)"
remainder="$(expr $elapsed % 3600)"
hours="$(expr $(expr $elapsed - $remainder) / 3600)"
seconds="$(expr $remainder % 60)"
minutes="$(expr $(expr $remainder - $seconds) / 60)"
echo "Elapsed time: "`date -d $hours:$minutes:$seconds +%H:%M:%S`Latest version at https://dl.dropbox.com/u/11734958/build_target_pkgs.sh
Offline