huawei-sturgeon: new device (Huawei Watch) (MR 2538)
https://wiki.postmarketos.org/wiki/Huawei_Watch_(huawei-sturgeon) [ci:skip-build] Aready built on CI in MR
This commit is contained in:
parent
4bf9572291
commit
b2dd78880b
10 changed files with 3683 additions and 0 deletions
30
device/testing/device-huawei-sturgeon/APKBUILD
Normal file
30
device/testing/device-huawei-sturgeon/APKBUILD
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-huawei-sturgeon
|
||||
pkgdesc="Huawei Watch"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-huawei-sturgeon
|
||||
mesa-dri-swrast
|
||||
mkbootimg
|
||||
msm-fb-refresher
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
35ee89b4f810aeb24a51695607ce8402e683c2a99e1ccc2cbf5f96e2d6628c007371d582b8a780f185f66d3f987c5b6d20eb29d575967678e4c40837559903c1 deviceinfo
|
||||
"
|
32
device/testing/device-huawei-sturgeon/deviceinfo
Normal file
32
device/testing/device-huawei-sturgeon/deviceinfo
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Huawei Watch"
|
||||
deviceinfo_manufacturer="Huawei"
|
||||
deviceinfo_codename="huawei-sturgeon"
|
||||
deviceinfo_year="2015"
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="watch"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
deviceinfo_screen_width="400"
|
||||
deviceinfo_screen_height="400"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="androidboot.hardware=sturgeon user_debug=31 maxcpus=4 msm_rtb.filter=0x3F pm_levels.sleep_disabled=1 selinux=0"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x01e00000"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_fastboot_partition_system="userdata"
|
|
@ -0,0 +1,142 @@
|
|||
From patchwork Tue Aug 12 04:01:30 2014
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: "Gao, Yunpeng" <yunpeng.gao@intel.com>
|
||||
X-Patchwork-Id: 4710641
|
||||
Return-Path: <linux-mmc-owner@kernel.org>
|
||||
X-Original-To: patchwork-linux-mmc@patchwork.kernel.org
|
||||
Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org
|
||||
Received: from mail.kernel.org (mail.kernel.org [198.145.19.201])
|
||||
by patchwork1.web.kernel.org (Postfix) with ESMTP id D35AC9F38D
|
||||
for <patchwork-linux-mmc@patchwork.kernel.org>;
|
||||
Tue, 12 Aug 2014 03:59:55 +0000 (UTC)
|
||||
Received: from mail.kernel.org (localhost [127.0.0.1])
|
||||
by mail.kernel.org (Postfix) with ESMTP id EB1D520115
|
||||
for <patchwork-linux-mmc@patchwork.kernel.org>;
|
||||
Tue, 12 Aug 2014 03:59:54 +0000 (UTC)
|
||||
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
|
||||
by mail.kernel.org (Postfix) with ESMTP id A117620125
|
||||
for <patchwork-linux-mmc@patchwork.kernel.org>;
|
||||
Tue, 12 Aug 2014 03:59:53 +0000 (UTC)
|
||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S1754810AbaHLD7s (ORCPT
|
||||
<rfc822;patchwork-linux-mmc@patchwork.kernel.org>);
|
||||
Mon, 11 Aug 2014 23:59:48 -0400
|
||||
Received: from mga01.intel.com ([192.55.52.88]:7200 "EHLO mga01.intel.com"
|
||||
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
|
||||
id S1753033AbaHLD7r (ORCPT <rfc822;linux-mmc@vger.kernel.org>);
|
||||
Mon, 11 Aug 2014 23:59:47 -0400
|
||||
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
|
||||
by fmsmga101.fm.intel.com with ESMTP; 11 Aug 2014 20:59:46 -0700
|
||||
X-ExtLoop1: 1
|
||||
X-IronPort-AV: E=Sophos;i="5.01,847,1400050800"; d="scan'208";a="583529905"
|
||||
Received: from spark-hp-compaq-8000-elite-cmt-pc.bj.intel.com
|
||||
([172.16.181.71])
|
||||
by fmsmga002.fm.intel.com with ESMTP; 11 Aug 2014 20:59:43 -0700
|
||||
From: Yunpeng Gao <yunpeng.gao@intel.com>
|
||||
To: linux-mmc@vger.kernel.org
|
||||
Cc: Chuanxiao Dong <chuanxiao.dong@intel.com>,
|
||||
Yunpeng Gao <yunpeng.gao@intel.com>
|
||||
Subject: [PATCH] mmc: card: not access RPMB partition for normal read and
|
||||
write
|
||||
Date: Tue, 12 Aug 2014 12:01:30 +0800
|
||||
Message-Id: <1407816090-7671-1-git-send-email-yunpeng.gao@intel.com>
|
||||
X-Mailer: git-send-email 1.7.9.5
|
||||
Sender: linux-mmc-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-mmc.vger.kernel.org>
|
||||
X-Mailing-List: linux-mmc@vger.kernel.org
|
||||
X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI,
|
||||
RP_MATCHES_RCVD,
|
||||
UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1
|
||||
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org
|
||||
X-Virus-Scanned: ClamAV using ClamSMTP
|
||||
|
||||
From: Chuanxiao Dong <chuanxiao.dong@intel.com>
|
||||
|
||||
During kernel boot, it will try to read some logical sectors
|
||||
of each block device node for the possible partition table.
|
||||
|
||||
But since RPMB partition is special and can not be accessed
|
||||
by normal eMMC read / write CMDs, it will cause below error
|
||||
messages during kernel boot:
|
||||
...
|
||||
<3>[ 4.890052] mmc0: Got data interrupt 0x00000002 even though no data operation was in progress.
|
||||
<3>[ 4.892160] mmcblk0rpmb: error -110 transferring data, sector 0, nr 32, cmd response 0x900, card status 0xb00
|
||||
<4>[ 4.892165] mmcblk0rpmb: retrying using single block read
|
||||
<3>[ 4.895727] mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
|
||||
<3>[ 4.899269] mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
|
||||
<3>[ 4.901466] mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
|
||||
<3>[ 4.905106] mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
|
||||
<3>[ 4.907166] mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
|
||||
<3>[ 4.909235] mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
|
||||
<3>[ 4.909241] end_request: I/O error, dev mmcblk0rpmb, sector 0
|
||||
<3>[ 4.909247] Buffer I/O error on device mmcblk0rpmb, logical block 0
|
||||
<3>[ 4.909263] end_request: I/O error, dev mmcblk0rpmb, sector 8
|
||||
<3>[ 4.909267] Buffer I/O error on device mmcblk0rpmb, logical block 1
|
||||
<3>[ 4.909272] end_request: I/O error, dev mmcblk0rpmb, sector 16
|
||||
<3>[ 4.909275] Buffer I/O error on device mmcblk0rpmb, logical block 2
|
||||
<3>[ 4.909280] end_request: I/O error, dev mmcblk0rpmb, sector 24
|
||||
<3>[ 4.909283] Buffer I/O error on device mmcblk0rpmb, logical block 3
|
||||
...
|
||||
|
||||
This patch will discard the access request in eMMC queue if
|
||||
it is RPMB partition access request. By this way, it avoids
|
||||
trigger above error messages.
|
||||
|
||||
Signed-off-by: Yunpeng Gao <yunpeng.gao@intel.com>
|
||||
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
|
||||
---
|
||||
drivers/mmc/card/block.c | 13 +++++++++++++
|
||||
drivers/mmc/card/queue.c | 2 +-
|
||||
drivers/mmc/card/queue.h | 2 ++
|
||||
3 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
|
||||
index 452782b..4b79592 100644
|
||||
--- a/drivers/mmc/card/block.c
|
||||
+++ b/drivers/mmc/card/block.c
|
||||
@@ -1025,6 +1025,18 @@ static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type)
|
||||
md->reset_done &= ~type;
|
||||
}
|
||||
|
||||
+int mmc_access_rpmb(struct mmc_queue *mq)
|
||||
+{
|
||||
+ struct mmc_blk_data *md = mq->data;
|
||||
+ /*
|
||||
+ * If this is a RPMB partition access, return true
|
||||
+ */
|
||||
+ if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB)
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
|
||||
{
|
||||
struct mmc_blk_data *md = mq->data;
|
||||
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
|
||||
index 3e049c1..6ceede0 100644
|
||||
--- a/drivers/mmc/card/queue.c
|
||||
+++ b/drivers/mmc/card/queue.c
|
||||
@@ -38,7 +38,7 @@ static int mmc_prep_request(struct request_queue *q, struct request *req)
|
||||
return BLKPREP_KILL;
|
||||
}
|
||||
|
||||
- if (mq && mmc_card_removed(mq->card))
|
||||
+ if (mq && (mmc_card_removed(mq->card) || mmc_access_rpmb(mq)))
|
||||
return BLKPREP_KILL;
|
||||
|
||||
req->cmd_flags |= REQ_DONTPREP;
|
||||
diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h
|
||||
index 5752d50..99e6521 100644
|
||||
--- a/drivers/mmc/card/queue.h
|
||||
+++ b/drivers/mmc/card/queue.h
|
||||
@@ -73,4 +73,6 @@ extern void mmc_queue_bounce_post(struct mmc_queue_req *);
|
||||
extern int mmc_packed_init(struct mmc_queue *, struct mmc_card *);
|
||||
extern void mmc_packed_clean(struct mmc_queue *);
|
||||
|
||||
+extern int mmc_access_rpmb(struct mmc_queue *);
|
||||
+
|
||||
#endif
|
|
@ -0,0 +1,28 @@
|
|||
From 6443246a5765322e6407b3f5f619d906139e85a0 Mon Sep 17 00:00:00 2001
|
||||
From: Timon Baetz <timon.baetz@protonmail.com>
|
||||
Date: Sun, 19 Sep 2021 21:35:18 +0200
|
||||
Subject: [PATCH] msm: mdss: fix fb memory allocation
|
||||
|
||||
Signed-off-by: Timon Baetz <timon.baetz@protonmail.com>
|
||||
---
|
||||
drivers/video/msm/mdss/mdss_fb.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
|
||||
index d692846ea6f..3e94c5b4fc8 100644
|
||||
--- a/drivers/video/msm/mdss/mdss_fb.c
|
||||
+++ b/drivers/video/msm/mdss/mdss_fb.c
|
||||
@@ -2868,8 +2868,8 @@ static int mdss_fb_set_par(struct fb_info *info)
|
||||
else
|
||||
mfd->fbi->fix.line_length = var->xres * var->bits_per_pixel / 8;
|
||||
|
||||
- mfd->fbi->fix.smem_len = mfd->fbi->fix.line_length *
|
||||
- mfd->fbi->var.yres_virtual;
|
||||
+ mfd->fbi->fix.smem_len = PAGE_ALIGN(mfd->fbi->fix.line_length *
|
||||
+ mfd->fbi->var.yres_virtual);
|
||||
|
||||
if (mfd->panel_reconfig || (mfd->fb_imgType != old_imgType)) {
|
||||
mdss_fb_blank_sub(FB_BLANK_POWERDOWN, info, mfd->op_enable);
|
||||
--
|
||||
2.25.1
|
||||
|
67
device/testing/linux-huawei-sturgeon/APKBUILD
Normal file
67
device/testing/linux-huawei-sturgeon/APKBUILD
Normal file
|
@ -0,0 +1,67 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/sturgeon_defconfig
|
||||
|
||||
pkgname=linux-huawei-sturgeon
|
||||
pkgver=3.10.40
|
||||
pkgrel=0
|
||||
pkgdesc="Huawei Watch kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="huawei-sturgeon"
|
||||
url="https://android.googlesource.com/kernel/msm/+/refs/heads/android-msm-sturgeon-3.10-marshmallow-dr1-wear-release/"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="
|
||||
bash
|
||||
bc
|
||||
bison
|
||||
devicepkg-dev
|
||||
flex
|
||||
linux-headers
|
||||
openssl-dev
|
||||
perl
|
||||
"
|
||||
|
||||
# Source
|
||||
_repository="android-kernel-msm-sturgeon"
|
||||
_commit="97abcf5b24684a46530ffc8a4748dd7ae6c2e65a"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/timbz/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
gcc8-fix-put-user.patch
|
||||
gcc10-extern_YYLOC_global_declaration.patch
|
||||
kernel-use-the-gnu89-standard-explicitly.patch
|
||||
0001-mmc-card-not-access-RPMB-partition-for-normal-read-and-write.patch
|
||||
0002-msm-mdss-fix-fb-memory-allocation.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="
|
||||
515ae0ddd89251b234368c1082332e216051d528ba7164267c943b5b5b077620fe50aceabc28d0c151fc31804a1c532c38c1289e67bcd87d4a07c5cd9e9729f5 linux-huawei-sturgeon-97abcf5b24684a46530ffc8a4748dd7ae6c2e65a.tar.gz
|
||||
35b286b663e474f6d20f9ad445832e534a88b74743c3ce847b3c87d5d9c1ded52d632ff8861e0d5188efef8da10b37c4d8b849362bd7d1ed7477e6c4854f6792 config-huawei-sturgeon.armv7
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
|
||||
ed1c144529612e7e5320a00979095431135bd3a65271ca76b8b6ceecb26db11d11899a9104695387ffea64cc618f72c79d3caa41481fa11a8bd9b54fdf6fd1d7 0001-mmc-card-not-access-RPMB-partition-for-normal-read-and-write.patch
|
||||
88443774add9efe2c3278da0e8e75710dbc93fcf2930d07d00346f86860278e2cfe9e9cba1192e9bafda4e0df604e63efbfe2f6242ebe67d08f2c7ce4991532c 0002-msm-mdss-fix-fb-memory-allocation.patch
|
||||
"
|
3380
device/testing/linux-huawei-sturgeon/config-huawei-sturgeon.armv7
Normal file
3380
device/testing/linux-huawei-sturgeon/config-huawei-sturgeon.armv7
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
|
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/testing/linux-huawei-sturgeon/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-huawei-sturgeon/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch
|
Loading…
Reference in a new issue