kernel: simplify some parts in template file.

This commit is contained in:
Juan RP 2011-02-10 13:06:05 +01:00
parent e9781f1407
commit 9e7d351292

View file

@ -33,8 +33,9 @@ Add_dependency build perl
do_build() do_build()
{ {
# If there's a file called kernel-<arch>-dotconfig, use it to # If there's a file called <arch>-dotconfig, use it to
# configure the kernel; otherwise run the menuconfig target. # configure the kernel; otherwise use arch defaults and all stuff
# as modules (defconfig+allmodconfig).
local arch local arch
if [ "$xbps_machine" != "x86_64" ]; then if [ "$xbps_machine" != "x86_64" ]; then
@ -43,19 +44,18 @@ do_build()
arch=x86_64 arch=x86_64
fi fi
cd ${wrksrc}
# Configure # Configure
if [ -f ${FILESDIR}/$arch-dotconfig ]; then if [ -f ${FILESDIR}/${arch}-dotconfig ]; then
msg_normal " Detected a .config file for your arch, using it.\n" msg_normal " Detected a .config file for your arch, using it.\n"
cp -f ${FILESDIR}/$arch-dotconfig ${wrksrc}/.config cp -f ${FILESDIR}/${arch}-dotconfig .config
make ${makejobs} oldconfig make ${makejobs} oldconfig
else else
make ${makejobs} menuconfig msg_normal " Defaulting to 'defconfig and allmodconfig'.\n"
make ${makejobs} defconfig && make ${makejobs} allmodconfig
fi fi
if [ -n "${revision}" ]; then if [ -n "${revision}" ]; then
sed -i -e "s|LOCALVERSION=\"\"|LOCALVERSION=\"_${revision}\"|" \ sed -i -e "s|LOCALVERSION=\"\"|LOCALVERSION=\"_${revision}\"|" \
${wrksrc}/.config .config
fi fi
# Build # Build
make ${makejobs} prepare make ${makejobs} prepare
@ -72,8 +72,6 @@ do_install()
arch=x86_64 arch=x86_64
fi fi
cd ${wrksrc}
# Install kernel, firmware and modules # Install kernel, firmware and modules
make INSTALL_MOD_PATH=${DESTDIR} modules_install make INSTALL_MOD_PATH=${DESTDIR} modules_install