motorola-channel: new device (MR 1195)

Booting, with USB network, display, touch screen, and wifi.
This commit is contained in:
Jean-Étienne Tremblay 2020-04-27 11:11:58 -07:00 committed by Minecrell
parent f45890b631
commit 965150f646
No known key found for this signature in database
GPG key ID: B77CE638A6C2E562
7 changed files with 5295 additions and 0 deletions

View file

@ -0,0 +1,31 @@
# Contributor: Jean-Etienne Tremblay <jean.etienne.tremblay@gmail.com>
# Maintainer: Jean-Etienne Tremblay <jean.etienne.tremblay@gmail.com>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-motorola-channel
pkgdesc="Motorola G7 Play"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
options="!check !archcheck"
depends="postmarketos-base linux-motorola-channel mkbootimg mesa-dri-swrast msm-fb-refresher"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="Wifi firmware"
depends="firmware-motorola-channel-wcnss wcnss-wlan"
mkdir "$subpkgdir"
}
sha512sums="4625074160c5b32fa244250f1c3c608134258fa81722c1ffc2dd0862644d09474b436bdc277fab878e8e3ff1ccbc33e446fa0b33358960a150e70f0063742370 deviceinfo"

View file

@ -0,0 +1,31 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Motorola G7 Play"
deviceinfo_manufacturer="Motorola"
deviceinfo_codename="motorola-channel"
deviceinfo_year="2019"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="aarch64"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1512"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom user_debug=30 msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlycon=msm_hsl_uart,0x78af000 firmware_class.path=/vendor/firmware_mnt/image androidboot.usbconfigfs=true vmalloc=300M loop.max_part=7 printk.devkmsg=on androidboot.hab.csv=11 androidboot.hab.product=channel androidboot.hab.cid=50 buildvariant=user veritykeyid=id:b640f6ee9102b88daa3450b13ef25fc9eb143d63"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"

View file

@ -0,0 +1,49 @@
# Contributor: Jean-Etienne Tremblay <jean.etienne.tremblay@gmail.com>
# Maintainer: Jean-Etienne Tremblay <jean.etienne.tremblay@gmail.com>
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/channel_defconfig
pkgname=linux-motorola-channel
pkgver=4.9.203
pkgrel=0
pkgdesc="Motorola G7 Play kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="motorola-channel"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps"
makedepends="bash bc dtc bison devicepkg-dev flex openssl-dev perl dtbtool xz"
# Source
_repository="android_kernel_motorola_sdm632"
_commit="db8fd3bcfeee53f5ad5ae71df30c2b88076ff002"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
disable_tty_port_set_policy.patch
disable_skip_initramfs.patch
$_config
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" DTC=dtc \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
}
sha512sums="41bbbe33864866407877c5769882782e099a3f48898eb26ea08f172ff0bcc1239e2fb2d250c491a44c3bc5a3718d373ced4b26682aaa574077d1cb7abbb282c5 linux-motorola-channel-db8fd3bcfeee53f5ad5ae71df30c2b88076ff002.tar.gz
0fd5fd59e16c24a85302de83f61468591df472afbddaeab2b3dbf59cf9d48af2ac8ecc1a48a72b7a1db44077fbd4856dc60f2b2885eb1adf1f8e96b3a311eaad disable_tty_port_set_policy.patch
65048fb6474fd543b14bc99d9d95cfe5297da239af211d327a8509f7777d489bd01dd911364e0c62ec0e68f4c22ebb3b145eabfe01cad2abf57cf46896a1e58f disable_skip_initramfs.patch
d976d46e1892db749e5b9fd7037c747f80733e611919f98b19155d6419a79ce5fa2bb9720c250b1a11ba7a999fa1384063549a0014cd66c5e6986a2167282bbb config-motorola-channel.aarch64"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
diff --git a/init/initramfs.c b/init/initramfs.c
index bf3af10c500a..1c74b6d70e5e 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -622,11 +622,11 @@ static int __init populate_rootfs(void)
{
char *err;
- if (do_skip_initramfs) {
+ /*if (do_skip_initramfs) {
if (initrd_start)
free_initrd();
return default_rootfs();
- }
+ }*/
err = unpack_to_rootfs(__initramfs_start, __initramfs_size);
if (err)

View file

@ -0,0 +1,13 @@
diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c
index d099b32d40cb..2ca91bc13f22 100644
--- a/drivers/tty/serial/msm_serial_hs.c
+++ b/drivers/tty/serial/msm_serial_hs.c
@@ -3331,7 +3331,7 @@ static void msm_serial_hs_rt_init(struct uart_port *uport)
msm_uport->pm_state = MSM_HS_PM_SUSPENDED;
mutex_unlock(&msm_uport->mtx);
pm_runtime_enable(uport->dev);
- tty_port_set_policy(&uport->state->port, SCHED_FIFO, 1);
+ //tty_port_set_policy(&uport->state->port, SCHED_FIFO, 1);
}
static int msm_hs_runtime_suspend(struct device *dev)

View file

@ -0,0 +1,26 @@
pkgname=firmware-motorola-channel
pkgver=1
pkgrel=0
pkgdesc="Firmware for Motorola Channel G7 Play"
url="https://gitlab.com/jetremblay/firmware-motorola-channel"
subpackages="$pkgname-wcnss"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck"
_commit="b63367b99fc3782d4e326a84527f950436d97bf4"
source="https://gitlab.com/jetremblay/firmware-motorola-channel/-/archive/$_commit/firmware-motorola-channel-$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"
_fwdir="/lib/firmware/postmarketos"
package() {
# parent package is empty
mkdir -p "$pkgdir"
}
wcnss() {
pkgdesc="Motorola Moto G7 Play WiFi firmware"
install -Dm644 "$builddir"/wcnss.* -t "$subpkgdir/$_fwdir"
install -Dm644 "$builddir"/wlan/prima/WCNSS_* -t "$subpkgdir/$_fwdir"/wlan/prima
}
sha512sums="cfe2b52ebb3be71c41bc7f859a40cd72649087bf1390c4adfbcb4a3c09ec66db57750c97646c00e5ef1d1513fe02f8f8fd38a99480e80a3ac2b09496e49929d6 firmware-motorola-channel-b63367b99fc3782d4e326a84527f950436d97bf4.tar.gz"