Skip to content

WIP: Huawei Honor Note 8 (edi-al10)

Administrator requested to merge add-huawei-edi-al10-attempt2 into master

WIP branch, poor quality, but maybe we could get something out of this.

I'm working on a port of pmOS to my Huawei Honor Note 8, for now I managed to build a kernel package and flash it into my device. Boot process starts, but it freezes quickly and reboots after a while, something like 90 seconds, didn't measure yet.

README_Kernel.txt states that aarch64-linux-android-4.9 was used, so I went for GCC 4.

Here is pstore/console-ramoops-0 file, as you can see, I have a lot of corrupted characters, I don't know what causes this.

https://gitlab.com/muttley/pmaports/-/raw/a899041bdba938f0302815a76c769e5a146eb8da/device/testing/device-huawei-edi-al10/pstore/console-ramoops-0

Quirks in linux-huawei-edi-al10 repository, that I found:

  • My kernel is huge in size. It's around 32 MB, which means I had to use -Os for building, because 32 MB boot partition was not enough. I'd say it's fine, but kernel from original boot.img is only 11 MB. -Os trimmed down the size to 29 MB, which was just enough to fit into the partition. What could cause that difference?
  • tools/dtc is a x86_64 binary, which is dependant on glibc. I "fixed" it by installing https://github.com/sgerrand/alpine-pkg-glibc, which is not a real fix, but allowed me to proceed further.
  • drivers/huawei_platform/oases/inlinehook_gen_off relies on GNU grep, if it's not installed then it'll cause build to fail, as it generates drivers/huawei_platform/oases/inlinehook_offset.h, which will have empty #define directives. Full call looks like this (if you run it manually, then it'll complain about unknown -b flag):
/home/pmos/build/src/linux-huawei-edi-al10-master/drivers/huawei_platform/oases/inlinehook_gen_off \
  drivers/huawei_platform/oases/inlinehook_offset.h \
  /home/pmos/build/src/linux-huawei-edi-al10-master/drivers/huawei_platform/oases/inlinehook_const.h \
  drivers/huawei_platform/oases/inlinehook_func_pre.bin \
  drivers/huawei_platform/oases/inlinehook_func_post.bin \
  drivers/huawei_platform/oases/inlinehook_subfunc_pre.bin \
  drivers/huawei_platform/oases/inlinehook_subfunc_post.bin
  • drivers/hisi/tzdriver/Makefile had hardcoded reference to aarch64-linux-android-cpp, so I changed it to gcc4-aarch64-alpine-linux-musl-cpp, how can I do it properly? I assume $(CXX) would point me to g++ and not cpp

By the way, I tried doing this few months ago and got to pretty much same point, probably not anything useful there, but here it is:

https://gitlab.com/muttley/pmaports/-/commit/4605ce6559add2a13c23def425cde9765fc5cf95

Edited by Administrator

Merge request reports

Loading