Skip to content
Snippets Groups Projects
Commit 391af69a authored by ΞЖKƆ/QVH's avatar ΞЖKƆ/QVH
Browse files

lenovo-lxf-p5100: new device

parent 901cb952
No related branches found
No related tags found
1 merge request!5723lenovo-lxf-p5100: new device
Showing
with 4299 additions and 0 deletions
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-lenovo-lxf-p5100
pkgdesc="Lenovo Yoga Tab 3 10 LTE"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base linux-lenovo-lxf-p5100 mkbootimg xz mdss-fb-init-hack msm-fb-refresher"
makedepends="devicepkg-dev"
source="
deviceinfo
initfs-hook.sh
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
c9eb05f19bcd9455c6824bc817f77fe7f649398a0036bfe765a64e16dce0cfad645a12b470b5e2ba46bf489aeff4d479119629bc167a73bf841ea48195335cff deviceinfo
eab5837015ad489586ab046762ccd5f83627bff194162fa620ff648f897cecd8781bed8ec9c967fc6fd3eff359b8f3392ca889e0f085147d4efc9ed1702f4897 initfs-hook.sh
"
# 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 Yoga Tab 3 10 LTE"
deviceinfo_manufacturer="Lenovo"
deviceinfo_codename="lenovo-lxf-p5100"
deviceinfo_year="2016"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="800"
deviceinfo_screen_height="1280"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_generate_bootimg="true"
deviceinfo_kernel_cmdline="androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk kmemleak=on watchdog_v2.enable=0"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
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"
#!/bin/sh
# Setting the brightness
# because sometime the backlight is off druing boot
echo 255 > /sys/class/leds/lcd-backlight/brightness
From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
From: Behan Webster <behanw@converseincode.com>
Date: Wed, 24 Sep 2014 01:06:46 +0100
Subject: [PATCH] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). In this case using static inline
and removing the NULL version of return_address in return_address.c does
the right thing.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/ftrace.h | 2 +-
arch/arm/kernel/return_address.c | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 39eb16b0066f2..bfe2a2f5a644e 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
#else
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
{
return NULL;
}
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index fafedd86885dd..f6aa84d5b93c9 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
#warning "TODO: return_address should use unwind tables"
#endif
-void *return_address(unsigned int level)
-{
- return NULL;
-}
-
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
EXPORT_SYMBOL_GPL(return_address);
diff --git a/drivers/video/msm/mdss/mdp3_ctrl.c b/drivers/video/msm/mdss/mdp3_ctrl.c
index f9f55138..ccaebcb6 100644
--- a/drivers/video/msm/mdss/mdp3_ctrl.c
+++ b/drivers/video/msm/mdss/mdp3_ctrl.c
@@ -1832,7 +1832,7 @@ int mdp3_ctrl_init(struct msm_fb_data_type *mfd)
splash_mismatch = 1;
mdp3_interface->on_fnc = mdp3_ctrl_on;
- mdp3_interface->off_fnc = mdp3_ctrl_off;
+ mdp3_interface->off_fnc = NULL;
mdp3_interface->do_histogram = NULL;
mdp3_interface->cursor_update = NULL;
mdp3_interface->dma_fnc = mdp3_ctrl_pan_display;
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->ad_bl_level = 0;
- mfd->fb_imgType = MDP_RGBA_8888;
+ mfd->fb_imgType = MDP_RGBA_8888;
if (mfd->panel.type == MIPI_VIDEO_PANEL ||
mfd->panel.type == MIPI_CMD_PANEL) {
diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
index 53112ca6..4c430624 100644
--- a/drivers/video/msm/mdss/mdss_fb.c
+++ b/drivers/video/msm/mdss/mdss_fb.c
@@ -1421,7 +1421,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
var->left_margin = panel_info->lcdc.h_back_porch;
var->right_margin = panel_info->lcdc.h_front_porch;
var->hsync_len = panel_info->lcdc.h_pulse_width;
- var->pixclock = panel_info->clk_rate / 1000;
+ var->pixclock = 1000000 / 60;
/* id field for fb app */
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index a26cc5d..72c9dba 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -525,7 +525,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
{
int i, j;
struct menu *submenu[8], *menu, *location = NULL;
- struct jump_key *jump;
+ struct jump_key *jump = NULL;
str_printf(r, _("Prompt: %s\n"), _(prop->text));
menu = prop->menu->parent;
@@ -563,7 +563,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
str_printf(r, _(" Location:\n"));
for (j = 4; --i >= 0; j += 2) {
menu = submenu[i];
- if (head && location && menu == location)
+ if (jump && menu == location)
jump->offset = r->len - 1;
str_printf(r, "%*c-> %s", j, ' ',
_(menu_get_prompt(menu)));
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/msm8909_lxf_p5100_*
# Use device that is extract from stock android 's boot image as of now.
# (See Lenovo Yoga Tab 3 10 LTE/WiFi (lenovo-lxf-p5100#Missing Device Tree Changes on the wiki)
pkgname=linux-lenovo-lxf-p5100
pkgver=3.10.49
pkgrel=0
pkgdesc="Lenovo Yoga Tab 3 10 LTE kernel fork"
arch="armv7"
_carch="arm"
_flavor="lenovo-lxf-p5100-b01"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz dtbtool gcc4"
# Source
_dtb_repository="lxf-p5100-dtb"
_repository="kernel_yt3-x50l"
_commit="996d208f192d80911da0ef133ef1c9bddc0abad9"
_dtb_commit="e6c11f8cf202af6181879ce882dad866e40826f7"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/leandrofriedrich/$_repository/archive/$_commit.tar.gz
dtb.tar.gz::https://gitlab.postmarketos.org/exkc/lxf-p5100-dtb/-/archive/$_dtb_commit/lxf-p5100-dtb-$_dtb_commit.tar.gz
$_config
Remove_lenovo_usb_cdrom_hack.patch
Remove-gcc-python-wrapper.patch
gcc10-extern_YYLOC_global_declaration.patch
kernel-use-the-gnu89-standard-explicitly.patch
00_fix_return_address.patch
05_fix_mdp3_ctrl_off.patch
06_fix_mdss_fb_rgb_mode.patch
07_fix_mdss_fb_refresh_rate.patch
09_fix-warning-jump-may-be-used-uninitialized.patch
linux3.4-fix-piggy.gzip.S.patch
linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
fix-check-lxdialog.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
# Compiler: this kernel was only tested with GCC4. Feel free to make a merge
# request if you find out that it is booting working with newer GCCs as
# well. See <https://postmarketos.org/vendorkernel> for instructions.
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
fi
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Master DTB (deviceinfo_bootimg_qcdt)
# (packing device tree that extracted from stock android 's boot image)
dtbTool -o "$_outdir/arch/$_carch/boot"/dt.img "$srcdir/$_dtb_repository-$_dtb_commit"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
make modules_install \
O="$_outdir" \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img \
"$pkgdir"/boot/dt.img
}
sha512sums="
0295a7bc7c99032a21fd7924ecefa885cbc15c8e0d5700c9e0d6292fbf221b628ffce6562c6fd521a324bfdb5c45e01639afdf39344c55bbb839d0463c95951d linux-lenovo-lxf-p5100-996d208f192d80911da0ef133ef1c9bddc0abad9.tar.gz
3e3497d6b8b70910823b4ad5f441f1f3a7ecbd56747d59cf35eea168bdea787f5f76e2be820f492af7ac52995fe79b7a51ac6084d42cd88ce4e5cdb854e6b1ac dtb.tar.gz
d4270ce5e6fe9f1fb1553ab2af9ffb40c9fc997d4fb94c2fcaf2ad8f8746fe29323f8825dde2e9631b045df2503433ae4a649ba9fa9a48bdfc5af2bb62fac31c config-lenovo-lxf-p5100-b01.armv7
5bede1732868ce4748ecba80814f72e018ac5972d5074fd8b3a18aadec0f89ffbbaed72cb2ebb621d4af2782f40fddbad3f7ffd5789b97f854f3e79d257bdfe2 Remove_lenovo_usb_cdrom_hack.patch
1cb4d6dd7a8eb32fd4aeae8b79e15885192daa6f1bb087c786957fab48547ad38c6f4acb278b12db9e455057cae122f39bd3eb040241dd22d6f5eb6a7f986f8c Remove-gcc-python-wrapper.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
fbc61e379403990167853f4c4fbdfa22d7e9661a7eedecf2a75eec2a8008991a82d0a61be844ab4b1c88383f3fa79b43eff10b1039e44ad5a758a173cbf6386b 05_fix_mdp3_ctrl_off.patch
3f71b90f17cb4d3896169eac20a6ab761a9bd328d872ce7acb52d085497c90e7546aec08f66ccbde07d18fcef3bff6fdfd3cda9f439cdac7cb62aa0ce0e0ab49 06_fix_mdss_fb_rgb_mode.patch
1f743d3e7f4ac7401167ea35edc7d7e113bd80824c4d53631d7500f33557ff486163f8244786c16506b2e21db6ccbcd8a0f7b26fcf4937efee50b62c074f9a22 07_fix_mdss_fb_refresh_rate.patch
73908bc239f916d63d1552c0ee9774b0ed454fc3b0cf3cd929dc3d61a55ad105b45db03eb3023bd42339663bc371bf122dff3eb7709ce831492ee6e75f71904d 09_fix-warning-jump-may-be-used-uninitialized.patch
080745ca4ecaa804ee1df26ea81975ca93b74372e0c08322a6c481e97807495ae6ceb6cc77653afa24f9f2df45da8ebf8e5de6b06037fbb08e0279877ce42188 linux3.4-fix-piggy.gzip.S.patch
9e3b067fa1b19ad02500c4fce1b6142051df3845c508e615788beb650c4f953683107ac2d80670c4e3df38f532e0e91060d2d13ec04c9ec985abd2dfa82e900b linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
182be3c596b9cc267ac108d7cf03fc8c328ccc6b36770800e4dcedea8d1bb65e3f5eacf590c2948f58b1418cc60a1670ba77dde8c259e428d158c31b6e1dbaf5 fix-check-lxdialog.patch
"
From 966d3ac2409b59f431e1397f5ab8e9ee74ba5ae0 Mon Sep 17 00:00:00 2001
From: Iskren Chernev <me@iskren.info>
Date: Sat, 20 Feb 2021 00:49:45 +0200
Subject: [PATCH 3/6] Remove gcc python wrapper
---
Makefile | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 15a18b3cd15f6..e6a72c1a84fe9 100644
--- a/Makefile
+++ b/Makefile
@@ -326,7 +326,7 @@ include $(srctree)/scripts/Kbuild.include
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
-REAL_CC = $(CROSS_COMPILE)gcc
+CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
@@ -340,10 +340,6 @@ DEPMOD = /sbin/depmod
PERL = perl
CHECK = sparse
-# Use the wrapper for the compiler. This wrapper scans for new
-# warnings and causes the build to stop upon encountering them.
-CC = $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
-
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
CFLAGS_MODULE =
--
2.30.1
From 0ef2692e7a31c74b7e60393d72e6ff44a2e7d638 Mon Sep 17 00:00:00 2001
From: "@exkc" <@exkc>
Date: Sun, 26 Feb 2023 09:54:28 +0800
Subject: [PATCH] a
---
drivers/usb/gadget/f_mass_storage.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 4767bd15..2a42c517 100755
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -1211,8 +1211,6 @@ static int do_inquiry(struct fsg_common *common, struct fsg_buffhd *bh)
{
struct fsg_lun *curlun = common->curlun;
u8 *buf = (u8 *) bh->buf;
- char disk_inquiry_string[8 + 16 + 4 + 1];
-
if (!curlun) { /* Unsupported LUNs are okay */
common->bad_lun_okay = 1;
memset(buf, 0, 36);
@@ -1229,22 +1227,7 @@ static int do_inquiry(struct fsg_common *common, struct fsg_buffhd *bh)
buf[5] = 0; /* No special options */
buf[6] = 0;
buf[7] = 0;
-#if defined(CONFIG_LXF_P5000_A01) || defined(CONFIG_LXF_P5000_B02) || defined(CONFIG_LXF_P5000_B01) \
- || defined(CONFIG_LXF_P5000_C01) || defined(CONFIG_LXF_P5000_C02)
- if(buf[0] == TYPE_ROM) {
- snprintf(disk_inquiry_string, sizeof disk_inquiry_string,
- "%-8s%-16s%4s", "Lenovo", "CDROM", "2.31");
- memcpy(buf + 8, disk_inquiry_string, sizeof(disk_inquiry_string));}
- else
- memcpy(buf + 8, common->inquiry_string, sizeof common->inquiry_string);
-#else
- if(buf[0] == TYPE_ROM) {
- snprintf(disk_inquiry_string, sizeof disk_inquiry_string,
- "%-8s%-16s%4s", "Linux", "CDROM", "2.31");
- memcpy(buf + 8, disk_inquiry_string, sizeof(disk_inquiry_string));}
- else
- memcpy(buf + 8, common->inquiry_string, sizeof common->inquiry_string);
-#endif
+ memcpy(buf + 8, common->inquiry_string, sizeof common->inquiry_string);
return 36;
}
--
2.47.0
This diff is collapsed.
../../.shared-patches/linux/fix-check-lxdialog.patch
\ No newline at end of file
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
\ No newline at end of file
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch
\ No newline at end of file
../../.shared-patches/linux/linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
\ No newline at end of file
../../.shared-patches/linux/linux3.4-fix-piggy.gzip.S.patch
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment