sony-eagle: new device (Sony Xperia M2) (MR 1338)
This commit is contained in:
parent
9f7c7752c1
commit
18e5129f3e
9 changed files with 4151 additions and 0 deletions
22
device/testing/device-sony-eagle/APKBUILD
Normal file
22
device/testing/device-sony-eagle/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-sony-eagle
|
||||
pkgdesc="Sony Xperia M2"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-sony-eagle mkbootimg mesa-dri-gallium"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="a5550c91df1b28704edffab5d433ff1641ac2cf8f152aaebd7d9523db57185fefef3ceb31bfb264e1dddcbb2c25eff5c2dd2e222c6799d40f88f4d725acb4923 deviceinfo"
|
32
device/testing/device-sony-eagle/deviceinfo
Normal file
32
device/testing/device-sony-eagle/deviceinfo
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Sony Xperia M2"
|
||||
deviceinfo_manufacturer="Sony"
|
||||
deviceinfo_codename="sony-eagle"
|
||||
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 user_debug=31 androidboot.selinux=permissive msm_rtb.filter=0x3F ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y sched_enable_power_aware=1 androidboot.hardware=eagle buildvariant=userdebug"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
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"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
|
45
device/testing/linux-sony-eagle/01_timeconst_fix.patch
Normal file
45
device/testing/linux-sony-eagle/01_timeconst_fix.patch
Normal file
|
@ -0,0 +1,45 @@
|
|||
From 63a3f603413ffe82ad775f2d62a5afff87fd94a0 Mon Sep 17 00:00:00 2001
|
||||
From: "H. Peter Anvin" <hpa@linux.intel.com>
|
||||
Date: Thu, 7 Feb 2013 17:14:08 -0800
|
||||
Subject: [PATCH] timeconst.pl: Eliminate Perl warning
|
||||
|
||||
defined(@array) is deprecated in Perl and gives off a warning.
|
||||
Restructure the code to remove that warning.
|
||||
|
||||
[ hpa: it would be interesting to revert to the timeconst.bc script.
|
||||
It appears that the failures reported by akpm during testing of
|
||||
that script was due to a known broken version of make, not a problem
|
||||
with bc. The Makefile rules could probably be restructured to avoid
|
||||
the make bug, or it is probably old enough that it doesn't matter. ]
|
||||
|
||||
Reported-by: Andi Kleen <ak@linux.intel.com>
|
||||
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
||||
Cc: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
|
||||
---
|
||||
Patch status: upstream
|
||||
|
||||
kernel/timeconst.pl | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
|
||||
index eb51d76..3f42652 100644
|
||||
--- a/kernel/timeconst.pl
|
||||
+++ b/kernel/timeconst.pl
|
||||
@@ -369,10 +369,8 @@ if ($hz eq '--can') {
|
||||
die "Usage: $0 HZ\n";
|
||||
}
|
||||
|
||||
- @val = @{$canned_values{$hz}};
|
||||
- if (!defined(@val)) {
|
||||
- @val = compute_values($hz);
|
||||
- }
|
||||
+ $cv = $canned_values{$hz};
|
||||
+ @val = defined($cv) ? @$cv : compute_values($hz);
|
||||
output($hz, @val);
|
||||
}
|
||||
exit 0;
|
||||
--
|
||||
2.4.10
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
Reduce the compression for kernel
|
||||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index a7ca009..808091b 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -259,7 +259,7 @@ cmd_lzma = (cat $(filter-out FORCE,$^) | \
|
||||
|
||||
quiet_cmd_lzo = LZO $@
|
||||
cmd_lzo = (cat $(filter-out FORCE,$^) | \
|
||||
- lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
|
||||
+ lzop -6 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
|
||||
(rm -f $@ ; false)
|
||||
|
||||
# XZ
|
||||
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
|
||||
index b482f16..c4e08c5 100644
|
||||
--- a/scripts/gen_initramfs_list.sh
|
||||
+++ b/scripts/gen_initramfs_list.sh
|
||||
@@ -245,7 +245,7 @@ case "$arg" in
|
||||
echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f"
|
||||
echo "$output_file" | grep -q "\.xz$" && \
|
||||
compr="xz --check=crc32 --lzma2=dict=1MiB"
|
||||
- echo "$output_file" | grep -q "\.lzo$" && compr="lzop -9 -f"
|
||||
+ echo "$output_file" | grep -q "\.lzo$" && compr="lzop -6 -f"
|
||||
echo "$output_file" | grep -q "\.cpio$" && compr="cat"
|
||||
shift
|
||||
;;
|
29
device/testing/linux-sony-eagle/03_fix_add_uevent_var.patch
Normal file
29
device/testing/linux-sony-eagle/03_fix_add_uevent_var.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
From dec4cfa22eee1a74f4a5a5c50cafc8056f308d4b Mon Sep 17 00:00:00 2001
|
||||
From: Jiangli Yuan <a6808c@motorola.com>
|
||||
Date: Thu, 3 Jul 2014 03:39:12 +0800
|
||||
Subject: [PATCH] kobject: Fix "add_uevent_var: too many keys" warn.
|
||||
|
||||
Double the UEVENT_NUM_ENVP to 64 to fix the "too many keys" warn.
|
||||
|
||||
Signed-off-by: Jiangli Yuan <a6808c@motorola.com>
|
||||
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
|
||||
---
|
||||
include/linux/kobject.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
|
||||
index 939b11268c86..e96b2d868230 100644
|
||||
--- a/include/linux/kobject.h
|
||||
+++ b/include/linux/kobject.h
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <linux/atomic.h>
|
||||
|
||||
#define UEVENT_HELPER_PATH_LEN 256
|
||||
-#define UEVENT_NUM_ENVP 32 /* number of env pointers */
|
||||
+#define UEVENT_NUM_ENVP 64 /* number of env pointers */
|
||||
#define UEVENT_BUFFER_SIZE 2048 /* buffer for the variables */
|
||||
|
||||
/* path to the userspace helper executed on an event */
|
||||
--
|
||||
2.24.1
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
From ff0cdcc049c0c4b36a23eb6880a116d5f78e90e3 Mon Sep 17 00:00:00 2001
|
||||
From: Konrad <32096130+ewentual@users.noreply.github.com>
|
||||
Date: Sat, 9 Jun 2018 12:03:07 +0200
|
||||
Subject: [PATCH] Update base.c
|
||||
|
||||
---
|
||||
fs/proc/base.c | 17 ++++++++++-------
|
||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/fs/proc/base.c b/fs/proc/base.c
|
||||
index 64dd67f74cd..4484fa0a8ed 100644
|
||||
--- a/fs/proc/base.c
|
||||
+++ b/fs/proc/base.c
|
||||
@@ -1803,7 +1803,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||
rcu_read_lock();
|
||||
file = fcheck_files(files, fd);
|
||||
if (file) {
|
||||
- unsigned i_mode, f_mode = file->f_mode;
|
||||
+ unsigned f_mode = file->f_mode;
|
||||
|
||||
rcu_read_unlock();
|
||||
put_files_struct(files);
|
||||
@@ -1819,12 +1819,14 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
|
||||
inode->i_gid = 0;
|
||||
}
|
||||
|
||||
- i_mode = S_IFLNK;
|
||||
- if (f_mode & FMODE_READ)
|
||||
- i_mode |= S_IRUSR | S_IXUSR;
|
||||
- if (f_mode & FMODE_WRITE)
|
||||
- i_mode |= S_IWUSR | S_IXUSR;
|
||||
- inode->i_mode = i_mode;
|
||||
+ if (S_ISLNK(inode->i_mode)) {
|
||||
+ unsigned i_mode = S_IFLNK;
|
||||
+ if (f_mode & FMODE_READ)
|
||||
+ i_mode |= S_IRUSR | S_IXUSR;
|
||||
+ if (f_mode & FMODE_WRITE)
|
||||
+ i_mode |= S_IWUSR | S_IXUSR;
|
||||
+ inode->i_mode = i_mode;
|
||||
+ }
|
||||
|
||||
security_task_to_inode(task, inode);
|
||||
put_task_struct(task);
|
||||
@@ -1859,6 +1861,7 @@ static struct dentry *proc_fd_instantiate(struct inode *dir,
|
||||
ei = PROC_I(inode);
|
||||
ei->fd = fd;
|
||||
|
||||
+ inode->i_mode = S_IFLNK;
|
||||
inode->i_op = &proc_pid_link_inode_operations;
|
||||
inode->i_size = 64;
|
||||
ei->op.proc_get_link = proc_fd_link;
|
79
device/testing/linux-sony-eagle/APKBUILD
Normal file
79
device/testing/linux-sony-eagle/APKBUILD
Normal file
|
@ -0,0 +1,79 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/eagle_ss_defconfig
|
||||
|
||||
pkgname=linux-sony-eagle
|
||||
pkgver=3.4.0
|
||||
pkgrel=0
|
||||
pkgdesc="Sony Xperia M2 kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="sony-eagle"
|
||||
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 gcc4"
|
||||
|
||||
# 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
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_sony_msm8226"
|
||||
_commit="53fc207771ed87a44d9f7c73058f4638b883e474"
|
||||
_primacommit="79403896e1c410582044c50dfce92d5e97233e0c"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/ilpianista/$_repository/archive/$_commit.tar.gz
|
||||
$pkgname-prima-$_primacommit.tar.gz::https://source.codeaurora.org/external/wlan/prima/snapshot/$_primacommit.tar.gz
|
||||
$_config
|
||||
01_timeconst_fix.patch
|
||||
02_reduce_lzo_compression.patch
|
||||
03_fix_add_uevent_var.patch
|
||||
06_fix_too_many_levels_of_symlinks.patch
|
||||
gcc-wrapper-port-to-py3.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_primadir="$srcdir/$_primacommit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
. downstreamkernel_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
|
||||
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
|
||||
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
-C "$builddir" M="$_primadir" CONFIG_PRONTO_WLAN=m CONFIG_PRIMA_WLAN_LFR=y \
|
||||
CONFIG_QCOM_TDLS=y CONFIG_ENABLE_LINUX_REG=y \
|
||||
KERNEL_BUILD=1 WLAN_ROOT="$_primadir" modules
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||
|
||||
mkdir -p "$pkgdir"/lib/modules/$pkgver
|
||||
install -Dm644 "$_primadir"/wlan.ko "$pkgdir"/lib/modules/$pkgver/
|
||||
|
||||
# Master DTB (deviceinfo_bootimg_qcdt)
|
||||
dtbTool -p scripts/dtc/ -o "$_outdir/arch/$_carch/boot"/dt.img "$_outdir/arch/$_carch/boot/"
|
||||
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img "$pkgdir"/boot/dt.img
|
||||
}
|
||||
|
||||
sha512sums="4c5a675e2583480cf91ddd73527cb26480fd0d385427b5d6fd6a4e975cfe8d979a647451291c8d123cff66efbc1f97baa87b4eb8be4d7745f739d4bda5ea081e linux-sony-eagle-53fc207771ed87a44d9f7c73058f4638b883e474.tar.gz
|
||||
f9e75725bd2c8e8e65af0ed07601aa9cfb3404653b94cb249d2e063be2877e0738fcbcdfb8bfefeaba7aafc2f542735e0af56a586a22340889922e7db469f0fb linux-sony-eagle-prima-79403896e1c410582044c50dfce92d5e97233e0c.tar.gz
|
||||
856279742befeab228787ae5f3fef30429586cdadfd202daee4bb70fdca32d49317dcfde5844d63c70f69adbffbbe4023152c3a8cc6ddd2e0e1ee82f2cd4f5d2 config-sony-eagle.armv7
|
||||
a2bb98fb8d988bbb659cae00fbaca360828300e9b98b90aed5ee0dd839c3f740696df4094a9021b813cbada06820d115aabed581a47cdd2c947e8d853c20b145 01_timeconst_fix.patch
|
||||
30ac7171fe2a5aa90c15e56465b35bfc84015079296df2ebbb4287a2848ac5e8cf8e0dbb00dfdf84acb6692587eefdfc338e65ef3170a1a3e5b279b317ba43f3 02_reduce_lzo_compression.patch
|
||||
72553b9283552fd003ee50e93a96c358184503e02500ca0b1790eb5e5e16c308193c04ee881dbf447424bba50afa2d1e38ad01a1d34482dcc17e73a337e07026 03_fix_add_uevent_var.patch
|
||||
18a413d0fc91aa95640b0d073fa1ab510056a87a541f9fc5a9272943bb2971492e51eedb84f2cbef56584c1f1c6dfdeb6b5984bbb8161f70409bdd5028f400d3 06_fix_too_many_levels_of_symlinks.patch
|
||||
13e289c889a48946cd3d976932f06f749bed5c6596776f4b683aada4e3e2f50b66286d6f550b8f2e260b58867b759591bbf8b54cc07ad9d3bb761ff477f036a1 gcc-wrapper-port-to-py3.patch"
|
3819
device/testing/linux-sony-eagle/config-sony-eagle.armv7
Normal file
3819
device/testing/linux-sony-eagle/config-sony-eagle.armv7
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,47 @@
|
|||
commit d5a70cdd4e2ce4ee432011504ea0fdfa0096ef7e
|
||||
Author: Alexey Min <alexey.min@gmail.com>
|
||||
Date: Sat May 2 00:22:09 2020 +0300
|
||||
|
||||
gcc-wrapper: port to py3
|
||||
|
||||
diff --git a/scripts/gcc-wrapper.py b/scripts/gcc-wrapper.py
|
||||
index 83f7e99da3b..499aac09244 100755
|
||||
--- a/scripts/gcc-wrapper.py
|
||||
+++ b/scripts/gcc-wrapper.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
|
||||
@@ -59,7 +59,7 @@ def interpret_warning(line):
|
||||
line = line.rstrip('\n')
|
||||
m = warning_re.match(line)
|
||||
if m and m.group(2) not in allowed_warnings:
|
||||
- print "error, forbidden warning:", m.group(2)
|
||||
+ print("error, forbidden warning:", m.group(2))
|
||||
|
||||
# If there is a warning, remove any object if it exists.
|
||||
if ofile:
|
||||
@@ -84,17 +84,16 @@ def run_gcc():
|
||||
try:
|
||||
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
|
||||
for line in proc.stderr:
|
||||
- print line,
|
||||
- interpret_warning(line)
|
||||
+ print(line, interpret_warning(line))
|
||||
|
||||
result = proc.wait()
|
||||
except OSError as e:
|
||||
result = e.errno
|
||||
if result == errno.ENOENT:
|
||||
- print args[0] + ':',e.strerror
|
||||
- print 'Is your PATH set correctly?'
|
||||
+ print(args[0] + ':', e.strerror)
|
||||
+ print('Is your PATH set correctly?')
|
||||
else:
|
||||
- print ' '.join(args), str(e)
|
||||
+ print(' '.join(args), str(e))
|
||||
|
||||
return result
|
||||
|
Loading…
Reference in a new issue