kernel: split build stuff into do_build() from do_install().
--HG-- extra : convert_revision : 9eab6b265fe2fd6e2f6179e59ac608134342629a
This commit is contained in:
parent
dec6b4651e
commit
03648bf2ee
1 changed files with 17 additions and 4 deletions
|
@ -28,11 +28,11 @@ Add_dependency run initramfs-tools
|
||||||
Add_dependency run kernel-firmware ">=${_kernel_ver}"
|
Add_dependency run kernel-firmware ">=${_kernel_ver}"
|
||||||
Add_dependency build perl
|
Add_dependency build perl
|
||||||
|
|
||||||
do_install()
|
do_build()
|
||||||
{
|
{
|
||||||
# If there's a file called kernel-<arch>-dotconfig, use it to
|
# If there's a file called kernel-<arch>-dotconfig, use it to
|
||||||
# configure the kernel; otherwise run the menuconfig target.
|
# configure the kernel; otherwise run the menuconfig target.
|
||||||
local arch lver mjobs hdrdest
|
local arch mjobs
|
||||||
|
|
||||||
if [ "$XBPS_MAKEJOBS" -gt 1 ]; then
|
if [ "$XBPS_MAKEJOBS" -gt 1 ]; then
|
||||||
mjobs="-j $XBPS_MAKEJOBS"
|
mjobs="-j $XBPS_MAKEJOBS"
|
||||||
|
@ -58,12 +58,25 @@ do_install()
|
||||||
${wrksrc}/.config
|
${wrksrc}/.config
|
||||||
fi
|
fi
|
||||||
# Build
|
# Build
|
||||||
make ${mjobs} prepare
|
make ${mjobs} prepare || return 1
|
||||||
make ${mjobs} bzImage modules || return 1
|
make ${mjobs} bzImage modules || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install()
|
||||||
|
{
|
||||||
|
local arch lver hdrdest
|
||||||
|
|
||||||
|
if [ "$xbps_machine" != "x86_64" ]; then
|
||||||
|
arch=i386
|
||||||
|
else
|
||||||
|
arch=x86_64
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ${wrksrc} || return 1
|
||||||
|
|
||||||
# Install kernel, firmware and modules
|
# Install kernel, firmware and modules
|
||||||
install -d ${DESTDIR}/lib ${DESTDIR}/boot
|
install -d ${DESTDIR}/lib ${DESTDIR}/boot
|
||||||
make ${mjobs} INSTALL_MOD_PATH=${DESTDIR} modules_install || return 1
|
make INSTALL_MOD_PATH=${DESTDIR} modules_install || return 1
|
||||||
if [ -n "$revision" ]; then
|
if [ -n "$revision" ]; then
|
||||||
lver="${version}_${revision}"
|
lver="${version}_${revision}"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue