efidroid / projectmanagement

EFIDroid Project Management
118 stars 12 forks source link

Moto X Style (Pure) Support #102

Open NekoNoor opened 7 years ago

NekoNoor commented 7 years ago

ARCH: MSM8992 (use MSM8994 for build) OEM: Motorola Branch used to build: LA.BF64

lk.img boots with display (DEFINES += WITH_2NDSTAGE_DISPLAY_DMA_TRIGGER in lk_inc.mk) uefi_boot.img boots into system.

config.ini

[variables]
DEVICE_NAME = Moto X Style (Pure)

LK_TARGET = msm8994
LK_BASE   = 0x0f000000
LK_SOURCE = qcom/LA.BF64
EDK2_BASE = 0xde000000
EDK2_SIZE = 0x02000000

BOOTIMG_DT       = $(DEVICE_DIR)/dt.img
BOOTIMG_BASE     = 0x0
BOOTIMG_PAGESIZE = 4096
BOOTIMG_ADDITIONAL_ARGS = --ramdisk_offset 0x01000000 --tags_offset 0x00000100

LCD_DENSITY = 560
M1cha commented 7 years ago

bootloader/lk/common/shared/uefiapi/target/msm8994.c: add the following lines at the end of uefiapi_mmap_add_platform_mappings(before the return):

pdata = cb(pdata, 0x06d00000, 1*MB, LKAPI_MMAP_RANGEFLAG_RESERVED,
           LKAPI_MEMORYATTR_DEVICE, 0, LKAPI_MMAP_RANGEFLAG_UNUSED|LKAPI_MMAP_RANGEFLAG_DRAM);
NekoNoor commented 7 years ago

It works :+1: it has a graphical glitch on the bottom of the screen (the size of 1 button) edit: i found the wiki page already

M1cha commented 7 years ago

what's your screen resolution? if it's big this might help: device/X/Y/config.ini: LCD_VRAM_SIZE = 0x1000000

NekoNoor commented 7 years ago

1440x2560

M1cha commented 7 years ago

yea 1440*2560*3 = 11059200 which is bigger than 8MB, so the config.ini change should fix that

NekoNoor commented 7 years ago

I made an ota package but it can't install from the app, says failed to get ESP partition (at 50%) also, could i get access to the slack? it is hard to ask a ton of questions here and i can't find anything in the wiki.

NekoNoor commented 7 years ago

appearantly the arch is wrong but setting it to arm arm64 does not work... (it should work according to m1cha on slack)

[variables]
DEVICE_NAME = Moto X Style (Pure)

LK_TARGET = msm8994
LK_BASE   = 0x0f000000
LK_SOURCE = qcom/LA.BF64
EDK2_BASE = 0xde000000
EDK2_SIZE = 0x02000000

BOOTIMG_DT       = $(DEVICE_DIR)/dt.img
BOOTIMG_BASE     = 0x0
BOOTIMG_PAGESIZE = 4096
BOOTIMG_ADDITIONAL_ARGS = --ramdisk_offset 0x01000000 --tags_offset 0x00000100

LCD_DENSITY   = 560
LCD_VRAM_SIZE = 0x1000000

EFIDROID_TARGET_ARCH = arm arm64

edit: the buildlib.py script is wrong and doesnt even use the EFIDROID_TARGET_ARCH because it sets it to 'arm' right after. but i got it to compile

now the problem is that it says "unable to find suitable device tree for device" and "tagloader 'qcdt'(2) returned -1" when booting even though i have DEVICE_PREFER_ATAGS_HWID := 1 in my lk_inc.mk

M1cha commented 7 years ago

the buildsystem is not wrong, you are using the wrong flag, use DEVICE_ARCHITECTURES = arm arm64

did you try both with and without DEVICE_PREFER_ATAGS_HWID ? if so, post an oem lk_log.

NekoNoor commented 7 years ago

i tried both with and without DEVICE_PREFER_ATAGS_HWID and both do not boot twrp from uefi fastboot lk_log: https://gist.github.com/creeperlwd/092d5650a058470367843085b265266f

NekoNoor commented 7 years ago

update: i fastboot flashed it and now it is booting twrp and internal fine :100:

NekoNoor commented 7 years ago

Another update: on 64-bit devices TWRP does not work out of the box in multiboot roms. I am working on compiling a version of twrp for my own use