linux-asus-grouper: upgrade prepare, build and package procedure (MR 2397)

Signed-off-by: David Heidelberg <david@ixit.cz>
This commit is contained in:
David Heidelberg 2021-08-01 11:30:25 +02:00 committed by Bart Ribbers
parent a52fe87b9b
commit 76a449d085

View file

@ -17,42 +17,28 @@ _carch="arm"
_config="config-$_flavor.armv7" _config="config-$_flavor.armv7"
source="$pkgname-$pkgver-$_commit.tar.gz::https://github.com/grate-driver/linux/archive/$_commit.tar.gz source="$pkgname-$pkgver-$_commit.tar.gz::https://github.com/grate-driver/linux/archive/$_commit.tar.gz
$_config" $_config"
_ksrcdir="$srcdir/linux-$_commit" builddir="$srcdir/linux-$_commit"
_outdir="out" _outdir="out"
prepare() { prepare() {
default_prepare default_prepare
mkdir -p "$srcdir"/build REPLACE_GCCH=0 \
cp -v "$srcdir"/$_config "$srcdir"/build/.config . downstreamkernel_prepare
make -C "$_ksrcdir" O="$srcdir"/build ARCH="$_carch" \
olddefconfig
} }
build() { build() {
cd "$srcdir"/build
unset LDFLAGS unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \ make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
} }
package() { package() {
install -Dm644 "$srcdir/build/arch/$_carch/boot/"*zImage \ downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
"$pkgdir/boot/vmlinuz-$_flavor"
install -D "$srcdir/build/include/config/kernel.release" \ make modules_install dtbs_install \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release" O="$_outdir" ARCH="$_carch" \
INSTALL_MOD_STRIP=1 \
cd "$srcdir"/build
local _install
case "$CARCH" in
aarch64*|arm*) _install="modules_install dtbs_install" ;;
*) _install="modules_install" ;;
esac
make -j1 $_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \ INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb" INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
} }