lg-e610: new device (LG Optimus L5) (!340)
The phone boots postmarketOS and shows logo. USB networking and flashing via fastboot works. Display is currently broken but I will try to fix it soon. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
938fe1a52a
commit
ba8a3ac375
8 changed files with 3632 additions and 0 deletions
23
device/device-lg-e610/APKBUILD
Normal file
23
device/device-lg-e610/APKBUILD
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-lg-e610"
|
||||
pkgdesc="LG Optimus L5"
|
||||
pkgver=0.1
|
||||
pkgrel=1
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-lg-e610 mkbootimg mesa-dri-swrast msm-fb-refresher"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
|
||||
sha512sums="12f2a7b3b35c648636d5805480f06cb6e6afc5bfd5284844e240e72629b13fc6d0ad8972d56db6e0ef898d950dfdb699cdcce80d593d52954edb9e29ceb5913c deviceinfo"
|
33
device/device-lg-e610/deviceinfo
Normal file
33
device/device-lg-e610/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="LG Optimus L5"
|
||||
deviceinfo_manufacturer="LG"
|
||||
deviceinfo_codename="lg-e610"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="320"
|
||||
deviceinfo_screen_height="480"
|
||||
deviceinfo_dev_touchscreen=""
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="androidboot.hardware=m4 lge.signed_image=false"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_flash_offset_base="0x00200000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01200000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
|
49
device/linux-lg-e610/00_fix_return_address.patch
Executable file
49
device/linux-lg-e610/00_fix_return_address.patch
Executable file
|
@ -0,0 +1,49 @@
|
|||
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);
|
33
device/linux-lg-e610/02_gpu-msm-fix-gcc5-compile.patch
Normal file
33
device/linux-lg-e610/02_gpu-msm-fix-gcc5-compile.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
source:
|
||||
https://github.com/ShinySide/HispAsian_Lollipop_G6/commit/b7756b6fc4bb728722b14d2dfdbaf1dc843812e9
|
||||
|
||||
* These need to be static to avoid these errors:
|
||||
|
||||
drivers/built-in.o: In function `.LANCHOR1':
|
||||
msm_iommu_sec.c:(.data+0x9298): undefined reference to `kgsl_iommu_sync_lock'
|
||||
msm_iommu_sec.c:(.data+0x929c): undefined reference to `kgsl_iommu_sync_unlock'
|
||||
Makefile:877: recipe for target '.tmp_vmlinux1' failed
|
||||
make: *** [.tmp_vmlinux1] Error 1
|
||||
|
||||
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
|
||||
|
||||
--- a/drivers/gpu/msm/kgsl_iommu.c
|
||||
+++ b/drivers/gpu/msm/kgsl_iommu.c
|
||||
@@ -1010,7 +1010,7 @@ static int kgsl_iommu_init_sync_lock(struct kgsl_mmu *mmu)
|
||||
*
|
||||
* Return - int - number of commands.
|
||||
*/
|
||||
-inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
||||
+static inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
||||
unsigned int *cmds)
|
||||
{
|
||||
struct kgsl_device *device = mmu->device;
|
||||
@@ -1080,7 +1080,7 @@ inline unsigned int kgsl_iommu_sync_lock(struct kgsl_mmu *mmu,
|
||||
*
|
||||
* Return - int - number of commands.
|
||||
*/
|
||||
-inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu,
|
||||
+static inline unsigned int kgsl_iommu_sync_unlock(struct kgsl_mmu *mmu,
|
||||
unsigned int *cmds)
|
||||
{
|
||||
struct kgsl_device *device = mmu->device;
|
73
device/linux-lg-e610/APKBUILD
Normal file
73
device/linux-lg-e610/APKBUILD
Normal file
|
@ -0,0 +1,73 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/cyanogenmod_m4_defconfig
|
||||
|
||||
pkgname="linux-lg-e610"
|
||||
pkgver=3.4.0
|
||||
pkgrel=0
|
||||
pkgdesc="LG Optimus L5 kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="lg-e610"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc6"
|
||||
|
||||
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="lge-kernel-lproj"
|
||||
_commit="45d6b0c683f3e0178e91c081133c6ebbea1d30fd"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/TeamHackLG/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
gcc8-fix-put-user.patch
|
||||
00_fix_return_address.patch
|
||||
02_gpu-msm-fix-gcc5-compile.patch
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
# kernel.release
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
# zImage (find the right one)
|
||||
cd "$builddir/arch/$_carch/boot"
|
||||
_target="$pkgdir/boot/vmlinuz-$_flavor"
|
||||
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
|
||||
[ -e "$_zimg" ] || continue
|
||||
msg "zImage found: $_zimg"
|
||||
install -Dm644 "$_zimg" "$_target"
|
||||
break
|
||||
done
|
||||
if ! [ -e "$_target" ]; then
|
||||
error "Could not find zImage in $PWD!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
sha512sums="b73f5d8a87eaea99489b3ed090ef5219438779a9ba8de4716be9d6a0b8f8e88e56ae493cc9b9efdd1736bc061f174a61576f0b99a9f75e8c613fc09bd01a7d86 linux-lg-e610-45d6b0c683f3e0178e91c081133c6ebbea1d30fd.tar.gz
|
||||
1fc874729ec04536d8f16bdfa61ec925a460d0f0737d0a436ee09ec79e93cc662bfe35143a11abcce4ba8a8a8cd537825bb60b7169a8655cf4af592288e0d7ce config-lg-e610.armv7
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
|
||||
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 02_gpu-msm-fix-gcc5-compile.patch"
|
3419
device/linux-lg-e610/config-lg-e610.armv7
Normal file
3419
device/linux-lg-e610/config-lg-e610.armv7
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/linux-lg-e610/gcc8-fix-put-user.patch
Symbolic link
1
device/linux-lg-e610/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
Loading…
Reference in a new issue