huawei-plank: new device (MR 4096)

[ci:skip-build] already built successfully in CI
This commit is contained in:
gtrxAC 2023-05-19 09:26:40 +03:00 committed by Clayton Craft
parent e388dbb57d
commit 5aa28ef117
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
10 changed files with 3983 additions and 0 deletions

View file

@ -71,6 +71,8 @@ device/*/device-samsung-klimtlte @Grimler
device/*/linux-samsung-klimtlte @Grimler
device/*/firmware-odroid-xu4 @Grimler
device/*/linux-samsung-chagallwifi @Grimler
device/*/device-huawei-plank @gtrxAC
device/*/linux-huawei-plank @gtrxAC
main/postmarketos-update-depthcharge-kernel/ @jenneron
main/osk-sdl/ @craftyguy

View file

@ -0,0 +1,28 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-huawei-plank
pkgdesc="Huawei Honor 7"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
linux-huawei-plank
mkbootimg
postmarketos-base
"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
b987d515eafaa324d9096529e6b8efbadfc2a73fe0f5e6b3626aa04cd5292386a9743ddde6f4443211ee52b3b8198157a3382c33ecbeba6baa05e0cd9bb93707 deviceinfo
"

View 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="Huawei Honor 7"
deviceinfo_manufacturer="Huawei"
deviceinfo_codename="huawei-plank"
deviceinfo_year="2015"
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="androidboot.hardware=hi3635 androidboot.selinux=permissive no_console_suspend=1 mem=3072M coherent_pool=512K mmcparts=mmcblk0:p1(vrl),p2(vrl_backup),p6(modemnvm_factory),p9(splash),p10(modemnvm_backup),p11(modemnvm_img),p12(modemnvm_system),p14(3rdmodemnvm),p15(3rdmodemnvmback),p17(modem_om),p20(modemnvm_update),p30(modem),p31(modem_dsp),p32(dfx),p33(3rdmodem) cpuidle_sysfs_switch=1"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_header_version="0"
deviceinfo_flash_offset_base="0x00678000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x07588000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0xffb88000"

View file

@ -0,0 +1,14 @@
fix undefined reference to `lifebook_detect'
diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h
index 4c4326c..e4c2453 100644
--- a/drivers/input/mouse/lifebook.h
+++ b/drivers/input/mouse/lifebook.h
@@ -19,7 +19,7 @@ int lifebook_init(struct psmouse *psmouse);
inline void lifebook_module_init(void)
{
}
-inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
+static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}

View file

@ -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 > */

View file

@ -0,0 +1,14 @@
Fix undefined reference to `fsp_detect'
diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h
index 334de19..06fc881 100644
--- a/drivers/input/mouse/sentelic.h
+++ b/drivers/input/mouse/sentelic.h
@@ -115,7 +115,7 @@ struct fsp_data {
extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
extern int fsp_init(struct psmouse *psmouse);
#else
-inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
+static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}

View file

@ -0,0 +1,67 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/merge_hi3635_defconfig
pkgname=linux-huawei-plank
pkgver=3.10.108
pkgrel=0
pkgdesc="Huawei Honor 7 kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="huawei-plank"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
findutils
flex
openssl-dev
perl
linux-headers
"
# Source
_repository="android_kernel_huawei_hi3635"
_commit="e3e70fb925e39bbcaaaf3c07e717e8d616c12672"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/skbeh/$_repository/archive/$_commit.tar.gz
$_config
gcc8-fix-put-user.patch
gcc10-extern_YYLOC_global_declaration.patch
02_fix_undeclared_AID_INET.patch
02_patch_fsp_detect.patch
01_patch_lifebook_detect.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="
6e08d2101e5a217547f68244ea9c96d146ac7ebe4b76e05258a90f9f1437b6885e16229a687e0f220709fd4ac5e3d838221014210f77de39005561a1cb3b33e9 linux-huawei-plank-e3e70fb925e39bbcaaaf3c07e717e8d616c12672.tar.gz
ae54cbe79355bb1f5f707aa9c80f991476af12ff2e4c49e550f86bcd0c0cadf2e20e271df44c861f9c354c376e775bdf93b93789a2c917e62878329df233e3cf config-huawei-plank.aarch64
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
33599989d5088bb58bcbebe1b33f324fca130fac7f4938e848c07abafb119af9cebf94ef4acf786b5e43e9199a8200aa216a4238a0331d426861651204aea8c8 02_fix_undeclared_AID_INET.patch
9da951bb0391564f33bdb0a97c339997eda7b15ec2f160da8af237cc87c233b8c3dcdc1a12759e04d69d075ae9b0afaf726101ef356e788d7f4606a03db2e248 02_patch_fsp_detect.patch
36418ec3d31d1d6d9915afcf3d38d4549aeeb49c3825414b51b67db7a1ab6482f22d2723da3b258b671956809949278a51f6507df9b0052aec0bd0c59f56919a 01_patch_lifebook_detect.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc8-fix-put-user.patch