Some kernel APKBUILD cleanup (#833)
* Cleanup linux-htc-bravo APKBUILD * Cleanup linux-samsung-tuna APKBUILD and rename the package to linux-samsung-maguro * Cleanup linux-sony-aries APKBUILD
This commit is contained in:
parent
1237ef25f7
commit
e5543e368b
9 changed files with 115 additions and 257 deletions
|
@ -1,11 +1,11 @@
|
|||
pkgname=device-samsung-maguro
|
||||
pkgver=2
|
||||
pkgrel=11
|
||||
pkgrel=12
|
||||
pkgdesc="Google Galaxy Nexus (GSM)"
|
||||
url="https://github.com/postmarketOS"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="linux-firmware linux-samsung-tuna mkbootimg"
|
||||
depends="linux-firmware linux-samsung-maguro mkbootimg"
|
||||
makedepends=""
|
||||
install=""
|
||||
subpackages=""
|
||||
|
|
|
@ -1,106 +1,57 @@
|
|||
# APKBUILD based on linux-vanilla aport. Changes:
|
||||
# - disabled module installation
|
||||
# - add !check !tracedeps
|
||||
# - add xz package (necessary to build)
|
||||
#
|
||||
# Kernel config based on: arch/arm/configs/bravo_defconfig
|
||||
# Changes:
|
||||
# - apply patches to compile with gcc6
|
||||
# - enable devtmpfs (needed for udev -> touch support in weston)
|
||||
# - enable udev required options (https://wiki.gentoo.org/wiki/Udev#Kernel)
|
||||
# - disable ANDROID_PARANOID_NETWORK (removes network restrictions)
|
||||
|
||||
_vendor=htc
|
||||
_flavor=htc-bravo
|
||||
_config="config-${_flavor}.armhf"
|
||||
_hash="4bc19919f805777947c243e6c2ed41ece530488b"
|
||||
|
||||
pkgname=linux-${_flavor}
|
||||
pkgname="linux-htc-bravo"
|
||||
pkgver=3.0.16
|
||||
case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
pkgrel=7
|
||||
arch="armhf"
|
||||
pkgrel=8
|
||||
pkgdesc="HTC Desire kernel from spezi77"
|
||||
url="https://github.com/spezi77/android_kernel_htc_qsd8k_3.0"
|
||||
depends="postmarketos-mkinitfs"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz"
|
||||
options="!strip !check !tracedeps"
|
||||
install=
|
||||
source="
|
||||
$pkgname-$_hash.tar.gz::https://github.com/spezi77/android_kernel_htc_qsd8k_3.0/archive/${_hash}.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
"
|
||||
subpackages=""
|
||||
license="GPL2"
|
||||
|
||||
_abi_release=${pkgver}
|
||||
arch="armhf"
|
||||
_carch="arm"
|
||||
_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"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
ksrcdir="$srcdir/android_kernel_htc_qsd8k_3.0-${_hash}"
|
||||
# Source
|
||||
_repository="android_kernel_htc_qsd8k_3.0"
|
||||
_commit="4bc19919f805777947c243e6c2ed41ece530488b"
|
||||
_config="config-${_flavor}.armhf"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/spezi77/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
prepare() {
|
||||
local _patch_failed=
|
||||
cd "$ksrcdir"
|
||||
|
||||
# first apply patches in specified order
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch)
|
||||
msg "Applying $i..."
|
||||
if ! patch -s -p1 -N -i "$srcdir"/$i; then
|
||||
echo $i >>failed
|
||||
_patch_failed=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! [ -z "$_patch_failed" ]; then
|
||||
error "The following patches failed:"
|
||||
cat failed
|
||||
return 1
|
||||
fi
|
||||
default_prepare
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
||||
|
||||
mkdir -p "$srcdir"/build
|
||||
cp "$srcdir"/$_config "$srcdir"/build/.config
|
||||
yes "" | make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
oldconfig
|
||||
cp "$srcdir"/$_config "$builddir"/.config
|
||||
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
|
||||
}
|
||||
|
||||
|
||||
|
||||
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
||||
menuconfig() {
|
||||
cd "$srcdir"/build
|
||||
echo "--[ menuconfig ]--"
|
||||
cd "$builddir"
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/build
|
||||
unset LDFLAGS
|
||||
|
||||
echo "--[ Build kernel + modules ]--"
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine"
|
||||
}
|
||||
|
||||
package() {
|
||||
echo "--[ Installing kernel ]--"
|
||||
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
|
||||
install -Dm644 "$builddir/arch/arm/boot/zImage" \
|
||||
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||
|
||||
install -D "$srcdir/build/include/config/kernel.release" \
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
}
|
||||
|
||||
|
|
64
device/linux-samsung-maguro/APKBUILD
Normal file
64
device/linux-samsung-maguro/APKBUILD
Normal file
|
@ -0,0 +1,64 @@
|
|||
# Kernel config based on: arch/arm/configs/cyanogenmod_tuna_defconfig
|
||||
|
||||
pkgname="linux-samsung-maguro"
|
||||
pkgver=3.0.31
|
||||
pkgrel=8
|
||||
pkgdesc="Samsung Galaxy Nexus kernel from LineageOS"
|
||||
arch="armhf"
|
||||
_carch="arm"
|
||||
_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"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_samsung_tuna"
|
||||
_commit="e14e5fe679a63eef92346cde874175d8b62b6a4a"
|
||||
_config="config-${_flavor}.armhf"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
android_paranoid_network.patch
|
||||
fix_old_perl_code.patch
|
||||
"
|
||||
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
|
||||
}
|
||||
|
||||
menuconfig() {
|
||||
cd "$builddir"
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "$builddir/arch/arm/boot/zImage" \
|
||||
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
}
|
||||
|
||||
sha512sums="f117b3202c3db1a575598fd87ee27080db5c447c986ced677b63e6b00613ebfab58d634bf63b8bcf0c229eb0bec4dc81b13d7cfda3c2aee62e9ed8e26eeb860c linux-samsung-maguro-e14e5fe679a63eef92346cde874175d8b62b6a4a.tar.gz
|
||||
283d747b011e4ea283680f618ee4ab6373d4879f285f22ee733ef542ea6b12d24e27a641b8a04c0448862ca58d2702d8a60db84c14da504d0deb8143994222cd config-samsung-maguro.armhf
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
d8cdc1137e6a4ad78a3a31acc40f0c98f4db272eaf5b90ee850abb83b80916c4ff3c18a0a181e94eebead44213f6314e3363d0c4b91d95ee1adafbcad6dc57ab android_paranoid_network.patch
|
||||
65eb11dca6645073885228af6aae6efa40b6f063fd04157b501acf40368bf331dd701f746ed187659f654a9354ddf304aaefca8ffc9ea2b00c145c61162e1189 fix_old_perl_code.patch"
|
|
@ -1,109 +0,0 @@
|
|||
# APKBUILD based on linux-vanilla aport. Changes:
|
||||
# - disabled module installation
|
||||
# - add !check !tracedeps
|
||||
# - package: just install zimage and kernel.release, because the kernel config
|
||||
# does not generate modules or dtb files
|
||||
# - do not create -dev subpackage (makes no sense without module support)
|
||||
#
|
||||
# Kernel config based on: arch/arm/configs/lineageos_mako_defconfig
|
||||
# Changes:
|
||||
# - enable devtmpfs (needed for udev -> touch support in weston)
|
||||
# - disable ANDROID_PARANOID_NETWORK (removes network restrictions)
|
||||
|
||||
_vendor=samsung
|
||||
_flavor=samsung-tuna
|
||||
_hash="e14e5fe679a63eef92346cde874175d8b62b6a4a"
|
||||
_config="config-${_flavor}.armhf"
|
||||
|
||||
pkgname=linux-samsung-tuna
|
||||
pkgver=3.4.0
|
||||
case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
pkgrel=7
|
||||
arch="armhf"
|
||||
pkgdesc="Nexus 4 kernel from LineageOS"
|
||||
url="https://github.com/LineageOS/android_kernel_samsung_tuna"
|
||||
depends="postmarketos-mkinitfs"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||
options="!strip !check !tracedeps"
|
||||
install=
|
||||
source="
|
||||
$pkgname-$_hash.tar.gz::https://github.com/LineageOS/android_kernel_samsung_tuna/archive/${_hash}.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
android_paranoid_network.patch
|
||||
fix_old_perl_code.patch
|
||||
"
|
||||
subpackages=""
|
||||
license="GPL2"
|
||||
|
||||
_abi_release=${pkgver}
|
||||
_carch="arm"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
ksrcdir="$srcdir/android_kernel_samsung_tuna-${_hash}"
|
||||
|
||||
prepare() {
|
||||
local _patch_failed=
|
||||
cd "$ksrcdir"
|
||||
|
||||
# first apply patches in specified order
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch)
|
||||
msg "Applying $i..."
|
||||
if ! patch -s -p1 -N -i "$srcdir"/$i; then
|
||||
echo $i >>failed
|
||||
_patch_failed=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! [ -z "$_patch_failed" ]; then
|
||||
error "The following patches failed:"
|
||||
cat failed
|
||||
return 1
|
||||
fi
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
||||
|
||||
mkdir -p "$srcdir"/build
|
||||
cp "$srcdir"/$_config "$srcdir"/build/.config
|
||||
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
silentoldconfig
|
||||
}
|
||||
|
||||
|
||||
|
||||
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
||||
menuconfig() {
|
||||
cd "$srcdir"/build
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/build
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
|
||||
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||
|
||||
install -D "$srcdir/build/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
}
|
||||
|
||||
sha512sums="f117b3202c3db1a575598fd87ee27080db5c447c986ced677b63e6b00613ebfab58d634bf63b8bcf0c229eb0bec4dc81b13d7cfda3c2aee62e9ed8e26eeb860c linux-samsung-tuna-e14e5fe679a63eef92346cde874175d8b62b6a4a.tar.gz
|
||||
283d747b011e4ea283680f618ee4ab6373d4879f285f22ee733ef542ea6b12d24e27a641b8a04c0448862ca58d2702d8a60db84c14da504d0deb8143994222cd config-samsung-tuna.armhf
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
d8cdc1137e6a4ad78a3a31acc40f0c98f4db272eaf5b90ee850abb83b80916c4ff3c18a0a181e94eebead44213f6314e3363d0c4b91d95ee1adafbcad6dc57ab android_paranoid_network.patch
|
||||
65eb11dca6645073885228af6aae6efa40b6f063fd04157b501acf40368bf331dd701f746ed187659f654a9354ddf304aaefca8ffc9ea2b00c145c61162e1189 fix_old_perl_code.patch"
|
|
@ -1,106 +1,58 @@
|
|||
# APKBUILD based on linux-vanilla aport. Changes:
|
||||
# - disabled module installation
|
||||
# - add !check !tracedeps
|
||||
# - package: just install zImage-dtb and kernel.release, because the kernel config
|
||||
# does not generate modules or dtb files
|
||||
# - do not create -dev subpackage (makes no sense without module support)
|
||||
#
|
||||
# Kernel config changes, based on: arch/arm/configs/aosp_shinano_aries_defconfig
|
||||
# - enable devtmpfs (needed for udev -> touch support in weston)
|
||||
# - change compression from CONFIG_KERNEL_LZMA=y to
|
||||
# CONFIG_KERNEL_GZIP=y (so it works with busybox)
|
||||
# - disable proprietary graphics driver
|
||||
# - disable ANDROID_PARANOID_NETWORK (removes network restrictions)
|
||||
# Kernel config based on: arch/arm/configs/aosp_shinano_aries_defconfig
|
||||
|
||||
_vendor=sony
|
||||
_flavor=sony-aries
|
||||
_hash="b1ceda7b02ea29c526d329884db1e9f2694ab394"
|
||||
_config="config-${_flavor}.armhf"
|
||||
|
||||
pkgname=linux-${_flavor}
|
||||
pkgname="linux-sony-aries"
|
||||
pkgver=3.10.84
|
||||
case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
pkgrel=6
|
||||
arch="armhf"
|
||||
pkgrel=7
|
||||
pkgdesc="Sony Xperia Z3 Compact kernel"
|
||||
arch="armhf"
|
||||
_carch="arm"
|
||||
_flavor=sony-aries
|
||||
url="https://github.com/sonyxperiadev/kernel"
|
||||
depends="postmarketos-mkinitfs"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||
license="GPL2"
|
||||
options="!strip !check !tracedeps"
|
||||
install=
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
_repository="kernel"
|
||||
_commit="b1ceda7b02ea29c526d329884db1e9f2694ab394"
|
||||
_config="config-${_flavor}.armhf"
|
||||
source="
|
||||
$pkgname-$_hash.tar.gz::https://github.com/sonyxperiadev/kernel/archive/${_hash}.tar.gz
|
||||
$pkgname-$_commit.tar.gz::https://github.com/sonyxperiadev/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
02_mdss_fb_refresh_rate.patch
|
||||
"
|
||||
subpackages=""
|
||||
license="GPL2"
|
||||
|
||||
_abi_release=${pkgver}
|
||||
_carch="arm"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
ksrcdir="$srcdir/kernel-${_hash}"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
prepare() {
|
||||
local _patch_failed=
|
||||
cd "$ksrcdir"
|
||||
|
||||
# first apply patches in specified order
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch)
|
||||
msg "Applying $i..."
|
||||
if ! patch -s -p1 -N -i "$srcdir"/$i; then
|
||||
echo $i >>failed
|
||||
_patch_failed=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! [ -z "$_patch_failed" ]; then
|
||||
error "The following patches failed:"
|
||||
cat failed
|
||||
return 1
|
||||
fi
|
||||
default_prepare
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
||||
|
||||
mkdir -p "$srcdir"/build
|
||||
cp "$srcdir"/$_config "$srcdir"/build/.config
|
||||
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
silentoldconfig
|
||||
cp "$srcdir"/$_config "$builddir"/.config
|
||||
make ARCH="$_carch" HOSTCC="$HOSTCC" silentoldconfig
|
||||
}
|
||||
|
||||
|
||||
|
||||
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
||||
menuconfig() {
|
||||
cd "$srcdir"/build
|
||||
cd "$builddir"
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/build
|
||||
unset LDFLAGS
|
||||
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "$srcdir/build/arch/arm/boot/zImage-dtb" \
|
||||
install -Dm644 "$builddir/arch/arm/boot/zImage-dtb" \
|
||||
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||
|
||||
install -D "$srcdir/build/include/config/kernel.release" \
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue