Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moto X Style (Pure) Support #102

Open
NekoNoor opened this issue Mar 30, 2017 · 11 comments
Open

Moto X Style (Pure) Support #102

NekoNoor opened this issue Mar 30, 2017 · 11 comments

Comments

@NekoNoor
Copy link

NekoNoor commented Mar 30, 2017

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
Copy link
Member

M1cha commented Mar 30, 2017

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
Copy link
Author

NekoNoor commented Mar 30, 2017

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

@M1cha
Copy link
Member

M1cha commented Mar 30, 2017

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

@NekoNoor
Copy link
Author

1440x2560

@M1cha
Copy link
Member

M1cha commented Mar 30, 2017

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

@NekoNoor
Copy link
Author

NekoNoor commented Mar 30, 2017

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
Copy link
Author

NekoNoor commented Mar 30, 2017

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
Copy link
Member

M1cha commented Mar 31, 2017

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
Copy link
Author

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
Copy link
Author

NekoNoor commented Mar 31, 2017

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

@NekoNoor
Copy link
Author

NekoNoor commented Apr 3, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants