asus-sparrow: new device (MR 2644)
[ci:skip-build] Already built on CI in MR
This commit is contained in:
parent
931a460c14
commit
2c9a4920be
11 changed files with 4344 additions and 0 deletions
29
device/testing/device-asus-sparrow/APKBUILD
Normal file
29
device/testing/device-asus-sparrow/APKBUILD
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-asus-sparrow
|
||||
pkgdesc="ASUS ZenWatch 2"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-asus-sparrow
|
||||
mesa-dri-gallium
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
71bfc59daed97ba63a17230e56ba72867fa63844789b3b20660fe452eaa1ad1ec437e805880e7966589cfc4a39dd0d0971a4d1dac53e60b2f16241d580efc8cb deviceinfo
|
||||
"
|
31
device/testing/device-asus-sparrow/deviceinfo
Normal file
31
device/testing/device-asus-sparrow/deviceinfo
Normal 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="ASUS ZenWatch 2"
|
||||
deviceinfo_manufacturer="ASUS"
|
||||
deviceinfo_codename="asus-sparrow"
|
||||
deviceinfo_year="2015"
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="watch"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
deviceinfo_screen_width="320"
|
||||
deviceinfo_screen_height="320"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=sparrow user_debug=31 maxcpus=4 msm_rtb.filter=0x3F"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
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"
|
|
@ -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
|
68
device/testing/linux-asus-sparrow/APKBUILD
Normal file
68
device/testing/linux-asus-sparrow/APKBUILD
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/sparrow_userdebug_msm8226_defconfig
|
||||
|
||||
pkgname=linux-asus-sparrow
|
||||
pkgver=3.10.40
|
||||
pkgrel=0
|
||||
pkgdesc="ASUS ZenWatch 2 kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="asus-sparrow"
|
||||
url="https://kernel.org"
|
||||
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
|
||||
_commit="8ffc85d0e5dba485a52a4405a21d3a516f969420"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/z3ntu/android_kernel_asus_sparrow/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
|
||||
asus_sw_ver.patch
|
||||
fix_ifdef.patch
|
||||
0001-mmc-card-not-access-RPMB-partition-for-normal-read-and-write.patch
|
||||
"
|
||||
builddir="$srcdir/android_kernel_asus_sparrow-$_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="
|
||||
206cb75e8180dd0efc42369e584a4cfa75d53f350e44c81b88b4335f54143faecf87863652162b3e816903dd1c6f377763cd0261b178d6f76cb080b22e68f0f3 linux-asus-sparrow-8ffc85d0e5dba485a52a4405a21d3a516f969420.tar.gz
|
||||
e9407e6b5c39b40513b68e9e77a1130ebc9c425f97ad502875f6cd4e32c16485d8d8bfc0fa421fb59fade804f36e77fd7524ce5039845ef8ab3566142da18237 config-asus-sparrow.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
|
||||
95ec8dfeaf0cc3e834ed15ebe703d2fd45ca96fd650968d5200fddf397c11fe3be7e53d09f215a66e8733dcd5ab470a39a0cefe126c8536aba2fb212f1b6682f asus_sw_ver.patch
|
||||
a8022af924c7421066a2e5dd8a5e136479d07eba26e40477fe557ba7492930f7e758ea7efabe95f4f078ab4d177bad3789947074582391015518330add7d6b7e fix_ifdef.patch
|
||||
ed1c144529612e7e5320a00979095431135bd3a65271ca76b8b6ceecb26db11d11899a9104695387ffea64cc618f72c79d3caa41481fa11a8bd9b54fdf6fd1d7 0001-mmc-card-not-access-RPMB-partition-for-normal-read-and-write.patch
|
||||
"
|
44
device/testing/linux-asus-sparrow/asus_sw_ver.patch
Normal file
44
device/testing/linux-asus-sparrow/asus_sw_ver.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
diff --git a/kernel/asusdebug.c b/kernel/asusdebug.c
|
||||
index aee6355934f7..b1c782d700e5 100755
|
||||
--- a/kernel/asusdebug.c
|
||||
+++ b/kernel/asusdebug.c
|
||||
@@ -245,7 +245,7 @@ void print_all_thread_info(void)
|
||||
g_iPtr = 0;
|
||||
memset(g_phonehang_log, 0, PHONE_HANG_LOG_SIZE);
|
||||
|
||||
- save_log("PhoneHang-%04d%02d%02d-%02d%02d%02d.txt --- ASUS_SW_VER : %s----------------------------------------------\r\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, ASUS_SW_VER);
|
||||
+ save_log("PhoneHang-%04d%02d%02d-%02d%02d%02d.txt -------------------------------------------------\r\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
save_log(" pID----ppID----NAME----------------SumTime---vruntime--SPri-NPri-State----------PmpCnt-Binder----Waiting\r\n");
|
||||
|
||||
for_each_process(pts)
|
||||
@@ -521,7 +521,7 @@ void save_all_thread_info(void)
|
||||
g_iPtr = 0;
|
||||
memset(g_phonehang_log, 0, PHONE_HANG_LOG_SIZE);
|
||||
|
||||
- save_log("ASUSSlowg-%04d%02d%02d-%02d%02d%02d.txt --- ASUS_SW_VER : %s----------------------------------------------\r\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, ASUS_SW_VER);
|
||||
+ save_log("ASUSSlowg-%04d%02d%02d-%02d%02d%02d.txt -------------------------------------------------\r\n", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
|
||||
save_log(" pID----ppID----NAME----------------SumTime---vruntime--SPri-NPri-State----------PmpCnt-binder----Waiting\r\n");
|
||||
|
||||
if(ptis_head != NULL)
|
||||
@@ -1230,7 +1230,7 @@ static void do_write_event_worker(struct work_struct *work)
|
||||
if (g_hfileEvtlog < 0)
|
||||
printk("[adbg] 1. open %s failed during renaming old one, err:%d\n", ASUS_EVTLOG_PATH"ASUSEvtlog.txt", g_hfileEvtlog);
|
||||
}
|
||||
- sprintf(buffer, "\n\n---------------System Boot----%s---------\n", ASUS_SW_VER);
|
||||
+ sprintf(buffer, "\n\n---------------System Boot-------------\n");
|
||||
|
||||
sys_write(g_hfileEvtlog, buffer, strlen(buffer));
|
||||
sys_close(g_hfileEvtlog);
|
||||
diff --git a/kernel/printk.c b/kernel/printk.c
|
||||
index eec2f2a61804..56144bff4406 100755
|
||||
--- a/kernel/printk.c
|
||||
+++ b/kernel/printk.c
|
||||
@@ -1019,7 +1019,7 @@ void printk_buffer_rebase(void)
|
||||
asus_global.kernel_log_size = log_buf_len;
|
||||
|
||||
memset( asus_global.kernel_version, 0, sizeof(asus_global.kernel_version));
|
||||
- strncpy(asus_global.kernel_version, ASUS_SW_VER, sizeof(asus_global.kernel_version));
|
||||
+ //strncpy(asus_global.kernel_version, ASUS_SW_VER, sizeof(asus_global.kernel_version));
|
||||
|
||||
memcpy(log_buf, __log_buf, __LOG_BUF_LEN);
|
||||
|
4008
device/testing/linux-asus-sparrow/config-asus-sparrow.armv7
Normal file
4008
device/testing/linux-asus-sparrow/config-asus-sparrow.armv7
Normal file
File diff suppressed because it is too large
Load diff
18
device/testing/linux-asus-sparrow/fix_ifdef.patch
Normal file
18
device/testing/linux-asus-sparrow/fix_ifdef.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
diff --git a/drivers/hwmon/qpnp-adc-common.c b/drivers/hwmon/qpnp-adc-common.c
|
||||
index e93bbbf5d466..02039388c099 100644
|
||||
--- a/drivers/hwmon/qpnp-adc-common.c
|
||||
+++ b/drivers/hwmon/qpnp-adc-common.c
|
||||
@@ -30,11 +30,11 @@
|
||||
#include <linux/qpnp/qpnp-adc.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
-#ifdef ASUS_WREN_PROJECT
|
||||
+#ifdef CONFIG_ASUS_WREN
|
||||
#include "qpnp-adc-common-wren.h"
|
||||
#endif
|
||||
|
||||
-#ifdef ASUS_SPARROW_PROJECT
|
||||
+#ifdef CONFIG_ASUS_SPARROW
|
||||
#include "qpnp-adc-common-sparrow.h"
|
||||
#endif
|
||||
|
|
@ -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-asus-sparrow/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-asus-sparrow/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