motorola-ocean: new device (Motorola Moto G7 Power) (MR 1470)
As of now only USB networking and screen (partially) works.
This commit is contained in:
parent
c9987d2e30
commit
f7ce83577b
6 changed files with 5318 additions and 0 deletions
35
device/testing/device-motorola-ocean/APKBUILD
Normal file
35
device/testing/device-motorola-ocean/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Maintainer: Ultracoolguy <myownpersonalaccount@protonmail.com>
|
||||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-motorola-ocean
|
||||
pkgdesc="Motorola Moto G7 Power"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
# Without msm-fb-refresher the display works as long as you execute
|
||||
# cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode
|
||||
# as root (at least on weston). With it installed, it makes the screen too dim
|
||||
# to be usable. Which is why it shouldn't be added until the issue gets fixed
|
||||
# somehow.
|
||||
depends="postmarketos-base linux-motorola-ocean mkbootimg mesa-dri-gallium"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Wifi and video firmware"
|
||||
depends="firmware-motorola-ocean"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="fbeb62e9fff42feb6e1ec926ca584f630968b5a7aefa1f637c80b089dcd9897e55b7f6e73d5c75767493ef373e2253e7506a0a55417f5bfc67de4ddc66fcb966 deviceinfo"
|
29
device/testing/device-motorola-ocean/deviceinfo
Normal file
29
device/testing/device-motorola-ocean/deviceinfo
Normal file
|
@ -0,0 +1,29 @@
|
|||
# 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 Moto G7 Power"
|
||||
deviceinfo_manufacturer="Motorola"
|
||||
deviceinfo_codename="motorola-ocean"
|
||||
deviceinfo_year="2019"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="720"
|
||||
deviceinfo_screen_height="1520"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_serial_hs,0x78af000 firmware_class.path=/vendor/firmware_mnt/image androidboot.usbconfigfs=true loop.max_part=7 printk.devkmsg=on androidboot.hab.csv=12 androidboot.hab.product=ocean androidboot.hab.cid=21 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"
|
22
device/testing/firmware-motorola-ocean/APKBUILD
Normal file
22
device/testing/firmware-motorola-ocean/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
pkgname=firmware-motorola-ocean
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for Motorola Moto G7 Power"
|
||||
url="https://gitlab.com/Ultracoolguy/firmware-motorola-ocean"
|
||||
arch="aarch64"
|
||||
license="proprietary"
|
||||
options="!check !strip !archcheck"
|
||||
depends="wcnss-wlan"
|
||||
_commit="8ac6914c1e6559016db55981d575d6034413b286"
|
||||
source="https://gitlab.com/Ultracoolguy/firmware-motorola-ocean/-/archive/$_commit/firmware-motorola-ocean-$_commit.tar.gz"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
|
||||
_fwdir="/lib/firmware/postmarketos"
|
||||
|
||||
package() {
|
||||
install -Dm644 "$builddir"/wcnss.* -t "$pkgdir/$_fwdir"
|
||||
install -Dm644 "$builddir"/wlan/prima/WCNSS_* -t "$pkgdir/$_fwdir"/wlan/prima
|
||||
install -Dm644 "$builddir"/venus.* -t "$pkgdir/$_fwdir"
|
||||
}
|
||||
|
||||
sha512sums="b382c3497dfac931c346d7a680e4144229d56584a6dbd3b7ceeca6083730608c774980a1a7db51834b4b7206c6ade8f2200c37373ffc2a92c8407b5a0e20b030 firmware-motorola-ocean-8ac6914c1e6559016db55981d575d6034413b286.tar.gz"
|
46
device/testing/linux-motorola-ocean/APKBUILD
Normal file
46
device/testing/linux-motorola-ocean/APKBUILD
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Maintainer: Ultracoolguy <myownpersonalaccount@protonmail.com>
|
||||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/ocean_defconfig
|
||||
|
||||
pkgname=linux-motorola-ocean
|
||||
pkgver=4.9.206
|
||||
pkgrel=0
|
||||
pkgdesc="Motorola Moto G7 Power kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="motorola-ocean"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl dtc"
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_motorola_sdm632"
|
||||
_commit="8f94fe92fabc32ead1a726545adcc16d4d233058"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/erfanoabdi/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
disable_skip_initramfs.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
. downstreamkernel_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
DTC_EXT="dtc" make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||
}
|
||||
|
||||
sha512sums="20ff9ba981b3818df07ffc7421357e19e12cd50d5fb7b9b2bcc7aaa8bf82dbf8d60b92f91142dc10aa12b253a7a8403f7bbb8096cbbbacf3624646b8fd951c72 linux-motorola-ocean-8f94fe92fabc32ead1a726545adcc16d4d233058.tar.gz
|
||||
4238c3feec82d1944a2e4c13cedd6856efa6425a2258502fb8b3b2590ad15ceb970c557f078b4210f435f9d3e93c0e56122735622c4d05bfaaa52bf71b412858 config-motorola-ocean.aarch64
|
||||
186ab6850d93497cb54b97bb36c884d8b75140b7f37ce2971725364376fb1f0975b92ccf7fb01e438a13dd17552642463ff6f945fa09b5f9ba9ac72f344a42d8 disable_skip_initramfs.patch"
|
5159
device/testing/linux-motorola-ocean/config-motorola-ocean.aarch64
Normal file
5159
device/testing/linux-motorola-ocean/config-motorola-ocean.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,27 @@
|
|||
From a865df5045656fc9f7ebeaf77f5b417f0d2b9249 Mon Sep 17 00:00:00 2001
|
||||
From: Erfan Abdi <erfangplus@gmail.com>
|
||||
Date: Mon, 16 Mar 2020 04:20:23 +0330
|
||||
Subject: [PATCH] init: initramfs: disable do_skip_initramfs
|
||||
Body: Additional info(added by gavodavo): On Android AB devices, this
|
||||
option is set to 1 because in there it doesn't really need the ramdisk,
|
||||
so it boots directly into the /system partition. We need this
|
||||
ramdisk on Linux though, so we need to disable the skipping.
|
||||
|
||||
Change-Id: Ic2ef95f803f49cb6779966ed5175b34782e1db64
|
||||
---
|
||||
init/initramfs.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/init/initramfs.c b/init/initramfs.c
|
||||
index bf3af10c500a..858631138dd0 100644
|
||||
--- a/init/initramfs.c
|
||||
+++ b/init/initramfs.c
|
||||
@@ -613,7 +613,7 @@ static int __init skip_initramfs_param(char *str)
|
||||
{
|
||||
if (*str)
|
||||
return 0;
|
||||
- do_skip_initramfs = 1;
|
||||
+ do_skip_initramfs = 0;
|
||||
return 1;
|
||||
}
|
||||
__setup("skip_initramfs", skip_initramfs_param);
|
Loading…
Reference in a new issue