Difference between revisions of "Honor 9 Lite (huawei-leland)"

From postmarketOS
Jump to navigation Jump to search
(→‎Links: aa13q's aports initial fork)
Line 53: Line 53:
 
#:<syntaxhighlight lang="shell-session">
 
#:<syntaxhighlight lang="shell-session">
 
$ # copy created boot image to current directory  
 
$ # copy created boot image to current directory  
$ cp ~/.local/var/pmbootstrap/chroot_rootfs_huawei-leland/boot/boot.img-huawei-leland .
 
 
$ # extract the created boot.img
 
$ mkdir pmos-boot-huawei-leland
 
$ unpackbootimg -i boot.img-huawei-leland -o pmos-boot-huawei-leland/
 
 
$ # copy created boot image to current directory
 
 
$ cp ~/.local/var/pmbootstrap/chroot_rootfs_huawei-leland/boot/boot.img-huawei-leland .
 
$ cp ~/.local/var/pmbootstrap/chroot_rootfs_huawei-leland/boot/boot.img-huawei-leland .
  
Line 75: Line 68:
 
#:<syntaxhighlight lang="shell-session">
 
#:<syntaxhighlight lang="shell-session">
 
$ # kernel (with empty.file size is 0):
 
$ # kernel (with empty.file size is 0):
$ mkbootimg.py --kernel pmos-boot-huawei-leland/boot.img-huawei-leland-zImage --ramdisk empty.file --cmdline 'loglevel=4 initcall_debug=y page_tracker=on slub_min_objects=16 unmovable_isolate1=2:192M,3:224M,4:256M printktimer=0xfff0a000,0x534,0x538 androidboot.selinux=enforcing buildvariant=user' --base 0x0 --kernel_offset 524288 --ramdisk_offset 130023424 --second_offset 15728640 --tags_offset 0x7a00000 --os_version 8.0.0 --os_patch_level 2018-12 -o pmos-leland.kernel.img
+
$ mkbootimg.py --kernel pmos-boot-huawei-leland/boot.img-huawei-leland-zImage --ramdisk empty.file --cmdline 'loglevel=4 coherent_pool=512K page_tracker=on slub_min_objects=12 unmovable_isolate1=2:192M,3:224M,4:256M printktimer=0xfff0a000,0x534,0x538 androidboot.selinux=enforcing buildvariant=user' --base 0x00478000 --kernel_offset 0x00008000 --ramdisk_offset 0x07b88000 --second_offset 0x00e88000 --tags_offset 0x07988000  --os_version 8.0.0 --os_patch_level 2018-12 --pagesize 2048 -o pmos-leland.kernel.img
 
</syntaxhighlight>
 
</syntaxhighlight>
 
# Flash ramdisk and kernel with fastboot:
 
# Flash ramdisk and kernel with fastboot:

Revision as of 19:02, 18 February 2019

Huawei Honor 9 Lite
Honor 9 Lite with framebuffer and usb net working
Honor 9 Lite with framebuffer and usb net working
Manufacturer Huawei
Name Honor 9 Lite
Codename huawei-leland
Released 2017
Category testing
Original software Android 8 Oreo (EMUI 8.0)
Hardware
Chipset Kirin 650 Series Chipset
CPU HiSilicon Kirin 659 (Cortex-A53)
GPU ARM Mali-T830 MP2
Display PS LCD capacitive touchscreen, 16M colors; 5.65 inches; 1080 x 2160 pixels; 18:9 ratio (~428 ppi density)
Storage 64 GB, 4 GB RAM or 32 GB, 3/4 GB RAM; microSD, up to 256 GB (uses SIM 2 slot)
Memory 4096
Architecture aarch64
Features
USB Networking
Works
Flashing
Broken
Touchscreen
Display
Works
WiFi
Xwayland
FDE
Mainline
Broken
Battery
3D Acceleration
Accelerometer
Audio
Bluetooth
Camera
GPS
Mobile data
SMS
Calls
USB OTG
NFC
Ir TX



Contributors

Maintainer(s)

How to enter flash mode

With power off, press power und volume-down at the same time, with the usb-cable plugged in.

How to flash

As Huawei changed the partition layout, there is no boot partition anymore. Instead there is a ramdisk and a seperate kernel partition. In order to create the correct images the following steps need to be done:

  1. Get mkbootimg and unpackbootimg i.e. from here.
  2. You can extract the kernel-image and ramdisk from the created boot.img with unpackbootimg.
    $ # copy created boot image to current directory 
    $ cp ~/.local/var/pmbootstrap/chroot_rootfs_huawei-leland/boot/boot.img-huawei-leland .
    
    $ # extract the created boot.img
    $ mkdir pmos-boot-huawei-leland
    $ unpackbootimg -i boot.img-huawei-leland -o pmos-boot-huawei-leland/
    
    Use the extracted files in the following steps.
  3. Create ramdisk image:
    $ # create new ramdisk image with empty kernel (empty.file size is 0) 
    $ ./android-unpackbootimg/mkbootimg.py --kernel empty.file --ramdisk pmos-boot-huawei-leland/boot.img-huawei-leland-ramdisk.gz --cmdline 'buildvariant=user' --os_version 8.0.0 --os_patch_level 2018-06-05 -o pmos-leland.ramdisk.img
    
  4. Create kernel image:
    $ # kernel (with empty.file size is 0):
    $ mkbootimg.py --kernel pmos-boot-huawei-leland/boot.img-huawei-leland-zImage --ramdisk empty.file --cmdline 'loglevel=4 coherent_pool=512K page_tracker=on slub_min_objects=12 unmovable_isolate1=2:192M,3:224M,4:256M printktimer=0xfff0a000,0x534,0x538 androidboot.selinux=enforcing buildvariant=user' --base 0x00478000 --kernel_offset 0x00008000 --ramdisk_offset 0x07b88000 --second_offset 0x00e88000 --tags_offset 0x07988000   --os_version 8.0.0 --os_patch_level 2018-12 --pagesize 2048 -o pmos-leland.kernel.img
    
  5. Flash ramdisk and kernel with fastboot:
    $ fastboot flash kernel pmos-leland.kernel.img 
    $ fastboot flash ramdisk pmos-leland.ramdisk.img
    

Additional Kernel Configuration

OASES

About

OASES stands for Open Adaptive Security Extensions. Its a Tradmark of Baidu and seems to have something todo with adaptive kernel live-patching. For now there were no disadvantages from disabling it.

Location in menu

-> Device Drivers
   -> Huawei Platform Drivers
      -> Huawei platform drivers support (HUAWEI_PLATFORM [=y]) 

In Order to compile the kernel OASES had to be disabled.

Additional Info

The display brightness can be set by writing a value between 0 and 9960 to /sys/class/leds/lcd_backlight0/brightness.

$ sudo -i
# echo 1024 > /sys/class/leds/lcd_backlight0/brightness

Links