amazon-mustang: new device (MR 1263)

Just got done with my second port of postmarketOS, here's the device:
Amazon Fire 7 (2019) postmarketOS
Mediatek MT8163
600x1024 display
1GB RAM
Linux 4.9.77 (downstream kernel)

Untested:
- Wi-Fi
- Audio
Pretty much everything else

Works:
- Boots
- Touchscreen
- Battery percentage seems to show in Xfce
This commit is contained in:
Shana 2020-05-23 19:07:12 -07:00 committed by Alexey Min
parent bd57bf30c3
commit f15fa76d38
No known key found for this signature in database
GPG key ID: EBF5ECFFFEE34DED
5 changed files with 4896 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-amazon-mustang
pkgdesc="Amazon Fire 7 (2019)"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-amazon-mustang mkbootimg mesa-dri-gallium"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="9a1e225af66c34e6c9f2e7137e9904106bf7858ffc0fd370de16d1a4b2088c18d9138c3b20e8089d46773d50841aba8d8e915a8dd6c53b3584bcdf18ed3de3ed 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="Amazon Fire 7 (2019)"
deviceinfo_manufacturer="Amazon"
deviceinfo_codename="amazon-mustang"
deviceinfo_year="2019"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="600"
deviceinfo_screen_height="1024"
deviceinfo_chassis="tablet"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="bootopt=64S3,32N2,64N2 androidboot.selinux=permissive buildvariant=userdebug"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x40078000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x03408000"
deviceinfo_flash_offset_second="0x00e88000"
deviceinfo_flash_offset_tags="0x07f88000"
deviceinfo_flash_pagesize="2048"

View file

@ -0,0 +1,52 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/mustang_defconfig
pkgname=linux-amazon-mustang
pkgver=4.9.77
pkgrel=0
pkgdesc="Amazon Fire 7 (2019) kernel fork"
arch="armv7"
_carch="arm"
_flavor="amazon-mustang"
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 gcc6"
# Compiler: GCC 6 (doesn't boot when compiled 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_amazon_mustang"
_commit="42d97d6450e8ba87315543081a765b0f0a1da358"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/ggow/$_repository/archive/$_commit.tar.gz
$_config
pinctrl-mtk-common.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
}
sha512sums="af94e53334bf7ad4541d8813eb8ef6902a352d9ee0951193a3031189d2c232b1cc1fe00a263958b617cea2af7761a56c4144db702d47cde0aed4e8c268d23f0c linux-amazon-mustang-42d97d6450e8ba87315543081a765b0f0a1da358.tar.gz
8b2a3bd95fffef958488117e42b436b022c7edb07017c0dd3ad02b302947303660ff6b9d852c4efb59e528b867e1a7fa998b218f0ef20efe8ce970495fa3f3d1 config-amazon-mustang.armv7
f1ce4270766e992bc2c03821cf2e62c60d987adb7f448d5ae7430f6eba4d0d6718f337c9f0d7e4db4097f5f49d5b49e653fcb6a1ee50fa8d07b625bb04a87484 pinctrl-mtk-common.patch"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,19 @@
commit d5a43cdd4e2ce4ee432011501da0fdfa0096ef7e
Author: Shana <devfusediboot@protonmail.com>
Date: Sat May 23 19:07:12 2020 -0700
drivers: pinctrl: mediatek: fix compile error on GCC 6
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
index 7250f25e..83e98b34 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
@@ -356,7 +356,7 @@ struct mtk_pinctrl_devdata {
const struct mtk_pin_info *pin_drve8_grps;
unsigned int n_pin_drve8;
#endif
- const const struct mtk_pin_drv_grp *pin_drv_grp;
+ const struct mtk_pin_drv_grp *pin_drv_grp;
unsigned int n_pin_drv_grps;
int (*spec_pull_set)(struct regmap *reg, unsigned int pin,
unsigned char align, bool isup, unsigned int arg);