new device: meizu-turbo (Meizu Pro 5) (!106)
The device boots till USB networking.
This commit is contained in:
parent
917ad071f0
commit
7597fa7a22
10 changed files with 10622 additions and 0 deletions
23
device/device-meizu-turbo/APKBUILD
Normal file
23
device/device-meizu-turbo/APKBUILD
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-meizu-turbo"
|
||||
pkgdesc="Meizu Pro 5"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-meizu-turbo mkbootimg mesa-dri-swrast msm-fb-refresher"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
|
||||
sha512sums="e40b76f71375c368f62465a4a674f78bf12353d90230d23f1eab84737e7d3f9b31b5dc1ac898b9f9cf12d8259e7e5137c2b1b03e2c4d0efc329ce1f56cf3afee deviceinfo"
|
34
device/device-meizu-turbo/deviceinfo
Normal file
34
device/device-meizu-turbo/deviceinfo
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Meizu Pro 5"
|
||||
deviceinfo_manufacturer="Meizu"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="1920"
|
||||
deviceinfo_dev_touchscreen=""
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
deviceinfo_rootfs_image_sector_size="4096"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
|
||||
deviceinfo_kernel_cmdline="console=ttyFIQ2,115200n8 no_console_suspend systempart=/dev/disk/by-partlabel/system datapart=/dev/disk/by-partlabel/userdata"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_flash_offset_base="0x40078000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01f88000"
|
||||
deviceinfo_flash_offset_second="0x00e88000"
|
||||
deviceinfo_flash_offset_tags="0xfff88100"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
deviceinfo_codename="meizu-turbo"
|
|
@ -0,0 +1,27 @@
|
|||
From 2435ec7df5e263e5f321c8092dfd671faf81ccf9 Mon Sep 17 00:00:00 2001
|
||||
From: "elel@3wh.net" <elel@3wh.net>
|
||||
Date: Sat, 22 Dec 2018 22:56:50 +0000
|
||||
Subject: [PATCH 1/5] Get rid of Android toolchain binaries in Makefile
|
||||
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ddb4853621e3..785aa8d1cb2f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -194,8 +194,8 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
|
||||
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
|
||||
#ARCH ?= $(SUBARCH)
|
||||
ARCH := arm64
|
||||
-#CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
|
||||
-CROSS_COMPILE := aarch64-linux-android-
|
||||
+CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
|
||||
+
|
||||
# Architecture as present in compile.h
|
||||
UTS_MACHINE := $(ARCH)
|
||||
SRCARCH := $(ARCH)
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From d71d6d5ae6fc56903618444e2229866c0712725a Mon Sep 17 00:00:00 2001
|
||||
From: "elel@3wh.net" <elel@3wh.net>
|
||||
Date: Mon, 24 Dec 2018 21:51:40 +0000
|
||||
Subject: [PATCH 2/5] Make exynos_ufs_ctrl_hci_core_clk visible to other TUs
|
||||
for DM
|
||||
|
||||
---
|
||||
drivers/scsi/ufs/ufs-exynos.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
|
||||
index d591033a6ac1..af9480e3a637 100644
|
||||
--- a/drivers/scsi/ufs/ufs-exynos.c
|
||||
+++ b/drivers/scsi/ufs/ufs-exynos.c
|
||||
@@ -883,7 +883,7 @@ struct exynos_ufs_soc *exynos_ufs_get_drv_data(struct device *dev)
|
||||
return ((struct ufs_hba_variant *)match->data)->vs_data;
|
||||
}
|
||||
|
||||
-inline void exynos_ufs_ctrl_hci_core_clk(struct exynos_ufs *ufs, bool en)
|
||||
+void exynos_ufs_ctrl_hci_core_clk(struct exynos_ufs *ufs, bool en)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
From 951f53d9a9000dd661b9db7167929ec50d245856 Mon Sep 17 00:00:00 2001
|
||||
From: "elel@3wh.net" <elel@3wh.net>
|
||||
Date: Mon, 24 Dec 2018 21:52:48 +0000
|
||||
Subject: [PATCH 3/5] Remove hard-coded denial of ro attr change for SD
|
||||
|
||||
---
|
||||
drivers/scsi/sd.c | 9 ++-------
|
||||
drivers/scsi/ufs/ufs-exynos.h | 1 +
|
||||
2 files changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
|
||||
index c01742258ac4..dae2cdb1b797 100755
|
||||
--- a/drivers/scsi/sd.c
|
||||
+++ b/drivers/scsi/sd.c
|
||||
@@ -1280,11 +1280,6 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode,
|
||||
SCSI_LOG_IOCTL(1, sd_printk(KERN_INFO, sdkp, "sd_ioctl: disk=%s, "
|
||||
"cmd=0x%x\n", disk->disk_name, cmd));
|
||||
|
||||
- /* Forbid setting device's ro attribute */
|
||||
- if (cmd == BLKROSET) {
|
||||
- return -EACCES;
|
||||
- }
|
||||
-
|
||||
error = scsi_verify_blk_ioctl(bdev, cmd);
|
||||
if (error < 0)
|
||||
return error;
|
||||
@@ -2261,7 +2256,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)
|
||||
struct scsi_mode_data data;
|
||||
int old_wp = sdkp->write_prot;
|
||||
|
||||
- //set_disk_ro(sdkp->disk, 0);
|
||||
+ set_disk_ro(sdkp->disk, 0);
|
||||
if (sdp->skip_ms_page_3f) {
|
||||
sd_printk(KERN_NOTICE, sdkp, "Assuming Write Enabled\n");
|
||||
return;
|
||||
@@ -2299,7 +2294,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)
|
||||
"Test WP failed, assume Write Enabled\n");
|
||||
} else {
|
||||
sdkp->write_prot = ((data.device_specific & 0x80) != 0);
|
||||
- //set_disk_ro(sdkp->disk, sdkp->write_prot);
|
||||
+ set_disk_ro(sdkp->disk, sdkp->write_prot);
|
||||
if (sdkp->first_scan || old_wp != sdkp->write_prot) {
|
||||
sd_printk(KERN_NOTICE, sdkp, "Write Protect is %s\n",
|
||||
sdkp->write_prot ? "on" : "off");
|
||||
diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h
|
||||
index 43edc4b92eb5..70fbf39408be 100644
|
||||
--- a/drivers/scsi/ufs/ufs-exynos.h
|
||||
+++ b/drivers/scsi/ufs/ufs-exynos.h
|
||||
@@ -511,4 +511,5 @@ struct ufs_attr_log {
|
||||
u32 res;
|
||||
u32 val;
|
||||
};
|
||||
+
|
||||
#endif /* _UFS_EXYNOS_H_ */
|
||||
--
|
||||
2.20.1
|
||||
|
21
device/linux-meizu-turbo/0004-Remove-loopy-symlink.patch
Normal file
21
device/linux-meizu-turbo/0004-Remove-loopy-symlink.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
From 43d2ec95dcbcabd4a48b0f5bede37c61e09fe4f4 Mon Sep 17 00:00:00 2001
|
||||
From: "elel@3wh.net" <elel@3wh.net>
|
||||
Date: Thu, 27 Dec 2018 08:06:28 +0000
|
||||
Subject: [PATCH 4/5] Remove loopy symlink
|
||||
|
||||
---
|
||||
drivers/gpu/arm/mali400/ump/arch/arch-release | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
delete mode 120000 drivers/gpu/arm/mali400/ump/arch/arch-release
|
||||
|
||||
diff --git a/drivers/gpu/arm/mali400/ump/arch/arch-release b/drivers/gpu/arm/mali400/ump/arch/arch-release
|
||||
deleted file mode 120000
|
||||
index 58ffbe7dd66b..000000000000
|
||||
--- a/drivers/gpu/arm/mali400/ump/arch/arch-release
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-arch-release
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.20.1
|
||||
|
6547
device/linux-meizu-turbo/0005-Use-Samsung-MFC-from-A810.patch
Normal file
6547
device/linux-meizu-turbo/0005-Use-Samsung-MFC-from-A810.patch
Normal file
File diff suppressed because it is too large
Load diff
74
device/linux-meizu-turbo/APKBUILD
Normal file
74
device/linux-meizu-turbo/APKBUILD
Normal file
|
@ -0,0 +1,74 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/m86_user_defconfig
|
||||
|
||||
pkgname="linux-meizu-turbo"
|
||||
pkgver=3.10.61
|
||||
pkgrel=0
|
||||
pkgdesc="Meizu Pro 5 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="meizu-turbo"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev"
|
||||
|
||||
# Compiler: latest GCC from Alpine
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
_repository="m576"
|
||||
_commit="2d3fa1ca1fbc8b52c75b2bcc3784b7e52085768b"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/meizuosc/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
0001-Get-rid-of-Android-toolchain-binaries-in-Makefile.patch
|
||||
0002-Make-exynos_ufs_ctrl_hci_core_clk-visible-to-other-T.patch
|
||||
0003-Remove-hard-coded-denial-of-ro-attr-change-for-SD.patch
|
||||
0004-Remove-loopy-symlink.patch
|
||||
0005-Use-Samsung-MFC-from-A810.patch
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
# kernel.release
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
# zImage (find the right one)
|
||||
cd "$builddir/arch/$_carch/boot"
|
||||
_target="$pkgdir/boot/vmlinuz-$_flavor"
|
||||
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
|
||||
[ -e "$_zimg" ] || continue
|
||||
msg "zImage found: $_zimg"
|
||||
install -Dm644 "$_zimg" "$_target"
|
||||
break
|
||||
done
|
||||
if ! [ -e "$_target" ]; then
|
||||
error "Could not find zImage in $PWD!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
sha512sums="3e2fed72982aa58ae4fb403f70a0141680e01188c8c82c9272478b5fc9022de8ef7f229c44f6d07f0aa14904d6c1fb2f5fd3233440ea9f42702987ca165ce0ce linux-meizu-turbo-2d3fa1ca1fbc8b52c75b2bcc3784b7e52085768b.tar.gz
|
||||
4d26bbd8e3cf7e53f1294b249b5c82f511150d9e87940ba0b4096e591df5e47d8d608055fde6e65043113478c2f3b2cc621fbf868cb8092b3a987e0e4ce96dd3 config-meizu-turbo.aarch64
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
1ebe72fe30dc92015b518ebc6eed9145a71b6a71efecd130757013831bcc1ba75e40dce5b8708028c8604ab9737d7679fce941dd879fcddf0b290d5d02cafae9 0001-Get-rid-of-Android-toolchain-binaries-in-Makefile.patch
|
||||
9669953f33404ebbceb91ac20c9023e76c35c5d21c2a506917139f58f16d5670ee085c366199b9a154fe4b5c6bfd59ed5a0af9fc06d7e92c2bf0b876f66e44b6 0002-Make-exynos_ufs_ctrl_hci_core_clk-visible-to-other-T.patch
|
||||
f81ec28b6bcf59ed842ccf1fe6549d847b804a54d0e705f60c68e3cb07f776763c7ddd2168dacc1d23c4b0c6602bae84c3a921b4df7f2545ae2597c54c4dd4c1 0003-Remove-hard-coded-denial-of-ro-attr-change-for-SD.patch
|
||||
8b43266d761e952624e477ce281ea6d6e9b4243ce149ce56487799faeb2ad58b3916b9aa6f8b905715132c20c8d55e59e1e7e3c69ad05f42e79461e181f26b23 0004-Remove-loopy-symlink.patch
|
||||
f62c152bc7832a31d4d148d9b2f378be70f82a5ae4d32a82da52291e00cbe82dfefe72dd1383ec9a6e801d94bbf114728c8988d7cc2219beb7ae93eada886e68 0005-Use-Samsung-MFC-from-A810.patch"
|
3812
device/linux-meizu-turbo/config-meizu-turbo.aarch64
Normal file
3812
device/linux-meizu-turbo/config-meizu-turbo.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
Loading…
Reference in a new issue