huawei-frd: new device (MR 2247)
Based on downstream Android 7.0 kernel source from Huawei. 02_fix_undeclared_AUD_INET.patch is from huawei-alice USB Networking, Touchscreen, USB OTG and Display work in xfce4. Wifi just needs firmware, audio is broken. Other parts haven't been tested yet.
This commit is contained in:
parent
b6330fa704
commit
5566adf660
8 changed files with 4782 additions and 0 deletions
30
device/testing/device-huawei-frd/APKBUILD
Normal file
30
device/testing/device-huawei-frd/APKBUILD
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-huawei-frd
|
||||||
|
pkgdesc="Huawei Honor 8"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="
|
||||||
|
linux-huawei-frd
|
||||||
|
mesa-dri-gallium
|
||||||
|
mkbootimg
|
||||||
|
msm-fb-refresher
|
||||||
|
postmarketos-base
|
||||||
|
"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
source="deviceinfo"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
b8842985b9134181d857b943642f032cd9e72c5cd60b2a7082a0e4893023bc0082f67bf44cb810c898ab184d9d138bb2ac76aa8affb4d5ab78e83b5c81a8c5b6 deviceinfo
|
||||||
|
"
|
33
device/testing/device-huawei-frd/deviceinfo
Normal file
33
device/testing/device-huawei-frd/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="Huawei Honor 8"
|
||||||
|
deviceinfo_manufacturer="Huawei"
|
||||||
|
deviceinfo_codename="huawei-frd"
|
||||||
|
deviceinfo_year="2016"
|
||||||
|
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="loglevel=4 page_tracker=on slub_min_objects=12 unmovable_isolate1=2:192M,3:224M,4:256M androidboot.selinux=enforcing"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="false"
|
||||||
|
deviceinfo_bootimg_mtk_mkimage="false"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
deviceinfo_flash_offset_base="0x00478000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x07b88000"
|
||||||
|
deviceinfo_flash_offset_second="0x00e88000"
|
||||||
|
deviceinfo_flash_offset_tags="0x07588000"
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
|
@ -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 > */
|
61
device/testing/linux-huawei-frd/APKBUILD
Normal file
61
device/testing/linux-huawei-frd/APKBUILD
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm64/configs/merge_hi3650_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-huawei-frd
|
||||||
|
pkgver=4.1.18
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Huawei Honor 8 kernel fork"
|
||||||
|
arch="aarch64"
|
||||||
|
_carch="arm64"
|
||||||
|
_flavor="huawei-frd"
|
||||||
|
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="android_kernel_huawei_frd"
|
||||||
|
_commit="b339c4b748cfceba3b52e8e91b64b2136a4cef8a"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://gitlab.com/Sandelinos/$_repository/-/archive/7.0/$_repository-7.0.tar.gz?sha=$_commit
|
||||||
|
$_config
|
||||||
|
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||||
|
gcc8-fix-put-user.patch
|
||||||
|
gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
01_fix_undeclared_AID_INET.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/$_repository-7.0"
|
||||||
|
_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="
|
||||||
|
3ef907f743ac82e3b713845bb49a298a1e86f37b5ac4dc6a8b968845d9273a80a4fea98fd07e564b4a7166e834f652f820f583fe77d82d48fb1ebc7c4045f408 linux-huawei-frd-b339c4b748cfceba3b52e8e91b64b2136a4cef8a.tar.gz
|
||||||
|
781ad150a92bfe59418a957a7aefda3b9721ffd50b7bf46905393541b46b1932c395cc1ad8438e072552f138a6d961c9b96d0305ad8fec3f204c4b850e43eecf config-huawei-frd.aarch64
|
||||||
|
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||||
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||||
|
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
33599989d5088bb58bcbebe1b33f324fca130fac7f4938e848c07abafb119af9cebf94ef4acf786b5e43e9199a8200aa216a4238a0331d426861651204aea8c8 01_fix_undeclared_AID_INET.patch
|
||||||
|
"
|
4634
device/testing/linux-huawei-frd/config-huawei-frd.aarch64
Normal file
4634
device/testing/linux-huawei-frd/config-huawei-frd.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
|
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/testing/linux-huawei-frd/gcc8-fix-put-user.patch
Symbolic link
1
device/testing/linux-huawei-frd/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
Loading…
Reference in a new issue