asus-x00td: new device (Asus Zenfone Max Pro M1) (MR 2973)
https://wiki.postmarketos.org/wiki/Asus_Zenfone_Max_Pro_M1_(asus-x00td) Initially ported by Alice Koul. iAboothahir: set CONFIG_DEVPTS_MULTIPLE_INSTANCES and remove empty deviceinfo_* Signed-off-by: Alice Koul <alice-koul@protonmail.com> Signed-off-by: iAboothahir <aboothahirpkd@gmail.com> [ci:skip-build] Already built once fine on CI in MR
This commit is contained in:
parent
00ede8bcf2
commit
6127af7883
5 changed files with 5597 additions and 0 deletions
22
device/testing/device-asus-x00td/APKBUILD
Normal file
22
device/testing/device-asus-x00td/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-asus-x00td
|
||||
pkgdesc="Asus ZenFone Max Pro M1"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-asus-x00td mkbootimg mesa-dri-gallium msm-fb-refresher"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="381b37d83afd97610527af7fe78058717d5a48f198c8d006b0f3461f5fc962c8c6de099d57430549d27fe17ce0a5b4848d870211066834bc49d5c468b26446f2 deviceinfo"
|
32
device/testing/device-asus-x00td/deviceinfo
Normal file
32
device/testing/device-asus-x00td/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="Asus ZenFone Max Pro M1"
|
||||
deviceinfo_manufacturer="Asus"
|
||||
deviceinfo_codename="asus-x00td"
|
||||
deviceinfo_year="2018"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="2160"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 earlycon=msm_serial_dm,0xc170000 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=1 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 buildvariant=userdebug"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_offset_base="0x00000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="4096"
|
||||
deviceinfo_flash_sparse=true
|
||||
deviceinfo_flash_fastboot_partition_vbmeta="vbmeta"
|
||||
deviceinfo_usb_rndis_function_downstream="rndis_bam.rndis"
|
||||
deviceinfo_chassis="handset"
|
50
device/testing/linux-asus-x00td/APKBUILD
Normal file
50
device/testing/linux-asus-x00td/APKBUILD
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/X00TD_defconfig
|
||||
|
||||
pkgname=linux-asus-x00td
|
||||
pkgver=4.4.223
|
||||
pkgrel=0
|
||||
pkgdesc="Asus ZenFone Max Pro M1 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="asus-x00td"
|
||||
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 (My phone refuses to boot kernel compiled with gcc and goes straight to fastboot mode)
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
# Source
|
||||
_repository="android_kernel_asus_sdm660"
|
||||
_commit="ad8e4cb1207f5bb5abbdc0cd51830bd7912d7c2d"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
fix-macro-declare_usb_function.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="84648d1f7e96bf8c14992ce315dc033a9d2f3e46d91ba12e5fdf621ba3fdc58048b9feda9197c2f8f9506a8600fa07484abd4ebcc73d1e98150b65981c4f54cf linux-asus-x00td-ad8e4cb1207f5bb5abbdc0cd51830bd7912d7c2d.tar.gz
|
||||
67612dd3513592cc8b277476f0cf88af7cdd48cdeec24e9342bbb424bb5ea44bc9a53ea7f5b7d6e3e2f77018aa8b0514004ee28e2dfc1c5326e90ba29f6556e8 config-asus-x00td.aarch64
|
||||
8b3934e3c4115e81ac40a3c8022f3134cd89133f7569557ca857b4fd514078c4898b2ba3427986936d029874903711d04d7757d5a87bcb89137073128e51e8f5 fix-macro-declare_usb_function.patch"
|
5453
device/testing/linux-asus-x00td/config-asus-x00td.aarch64
Normal file
5453
device/testing/linux-asus-x00td/config-asus-x00td.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,40 @@
|
|||
--- a/drivers/usb/gadget/function/f_fs.c
|
||||
+++ b/drivers/usb/gadget/function/f_fs.c
|
||||
@@ -4295,7 +4295,7 @@
|
||||
return data;
|
||||
}
|
||||
|
||||
-DECLARE_USB_FUNCTION_INIT(ffs, ffs_alloc_inst, ffs_alloc);
|
||||
+DECLARE_USB_FUNCTION(ffs, ffs_alloc_inst, ffs_alloc);
|
||||
|
||||
static int ffs_init(void)
|
||||
{
|
||||
@@ -4303,7 +4303,7 @@
|
||||
if (IS_ERR_OR_NULL(ffs_ipc_log))
|
||||
ffs_ipc_log = NULL;
|
||||
|
||||
- return 0;
|
||||
+ usb_function_register(&ffsusb_func);
|
||||
}
|
||||
module_init(ffs_init);
|
||||
|
||||
@@ -4327,6 +4327,8 @@
|
||||
ipc_log_context_destroy(ffs_ipc_log);
|
||||
ffs_ipc_log = NULL;
|
||||
}
|
||||
+
|
||||
+ usb_function_unregister(&ffsusb_func);
|
||||
}
|
||||
module_exit(ffs_exit);
|
||||
|
||||
--- a/drivers/usb/gadget/function/f_qc_rndis.c
|
||||
+++ b/drivers/usb/gadget/function/f_qc_rndis.c
|
||||
@@ -1528,7 +1528,7 @@
|
||||
return rndis_ipa_params.skip_ep_cfg;
|
||||
}
|
||||
|
||||
-DECLARE_USB_FUNCTION_INIT(rndis_bam, qcrndis_alloc_inst, qcrndis_alloc);
|
||||
+DECLARE_USB_FUNCTION(rndis_bam, qcrndis_alloc_inst, qcrndis_alloc);
|
||||
|
||||
static int __init usb_qcrndis_init(void)
|
||||
{
|
Loading…
Reference in a new issue