lenovo-karatep: new device (MR 4875)
For now there is just PMOS Splash Screen and ssh connection working
This commit is contained in:
parent
c72f4346d2
commit
57863359a9
8 changed files with 4943 additions and 0 deletions
31
device/testing/device-lenovo-karatep/APKBUILD
Normal file
31
device/testing/device-lenovo-karatep/APKBUILD
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: SeMi2309 <semi2309@gmail.com>
|
||||
pkgname=device-lenovo-karatep
|
||||
pkgdesc="Lenovo K6 Note"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-lenovo-karatep
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
mdss-fb-init-hack
|
||||
msm-fb-refresher
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1b8c65c135a778ea332491599b6886fc5c54ec26ebe14925ccf8385d56f09af1999d1e7c0dec17169cb7f5e1c30c1a6f5a5a9815861b95f6d480a01985cdbdfb deviceinfo
|
||||
"
|
29
device/testing/device-lenovo-karatep/deviceinfo
Normal file
29
device/testing/device-lenovo-karatep/deviceinfo
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Lenovo K6 Note"
|
||||
deviceinfo_manufacturer="Lenovo"
|
||||
deviceinfo_codename="lenovo-karatep"
|
||||
deviceinfo_year="2016"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78B0000 androidboot.selinux=permissive buildvariant=eng"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
deviceinfo_header_version="0"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
|
@ -0,0 +1,40 @@
|
|||
From c22fd5c89335bc202bc5b498b3608fe0654b51d7 Mon Sep 17 00:00:00 2001
|
||||
From: Kacper <semis2309@gmail.com>
|
||||
Date: Wed, 6 Mar 2024 19:39:47 +0100
|
||||
Subject: [PATCH] Comment lines that are sending Touchscreen info to kernel log
|
||||
|
||||
---
|
||||
drivers/input/touchscreen/FT5436/focaltech_core.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/FT5436/focaltech_core.c b/drivers/input/touchscreen/FT5436/focaltech_core.c
|
||||
index c3f55ea9a59e..0cbfd30c26e2 100644
|
||||
--- a/drivers/input/touchscreen/FT5436/focaltech_core.c
|
||||
+++ b/drivers/input/touchscreen/FT5436/focaltech_core.c
|
||||
@@ -576,7 +576,7 @@ static void fts_report_value(struct fts_ts_data *data)
|
||||
input_report_key(data->input_dev, pdata->button_map[j],
|
||||
event->au8_touch_event[i] == FTS_TOUCH_DOWN || data->disable_keys);
|
||||
input_sync(data->input_dev);
|
||||
- pr_info("B[%d]: button %d, %d, %d, %d\n", i, pdata->button_map[j], event->au16_y[i], event->au16_x[i], event->au8_touch_event[i]);
|
||||
+ /*pr_info("B[%d]: button %d, %d, %d, %d\n", i, pdata->button_map[j], event->au16_y[i], event->au16_x[i], event->au8_touch_event[i]);*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -595,12 +595,12 @@ static void fts_report_value(struct fts_ts_data *data)
|
||||
input_report_abs(data->input_dev, ABS_MT_POSITION_Y, event->au16_y[i]);
|
||||
touchs |= BIT(event->au8_finger_id[i]);
|
||||
data->touchs |= BIT(event->au8_finger_id[i]);
|
||||
- pr_info("F[%d]-%d: %d, %d, %d\n", i, event->au8_finger_id[i], event->au16_y[i], event->au16_x[i], event->au8_touch_event[i]);
|
||||
+ /*pr_info("F[%d]-%d: %d, %d, %d\n", i, event->au8_finger_id[i], event->au16_y[i], event->au16_x[i], event->au8_touch_event[i]);*/
|
||||
} else {
|
||||
uppoint++;
|
||||
input_mt_report_slot_state(data->input_dev, MT_TOOL_FINGER, false);
|
||||
data->touchs &= ~BIT(event->au8_finger_id[i]);
|
||||
- pr_info("F[%d]-%d: %d, %d, %d\n", i, event->au8_finger_id[i], event->au16_y[i], event->au16_x[i], event->au8_touch_event[i]);
|
||||
+ /*pr_info("F[%d]-%d: %d, %d, %d\n", i, event->au8_finger_id[i], event->au16_y[i], event->au16_x[i], event->au8_touch_event[i]);*/
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
From 6c22adc0802e2585a4b7e6f8c786a9b295953138 Mon Sep 17 00:00:00 2001
|
||||
From: Kacper <semis2309@gmail.com>
|
||||
Date: Wed, 6 Mar 2024 20:17:18 +0100
|
||||
Subject: [PATCH] Framebuffer patch for MSM8937
|
||||
|
||||
---
|
||||
drivers/video/msm/mdss/mdss_fb.c | 26 ++++++++++++++---------
|
||||
drivers/video/msm/mdss/mdss_fb.h | 3 +--
|
||||
drivers/video/msm/mdss/mdss_mdp_overlay.c | 2 +-
|
||||
3 files changed, 18 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
|
||||
index ba5e7173087e..f6a02325d90e 100644
|
||||
--- a/drivers/video/msm/mdss/mdss_fb.c
|
||||
+++ b/drivers/video/msm/mdss/mdss_fb.c
|
||||
@@ -2006,7 +2006,7 @@ static void mdss_panel_validate_debugfs_info(struct msm_fb_data_type *mfd)
|
||||
if (is_panel_split(mfd) && pdata->next)
|
||||
mdss_fb_validate_split(pdata->panel_info.xres,
|
||||
pdata->next->panel_info.xres, mfd);
|
||||
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||
+ mdss_panelinfo_to_fb_var(mfd);
|
||||
if (mdss_fb_send_panel_event(mfd, MDSS_EVENT_CHECK_PARAMS,
|
||||
panel_info))
|
||||
pr_err("Failed to send panel event CHECK_PARAMS\n");
|
||||
@@ -2136,7 +2136,7 @@ static int mdss_fb_blank_unblank(struct msm_fb_data_type *mfd)
|
||||
* programmed in the controller.
|
||||
* Update this info in the upstream structs.
|
||||
*/
|
||||
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||
+ mdss_panelinfo_to_fb_var(mfd);
|
||||
|
||||
/* Start the work thread to signal idle time */
|
||||
if (mfd->idle_time)
|
||||
@@ -2868,7 +2868,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
|
||||
return ret;
|
||||
}
|
||||
|
||||
- mdss_panelinfo_to_fb_var(panel_info, var);
|
||||
+ mdss_panelinfo_to_fb_var(mfd);
|
||||
|
||||
fix->type = panel_info->is_3d_panel;
|
||||
if (mfd->mdp.fb_stride)
|
||||
@@ -3566,7 +3566,7 @@ static void mdss_fb_update_resolution(struct msm_fb_data_type *mfd,
|
||||
}
|
||||
var->xres_virtual = var->xres;
|
||||
var->yres_virtual = pinfo->yres * mfd->fb_page;
|
||||
- mdss_panelinfo_to_fb_var(pinfo, var);
|
||||
+ mdss_panelinfo_to_fb_var(mfd);
|
||||
}
|
||||
|
||||
int mdss_fb_atomic_commit(struct fb_info *info,
|
||||
@@ -3788,9 +3788,13 @@ static void mdss_fb_var_to_panelinfo(struct fb_var_screeninfo *var,
|
||||
pinfo->mipi.dsi_pclk_rate = pinfo->clk_rate;
|
||||
}
|
||||
|
||||
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||
- struct fb_var_screeninfo *var)
|
||||
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
+ if (!mfd) return -EINVAL;
|
||||
+ struct mdss_panel_info *pinfo = mfd->panel_info;
|
||||
+ struct fb_info *fbi = mfd->fbi;
|
||||
+ struct fb_var_screeninfo *var = &fbi->var;
|
||||
+
|
||||
u32 frame_rate;
|
||||
|
||||
var->xres = mdss_fb_get_panel_xres(pinfo);
|
||||
@@ -3825,10 +3829,12 @@ void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||
if (pinfo->physical_height)
|
||||
var->height = pinfo->physical_height;
|
||||
|
||||
- pr_debug("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",
|
||||
- var->xres, var->yres, var->left_margin,
|
||||
- var->right_margin, var->upper_margin,
|
||||
- var->lower_margin);
|
||||
+ if (fbi->mode){
|
||||
+ printk("Updating mdss fb mode from fb var\n");
|
||||
+ fb_var_to_videomode(fbi->mode, var);
|
||||
+ }
|
||||
+
|
||||
+ printk("ScreenInfo: res=%dx%d [%d, %d] [%d, %d]\n",var->xres, var->yres, var->left_margin,var->right_margin, var->upper_margin,var->lower_margin);
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/drivers/video/msm/mdss/mdss_fb.h b/drivers/video/msm/mdss/mdss_fb.h
|
||||
index 336a751d52b0..8cff2d5e8929 100644
|
||||
--- a/drivers/video/msm/mdss/mdss_fb.h
|
||||
+++ b/drivers/video/msm/mdss/mdss_fb.h
|
||||
@@ -468,7 +468,6 @@ int mdss_fb_async_position_update(struct fb_info *info,
|
||||
|
||||
u32 mdss_fb_get_mode_switch(struct msm_fb_data_type *mfd);
|
||||
void mdss_fb_report_panel_dead(struct msm_fb_data_type *mfd);
|
||||
-void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||
- struct fb_var_screeninfo *var);
|
||||
+void mdss_panelinfo_to_fb_var(struct msm_fb_data_type *mfd);
|
||||
void mdss_fb_calc_fps(struct msm_fb_data_type *mfd);
|
||||
#endif /* MDSS_FB_H */
|
||||
diff --git a/drivers/video/msm/mdss/mdss_mdp_overlay.c b/drivers/video/msm/mdss/mdss_mdp_overlay.c
|
||||
index 821521d9da5e..ad3b1f483336 100644
|
||||
--- a/drivers/video/msm/mdss/mdss_mdp_overlay.c
|
||||
+++ b/drivers/video/msm/mdss/mdss_mdp_overlay.c
|
||||
@@ -3846,7 +3846,7 @@ int mdss_mdp_dfps_update_params(struct msm_fb_data_type *mfd,
|
||||
* data, so any further call to get the screen
|
||||
* info has the updated timings.
|
||||
*/
|
||||
- mdss_panelinfo_to_fb_var(&pdata->panel_info, var);
|
||||
+ mdss_panelinfo_to_fb_var(mfd);
|
||||
|
||||
MDSS_XLOG(dfps);
|
||||
mutex_unlock(&mdp5_data->dfps_lock);
|
||||
--
|
||||
2.34.1
|
||||
|
70
device/testing/linux-lenovo-karatep/APKBUILD
Normal file
70
device/testing/linux-lenovo-karatep/APKBUILD
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/karatep_defconfig
|
||||
|
||||
pkgname=linux-lenovo-karatep
|
||||
pkgver=3.18.124
|
||||
pkgrel=0
|
||||
pkgdesc="Lenovo K6 Note kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="lenovo-karatep"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="
|
||||
bash
|
||||
bc
|
||||
bison
|
||||
devicepkg-dev
|
||||
findutils
|
||||
flex
|
||||
openssl-dev
|
||||
perl
|
||||
gcc4
|
||||
"
|
||||
# Compiler: GCC 4 (doesn't boot when compiled with newer versions)
|
||||
if [ "${CC:0:5}" != "gcc4-" ]; then
|
||||
CC="gcc4-$CC"
|
||||
HOSTCC="gcc4-gcc"
|
||||
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_lenovo_msm8937"
|
||||
_commit="f23254d4fbeb0e6d8ac866568f69a81b776a6437"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/karthick111/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
gcc10-extern_YYLOC_global_declaration.patch
|
||||
proc.S_patch.patch
|
||||
0001-Comment-lines-that-are-sending-Touchscreen-info-to-k.patch
|
||||
0002-Framebuffer-patch-for-MSM8937.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="
|
||||
c4be8501316f62db3b93ec0398bf59fe46f287447d7f5a163940efcdde3f3dd5d4a21e093801a49ad57100d002564bd94af12c545360cd72c6e2a93efb40816b linux-lenovo-karatep-f23254d4fbeb0e6d8ac866568f69a81b776a6437.tar.gz
|
||||
cac45e79e93723d30386b159a7768971d9f8a3c287bca234a96ebb1721a59d8ed084e58173da5dc617dde16a7050127bdb23e98f5bcbc15061616d07eb575665 config-lenovo-karatep.aarch64
|
||||
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||
bbd16d6e02c792e69ec98013ebe1166d2d03b81b28b9cea2ff0b87fd23146929849339b023180d926a781c251b269c120c00f5132106a1750c8aa3b003a10e00 proc.S_patch.patch
|
||||
acb22fbbac4fcff04c9df4c1abc4c6a1f50022a7ec2fe3108621bcca7d862a5b49ca63a5bba1e392101fc7569c3ac98e855cf472e116c8f66c7d999d6cae0cca 0001-Comment-lines-that-are-sending-Touchscreen-info-to-k.patch
|
||||
9f73fb305241e04d45717f894d9e1b59aba4ef80bd8af9790dd00c0ba2f59429a8f076386a906f98c8251c473738287c835b9e00fb88e330d942a5af2609a2a9 0002-Framebuffer-patch-for-MSM8937.patch
|
||||
"
|
4648
device/testing/linux-lenovo-karatep/config-lenovo-karatep.aarch64
Normal file
4648
device/testing/linux-lenovo-karatep/config-lenovo-karatep.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
|
11
device/testing/linux-lenovo-karatep/proc.S_patch.patch
Normal file
11
device/testing/linux-lenovo-karatep/proc.S_patch.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/arch/arm64/mm/proc.S
|
||||
+++ b/arch/arm64/mm/proc.S
|
||||
@@ -140,8 +140,6 @@
|
||||
b post_ttbr_update_workaround // Back to C code...
|
||||
ENDPROC(cpu_do_switch_mm)
|
||||
|
||||
- .section ".text.init", #alloc, #execinstr
|
||||
-
|
||||
/*
|
||||
* __cpu_setup
|
||||
*
|
Loading…
Reference in a new issue