huawei-alice: new device (MR 1306)
This commit is contained in:
parent
8e080015d7
commit
34297845c1
8 changed files with 3700 additions and 0 deletions
22
device/testing/device-huawei-alice/APKBUILD
Normal file
22
device/testing/device-huawei-alice/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-huawei-alice
|
||||||
|
pkgdesc="Huawei P8 Lite"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="postmarketos-base linux-huawei-alice mkbootimg mesa-dri-gallium msm-fb-refresher"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
source="deviceinfo"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="46f59ceedfba290257bc35001f2e28253012807f7556e7a7270d137cfe047566a1d02d3bf27f6c7dbeba866a9cfaae0cc2416576828d3600693894fd306c4245 deviceinfo"
|
31
device/testing/device-huawei-alice/deviceinfo
Normal file
31
device/testing/device-huawei-alice/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="Huawei P8 Lite"
|
||||||
|
deviceinfo_manufacturer="Huawei"
|
||||||
|
deviceinfo_codename="huawei-alice"
|
||||||
|
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="720"
|
||||||
|
deviceinfo_screen_height="1280"
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="fastboot"
|
||||||
|
deviceinfo_kernel_cmdline="console=tty1 enforcing=0 hisi_dma_print=0 vmalloc=384M maxcpus=8 coherent_pool=512K no_irq_affinity ate_enable=true androidboot.selinux=permissive buildvariant=userdebug"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="false"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
deviceinfo_flash_offset_base="0x07478000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x07b88000"
|
||||||
|
deviceinfo_flash_offset_second="0x00f00000"
|
||||||
|
deviceinfo_flash_offset_tags="0x02988000"
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
33
device/testing/linux-huawei-alice/01_fix_types_include.patch
Normal file
33
device/testing/linux-huawei-alice/01_fix_types_include.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
tools/include/tools/be_byteshift.h:5:10: fatal error: linux/types.h: No such file or directory
|
||||||
|
diff --git a/tools/include/tools/be_byteshift.h b/tools/include/tools/be_byteshift.h
|
||||||
|
index dbc6f1e3..cd041f3d 100644
|
||||||
|
--- a/tools/include/tools/be_byteshift.h
|
||||||
|
+++ b/tools/include/tools/be_byteshift.h
|
||||||
|
@@ -1,11 +1,7 @@
|
||||||
|
#ifndef _TOOLS_BE_BYTESHIFT_H
|
||||||
|
#define _TOOLS_BE_BYTESHIFT_H
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
-#include <linux/types.h>
|
||||||
|
-#else
|
||||||
|
#include "linux_types.h"
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
static inline __u16 __get_unaligned_be16(const __u8 *p)
|
||||||
|
{
|
||||||
|
diff --git a/tools/include/tools/le_byteshift.h b/tools/include/tools/le_byteshift.h
|
||||||
|
index 56d0af0a..0badd9b3 100644
|
||||||
|
--- a/tools/include/tools/le_byteshift.h
|
||||||
|
+++ b/tools/include/tools/le_byteshift.h
|
||||||
|
@@ -1,11 +1,7 @@
|
||||||
|
#ifndef _TOOLS_LE_BYTESHIFT_H
|
||||||
|
#define _TOOLS_LE_BYTESHIFT_H
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
-#include <linux/types.h>
|
||||||
|
-#else
|
||||||
|
#include "linux_types.h"
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
static inline __u16 __get_unaligned_le16(const __u8 *p)
|
||||||
|
{
|
|
@ -0,0 +1,21 @@
|
||||||
|
/home/pmos/build/src/android_kernel_huawei_alice-1ecb135f6/net/core/sock.c: In function 'sock_setbindtodevice':
|
||||||
|
/home/pmos/build/src/android_kernel_huawei_alice-1ecb135f6/net/core/sock.c:578:61: error: 'AID_INET' undeclared (first use in this function); did you mean 'AF_INET'?
|
||||||
|
578 | if (!ns_capable(net->user_ns, CAP_NET_RAW) && !in_egroup_p(AID_INET))
|
||||||
|
| ^~~~~~~~
|
||||||
|
| AF_INET
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/net/core/sock.c b/net/core/sock.c
|
||||||
|
index c7f705a0..35019d80 100644
|
||||||
|
--- a/net/core/sock.c
|
||||||
|
+++ b/net/core/sock.c
|
||||||
|
@@ -575,7 +575,7 @@ static int sock_setbindtodevice(struct sock *sk, char __user *optval,
|
||||||
|
/* < DTS2015012106130 guoxiaojie 00276951 2015.01.22
|
||||||
|
double cell concurrent download feature */
|
||||||
|
ret = -EPERM;
|
||||||
|
- if (!ns_capable(net->user_ns, CAP_NET_RAW) && !in_egroup_p(AID_INET))
|
||||||
|
+ if (!ns_capable(net->user_ns, CAP_NET_RAW))
|
||||||
|
goto out;
|
||||||
|
/* DTS2015012106130 guoxiaojie 00276951 2015.01.22
|
||||||
|
double cell concurrent download feature > */
|
40
device/testing/linux-huawei-alice/03_fix_get_ro_secure.patch
Normal file
40
device/testing/linux-huawei-alice/03_fix_get_ro_secure.patch
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
Fixes kernel panic on get_ro_secure function.
|
||||||
|
|
||||||
|
diff --git a/fs/proc/dcheck_root.c b/fs/proc/dcheck_root.c
|
||||||
|
index 483cdb20..5507546f 100755
|
||||||
|
--- a/fs/proc/dcheck_root.c
|
||||||
|
+++ b/fs/proc/dcheck_root.c
|
||||||
|
@@ -94,33 +94,6 @@ static int is_recorded(int action_type)
|
||||||
|
static int get_ro_secure(void)
|
||||||
|
{
|
||||||
|
int ro_secue = 0;
|
||||||
|
- int ret = 0;
|
||||||
|
- mm_segment_t old_fs;
|
||||||
|
- char buf_line[LOG_LINE_LEN];
|
||||||
|
- struct file *filp = NULL;
|
||||||
|
- loff_t pos=0;
|
||||||
|
- int i = 0;
|
||||||
|
-
|
||||||
|
- filp = filp_open(DEFAULT_PROP_FILE, O_RDONLY, 0644);
|
||||||
|
- if(NULL == filp){
|
||||||
|
- printk(KERN_WARNING "DEFAULT_PROP_FILE OPEN FAIL!\n");
|
||||||
|
- ro_secue = 1;
|
||||||
|
- return ro_secue;
|
||||||
|
- }
|
||||||
|
- old_fs = get_fs();
|
||||||
|
- set_fs(KERNEL_DS);
|
||||||
|
-
|
||||||
|
- while( (filp->f_inode->i_size-LOG_LINE_LEN*i) > 0 ){
|
||||||
|
- memset(buf_line, 0, LOG_LINE_LEN);
|
||||||
|
- ret = filp->f_op->read(filp, buf_line, LOG_LINE_LEN, &pos);
|
||||||
|
- if(strstr(buf_line,"ro.secure=1")){
|
||||||
|
- ro_secue = 1;
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- i++;
|
||||||
|
- }
|
||||||
|
- set_fs(old_fs);
|
||||||
|
- filp_close(filp,NULL);
|
||||||
|
return ro_secue;
|
||||||
|
}
|
||||||
|
static int umh_exec_ckrt( void )
|
|
@ -0,0 +1,32 @@
|
||||||
|
diff --git a/drivers/huawei_platform/connectivity/hisi/hisiwifi/Makefile b/drivers/huawei_platform/connectivity/hisi/hisiwifi/Makefile
|
||||||
|
index c4961e6f..e0301abb 100755
|
||||||
|
--- a/drivers/huawei_platform/connectivity/hisi/hisiwifi/Makefile
|
||||||
|
+++ b/drivers/huawei_platform/connectivity/hisi/hisiwifi/Makefile
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
#Makefile for Hisilicon Wi-Fi Chip Hi1101
|
||||||
|
|
||||||
|
-CFLAGS =
|
||||||
|
-
|
||||||
|
EXTRA_CFLAGS = $(CFLAGS) \
|
||||||
|
-DARP_OFFLOAD_SUPPORT \
|
||||||
|
-D__ROAM__ \
|
||||||
|
@@ -15,7 +13,6 @@ EXTRA_CFLAGS += -DWMM_OPT_FOR_AUTH
|
||||||
|
EXTRA_CFLAGS += -DHCC_DEBUG
|
||||||
|
|
||||||
|
#change wanrings to error,must warning clean!
|
||||||
|
-EXTRA_CFLAGS += -Werror
|
||||||
|
|
||||||
|
#android4.2 cross-compile support module must add the follow options!
|
||||||
|
#EXTRA_CFLAGS += -DMODULE -fno-pic
|
||||||
|
diff --git a/drivers/huawei_platform/connectivity/hisi/hw-pm/Makefile b/drivers/huawei_platform/connectivity/hisi/hw-pm/Makefile
|
||||||
|
index c646ce24..5bb9f7d8 100755
|
||||||
|
--- a/drivers/huawei_platform/connectivity/hisi/hw-pm/Makefile
|
||||||
|
+++ b/drivers/huawei_platform/connectivity/hisi/hw-pm/Makefile
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
#Makefile for Hisilicon Wi-Fi Chip Hi1101
|
||||||
|
|
||||||
|
-CFLAGS =
|
||||||
|
-
|
||||||
|
EXTRA_CFLAGS = $(CFLAGS) \
|
||||||
|
-DHi110X_VERSION_ROM \
|
||||||
|
|
58
device/testing/linux-huawei-alice/APKBUILD
Normal file
58
device/testing/linux-huawei-alice/APKBUILD
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm64/configs/alice.defconfig)
|
||||||
|
|
||||||
|
pkgname=linux-huawei-alice
|
||||||
|
pkgver=3.10.108
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Huawei P8 Lite kernel fork"
|
||||||
|
arch="aarch64"
|
||||||
|
_carch="arm64"
|
||||||
|
_flavor="huawei-alice"
|
||||||
|
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 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="android_kernel_huawei_alice"
|
||||||
|
_commit="0f650cf363b7911523ec5f11aebcdfa5abc55007"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/DarkJoker360/$_repository/archive/$_commit.tar.gz
|
||||||
|
01_fix_types_include.patch
|
||||||
|
02_fix_undeclared_AID_INET.patch
|
||||||
|
03_fix_get_ro_secure.patch
|
||||||
|
04_fix_hisiwifi_makefiles.patch
|
||||||
|
$_config
|
||||||
|
"
|
||||||
|
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="0432f760efbf0ac64a51e0ad229b2c3a3400ca8e0b7be04fce81b352482d980b7ae89ccfab445bbfa0c9be23691049b1de94d5523677e955c98afbc0eef84de1 linux-huawei-alice-0f650cf363b7911523ec5f11aebcdfa5abc55007.tar.gz
|
||||||
|
1c05b67b1dd8e42f7c26ce5d48d3194ce4e123b420643ce1f207e1b40b2e45134e280b78369633b9bfa2871b5cde6221f5083fa00b21fd252d1b85018ee3994d 01_fix_types_include.patch
|
||||||
|
33599989d5088bb58bcbebe1b33f324fca130fac7f4938e848c07abafb119af9cebf94ef4acf786b5e43e9199a8200aa216a4238a0331d426861651204aea8c8 02_fix_undeclared_AID_INET.patch
|
||||||
|
11e2825cec9fde87241b43993b956872c6686c5c76acef0332867c14fb3b6c4d64dc1d54d8dc6edb1e3375fd2369918912598a413f279a885f253630a658a4c6 03_fix_get_ro_secure.patch
|
||||||
|
2a7f487903a7f97ae50acb42a35096d688b51285f62e36ce0a70110539ffb6b116cb9cf1796d6332fe78c1a2ff597ece2ffa551428e92610c97ef635d52c57fb 04_fix_hisiwifi_makefiles.patch
|
||||||
|
da3efc16ae2045d59aa9d0ef19e0779c305e51a103172ee1adb226c37cf4a3c2170bfd3b39cfc5d1bab79a2290a5b907717b224bdbaa8285cca18eb6e61b1b6b config-huawei-alice.aarch64"
|
3463
device/testing/linux-huawei-alice/config-huawei-alice.aarch64
Normal file
3463
device/testing/linux-huawei-alice/config-huawei-alice.aarch64
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue