diff --git a/device/linux-amazon-tank/APKBUILD b/device/linux-amazon-tank/APKBUILD index cbce5c23b..59024acfe 100644 --- a/device/linux-amazon-tank/APKBUILD +++ b/device/linux-amazon-tank/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="bef51789afd0174f0c88d7cd1f038a754e85a8fa2a159036f154d08b8812e7fcee762d9e231cf1397b66afb846f453e00aae98f74c4c143d83b57b7c83616fe9 linux-amazon-tank-2861aa5f5e0bbb526072d75f24ef3af875519234.tar.gz diff --git a/device/linux-amazon-thor/APKBUILD b/device/linux-amazon-thor/APKBUILD index 9e9408038..bf200685f 100755 --- a/device/linux-amazon-thor/APKBUILD +++ b/device/linux-amazon-thor/APKBUILD @@ -10,7 +10,7 @@ _flavor="amazon-thor" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz dtbtool gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -42,22 +42,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -69,23 +54,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" install -Dm644 "$builddir/arch/$_carch/boot/dt.img" \ "$pkgdir/boot/dt.img" diff --git a/device/linux-asus-duma/APKBUILD b/device/linux-asus-duma/APKBUILD index 2c263d94d..378597aac 100644 --- a/device/linux-asus-duma/APKBUILD +++ b/device/linux-asus-duma/APKBUILD @@ -10,7 +10,7 @@ _flavor="asus-duma" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -36,22 +36,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -61,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="f47c0dfb34f9387ce9b7518fee6cae2fd91161cf1db0f0355bbc87fb201798d8c87f78779d3df4022a9bceeac8d9f0b111f7e63f25394e3f8cfbcd57a9da48c6 linux-asus-duma-b6a8f08e43a26771947556abfc697971eb67f06b.tar.gz diff --git a/device/linux-asus-t00f/APKBUILD b/device/linux-asus-t00f/APKBUILD index 541c75dc5..84fb143cf 100644 --- a/device/linux-asus-t00f/APKBUILD +++ b/device/linux-asus-t00f/APKBUILD @@ -10,7 +10,7 @@ _flavor="asus-t00f" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,19 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="98ae9cabe828b9aa3ea38c01f2294398bde4e7dbc470acb87d404d65f7526a416892c2e9a6ca9dacb69d8fe30e6b61a230beb1c4d234e16d126b3c4197564945 linux-asus-t00f-ffd0a7e6f0d4ccb951f3e39aa805d9c7c6cb3291.tar.gz diff --git a/device/linux-asus-tf101/APKBUILD b/device/linux-asus-tf101/APKBUILD index 98af2bd6d..facf87eed 100644 --- a/device/linux-asus-tf101/APKBUILD +++ b/device/linux-asus-tf101/APKBUILD @@ -10,7 +10,7 @@ _flavor="asus-tf101" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -41,19 +41,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -65,23 +53,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Modules cd "$builddir" diff --git a/device/linux-asus-z00t/APKBUILD b/device/linux-asus-z00t/APKBUILD index fa76e97fc..33b87aa67 100644 --- a/device/linux-asus-z00t/APKBUILD +++ b/device/linux-asus-z00t/APKBUILD @@ -10,7 +10,7 @@ _flavor="asus-z00t" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,22 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -65,23 +50,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm64/boot/dt.img" \ diff --git a/device/linux-bq-chaozu/APKBUILD b/device/linux-bq-chaozu/APKBUILD index 43a25cd66..6b26cfd36 100644 --- a/device/linux-bq-chaozu/APKBUILD +++ b/device/linux-bq-chaozu/APKBUILD @@ -10,7 +10,7 @@ _flavor="bq-chaozu" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,19 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="c72365057ddc94d0fd051f0a40f12e6eb0ba31b8fc0ad673c352be0924bc96c643726afac5042fd63eca5d79c4366b706da0addad3aa521867c323a3eec542cd linux-bq-chaozu-9fe7be06bdbbad2d9cb86d9b135d082b4d28b9ea.tar.gz diff --git a/device/linux-chuwi-hi10plus/APKBUILD b/device/linux-chuwi-hi10plus/APKBUILD index fe9d3d320..98c89ebd9 100644 --- a/device/linux-chuwi-hi10plus/APKBUILD +++ b/device/linux-chuwi-hi10plus/APKBUILD @@ -42,24 +42,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi - cd "$builddir" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" make -j1 modules_install \ ARCH="$_carch" \ diff --git a/device/linux-fairphone-fp2/APKBUILD b/device/linux-fairphone-fp2/APKBUILD index e81ed1a2b..be7b35a94 100644 --- a/device/linux-fairphone-fp2/APKBUILD +++ b/device/linux-fairphone-fp2/APKBUILD @@ -51,23 +51,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-finepower-f1/APKBUILD b/device/linux-finepower-f1/APKBUILD index 23704833a..bf320821e 100644 --- a/device/linux-finepower-f1/APKBUILD +++ b/device/linux-finepower-f1/APKBUILD @@ -49,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-fujitsu-m532/APKBUILD b/device/linux-fujitsu-m532/APKBUILD index 571a5fc4d..550fabd30 100644 --- a/device/linux-fujitsu-m532/APKBUILD +++ b/device/linux-fujitsu-m532/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7effec2a47246e65063d9bd60c547a8622aa9c934fd812ac189b9aa44f9c59628741c33b13ca99253d25e845aed24ccf56ae4492b70aff75f0651870f5e6447f linux-fujitsu-m532-1bcab4a49982baea177c26994d2b67811e7b16f9.tar.gz diff --git a/device/linux-google-glass/APKBUILD b/device/linux-google-glass/APKBUILD index d1b583e47..056803dfc 100644 --- a/device/linux-google-glass/APKBUILD +++ b/device/linux-google-glass/APKBUILD @@ -10,7 +10,7 @@ _flavor="google-glass" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -34,19 +34,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -56,23 +44,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="b98916d6cc745115e89be35158b4cf0e025e73261a8f56302e9b74d8a7b597df8bdef1ee4ce8503dfc4fc94be16b91227b358cba7c5bc1fabde182876f6becf7 linux-google-glass-1091b53a0b5e20d23a8447161e181e2a53e944de.tar.gz diff --git a/device/linux-gp-peak/APKBUILD b/device/linux-gp-peak/APKBUILD index fc44f1ec0..e8b89accd 100644 --- a/device/linux-gp-peak/APKBUILD +++ b/device/linux-gp-peak/APKBUILD @@ -10,7 +10,7 @@ _flavor="gp-peak" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -36,22 +36,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { diff --git a/device/linux-hisense-m470bsa/APKBUILD b/device/linux-hisense-m470bsa/APKBUILD index ac44d246c..9b7483e4d 100644 --- a/device/linux-hisense-m470bsa/APKBUILD +++ b/device/linux-hisense-m470bsa/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" echo "--[ Installing modules ]--" install -Dm644 "$builddir/drivers/net/wireless/bcmdhd/bcmdhd.ko" \ diff --git a/device/linux-htc-a5ul/APKBUILD b/device/linux-htc-a5ul/APKBUILD index 2815cd47e..394a4ca81 100644 --- a/device/linux-htc-a5ul/APKBUILD +++ b/device/linux-htc-a5ul/APKBUILD @@ -10,7 +10,7 @@ _flavor="htc-a5ul" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev lz4 dtbtool gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev lz4 dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,22 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -63,23 +48,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # We need the dtb file install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-htc-bravo/APKBUILD b/device/linux-htc-bravo/APKBUILD index fda7c67f7..b84936196 100644 --- a/device/linux-htc-bravo/APKBUILD +++ b/device/linux-htc-bravo/APKBUILD @@ -10,7 +10,7 @@ _flavor="htc-bravo" url="https://github.com/spezi77/android_kernel_htc_qsd8k_3.0" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,12 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { diff --git a/device/linux-htc-evita/APKBUILD b/device/linux-htc-evita/APKBUILD index 27b6a3c0b..f95e7a7a7 100644 --- a/device/linux-htc-evita/APKBUILD +++ b/device/linux-htc-evita/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="54451f0e222f3fa94da8ea65f148255ab3323d1e6fd312636bcba58cb59b89d9dd15129f5d6aa70ee58eb64667d057433e2d0267d59eaf68713c166a05ad1ae2 linux-htc-evita-9b9100465d6c6a2d0248009863f2d4bf05598124.tar.gz diff --git a/device/linux-htc-flounder/APKBUILD b/device/linux-htc-flounder/APKBUILD index c60dad36d..e14ad8066 100644 --- a/device/linux-htc-flounder/APKBUILD +++ b/device/linux-htc-flounder/APKBUILD @@ -10,7 +10,7 @@ _flavor="htc-flounder" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -34,22 +34,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +44,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="b9ee4b14b0466e0b19d869810ceb852dd70399a90cdb081b902177685b87d242e11284bb0f619ea103b30ef5544f06a88c0131d028024ad8aa45809697e070fa linux-htc-flounder-a8f66d78789d66906c886fd6818fb648d0a84a2a.tar.gz diff --git a/device/linux-htc-k2ul/APKBUILD b/device/linux-htc-k2ul/APKBUILD index 07d5f5263..23b933ef0 100644 --- a/device/linux-htc-k2ul/APKBUILD +++ b/device/linux-htc-k2ul/APKBUILD @@ -52,23 +52,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="de02e36c7c19c886cc1f16b5a3a4464542a905e85cc3a531bd27b4944ee1ada01aad6e5fe8fd0346b991c923144154fbce8d86b17f69e69d05549440129b2fc9 linux-htc-k2ul-6ac3629384fac88beef65fd841f5135f9f832624.tar.gz diff --git a/device/linux-htc-m7/APKBUILD b/device/linux-htc-m7/APKBUILD index 4c8b58a4a..ad58443fa 100644 --- a/device/linux-htc-m7/APKBUILD +++ b/device/linux-htc-m7/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7014029604b8c448c7d2d6302b9404521d89b12a3df687f3aee10e73cd49b3c31fbd5a3db92c082eeda93e0e83b00487d0ee5e6311f4f9fcb32a4eb139d0d231 linux-htc-m7-f6eb6496406f5a06cdd4716e494082d78df70e83.tar.gz diff --git a/device/linux-htc-m8/APKBUILD b/device/linux-htc-m8/APKBUILD index f62b0ab02..a9561399a 100644 --- a/device/linux-htc-m8/APKBUILD +++ b/device/linux-htc-m8/APKBUILD @@ -10,7 +10,7 @@ _flavor="htc-m8" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -36,22 +36,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -64,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-htc-memul/APKBUILD b/device/linux-htc-memul/APKBUILD index 1ed662cc7..34c4468b7 100644 --- a/device/linux-htc-memul/APKBUILD +++ b/device/linux-htc-memul/APKBUILD @@ -47,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-htc-primou/APKBUILD b/device/linux-htc-primou/APKBUILD index 5286c2cb8..22a0187e8 100644 --- a/device/linux-htc-primou/APKBUILD +++ b/device/linux-htc-primou/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="dd7744a8313497294283877085f31042e96132b21521b7c05f02829e612465b19487643462b87c4c26870dda5108667641e30e4dc09925eb22e2f320f67f2f48 linux-htc-primou-f674566057bd4e5552e06d920e768fb6b50a0058.tar.gz diff --git a/device/linux-htc-protou/APKBUILD b/device/linux-htc-protou/APKBUILD index e858a5b98..3e930cb39 100644 --- a/device/linux-htc-protou/APKBUILD +++ b/device/linux-htc-protou/APKBUILD @@ -49,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="f779774222ce1f89a9d658fa789be5112fa3f8c8fe7220eead28a6b353b001f49bd45bacfb3ca2fa3663c8ad8495ca4e83a153dd45362016294f8f00f28a4214 linux-htc-protou-0e395015315c8950e85b70271b973a7d3c1a3ac5.tar.gz diff --git a/device/linux-htc-ville/APKBUILD b/device/linux-htc-ville/APKBUILD index 94acbd417..def4de3db 100644 --- a/device/linux-htc-ville/APKBUILD +++ b/device/linux-htc-ville/APKBUILD @@ -44,23 +44,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="5f5bd1399608301dc8688bea638bdb729b5229202748769d68cabc1e4da423ae28e06f856c971a7265d053c8a46d77e0a4f71a6d57ffea13aa5f9d84e594f2d2 linux-htc-ville-5b59c1be35a99c8913d33e68d608eee9cdef3393.tar.gz diff --git a/device/linux-htc-vision/APKBUILD b/device/linux-htc-vision/APKBUILD index bbb7eb0c3..4ff77390b 100644 --- a/device/linux-htc-vision/APKBUILD +++ b/device/linux-htc-vision/APKBUILD @@ -40,23 +40,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="ec0325ee9d6ca0b9222b26c188070da1f57551c359452b6cb1c2f9371b82d574520628162e30fd9bb84685d511a42bd65fc038db0329c869e1c002a77e489c3d linux-htc-vision-9eb87bf88164847421895687ad86fd0ca144e6a0.tar.gz diff --git a/device/linux-htc-vivo/APKBUILD b/device/linux-htc-vivo/APKBUILD index a7110f9a8..2044e6c7a 100644 --- a/device/linux-htc-vivo/APKBUILD +++ b/device/linux-htc-vivo/APKBUILD @@ -10,7 +10,7 @@ _flavor="htc-vivo" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,22 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -62,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="17164b38f2ff8683d8e304a6f8b768f3d1851d65105505aa80d98769dbf132508db427cd55aa4da76a4650bd7ea108f674fec87fa432e553f0c27e029db312e8 linux-htc-vivo-da3fd71eec35410f38808712d0edc0c5a6a42dda.tar.gz diff --git a/device/linux-huawei-lua-u22/APKBUILD b/device/linux-huawei-lua-u22/APKBUILD index 42818d11c..f38315a02 100644 --- a/device/linux-huawei-lua-u22/APKBUILD +++ b/device/linux-huawei-lua-u22/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="1772a62d28175bd31f7e1c7f5543f15ffa9a75421409f2dceff5445eaf79ded9d229538b389df0a16d3fd00c4670d625c66e4a9efc7e809fb02c8ee7b0d9a260 linux-huawei-lua-u22-83637cb899ac81dfdabd8935181caec15a7c6929.tar.gz diff --git a/device/linux-huawei-y530/APKBUILD b/device/linux-huawei-y530/APKBUILD index 7631ae02d..f5b834a5e 100644 --- a/device/linux-huawei-y530/APKBUILD +++ b/device/linux-huawei-y530/APKBUILD @@ -10,7 +10,7 @@ _flavor="huawei-y530" url="https://github.com/PieroV/android_kernel_huawei_msm8x1x" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -45,19 +45,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -78,23 +66,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-infocus-flatfish/APKBUILD b/device/linux-infocus-flatfish/APKBUILD index 12cd9f919..fc1bf0e3d 100644 --- a/device/linux-infocus-flatfish/APKBUILD +++ b/device/linux-infocus-flatfish/APKBUILD @@ -10,7 +10,7 @@ _flavor="infocus-flatfish" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,22 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -71,23 +56,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # External modules install cd "$builddir" diff --git a/device/linux-jolla-sbj/APKBUILD b/device/linux-jolla-sbj/APKBUILD index 9e139b850..efeb53783 100644 --- a/device/linux-jolla-sbj/APKBUILD +++ b/device/linux-jolla-sbj/APKBUILD @@ -10,7 +10,7 @@ _flavor="jolla-sbj" url="http://releases.sailfishos.org/sources/2.1.0.11/" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -41,22 +41,7 @@ prepare() { cd "$ksrcdir" default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -66,23 +51,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="c0ff1641dd6ae4dbf736ddaf543da0cfd51188d36f163a5f519772867a44c19b40ab86043c9ee1598bbf766e05ef8620588dde9ae5ebadce6e03360ebc78e484 linux-jolla-sbj-2.1.0.11.tar.bz2 diff --git a/device/linux-leeco-s2/APKBUILD b/device/linux-leeco-s2/APKBUILD index 16b87870c..59e58df98 100644 --- a/device/linux-leeco-s2/APKBUILD +++ b/device/linux-leeco-s2/APKBUILD @@ -10,7 +10,7 @@ _flavor="leeco-s2" url="https://kernel.org" license="GPL-2.0-only" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev git gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev git gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,19 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="e04ad32aef101019c66717d23ee9af3c1ef1770d3627d5ef6fab68c6ed81a2de766829f9aea9fdf1968523524de82aa6d0617656e1e66cc7a813ee9f54642b9a linux-leeco-s2-b3650e93fec05cfe6ecf1fe80383bcff979463a0.tar.gz diff --git a/device/linux-lenovo-karate/APKBUILD b/device/linux-lenovo-karate/APKBUILD index 075195a37..8660b9a1c 100644 --- a/device/linux-lenovo-karate/APKBUILD +++ b/device/linux-lenovo-karate/APKBUILD @@ -10,7 +10,7 @@ _flavor="lenovo-karate" url="https://github.com/karthick111/android_kernel_lenovo_msm8937" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,19 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -57,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="bc362a70215315eee0c63e52701488f9aa31c7e6af8d80f9dcef7c06b1d522f5e5a7a21c80c554575b21568ffb0fc2101407eb33c8d030f326943925275e34f9 linux-lenovo-karate-d99e6751356d0d310db6a16f3fe7eeaea8041675.tar.gz diff --git a/device/linux-lg-bullhead/APKBUILD b/device/linux-lg-bullhead/APKBUILD index 0dec7cc5f..c1ff67d89 100644 --- a/device/linux-lg-bullhead/APKBUILD +++ b/device/linux-lg-bullhead/APKBUILD @@ -10,7 +10,7 @@ _flavor="lg-bullhead" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,22 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -62,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="f34e79b5c80e6dcb2de4a85ec5a59b837338b55c4fef5ac5c6dfaf0d78220a016397442032fbf340eeead1201dd01feeff660adfe3406fdddf66832e59416898 linux-lg-bullhead-57351a6494f82cda87c697e10afb98b7f3bd28a2.tar.gz diff --git a/device/linux-lg-d722/APKBUILD b/device/linux-lg-d722/APKBUILD index 4813e6463..d275a06b6 100644 --- a/device/linux-lg-d722/APKBUILD +++ b/device/linux-lg-d722/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-lg-dory/APKBUILD b/device/linux-lg-dory/APKBUILD index c05537720..83def4be2 100644 --- a/device/linux-lg-dory/APKBUILD +++ b/device/linux-lg-dory/APKBUILD @@ -26,7 +26,7 @@ arch="armhf" pkgdesc="Kernel for LG G Watch" url="https://android.googlesource.com/kernel/msm/+/android-msm-dory-3.10-marshmallow-mr1-wear-release" depends="" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" options="!strip !check !tracedeps" install= source=" @@ -57,12 +57,7 @@ builddir="$srcdir/kernel_msm-${_hash}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - cp "$srcdir"/$_config "$builddir"/.config - make ARCH="$_carch" HOSTCC="$HOSTCC" silentoldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { diff --git a/device/linux-lg-e610/APKBUILD b/device/linux-lg-e610/APKBUILD index b6540aa84..7f51d3d0b 100644 --- a/device/linux-lg-e610/APKBUILD +++ b/device/linux-lg-e610/APKBUILD @@ -46,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="b73f5d8a87eaea99489b3ed090ef5219438779a9ba8de4716be9d6a0b8f8e88e56ae493cc9b9efdd1736bc061f174a61576f0b99a9f75e8c613fc09bd01a7d86 linux-lg-e610-45d6b0c683f3e0178e91c081133c6ebbea1d30fd.tar.gz diff --git a/device/linux-lg-h815/APKBUILD b/device/linux-lg-h815/APKBUILD index da37f033f..3ddf308c5 100644 --- a/device/linux-lg-h815/APKBUILD +++ b/device/linux-lg-h815/APKBUILD @@ -10,7 +10,7 @@ _flavor="lg-h815" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,19 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -57,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="48a3345de582a6e4ba7fc2f87ffd423750bb8a1878ce386b8504306a49294e01e6c4c7511d2c178d8c9fb228c288782fe64f606df381843f144986d1cd467ad7 linux-lg-h815-aad745da91abbdf8bacda189aebf22db048604f5.tar.gz diff --git a/device/linux-lg-mako/APKBUILD b/device/linux-lg-mako/APKBUILD index ee66af9ed..467bfc709 100644 --- a/device/linux-lg-mako/APKBUILD +++ b/device/linux-lg-mako/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="41d6b4446dbccf8a8b0e362ad0875341fb17b2a2e95c5be0450f419b838bd5b65de27dda5cce2d9d51c97d45884343f2ecf2a1323671926a82815ea2b5c13294 linux-lg-mako-1495bfcf93f9e0e896331f29e1850387c31d6714.tar.gz diff --git a/device/linux-lg-p700/APKBUILD b/device/linux-lg-p700/APKBUILD index df933d60d..7d2c0de33 100644 --- a/device/linux-lg-p700/APKBUILD +++ b/device/linux-lg-p700/APKBUILD @@ -46,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="b73f5d8a87eaea99489b3ed090ef5219438779a9ba8de4716be9d6a0b8f8e88e56ae493cc9b9efdd1736bc061f174a61576f0b99a9f75e8c613fc09bd01a7d86 linux-lg-p700-45d6b0c683f3e0178e91c081133c6ebbea1d30fd.tar.gz diff --git a/device/linux-lg-vee7e/APKBUILD b/device/linux-lg-vee7e/APKBUILD index c7d4486ee..6428a6a97 100644 --- a/device/linux-lg-vee7e/APKBUILD +++ b/device/linux-lg-vee7e/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="0124de18237d4ea6a367aab9b6474a05bc67a5db18f687b8f58d3a8a63d2569b3ea9a9c8e33dc78ae834f4cc8fd2ee1c64b6d6a2ea12f0c4821b1f29385a3d8d linux-lg-vee7e-8a90ec65502bde12a03c60d6756eea3e88c02917.tar.gz diff --git a/device/linux-lg-w5/APKBUILD b/device/linux-lg-w5/APKBUILD index 19f344ea5..678c5a69c 100644 --- a/device/linux-lg-w5/APKBUILD +++ b/device/linux-lg-w5/APKBUILD @@ -50,23 +50,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-medion-kai/APKBUILD b/device/linux-medion-kai/APKBUILD index d816de8a7..b5a5388e5 100644 --- a/device/linux-medion-kai/APKBUILD +++ b/device/linux-medion-kai/APKBUILD @@ -51,23 +51,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Modules cd "$builddir" diff --git a/device/linux-meizu-turbo/APKBUILD b/device/linux-meizu-turbo/APKBUILD index bd71b293d..eab9b13a3 100644 --- a/device/linux-meizu-turbo/APKBUILD +++ b/device/linux-meizu-turbo/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="3e2fed72982aa58ae4fb403f70a0141680e01188c8c82c9272478b5fc9022de8ef7f229c44f6d07f0aa14904d6c1fb2f5fd3233440ea9f42702987ca165ce0ce linux-meizu-turbo-2d3fa1ca1fbc8b52c75b2bcc3784b7e52085768b.tar.gz diff --git a/device/linux-motorola-athene/APKBUILD b/device/linux-motorola-athene/APKBUILD index 9a12cab1e..54bf219f6 100644 --- a/device/linux-motorola-athene/APKBUILD +++ b/device/linux-motorola-athene/APKBUILD @@ -10,7 +10,7 @@ _flavor="motorola-athene" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,22 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -63,23 +48,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm64/boot/dt.img" \ diff --git a/device/linux-motorola-cedric/APKBUILD b/device/linux-motorola-cedric/APKBUILD index 09ff18720..4270cd4b0 100644 --- a/device/linux-motorola-cedric/APKBUILD +++ b/device/linux-motorola-cedric/APKBUILD @@ -47,23 +47,7 @@ build() { package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB install -Dm644 "$builddir/arch/arm64/boot/dt.img" \ diff --git a/device/linux-motorola-falcon/APKBUILD b/device/linux-motorola-falcon/APKBUILD index 0b73582eb..883be3a49 100644 --- a/device/linux-motorola-falcon/APKBUILD +++ b/device/linux-motorola-falcon/APKBUILD @@ -10,7 +10,7 @@ _flavor="motorola-falcon" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="coreutils perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz dtbtool gcc6" +makedepends="coreutils perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,19 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -62,23 +50,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # We need the dtb file install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-motorola-ghost/APKBUILD b/device/linux-motorola-ghost/APKBUILD index 878e223be..6a1f3131b 100644 --- a/device/linux-motorola-ghost/APKBUILD +++ b/device/linux-motorola-ghost/APKBUILD @@ -49,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="6e9700cd05af9cc27a4684fece48fa240969df11bc91fd53450496dde63df173cea2181699785439cf110874653612a8ae0493a456be8f0100aafd7eca918fa0 linux-motorola-ghost-37aee207bbd85eb20091286258a6b2529315cae8.tar.gz diff --git a/device/linux-motorola-lux/APKBUILD b/device/linux-motorola-lux/APKBUILD index 5c422527b..09088f99b 100644 --- a/device/linux-motorola-lux/APKBUILD +++ b/device/linux-motorola-lux/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-motorola-maserati/APKBUILD b/device/linux-motorola-maserati/APKBUILD index ac2469439..08009b797 100644 --- a/device/linux-motorola-maserati/APKBUILD +++ b/device/linux-motorola-maserati/APKBUILD @@ -10,7 +10,7 @@ _flavor="motorola-maserati" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -46,19 +46,7 @@ _pvr_builddir="$srcdir/${_hardware_repository}-${_hardware_commit}/pvr-source/eu prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" # Workaround to get the Makefile working outside of a git repository cd "$_wlan_builddir" @@ -87,23 +75,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" cd "$builddir" make modules_install \ diff --git a/device/linux-motorola-peregrine/APKBUILD b/device/linux-motorola-peregrine/APKBUILD index 225158d7a..42e1a7b13 100644 --- a/device/linux-motorola-peregrine/APKBUILD +++ b/device/linux-motorola-peregrine/APKBUILD @@ -10,7 +10,7 @@ _flavor="motorola-peregrine" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="coreutils perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz dtbtool gcc6" +makedepends="coreutils perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -38,19 +38,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -63,23 +51,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # We need the dtb file install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-motorola-potter/APKBUILD b/device/linux-motorola-potter/APKBUILD index ffb928c70..5fdd81fbf 100644 --- a/device/linux-motorola-potter/APKBUILD +++ b/device/linux-motorola-potter/APKBUILD @@ -10,7 +10,7 @@ _flavor="motorola-potter" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -40,19 +40,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -64,23 +52,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB install -Dm644 "$builddir/arch/arm64/boot/dt.img" \ diff --git a/device/linux-motorola-shamu/APKBUILD b/device/linux-motorola-shamu/APKBUILD index a60759df5..bf6e2be90 100644 --- a/device/linux-motorola-shamu/APKBUILD +++ b/device/linux-motorola-shamu/APKBUILD @@ -10,7 +10,7 @@ _flavor="motorola-shamu" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,19 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -57,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="2349f1ea66d3bf05675d91a8cf959bf683818c4aafc04b3ec60f8d0ee07dae1d38ade24b14a2457df733ed2db8249dba680a70992d5748806375b76b9cc47dc5 linux-motorola-shamu-0f791f84d1951e144f1e466ba97dd692d33d93c7.tar.gz diff --git a/device/linux-motorola-surnia/APKBUILD b/device/linux-motorola-surnia/APKBUILD index 748382bcb..eba8c93e5 100644 --- a/device/linux-motorola-surnia/APKBUILD +++ b/device/linux-motorola-surnia/APKBUILD @@ -46,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-nextbit-robin/APKBUILD b/device/linux-nextbit-robin/APKBUILD index 213e3cf7e..58f99b707 100644 --- a/device/linux-nextbit-robin/APKBUILD +++ b/device/linux-nextbit-robin/APKBUILD @@ -10,7 +10,7 @@ _flavor="nextbit-robin" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,21 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="f2bffe51d021cbe7e5eb3f33486ee3544ca4477e4d21bfb2cffb5743e16dd24a02dbbb93daa45f43ed1825607b730fb39a1b7dace7b24f99a844dca577ba52ad linux-nextbit-robin-8b8773362248bdba3224a1d92e76c5b9004519d6.tar.gz diff --git a/device/linux-nobby-230/APKBUILD b/device/linux-nobby-230/APKBUILD index ed95a01b2..6cd6bf674 100644 --- a/device/linux-nobby-230/APKBUILD +++ b/device/linux-nobby-230/APKBUILD @@ -51,23 +51,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="0bee0e9c67c155957ed90f6f3707ec9663fd541c1c73e93c747b71423b37d64486c1c758b5e889280210b69d377c0bb203346f8d290252d5a4989788749b6e89 linux-nobby-230-161c7229a4873ead08fc0118d93967b66e38d645.tar.gz diff --git a/device/linux-nokia-frt/APKBUILD b/device/linux-nokia-frt/APKBUILD index 9ab37b1f8..4d469dd5a 100644 --- a/device/linux-nokia-frt/APKBUILD +++ b/device/linux-nokia-frt/APKBUILD @@ -46,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Modules cd "$builddir" diff --git a/device/linux-nokia-rm885/APKBUILD b/device/linux-nokia-rm885/APKBUILD index 9e77dbbd6..7a7d7eccb 100644 --- a/device/linux-nokia-rm885/APKBUILD +++ b/device/linux-nokia-rm885/APKBUILD @@ -47,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7b09ae324b285b659a0b78755a559a814fabdc40857e0957fa4b637ed4b26b9d25b5a936d5231d5492956f6bd6a84739e5ab6402c8c0065d2b5963d0fe0bf6d8 linux-nokia-rm885-c76fa190cc0d20a9d803ce9bdb59eab0de67a64a.tar.gz diff --git a/device/linux-oneplus-cheeseburger/APKBUILD b/device/linux-oneplus-cheeseburger/APKBUILD index 6cd6ec78c..d5a428f1f 100644 --- a/device/linux-oneplus-cheeseburger/APKBUILD +++ b/device/linux-oneplus-cheeseburger/APKBUILD @@ -49,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7cbd92a8d16a0f47214ff3ba8295286a00ccd051ff45fe25f37d2f3e0829f24b98aa49e7fcb0977da5b77a26ae267fa48685c0e137be88a79599bf8b82853c41 linux-oneplus-cheeseburger-607bd717e602f6326ad40974d2f382db183633d2.tar.gz diff --git a/device/linux-oneplus-oneplus2/APKBUILD b/device/linux-oneplus-oneplus2/APKBUILD index 1767acc75..d960ad371 100644 --- a/device/linux-oneplus-oneplus2/APKBUILD +++ b/device/linux-oneplus-oneplus2/APKBUILD @@ -10,7 +10,7 @@ _flavor="oneplus-oneplus2" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,21 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - sed -i 's/-Werror//g' drivers/staging/qcacld-2.0/Kbuild - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="81ef633e95b16a6413cacc7eb287e5194396bc34c198d29b498a4c6f8750836ec1f247b6ba7b2371bc642c48ef2492dc0c18ee358d0bc3291d2a0c1d0ded684e linux-oneplus-oneplus2-0178fae80ec43cefa75f590e18a9039f5b379425.tar.gz diff --git a/device/linux-oppo-find-7a/APKBUILD b/device/linux-oppo-find-7a/APKBUILD index ae3fbf80a..0e402145f 100644 --- a/device/linux-oppo-find-7a/APKBUILD +++ b/device/linux-oppo-find-7a/APKBUILD @@ -62,23 +62,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-ouya-ouya/APKBUILD b/device/linux-ouya-ouya/APKBUILD index 09052c6e6..e71f82618 100644 --- a/device/linux-ouya-ouya/APKBUILD +++ b/device/linux-ouya-ouya/APKBUILD @@ -42,23 +42,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7e29ed39c61693d85d344b6eb6180920431364124e8a261f28804585e7362ddbb3ad43c9610bed1ce83b1de7957261e450862081f53de98a5873b5a8aad1748e linux-ouya-ouya-49f035e65e689f8c227bac7a6c4ecf89ad9158af.tar.gz diff --git a/device/linux-purism-librem5/APKBUILD b/device/linux-purism-librem5/APKBUILD index 959bf8535..7ecd19f2e 100644 --- a/device/linux-purism-librem5/APKBUILD +++ b/device/linux-purism-librem5/APKBUILD @@ -43,24 +43,8 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi - cd "$builddir" local _install case "$CARCH" in aarch64*|arm*) _install="modules_install dtbs_install" ;; diff --git a/device/linux-samsung-a5y17lte/APKBUILD b/device/linux-samsung-a5y17lte/APKBUILD index 7f61bc279..4b4872e22 100644 --- a/device/linux-samsung-a5y17lte/APKBUILD +++ b/device/linux-samsung-a5y17lte/APKBUILD @@ -69,28 +69,12 @@ build_modules() { } package() { + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" + mkdir -p "$pkgdir"/lib/modules/$pkgver cp -v "$builddir"/modules.builtin "$pkgdir"/lib/modules/$pkgver make INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 M=$qcaclddir modules_install - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi - # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm64/boot/dtb.img" \ "$pkgdir/boot/dt.img" diff --git a/device/linux-samsung-apexq/APKBUILD b/device/linux-samsung-apexq/APKBUILD index ebaf9efa9..ac3cef95e 100644 --- a/device/linux-samsung-apexq/APKBUILD +++ b/device/linux-samsung-apexq/APKBUILD @@ -46,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" cd "$builddir" make ARCH="$_carch" CC="${CC:-gcc}" \ diff --git a/device/linux-samsung-ariesve/APKBUILD b/device/linux-samsung-ariesve/APKBUILD index 2f80e2d7b..76b1571c7 100644 --- a/device/linux-samsung-ariesve/APKBUILD +++ b/device/linux-samsung-ariesve/APKBUILD @@ -42,23 +42,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="df16360802a9b07866a39356c6e63095049b00f7aae63b63cf5f9b88c016065d63e573b75af48bf7cd73df72cf60892f8781e23f00bbfc6ebb5a52e4c69ef966 linux-samsung-ariesve-b157ddfd3a28f6e6b2dca4acfc8fcbd0ad684489.tar.gz diff --git a/device/linux-samsung-espresso10/APKBUILD b/device/linux-samsung-espresso10/APKBUILD index 77803280b..e9348cba1 100644 --- a/device/linux-samsung-espresso10/APKBUILD +++ b/device/linux-samsung-espresso10/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-espresso10" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,19 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -57,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="86d77d7f1004e1b0ec63e95132b853ad6e03d3e55587bbbed91d64d95ba6f9bb82ac5b77162f8e89b16c4f8db491d4e8ce6ed16b7572bb6f99ce46144dac619e linux-samsung-espresso10-19d2fd25e2416ed04c287387ade7048047bf7b18.tar.gz diff --git a/device/linux-samsung-expressatt/APKBUILD b/device/linux-samsung-expressatt/APKBUILD index 29d6e1e88..9db937201 100644 --- a/device/linux-samsung-expressatt/APKBUILD +++ b/device/linux-samsung-expressatt/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="b9ac45ce753c83d1875ef0f55cedf0c998a2ad58ac4e1a667869980b21e70dd0e7c0781e8108c454fe45ed5a4bf76a3f79d68b70f38467470899acf4dc7daa47 linux-samsung-expressatt-0dbe2b56847b304d30b809dfd08ba3b4a61d9af8.tar.gz diff --git a/device/linux-samsung-golden/APKBUILD b/device/linux-samsung-golden/APKBUILD index 39bd59703..fe03f6d64 100644 --- a/device/linux-samsung-golden/APKBUILD +++ b/device/linux-samsung-golden/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-golden" url="https://kernel.org" license="GPL-2.0-or-later" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -40,22 +40,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -65,23 +50,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Modules cd "$builddir" diff --git a/device/linux-samsung-gts210velte/APKBUILD b/device/linux-samsung-gts210velte/APKBUILD index ced87e4d3..35af1f2ab 100644 --- a/device/linux-samsung-gts210velte/APKBUILD +++ b/device/linux-samsung-gts210velte/APKBUILD @@ -52,23 +52,8 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm64/boot/dt.img" \ "$pkgdir/boot/dt.img" diff --git a/device/linux-samsung-gts210vewifi/APKBUILD b/device/linux-samsung-gts210vewifi/APKBUILD index 81ca66f54..c0280e885 100644 --- a/device/linux-samsung-gts210vewifi/APKBUILD +++ b/device/linux-samsung-gts210vewifi/APKBUILD @@ -52,24 +52,8 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi - # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm64/boot/dt.img" \ "$pkgdir/boot/dt.img" diff --git a/device/linux-samsung-hero2lte/APKBUILD b/device/linux-samsung-hero2lte/APKBUILD index 17c9c12f4..8d6a366d0 100644 --- a/device/linux-samsung-hero2lte/APKBUILD +++ b/device/linux-samsung-hero2lte/APKBUILD @@ -42,23 +42,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Copy the in-tree DTBH block image install -Dm644 "$builddir/arch/arm64/boot/dtb.img" \ diff --git a/device/linux-samsung-herolte/APKBUILD b/device/linux-samsung-herolte/APKBUILD index 72e73869a..ae70ffdf3 100644 --- a/device/linux-samsung-herolte/APKBUILD +++ b/device/linux-samsung-herolte/APKBUILD @@ -50,23 +50,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Copy the in-tree DTBH block image install -Dm644 "$builddir/arch/arm64/boot/dt.img" \ diff --git a/device/linux-samsung-i747m/APKBUILD b/device/linux-samsung-i747m/APKBUILD index 69097dbe0..f2309ce02 100644 --- a/device/linux-samsung-i747m/APKBUILD +++ b/device/linux-samsung-i747m/APKBUILD @@ -16,7 +16,7 @@ _flavor="samsung-i747m" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers xz elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -44,19 +44,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -66,23 +54,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="6850231f0596dd272b4f963d20c77aee6ed16a1ba47261dbafe11ffccac695427db54efa71d070525c519885b795395e9ac6ca97fa06ccc36131aba1f95aa715 linux-samsung-i747m-716f00ee2e86adfd507842c5f193a738b57d3c49.tar.gz diff --git a/device/linux-samsung-i8200/APKBUILD b/device/linux-samsung-i8200/APKBUILD index 07ee0edb3..e71db58f7 100644 --- a/device/linux-samsung-i8200/APKBUILD +++ b/device/linux-samsung-i8200/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="425d76c48862f3662826518e44164769e3ea959aed569329bafd951b2124d2ea3318de8ed65cb5f45635e0f3a13fa99b1ffa1df913126a1a5ecd1fa0ad988668 linux-samsung-i8200-5e4d8b5f27fb90d5a3f8aad13d9afe63e586c82d.tar.gz diff --git a/device/linux-samsung-i9003/APKBUILD b/device/linux-samsung-i9003/APKBUILD index 53f415046..945d98e8b 100644 --- a/device/linux-samsung-i9003/APKBUILD +++ b/device/linux-samsung-i9003/APKBUILD @@ -50,7 +50,7 @@ prepare_isorec() { mv latona_initramfs.list latona_initramfs.list_old grep -v "../../ramdisk" latona_initramfs.list_old > latona_initramfs.list cp -v "$srcdir"/init "$builddir"/usr/latona_initramfs_files/init - + # Paths supplied to gen_initramfs_list.sh are prefixed with "source/". ln -s "$builddir" ln -s "$builddir"/source } @@ -70,25 +70,8 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi - - cd "$builddir" unset LDFLAGS echo "--[ Installing modules ]--" diff --git a/device/linux-samsung-i9070/APKBUILD b/device/linux-samsung-i9070/APKBUILD index 95a4eccfa..948330968 100644 --- a/device/linux-samsung-i9070/APKBUILD +++ b/device/linux-samsung-i9070/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-i9070" url="https://github.com/Epirex/Samsung_STE_Kernel" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev busybox-static-armhf gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev busybox-static-armhf gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -41,6 +41,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" # Use Alpine's busybox.static instead of the pre-compiled busybox shipped # with the source @@ -50,18 +51,6 @@ prepare() { # use custom init script in the initramfs which loads the initramfs from # the kernel2 partition ("isorec") cp -v "$srcdir"/init "$builddir"/usr/u8500_initramfs_files/init - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - cp "$srcdir"/$_config "$builddir"/.config - make ARCH="$_carch" HOSTCC="$HOSTCC" silentoldconfig } build() { @@ -75,23 +64,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Modules cd "$builddir" diff --git a/device/linux-samsung-i9100/APKBUILD b/device/linux-samsung-i9100/APKBUILD index 21220dec2..713137c8b 100644 --- a/device/linux-samsung-i9100/APKBUILD +++ b/device/linux-samsung-i9100/APKBUILD @@ -67,23 +67,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="285ffd2c82d0444b99da583573d19443b73de22d7382aae54413af229a28bebf4ea32ecbe248ae54ae64bbbc0af7d722b1ef86d5dd099e2990dcc6284fb195fa linux-samsung-i9100-349a3e91e76d17e67ef6213e1f6712e700695631.tar.gz diff --git a/device/linux-samsung-i9195/APKBUILD b/device/linux-samsung-i9195/APKBUILD index 9c7211236..4c97eed31 100644 --- a/device/linux-samsung-i9195/APKBUILD +++ b/device/linux-samsung-i9195/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-i9195" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,19 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7ce3621f50e0c615795eed17fa5178ba2d2c3165b9267f80f088305f8cb591c704129d841cb4c82496f185a59669dccf61b527dbf21b548a923bdb96b666dc2d linux-samsung-i9195-c4b753a5d44f42cee2191ecf5504bccdf53c838d.tar.gz diff --git a/device/linux-samsung-i927/APKBUILD b/device/linux-samsung-i927/APKBUILD index 7914dcb0f..7a0f23bbe 100644 --- a/device/linux-samsung-i927/APKBUILD +++ b/device/linux-samsung-i927/APKBUILD @@ -104,25 +104,8 @@ package() { "$builddir/arch/arm/boot/dts/tegra20-glide.dtb" \ > "$builddir/arch/arm/boot/zImage-dtb" - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi - - cd "$builddir" make modules_install \ ARCH="$_carch" \ INSTALL_MOD_PATH="$pkgdir" diff --git a/device/linux-samsung-j1mini3g/APKBUILD b/device/linux-samsung-j1mini3g/APKBUILD index e1f2762c3..be224fb58 100644 --- a/device/linux-samsung-j1mini3g/APKBUILD +++ b/device/linux-samsung-j1mini3g/APKBUILD @@ -47,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-samsung-j3nxlte/APKBUILD b/device/linux-samsung-j3nxlte/APKBUILD index b5df970ed..e0dccee3c 100644 --- a/device/linux-samsung-j3nxlte/APKBUILD +++ b/device/linux-samsung-j3nxlte/APKBUILD @@ -47,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-samsung-jflte/APKBUILD b/device/linux-samsung-jflte/APKBUILD index 7191ff7c7..0f3bce098 100644 --- a/device/linux-samsung-jflte/APKBUILD +++ b/device/linux-samsung-jflte/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7b73724636d9fb2a19e6405b1c6acd9f08020cb2d8c51f209eab2dea90616f15e88e96cdea62931864a6a3f6d4ad1c0b0b9b5cae3e3a690c20f5a9dcb4b33d82 linux-samsung-jflte-e8d93e03563e42d7c762d4e9a87d77115102b301.tar.gz diff --git a/device/linux-samsung-klte/APKBUILD b/device/linux-samsung-klte/APKBUILD index 32ec7683d..60963d289 100644 --- a/device/linux-samsung-klte/APKBUILD +++ b/device/linux-samsung-klte/APKBUILD @@ -61,23 +61,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-samsung-kminilte/APKBUILD b/device/linux-samsung-kminilte/APKBUILD index a7d11538f..8ecb3fd76 100644 --- a/device/linux-samsung-kminilte/APKBUILD +++ b/device/linux-samsung-kminilte/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-kminilte" url="https://github.com/cm-3470/android_kernel_samsung_kminilte" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -34,22 +34,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +44,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="351b043822d9fc25a002f07a490422341fd03671d661bb949085ef8d69042f1ae528f80ade7076aba3eaffec80f65c09fdbb600ffe04063c69d876c22a53709b linux-samsung-kminilte-7a8c010f226189116dcf2301d338555ae0d270c3.tar.gz diff --git a/device/linux-samsung-kylepro/APKBUILD b/device/linux-samsung-kylepro/APKBUILD index 4ccf576cb..8994970ca 100644 --- a/device/linux-samsung-kylepro/APKBUILD +++ b/device/linux-samsung-kylepro/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="b66ab7d8ed557ed095b059beb7b37d196a7290e6c8364560126a94f696718c4a61f99b1e21700d9a4b50c569243e4e2cbfc9fbd9d9517ca49cfa32f31525c27f linux-samsung-kylepro-026cf3b3e97ec40aa1c0c52837a318725786f05a.tar.gz diff --git a/device/linux-samsung-kylessopen/APKBUILD b/device/linux-samsung-kylessopen/APKBUILD index 1d966c2bb..d67e227f9 100644 --- a/device/linux-samsung-kylessopen/APKBUILD +++ b/device/linux-samsung-kylessopen/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="874957ad6a6c959b5479ece21225d9423f62e67a6a4c1f9a9e56d0c6078b6644a4ff2e490c7e43a8ef5241b148af6085b041f02268586cf8c61b1eacfd3511ad linux-samsung-kylessopen-d0e853abec2d7be79f5d9b319273a0b66046b125.tar.gz diff --git a/device/linux-samsung-kylevess/APKBUILD b/device/linux-samsung-kylevess/APKBUILD index 9e6325626..dc9aa92d4 100644 --- a/device/linux-samsung-kylevess/APKBUILD +++ b/device/linux-samsung-kylevess/APKBUILD @@ -9,7 +9,7 @@ _flavor="samsung-kylevess" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,22 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -62,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="ef1881e26be013a4f58eac86c884b3f2d50e7b742e97d7655832865089a4776e83b19df64ecda332a4cb44c5ce8006679428b22248590be881948821c45f469f linux-samsung-kylevess-17667b5c69eaf3db40ca2040d965d14cfd09a427.tar.gz diff --git a/device/linux-samsung-lt01wifi/APKBUILD b/device/linux-samsung-lt01wifi/APKBUILD index 53e805bc3..adefd2818 100644 --- a/device/linux-samsung-lt01wifi/APKBUILD +++ b/device/linux-samsung-lt01wifi/APKBUILD @@ -41,23 +41,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } #sha512sums="43c9a5cfe9a6f66d7fbdec04ea6a04c06864d2f6140f458fba7bcde7a871d0128d5f1bf45724923c6e7fc592863a1a0a01a067dd6255b5f7ee0dbef46958140c linux-samsung-lt01wifi-6ad0b18a63deacaebbc3d12751c3230cedbf7335.tar.gz diff --git a/device/linux-samsung-lt023g/APKBUILD b/device/linux-samsung-lt023g/APKBUILD index 657cb28cd..3c8565589 100644 --- a/device/linux-samsung-lt023g/APKBUILD +++ b/device/linux-samsung-lt023g/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-lt023g" url="https://github.com/kumajaya/android_kernel_samsung_lt02" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,22 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -62,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="41b0dc94d29e1ad75bcb309aebefc58302b5176be30cafd827b7f69b44805b84d44de93dfc363e671a421623ad2b6d264edbc74976106ba52f0c249d268622f1 linux-samsung-lt023g-c6fb6f677aa195b07348eb7777322ca956f9c44c.tar.gz diff --git a/device/linux-samsung-maguro/APKBUILD b/device/linux-samsung-maguro/APKBUILD index d3ebb5f1f..6cd9f095f 100644 --- a/device/linux-samsung-maguro/APKBUILD +++ b/device/linux-samsung-maguro/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-maguro" url="https://github.com/LineageOS/android_kernel_samsung_tuna" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -36,12 +36,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - cp "$srcdir"/$_config "$builddir"/.config - make ARCH="$_carch" HOSTCC="$HOSTCC" silentoldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { diff --git a/device/linux-samsung-manta/APKBUILD b/device/linux-samsung-manta/APKBUILD index 25c8ca9e4..ee10a47ec 100644 --- a/device/linux-samsung-manta/APKBUILD +++ b/device/linux-samsung-manta/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-manta" url="https://github.com/LineageOS/android_kernel_samsung_manta" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -34,19 +34,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -56,23 +44,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="11f8c197810438082bb103be9f26857e7ec1e1e49a1a8aca3bade12332ed1def62142b58219f4d17d07f0ab076708bef6c709312b784ab1c5339aa2e9db0232f linux-samsung-manta-21157195150c268c19303513e4e1327dc01ff89e.tar.gz diff --git a/device/linux-samsung-matissewifi/APKBUILD b/device/linux-samsung-matissewifi/APKBUILD index 925bf5427..f8cd03af5 100644 --- a/device/linux-samsung-matissewifi/APKBUILD +++ b/device/linux-samsung-matissewifi/APKBUILD @@ -51,23 +51,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-samsung-n5110/APKBUILD b/device/linux-samsung-n5110/APKBUILD index 3ef3d7aee..4e331ebf6 100644 --- a/device/linux-samsung-n5110/APKBUILD +++ b/device/linux-samsung-n5110/APKBUILD @@ -10,7 +10,7 @@ _flavor="samsung-n5110" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,19 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7e47ecfa6c3b2f4ac199ceed4103a00a577f9fa0002f5759df570f3c11a3436e53114e87a13e9efd27f2a2e17fcaab1be0666dffaa7d23699e700bee0d2afe33 linux-samsung-n5110-b7ffe7f2aea2391737cdeac2a33217ee0ea4f2ba.tar.gz diff --git a/device/linux-samsung-nevisp/APKBUILD b/device/linux-samsung-nevisp/APKBUILD index 3f5f023db..205cffbbe 100644 --- a/device/linux-samsung-nevisp/APKBUILD +++ b/device/linux-samsung-nevisp/APKBUILD @@ -54,23 +54,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Modules cd "$builddir" diff --git a/device/linux-samsung-royss/APKBUILD b/device/linux-samsung-royss/APKBUILD index 31bffeb16..4796e54e5 100644 --- a/device/linux-samsung-royss/APKBUILD +++ b/device/linux-samsung-royss/APKBUILD @@ -44,29 +44,13 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" + # Install kernel modules echo "--[ Installing modules ]--" make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \ INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 modules_install - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi } sha512sums="5dd49d41297247788d5b33815ec74f02ecc2566a9045102df63579dbc360f7c4c08fc4a28251efa02959137e7ed0f92a91b694145d40ee52bb0bf99557a7320a linux-samsung-royss-3169160cd6b23e0325fb5117cc347fc6acb2bc48.tar.gz diff --git a/device/linux-samsung-s6500d/APKBUILD b/device/linux-samsung-s6500d/APKBUILD index 9a585e64b..33f344965 100644 --- a/device/linux-samsung-s6500d/APKBUILD +++ b/device/linux-samsung-s6500d/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="a46d52f79597fc3a8ded036fbdcc4cdbb96ba1582fb1349002183c1e23598da10da2faede1a251f55705ae6e8e54232797866f4c03acc2b1ace1664b315dd216 linux-samsung-s6500d-d70eebdb55d7011c82ce64fe5eae2fdcbfd4e425.tar.gz diff --git a/device/linux-samsung-serranodsdd/APKBUILD b/device/linux-samsung-serranodsdd/APKBUILD index 19aadfbf0..cd70bf3d1 100644 --- a/device/linux-samsung-serranodsdd/APKBUILD +++ b/device/linux-samsung-serranodsdd/APKBUILD @@ -45,23 +45,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="a89f9da68be6cf3b0bc77a9d70519b4ffc4ad332a53bfb35facf0e8ae418b7f1870fc1596c9305c596f7a0353be82f7eff0e211a32e330d0dd20c98398ab2826 linux-samsung-serranodsdd-0c7b2079e9ba8f945ea444bad393c8d7f8b099cc.tar.gz diff --git a/device/linux-samsung-zanin/APKBUILD b/device/linux-samsung-zanin/APKBUILD index 218f0b8dd..4e55b5a20 100644 --- a/device/linux-samsung-zanin/APKBUILD +++ b/device/linux-samsung-zanin/APKBUILD @@ -46,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="1c62313451ff2a04ab9259a4b2c954388a360f45f20af90d05e9cfe73d31f49fc4847f24c1742c89a45f1646e1d27999fc6f5bd224baba7046b07ab324e7baae linux-samsung-zanin-8224116dca7de79d181c0761468f569e6ac3505e.tar.gz diff --git a/device/linux-semc-anzu/APKBUILD b/device/linux-semc-anzu/APKBUILD index af1ba49b2..9aeea9af4 100644 --- a/device/linux-semc-anzu/APKBUILD +++ b/device/linux-semc-anzu/APKBUILD @@ -16,7 +16,7 @@ _flavor="semc-anzu" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -42,19 +42,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -69,29 +57,12 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # modules - cd "$builddir" make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \ INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 modules_install - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi } sha512sums="234e8973236e6056c60a312340ef4ccb7598adc43bd1f0c2ca0e89d03f4e16ecfdd5ad4658d76993c7bae24242a7e134a9ed2fda662dfe229b61f3a88ea6c2f0 linux-semc-anzu-9c6f07f81e2c0bcb2bef75fa9716cc30f8942286.tar.gz diff --git a/device/linux-semc-smultron/APKBUILD b/device/linux-semc-smultron/APKBUILD index b4216a084..abd00952b 100644 --- a/device/linux-semc-smultron/APKBUILD +++ b/device/linux-semc-smultron/APKBUILD @@ -46,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="234e8973236e6056c60a312340ef4ccb7598adc43bd1f0c2ca0e89d03f4e16ecfdd5ad4658d76993c7bae24242a7e134a9ed2fda662dfe229b61f3a88ea6c2f0 linux-semc-smultron-9c6f07f81e2c0bcb2bef75fa9716cc30f8942286.tar.gz diff --git a/device/linux-sony-amami/APKBUILD b/device/linux-sony-amami/APKBUILD index c1b3ccf16..a69dddba9 100644 --- a/device/linux-sony-amami/APKBUILD +++ b/device/linux-sony-amami/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="fae2299d9d36956be71f40ae724ac0a5069b53d440c114184f82495550c76743e9275e37ad00f6d4a012d32e91a580f424cdb1a1222647c5f2fd678a405a225f linux-sony-amami-2134cafba220b32c43701368413ee333b41b7fe0.tar.gz diff --git a/device/linux-sony-aries/APKBUILD b/device/linux-sony-aries/APKBUILD index ab66c8e7c..b2ebbea63 100644 --- a/device/linux-sony-aries/APKBUILD +++ b/device/linux-sony-aries/APKBUILD @@ -42,23 +42,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="fae2299d9d36956be71f40ae724ac0a5069b53d440c114184f82495550c76743e9275e37ad00f6d4a012d32e91a580f424cdb1a1222647c5f2fd678a405a225f linux-sony-aries-2134cafba220b32c43701368413ee333b41b7fe0.tar.gz diff --git a/device/linux-sony-coconut/APKBUILD b/device/linux-sony-coconut/APKBUILD index 44b7811d0..60138e613 100644 --- a/device/linux-sony-coconut/APKBUILD +++ b/device/linux-sony-coconut/APKBUILD @@ -10,7 +10,7 @@ _flavor="sony-coconut" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="xz perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="xz perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -36,22 +36,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -61,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="234e8973236e6056c60a312340ef4ccb7598adc43bd1f0c2ca0e89d03f4e16ecfdd5ad4658d76993c7bae24242a7e134a9ed2fda662dfe229b61f3a88ea6c2f0 linux-sony-coconut-9c6f07f81e2c0bcb2bef75fa9716cc30f8942286.tar.gz diff --git a/device/linux-sony-honami/APKBUILD b/device/linux-sony-honami/APKBUILD index 249ce4c4d..cc0abc4a0 100644 --- a/device/linux-sony-honami/APKBUILD +++ b/device/linux-sony-honami/APKBUILD @@ -41,23 +41,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="b76641c07489712d393f1d318b0d4138e5c7126d4b78cfc23bcde07911cba185d3872e886f69197bd3912e8b4c646b74fb6992dee0ce3829d2995531ac4f257e linux-sony-honami-d78970c1afd9fad52cb4402c7bcb9701e8a06d41.tar.gz diff --git a/device/linux-sony-nicki/APKBUILD b/device/linux-sony-nicki/APKBUILD index bba13022e..fb00c426d 100644 --- a/device/linux-sony-nicki/APKBUILD +++ b/device/linux-sony-nicki/APKBUILD @@ -49,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="cb1132c1add4c87490889ca20924f92bc89d646b2efefe023802c22e0167a2cfd39fdcbf7316f957ba4c93fe7318079df8dea5657aac92710ddcd45bfa7977f8 linux-sony-nicki-627687e4625d208248fe5fa40dcaaeb3363dfce7.tar.gz diff --git a/device/linux-sony-scorpion/APKBUILD b/device/linux-sony-scorpion/APKBUILD index 7cec87409..8de305091 100644 --- a/device/linux-sony-scorpion/APKBUILD +++ b/device/linux-sony-scorpion/APKBUILD @@ -10,7 +10,7 @@ _flavor="sony-scorpion" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,22 +37,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -62,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="a3e1bd39f25da9b695fceb0282c036721352c52b7e495f37dc578d6076462c8495cbcf0714e3b03b66e564d08430f0bda6aee40ef45c437028b37ae162cace9b linux-sony-scorpion-1cc4f02f27228698213af5dac9ff690ea0e27d55.tar.gz diff --git a/device/linux-sony-seagull/APKBUILD b/device/linux-sony-seagull/APKBUILD index d553827ff..8aacaa482 100644 --- a/device/linux-sony-seagull/APKBUILD +++ b/device/linux-sony-seagull/APKBUILD @@ -12,7 +12,7 @@ _flavor="sony-seagull" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -42,22 +42,7 @@ builddir="$srcdir/${_repository}-${_commit}/" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -71,23 +56,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-sony-suzu/APKBUILD b/device/linux-sony-suzu/APKBUILD index f8fbdd0df..a0b3d2371 100644 --- a/device/linux-sony-suzu/APKBUILD +++ b/device/linux-sony-suzu/APKBUILD @@ -42,23 +42,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="c21d609d76ed65bd87e05e0b2874b861fce2af342286f65cf189dd651e54bce34147222880c812ccc7d70ae92d170c2b994c4a94b59fe0f69066240bb67326a2 linux-sony-suzu-6593c13acef86ad284ca49aa890e593855210dd1.tar.gz diff --git a/device/linux-sony-taoshan/APKBUILD b/device/linux-sony-taoshan/APKBUILD index c28065b86..7c94edcfc 100644 --- a/device/linux-sony-taoshan/APKBUILD +++ b/device/linux-sony-taoshan/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="c81a890e9905547106a00ecb308d176d55a19f7d4ec0dcfde10c5d62647a917292c2098be2a657ff3cf6963f03ffaa019ddc1586ab378b9a39d10a850c806f53 linux-sony-taoshan-df6292bc628cece5925d0f67fbc8c8a2cab2d524.tar.gz diff --git a/device/linux-sony-tulip/APKBUILD b/device/linux-sony-tulip/APKBUILD index 4c2fa729c..8af56950b 100644 --- a/device/linux-sony-tulip/APKBUILD +++ b/device/linux-sony-tulip/APKBUILD @@ -43,23 +43,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="7372b4fdfca2fef3c8ae48c9353a6d7ea658fc8412e2b288ee1097d902f5d9b81a0b76f3fc0e1bc74a015ec34e84c4942608f0e522d628b3deb288f4b177428c linux-sony-tulip-d8e51bc7dd6bde228f1d9a7ddcf664845c4f07fb.tar.gz diff --git a/device/linux-sony-yuga/APKBUILD b/device/linux-sony-yuga/APKBUILD index 850ec39d6..d72015748 100644 --- a/device/linux-sony-yuga/APKBUILD +++ b/device/linux-sony-yuga/APKBUILD @@ -48,23 +48,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="a20ab3f27b43999287ebef5ee150b1652ebc4996a2670079ff86a9ca07bd69555dbd1efb564ff767fb2bf22673dd609817aaded4731b09383d74c68887f545f4 linux-sony-yuga-f164c6d1016cb34ac90c053acbebe6e47fdd400f.tar.gz diff --git a/device/linux-wiko-lenny3/APKBUILD b/device/linux-wiko-lenny3/APKBUILD index 106d7bdbb..15971a489 100644 --- a/device/linux-wiko-lenny3/APKBUILD +++ b/device/linux-wiko-lenny3/APKBUILD @@ -10,7 +10,7 @@ _flavor="wiko-lenny3" url="https://wikomobile.com" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -37,19 +37,7 @@ builddir="$srcdir/LENNY3_OpenSource/kernel-3.18" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -59,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="83c56f0c8569b7ca3cd29ebb5769ebcc1bb457c9eefeacfa1ad3620436693fc7cbaeda93c7a2157ab92f463b0b1431a3f3a79e14a783000199dea1cc5b2d3e77 linux-wiko-lenny3-65b9eea6e1cc6bb9f0cd2a47751a186f.zip diff --git a/device/linux-wiko-ufeel/APKBUILD b/device/linux-wiko-ufeel/APKBUILD index 831bab134..0d6a19688 100644 --- a/device/linux-wiko-ufeel/APKBUILD +++ b/device/linux-wiko-ufeel/APKBUILD @@ -46,23 +46,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } diff --git a/device/linux-wileyfox-crackling/APKBUILD b/device/linux-wileyfox-crackling/APKBUILD index e048083c1..e8844792c 100644 --- a/device/linux-wileyfox-crackling/APKBUILD +++ b/device/linux-wileyfox-crackling/APKBUILD @@ -49,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-wingtech-wt88047/APKBUILD b/device/linux-wingtech-wt88047/APKBUILD index 53c6e5141..b09fd7aad 100644 --- a/device/linux-wingtech-wt88047/APKBUILD +++ b/device/linux-wingtech-wt88047/APKBUILD @@ -34,22 +34,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -62,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-xiaomi-aries/APKBUILD b/device/linux-xiaomi-aries/APKBUILD index cf689108c..3324e99d0 100644 --- a/device/linux-xiaomi-aries/APKBUILD +++ b/device/linux-xiaomi-aries/APKBUILD @@ -49,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="3d461173c0ec72d243870bcb2ce1935b2ba1652a532b9b09ef0a3823b5961a3d58415fce2d57f054e1945dc9e70c5c9a68fc45aad26a0adb894bc96120847bc9 linux-xiaomi-aries-6a30963cf10e5b7cc938f3ac7b22af4ad72c0bf9.tar.gz diff --git a/device/linux-xiaomi-armani/APKBUILD b/device/linux-xiaomi-armani/APKBUILD index cf9a6b423..f6d20c9d0 100644 --- a/device/linux-xiaomi-armani/APKBUILD +++ b/device/linux-xiaomi-armani/APKBUILD @@ -10,7 +10,7 @@ _flavor="xiaomi-armani" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -40,22 +40,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -68,23 +53,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-xiaomi-cancro/APKBUILD b/device/linux-xiaomi-cancro/APKBUILD index 1d985e546..554eac25e 100644 --- a/device/linux-xiaomi-cancro/APKBUILD +++ b/device/linux-xiaomi-cancro/APKBUILD @@ -10,7 +10,7 @@ _flavor="xiaomi-cancro" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="xz perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool gcc6" +makedepends="xz perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -42,22 +42,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -70,23 +55,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-xiaomi-ido/APKBUILD b/device/linux-xiaomi-ido/APKBUILD index 0d39b62e8..dadc980df 100644 --- a/device/linux-xiaomi-ido/APKBUILD +++ b/device/linux-xiaomi-ido/APKBUILD @@ -10,7 +10,7 @@ _flavor="xiaomi-ido" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool python gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool python gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -35,19 +35,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror-/-W/g' - find . -type f -name Makefile -print0 | \ - xargs -0 sed -i 's/-Werror//g' - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -58,23 +46,8 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi install -Dm644 "$builddir/arch/arm/boot/dt.img" "$pkgdir/boot/dt.img" } diff --git a/device/linux-xiaomi-kenzo/APKBUILD b/device/linux-xiaomi-kenzo/APKBUILD index 10f8bedd9..c64ac0457 100644 --- a/device/linux-xiaomi-kenzo/APKBUILD +++ b/device/linux-xiaomi-kenzo/APKBUILD @@ -49,23 +49,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="c2d57468544d9b96e7f55d8358419fecdbbb75ae02e08fb3e008a882750855966d989a79e058888bcdd5542f322fd26ac217cd73c316768183b496f108089b43 linux-xiaomi-kenzo-92430f1a110b9b49e69fb1d3bde81c0f048d0282.tar.gz diff --git a/device/linux-xiaomi-mido/APKBUILD b/device/linux-xiaomi-mido/APKBUILD index 600899be8..d46dbcbd8 100644 --- a/device/linux-xiaomi-mido/APKBUILD +++ b/device/linux-xiaomi-mido/APKBUILD @@ -10,7 +10,7 @@ _flavor="xiaomi-mido" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6" # Compiler: this kernel was only tested with GCC6. Feel free to make a merge # request if you find out that it is booting working with newer GCCs as @@ -41,22 +41,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # gcc6 support - cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/" - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { diff --git a/device/linux-xiaomi-santoni/APKBUILD b/device/linux-xiaomi-santoni/APKBUILD index 69dc45561..eec7893b4 100644 --- a/device/linux-xiaomi-santoni/APKBUILD +++ b/device/linux-xiaomi-santoni/APKBUILD @@ -9,7 +9,7 @@ _flavor="xiaomi-santoni" url="https://kernel.org" license="GPL2" options="!strip !check !tracedeps" -makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev" +makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev" # Compiler: latest GCC from Alpine HOSTCC="${CC:-gcc}" @@ -30,19 +30,7 @@ builddir="$srcdir/${_repository}-${_commit}" prepare() { default_prepare - - # Remove -Werror from all makefiles - local i - local makefiles="$(find . -type f -name Makefile) - $(find . -type f -name Kbuild)" - for i in $makefiles; do - sed -i 's/-Werror-/-W/g' "$i" - sed -i 's/-Werror//g' "$i" - done - - # Prepare kernel config ('yes ""' for kernels lacking olddefconfig) - cp "$srcdir"/$_config "$builddir"/.config - yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig + downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC" } build() { @@ -52,23 +40,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="d7a290e676aa40d35289cedbad5dd077accff4e1a2467223765a79f101ff4c1313315cbffd574ad74c648c4b8f5751d16a1fa1607c9939b373d3f2974a7b2326 linux-xiaomi-santoni-2dd8017f40290eb326e352cca254cd8bdd1614c9.tar.gz diff --git a/device/linux-xiaomi-tissot/APKBUILD b/device/linux-xiaomi-tissot/APKBUILD index 28b313eb3..69a40e19d 100644 --- a/device/linux-xiaomi-tissot/APKBUILD +++ b/device/linux-xiaomi-tissot/APKBUILD @@ -61,23 +61,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" } sha512sums="f0bba3e19e8cad92cabaeba63db75af9b2cf1e5fa7e79c7688c487c55db0230840ab838628b8aaf6a39a03d403237ab224aa94fac88eb538b82cb7909f35e43d linux-xiaomi-tissot-80cb3f607eb78280642c3b9b6e89f676e9c263bf.tar.gz diff --git a/device/linux-yu-tomato/APKBUILD b/device/linux-yu-tomato/APKBUILD index efa6bf506..69ded4f5e 100644 --- a/device/linux-yu-tomato/APKBUILD +++ b/device/linux-yu-tomato/APKBUILD @@ -52,23 +52,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-zte-kis3/APKBUILD b/device/linux-zte-kis3/APKBUILD index f5e263548..0efb4634e 100644 --- a/device/linux-zte-kis3/APKBUILD +++ b/device/linux-zte-kis3/APKBUILD @@ -47,23 +47,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Master DTB (deviceinfo_bootimg_qcdt) install -Dm644 "$builddir/arch/arm/boot/dt.img" \ diff --git a/device/linux-zuk-z2-row/APKBUILD b/device/linux-zuk-z2-row/APKBUILD index 93f2a6e05..cb161c1e3 100644 --- a/device/linux-zuk-z2-row/APKBUILD +++ b/device/linux-zuk-z2-row/APKBUILD @@ -50,23 +50,7 @@ build() { } package() { - # kernel.release - install -D "$builddir/include/config/kernel.release" \ - "$pkgdir/usr/share/kernel/$_flavor/kernel.release" - - # zImage (find the right one) - cd "$builddir/arch/$_carch/boot" - _target="$pkgdir/boot/vmlinuz-$_flavor" - for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do - [ -e "$_zimg" ] || continue - msg "zImage found: $_zimg" - install -Dm644 "$_zimg" "$_target" - break - done - if ! [ -e "$_target" ]; then - error "Could not find zImage in $PWD!" - return 1 - fi + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" # Modules cd "$builddir"