motorola-surnia: change to mainline kernel (MR 3329)

[ci:skip-build] Already built successfuly on CI in MR
This commit is contained in:
Craig Comstock 2022-09-04 08:14:13 -05:00 committed by Newbyte
parent b45db48e69
commit 911065a682
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
7 changed files with 34 additions and 3952 deletions

View file

@ -1,21 +1,23 @@
# Reference: <https://postmarketos.org/devicepkg> # Reference: <https://postmarketos.org/devicepkg>
pkgname=device-motorola-surnia pkgname=device-motorola-surnia
pkgdesc="Motorola Moto E (2nd Gen)" pkgdesc="Motorola Moto E (2nd Gen)"
pkgver=0.1 pkgver=1
pkgrel=10 pkgrel=0
url="https://postmarketos.org" url="https://postmarketos.org"
license="MIT" license="MIT"
arch="armhf" arch="aarch64"
options="!check !archcheck" options="!check !archcheck"
depends="postmarketos-base linux-motorola-surnia mkbootimg mesa-dri-gallium" depends="postmarketos-base mkbootimg linux-postmarketos-qcom-msm8916
soc-qcom-msm8916 soc-qcom-msm8916-rproc"
makedepends="devicepkg-dev" makedepends="devicepkg-dev"
source="deviceinfo" source="deviceinfo"
subpackages=" subpackages="
$pkgname-nonfree-firmware:nonfree_firmware $pkgname-nonfree-firmware:nonfree_firmware
$pkgname-nonfree-firmware-modem:nonfree_firmware_modem
" "
_pmb_select="soc-qcom-msm8916-rproc"
build() { build() {
devicepkg_build $startdir $pkgname devicepkg_build $startdir $pkgname
} }
@ -26,17 +28,10 @@ package() {
nonfree_firmware() { nonfree_firmware() {
pkgdesc="GPU/Wi-Fi/Bluetooth/Video(/Modem) firmware" pkgdesc="GPU/Wi-Fi/Bluetooth/Video(/Modem) firmware"
depends="linux-firmware-qcom firmware-motorola-surnia-wcnss firmware-motorola-surnia-venus" depends="firmware-qcom-adreno-a300 msm-firmware-loader firmware-motorola-surnia-wcnss-nv firmware-motorola-harpia-venus"
mkdir "$subpkgdir"
}
nonfree_firmware_modem() {
pkgdesc="Modem firmware"
depends="firmware-motorola-surnia-modem"
install_if="$pkgname-nonfree-firmware"
mkdir "$subpkgdir" mkdir "$subpkgdir"
} }
sha512sums=" sha512sums="
76cf306abef564fdf06974352af8a725934f3eda4f8a7009c39cc3d1e73c285a7ed35f8dd485b191465f27378d9e8ebd0f8ab30d6bf93a8c90a58e52ac49ac5b deviceinfo cf588a9a218dbe542700bb4a6b57d6c268cdfbb589fd348245d58d1530f04471d24af6c9059030971bd55d0f2d35a006720176e46f188a685d38be2a1cffad9e deviceinfo
" "

View file

@ -6,7 +6,10 @@ deviceinfo_name="Motorola Moto E (2nd Gen)"
deviceinfo_manufacturer="Motorola" deviceinfo_manufacturer="Motorola"
deviceinfo_codename="motorola-surnia" deviceinfo_codename="motorola-surnia"
deviceinfo_year="2015" deviceinfo_year="2015"
deviceinfo_arch="armhf" deviceinfo_dtb="qcom/msm8916-motorola-surnia"
deviceinfo_append_dtb="true"
deviceinfo_modules_initfs="panel-motorola-surnia-boe panel-motorola-surnia-tianma msm rmi-i2c"
deviceinfo_arch="aarch64"
# Device related # Device related
deviceinfo_gpu_accelerated="true" deviceinfo_gpu_accelerated="true"
@ -15,17 +18,16 @@ deviceinfo_keyboard="false"
deviceinfo_external_storage="true" deviceinfo_external_storage="true"
deviceinfo_screen_width="540" deviceinfo_screen_width="540"
deviceinfo_screen_height="960" deviceinfo_screen_height="960"
deviceinfo_getty="ttyMSM0;115200"
# Bootloader related # Bootloader related
deviceinfo_flash_method="fastboot" deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M androidboot.bootdevice=soc.0 utags.blkdev=/dev/block/platform/soc.0/by-name/utags utags.backup=/dev/block/platform/soc.0/by-name/utagsBackup movablecore=160M androidboot.write_protect=0" deviceinfo_kernel_cmdline="earlycon console=ttyMSM0,115200 PMOS_NO_OUTPUT_REDIRECT"
deviceinfo_generate_bootimg="true" deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_flash_offset_base="0x80000000" deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000" deviceinfo_flash_offset_kernel="0x00080000"
deviceinfo_flash_offset_ramdisk="0x01000000" deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000" deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100" deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048" deviceinfo_flash_pagesize="2048"
deviceinfo_flash_sparse="true"

View file

@ -1,41 +1,40 @@
# Maintainer: Craig Comstock <craig@unreasonablefarm.org>
pkgname=firmware-motorola-surnia pkgname=firmware-motorola-surnia
pkgver=0.1 pkgver=1
pkgrel=0 pkgrel=0
pkgdesc="Firmware for Motorola Moto E 2015 (2nd gen)" pkgdesc="Firmware for Motorola Moto E 2015 (2nd gen)"
url="https://github.com/linuxgorl/vendor_motorola_surnia" url="https://github.com/linuxgorl/vendor_motorola_surnia"
subpackages="$pkgname-wcnss $pkgname-venus $pkgname-modem" subpackages="$pkgname-wcnss-nv:wcnss_nv $pkgname-venus"
arch="armhf" arch="aarch64"
license="proprietary" license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native" options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="b8dbec48197c086d22371d360fa41387880a1dcb" _commit="b8dbec48197c086d22371d360fa41387880a1dcb"
source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz" source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz"
builddir="$srcdir/vendor_motorola_surnia-$_commit"
_fwdir="/lib/firmware/postmarketos" _fwdir="/lib/firmware/postmarketos"
package() { package() {
mkdir -p "$pkgdir" mkdir -p "$pkgdir"
} }
wcnss() { wcnss_nv() {
pkgdesc="Motorola Moto E 2015 (2nd gen) Wi-Fi/Bluetooth firmware" pkgdesc="Motorola Moto E 2015 (2nd gen) Wi-Fi/Bluetooth firmware configuration"
cd "$srcdir/vendor_motorola_surnia-$_commit" replaces="firmware-motorola-surnia-wcnss"
install -Dm644 wcnss.* -t "$subpkgdir/$_fwdir" install -Dm644 "$builddir"/wlan/prima/WCNSS_qcom_wlan_nv.bin -t "$subpkgdir/$_fwdir/wlan/prima"
install -Dm644 wlan/prima/WCNSS_qcom_wlan_nv.bin -t "$subpkgdir/$_fwdir/wlan/prima"
} }
venus() { venus() {
pkgdesc="Motorola Moto E 2015 (2nd gen) video firmware" pkgdesc="Motorola Moto E 2015 (2nd gen) video firmware"
cd "$srcdir/vendor_motorola_surnia-$_commit"
install -Dm644 venus.b* -t "$subpkgdir/$_fwdir" # Linux detects squashed (.mbn) vs non-squashed (.mdt + .b*) based on
install -Dm644 venus.mdt -t "$subpkgdir/$_fwdir" # file contents, so it is fine to install venus.mbn to venus.mdt
install -Dm644 "$builddir"/venus.mbn "$subpkgdir/$_fwdir"/qcom/venus-1.8/venus.mdt
} }
modem() {
pkgdesc="Motorola Moto E 2015 (2nd gen) modem firmware"
cd "$srcdir/vendor_motorola_surnia-$_commit"
install -Dm644 modem.* -t "$subpkgdir/$_fwdir"
install -Dm644 mba.mbn -t "$subpkgdir/$_fwdir"
}
sha512sums="859f81ef316ee025245e217e8bca891c89dade23781cc386d6c930608cbd8aba78b0f3c93a0ad1a265ba20554379fe60331e32c1924ee4dd9151f8c146be347f firmware-motorola-surnia-b8dbec48197c086d22371d360fa41387880a1dcb.tar.gz" sha512sums="
859f81ef316ee025245e217e8bca891c89dade23781cc386d6c930608cbd8aba78b0f3c93a0ad1a265ba20554379fe60331e32c1924ee4dd9151f8c146be347f firmware-motorola-surnia-b8dbec48197c086d22371d360fa41387880a1dcb.tar.gz
"

View file

@ -1,60 +0,0 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/surnia_defconfig
pkgname=linux-motorola-surnia
pkgver=3.10.49
pkgrel=5
pkgdesc="Motorola Moto E (2nd Gen) kernel fork"
arch="armhf"
_carch="arm"
_flavor="motorola-surnia"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool gcc6 xz"
# Compiler: GCC 6 (doesn't compile with newer versions)
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_motorola_msm8916"
_commit="4c864820053bb70e21cf1e9764baefefd4d2f6b1"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
$_config
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc10-extern_YYLOC_global_declaration.patch
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Generate master DTB (deviceinfo_bootimg_qcdt)
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
# Master DTB (deviceinfo_bootimg_qcdt)
install -Dm644 "$builddir/arch/arm/boot/dt.img" \
"$pkgdir/boot/dt.img"
}
sha512sums="28e70a5af0df65b85c257c4ca455553d38b17dad8d141876854c5a38502114638c8e59440cffcf81c278a6836e39ec0f63ed35dad825c49a8c3f299de7617b80 linux-motorola-surnia-4c864820053bb70e21cf1e9764baefefd4d2f6b1.tar.gz
e45324994d22d15fba27a7cad26d7258a2d11ef691a1ab31a033dfa00d1cc0457c660061298fb2194c12e49935c56a4b331f51e8f059563166e7de3e688ef0f6 config-motorola-surnia.armhf
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch"

View file

@ -1 +0,0 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

View file

@ -1 +0,0 @@
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch