diff --git a/core/linux-armv7/PKGBUILD b/core/linux-armv7/PKGBUILD index 635a92792..d1b63b008 100644 --- a/core/linux-armv7/PKGBUILD +++ b/core/linux-armv7/PKGBUILD @@ -48,7 +48,11 @@ md5sums=('c0ce046a9a0d041e13cf222f81eae574' '8b93b6ca167f70c60277f352f7b78024') prepare() { - cd "${srcdir}/${_srcname}" + cd $_srcname + + echo "Setting version..." + echo "-$pkgrel" > localversion.10-pkgrel + echo "${pkgbase#linux}" > localversion.20-pkgname # add upstream patch git apply --whitespace=nowarn ../patch-${pkgver} @@ -66,41 +70,15 @@ prepare() { git apply ../0007-USB-Armory-MkII-support.patch cat "${srcdir}/config" > ./.config - - # add pkgrel to extraversion - sed -ri "s|^(EXTRAVERSION =)(.*)|\1 \2-${pkgrel}|" Makefile - - # don't run depmod on 'make install'. We'll do this ourselves in packaging - sed -i '2iexit 0' scripts/depmod.sh } build() { - cd "${srcdir}/${_srcname}" + cd $_srcname # get kernel version make prepare make -s kernelrelease > version - # load configuration - # Configure the kernel. Replace the line below with one of your choice. - #make menuconfig # CLI menu for configuration - #make nconfig # new CLI menu for configuration - #make xconfig # X-based configuration - #make oldconfig # using old config from previous kernel version - # ... or manually edit .config - - # Copy back our configuration (use with new kernel version) - #cp ./.config ../${pkgbase}.config - - #################### - # stop here - # this is useful to configure the kernel - #msg "Stopping build" - #return 1 - #################### - - #yes "" | make config - # build! make ${MAKEFLAGS} zImage modules @@ -117,39 +95,24 @@ _package() { replaces=('linux-mvebu' 'linux-udoo' 'linux-sun4i' 'linux-sun5i' 'linux-sun7i' 'linux-usbarmory' 'linux-wandboard' 'linux-clearfog') install=${pkgname}.install - cd "${srcdir}/${_srcname}" + cd $_srcname + local kernver="$(/dev/null) + done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0) + + echo "Adding symlink..." + mkdir -p "$pkgdir/usr/src" + ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase" } _package-chromebook() { @@ -264,7 +240,7 @@ _package-odroidc1() { cd "${srcdir}/${_srcname}" mkdir -p "${pkgdir}/boot" - mkimage -A arm -O linux -T kernel -C none -a 0x00208000 -e 0x00208000 -n "${pkgname}" -d arch/$KARCH/boot/zImage "${pkgdir}/boot/uImage" + mkimage -A arm -O linux -T kernel -C none -a 0x00208000 -e 0x00208000 -n "${pkgname}" -d arch/arm/boot/zImage "${pkgdir}/boot/uImage" } pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-chromebook" "${pkgbase}-odroidc1")