sony-hollyss: new device (Sony Xperia M5) (MR 1349)
working: Display, Touch, Charging, USB Network, X11
This commit is contained in:
parent
92779b2e0c
commit
e5dd049cba
8 changed files with 3322 additions and 0 deletions
22
device/testing/device-sony-hollyss/APKBUILD
Normal file
22
device/testing/device-sony-hollyss/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-sony-hollyss
|
||||
pkgdesc="Sony Xperia M5"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-sony-hollyss mkbootimg mesa-dri-gallium"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="7b017ad49d20d328d12aee999e310092803bffa90e3e3dc3a3bfcd82c5fbe930f3545d0fff665df8b81041b9540a115aa75149b4683290d140b829a4fecba07a deviceinfo"
|
31
device/testing/device-sony-hollyss/deviceinfo
Normal file
31
device/testing/device-sony-hollyss/deviceinfo
Normal file
|
@ -0,0 +1,31 @@
|
|||
# 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 M5"
|
||||
deviceinfo_manufacturer="Sony"
|
||||
deviceinfo_codename="sony-hollyss"
|
||||
deviceinfo_year="2015"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="1920"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="bootopt=64S3,32N2,64N2 androidboot.selinux=permissive androidboot.bootdevice=mtk-msdc.0"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x40078000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x03f88000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x0df88000"
|
||||
deviceinfo_flash_pagesize="2048"
|
51
device/testing/linux-sony-hollyss/APKBUILD
Normal file
51
device/testing/linux-sony-hollyss/APKBUILD
Normal file
|
@ -0,0 +1,51 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/hollyss_defconfig
|
||||
|
||||
pkgname=linux-sony-hollyss
|
||||
pkgver=3.10.72
|
||||
pkgrel=0
|
||||
pkgdesc="Sony Xperia M5 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="sony-hollyss"
|
||||
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"
|
||||
|
||||
# Source
|
||||
_repository="linux-sony-hollyss-kernel-3.10"
|
||||
_commit="c008d85533efdc940e6052922cfeec91e582eeb2"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/empyreal96/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
gcc8-fix-put-user.patch
|
||||
mt_cpufreq_64.c.patch
|
||||
setup.c.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="db24fa217ec5877c688e376b3bc9b8c76c59dc3bd89bdbba5a1c133c2645d0cb945c558ed83faa24f91339cf0a600f0f86da7ee4500250a63498537ec95ddab2 linux-sony-hollyss-c008d85533efdc940e6052922cfeec91e582eeb2.tar.gz
|
||||
b2176f7259c4234732ea82592c2587004478e3e7743eddd3ef275dcfd4f19f60fea8255ee943653faeb525e727def80e381918bc620a813bbd7b6dd65bbb5bd6 config-sony-hollyss.aarch64
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
e0ededeef62e49a36bfc27b18cb65b1d417e771e8500463dd394f5c7558571aacabac251873a8476ee1f91d7c8bf84ee6b6444f4f198e2fe7ddb310138f15e7c mt_cpufreq_64.c.patch
|
||||
d290271d2133e071f2d8a2ac8c54a2e0be0b556b2faf87954ff69f15db31a9dc16a312c45d1955f7dfd227443f418242f41c3a6c88ccac43d4d43cfbcd210143 setup.c.patch"
|
3163
device/testing/linux-sony-hollyss/config-sony-hollyss.aarch64
Normal file
3163
device/testing/linux-sony-hollyss/config-sony-hollyss.aarch64
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/testing/linux-sony-hollyss/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-sony-hollyss/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
27
device/testing/linux-sony-hollyss/mt_cpufreq_64.c.patch
Normal file
27
device/testing/linux-sony-hollyss/mt_cpufreq_64.c.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
ARM based systems the udelay function imposes a maximum of 2000 and designed to fail when higher than that,
|
||||
so I lowered the number based off various mailinglists to prevent the fail.
|
||||
|
||||
|
||||
|
||||
diff --git a/drivers/misc/mediatek/mach/mt6795/mt_cpufreq_64.c b/drivers/misc/mediatek/mach/mt6795/mt_cpufreq_64.c
|
||||
index 760025c2..918e2713 100755
|
||||
--- a/drivers/misc/mediatek/mach/mt6795/mt_cpufreq_64.c
|
||||
+++ b/drivers/misc/mediatek/mach/mt6795/mt_cpufreq_64.c
|
||||
@@ -1848,7 +1848,7 @@ static int set_cur_volt_extbuck(struct mt_cpu_dvfs *p, unsigned int mv) /* volt:
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
- udelay(PMIC_SETTLE_TIME(cur_vproc_mv - MAX_DIFF_VSRAM_VPROC, cur_vproc_mv)); // TODO: always fix max gap <- refine it???
|
||||
+ udelay(20); // TODO: always fix max gap <- refine it???
|
||||
|
||||
// cpufreq_dbg("@%s(), UP, cur_vsram_mv = %d, cur_vproc_mv = %d, delay = %d\n", __func__, cur_vsram_mv, cur_vproc_mv, PMIC_SETTLE_TIME(cur_vproc_mv - MAX_DIFF_VSRAM_VPROC, cur_vproc_mv));
|
||||
} while (target_vsram_mv > cur_vsram_mv);
|
||||
@@ -1891,7 +1891,7 @@ static int set_cur_volt_extbuck(struct mt_cpu_dvfs *p, unsigned int mv) /* volt:
|
||||
mt_cpufreq_set_pmic_cmd(PMIC_WRAP_PHASE_NORMAL, IDX_NM_VSRAM_CA7, VOLT_TO_PMIC_VAL(cur_vsram_mv));
|
||||
mt_cpufreq_apply_pmic_cmd(IDX_NM_VSRAM_CA7);
|
||||
|
||||
- udelay(PMIC_SETTLE_TIME(cur_vproc_mv + MAX_DIFF_VSRAM_VPROC, cur_vproc_mv)); // TODO: always fix max gap <- refine it???
|
||||
+ udelay(20); // TODO: always fix max gap <- refine it???
|
||||
|
||||
// cpufreq_dbg("@%s(), DOWN, cur_vsram_mv = %d, cur_vproc_mv = %d, delay = %d\n", __func__, cur_vsram_mv, cur_vproc_mv, PMIC_SETTLE_TIME(cur_vproc_mv + MAX_DIFF_VSRAM_VPROC, cur_vproc_mv));
|
||||
} while (cur_vproc_mv > mv);
|
26
device/testing/linux-sony-hollyss/setup.c.patch
Normal file
26
device/testing/linux-sony-hollyss/setup.c.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
"The arm64 port doesn't provide a screen_info struct for console support
|
||||
which leads to a build failure with some configurations:
|
||||
|
||||
drivers/video/console/vgacon.c:820: undefined reference to `screen_info'
|
||||
|
||||
This patch adds an empty declaration of screen_info to fix the build
|
||||
problem. Some additional runtime code is needed to actually make it
|
||||
useful."
|
||||
|
||||
|
||||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
|
||||
index ab04a996..54c76fc6 100644
|
||||
--- a/arch/arm64/kernel/setup.c
|
||||
+++ b/arch/arm64/kernel/setup.c
|
||||
@@ -73,6 +73,10 @@ unsigned int compat_elf_hwcap __read_mostly = COMPAT_ELF_HWCAP_DEFAULT;
|
||||
unsigned int compat_elf_hwcap2 __read_mostly;
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
|
||||
+struct screen_info screen_info;
|
||||
+#endif
|
||||
+
|
||||
static const char *cpu_name;
|
||||
static const char *machine_name;
|
||||
phys_addr_t __fdt_pointer __initdata;
|
||||
|
Loading…
Reference in a new issue