motorola-condor: new device (MR 1887)
Added support for Motorola Moto E 2014 codename: condor It is booting, has usb, battery, flashing needs special fastboot command for the boot partition
This commit is contained in:
parent
3a82b531f5
commit
a7efb145a9
12 changed files with 3649 additions and 0 deletions
|
@ -0,0 +1,5 @@
|
|||
# use 'weston-calibrator' to calibrate the touchscreen!
|
||||
SUBSYSTEM=="input", ATTRS{name}=="touch_dev", \
|
||||
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1" \
|
||||
ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1"
|
||||
|
27
device/testing/device-motorola-condor/APKBUILD
Normal file
27
device/testing/device-motorola-condor/APKBUILD
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-motorola-condor
|
||||
pkgdesc="Motorola Moto E (1st gen)"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-motorola-condor mkbootimg mesa-dri-gallium msm-fb-refresher"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo initfs-hook.sh 90-android-touch-dev.rules"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
install -D -m644 "$srcdir"/90-android-touch-dev.rules \
|
||||
"$pkgdir"/etc/udev/rules.d/90-android-touch-dev.rules
|
||||
|
||||
}
|
||||
|
||||
sha512sums="9c9790789f412804325d84dc9d3fefc1fe54125d043f8708c57ab217a7408789a39fa89db83e4b52eed58ac7478789f7a16bf47f43610157c9980601981e0412 deviceinfo
|
||||
a009171a9f95ad15f28b22549f8618711b42fabbad473e416b905c60131265a02ab7eb33c4e57f2201b859152a603c77c3c9bec955ab3998cd385858f076c8ec initfs-hook.sh
|
||||
568d407c3e96b45d740af8617f0e389d36a7091dceccae8f77288fdc45fb7a5ed418c28f31d7fe5a51d92337a40b2dd741b1b18ad02e3fbae91f9a2035d62c95 90-android-touch-dev.rules"
|
33
device/testing/device-motorola-condor/deviceinfo
Normal file
33
device/testing/device-motorola-condor/deviceinfo
Normal file
|
@ -0,0 +1,33 @@
|
|||
# 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 E (1st gen)"
|
||||
deviceinfo_manufacturer="Motorola"
|
||||
deviceinfo_codename="motorola-condor"
|
||||
deviceinfo_year="2014"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="540"
|
||||
deviceinfo_screen_height="960"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 utags.blkdev=/dev/block/platform/msm_sdcc.1/by-name/utags movablecore=160M vmalloc=400M"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_mtk_mkimage="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
4
device/testing/device-motorola-condor/initfs-hook.sh
Normal file
4
device/testing/device-motorola-condor/initfs-hook.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo 1 > /sys/class/i2c-dev/i2c-1/device/1-0020/drv_irq
|
||||
echo 1 > /sys/class/i2c-dev/i2c-1/device/1-0020/reset
|
61
device/testing/linux-motorola-condor/APKBUILD
Normal file
61
device/testing/linux-motorola-condor/APKBUILD
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/cm_condor_defconfig
|
||||
|
||||
pkgname=linux-motorola-condor
|
||||
pkgver=3.4.112
|
||||
pkgrel=0
|
||||
pkgdesc="Motorola Moto E (1st gen) kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="motorola-condor"
|
||||
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 dtbtool coreutils xz"
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_motorola_msm8610"
|
||||
_commit="1f33ddf2acf97544fc509bb2546aec7907c56bc1"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_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
|
||||
fix_slow_boot_emmc_timeout.patch
|
||||
fix_bad_kernel_backport.patch
|
||||
fix_redish_display.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" CONFIG_NO_ERROR_ON_MISMATCH=y
|
||||
|
||||
# Master DTB (deviceinfo_bootimg_qcdt)
|
||||
dtbTool -p scripts/dtc/ -o "$_outdir/arch/$_carch/boot"/dt.img \
|
||||
"$_outdir/arch/$_carch/boot/"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img \
|
||||
"$pkgdir"/boot/dt.img
|
||||
}
|
||||
|
||||
sha512sums="375de04e128a0f03189f793851bc4df0e80d8cc35644df2145b484f5f44a679848e53a1eeb26259cbea66d23d850f6037f65693f206c93c96ddac7bd9f9e533a linux-motorola-condor-1f33ddf2acf97544fc509bb2546aec7907c56bc1.tar.gz
|
||||
4b221f706a8387ccd4bbe75ea66423be6ad52f5973a0b12a2c1d704db09242c28809cba4df4544f5087972189eed9db8ba9cb4183c89284dca9f2ef6a18ab038 config-motorola-condor.armv7
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||
e4d2a3ee6807659fe2bbbbdea4f9b4934b04ed1714ccdfea14dead5c8bc46cd9ebb93a98e2ff350382b0aa09bc4a6a00884f2b920082fdd6ab3a758a20b8e224 fix_slow_boot_emmc_timeout.patch
|
||||
4bcd16d8d828a82b96a8c62b42adcb4f717ca83d6724b6dea6850103a61c9d74f52b5caf0f1c4a26a7f3e2e991f33e13e3d532ef319a95cac6f187b3f0dbcda1 fix_bad_kernel_backport.patch
|
||||
be4e8d353dcf265aab7e31090e9514ca5f2303b8a2fa8f641654e3bff2a178af336b87e267c3fcc1aaa6c8204962d00c35fccabe56c02fc8d49bcb2620ba83fb fix_redish_display.patch"
|
3441
device/testing/linux-motorola-condor/config-motorola-condor.armv7
Normal file
3441
device/testing/linux-motorola-condor/config-motorola-condor.armv7
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,14 @@
|
|||
diff --git a/fs/stat.c b/fs/stat.c
|
||||
index 88b36c7..17b7a1b 100644
|
||||
--- a/fs/stat.c
|
||||
+++ b/fs/stat.c
|
||||
@@ -58,7 +58,7 @@
|
||||
int vfs_fstat(unsigned int fd, struct kstat *stat)
|
||||
{
|
||||
int fput_needed;
|
||||
- struct file *f = fget_light(fd, &fput_needed);
|
||||
+ struct file *f = fget_raw_light(fd, &fput_needed);
|
||||
int error = -EBADF;
|
||||
|
||||
if (f) {
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
|
||||
index 53112ca6..69673017 100644
|
||||
--- a/drivers/video/msm/mdss/mdss_fb.c
|
||||
+++ b/drivers/video/msm/mdss/mdss_fb.c
|
||||
@@ -569,7 +569,7 @@ static int mdss_fb_probe(struct platform_device *pdev)
|
||||
mfd->bl_level = 0;
|
||||
mfd->bl_scale = 1024;
|
||||
mfd->bl_min_lvl = 30;
|
||||
- mfd->fb_imgType = MDP_RGBA_8888;
|
||||
+ mfd->fb_imgType = MDP_ARGB_8888;
|
||||
|
||||
mfd->pdev = pdev;
|
||||
if (pdata->next)
|
|
@ -0,0 +1,48 @@
|
|||
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,19 @@ 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 ture
|
||||
+ */
|
||||
+ if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB)
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(mmc_access_rpmb);
|
||||
+
|
||||
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 @@
|
|||
../../.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-motorola-condor/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-motorola-condor/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
Loading…
Reference in a new issue