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 2014 support #105

Closed
chengyuhui opened this issue Apr 3, 2017 · 23 comments
Closed

Moto X 2014 support #105

chengyuhui opened this issue Apr 3, 2017 · 23 comments

Comments

@chengyuhui
Copy link

LK builds fine, but the device is not recognized on the computer when booting lk.img

conifg.ini

[variables]
DEVICE_NAME = Moto X 2014
LK_TARGET = msm8974
LK_BASE = 0x80208000
LK_SOURCE = qcom/LA.BF64
BOOTIMG_BASE = 0x80200000
BOOTIMG_PAGESIZE = 2048
BOOTIMG_ADDITIONAL_ARGS =  --ramdisk_offset 0x02000000 --tags_offset 0x01e00000
LCD_DENSITY = 424
BOOTIMG_DT_COMPRESSION = lz4
BOOTIMG_DT = $(DEVICE_DIR)/dt.img

lk_inc.mk

EMMC_BOOT := 1
DISPLAY_2NDSTAGE := 1
DEFINES += WITH_2NDSTAGE_DISPLAY_DMA_TRIGGER
@feherneoh
Copy link

Something is off with your config.
Your LK_TARGET is Snapdragon 800/801, but your LK_BASE and BOOTIMG_BASE seem to be for Snapdragon S4
Try LK_BASE=0x00008000 and BOOTIMG_BASE=0x00000000

@M1cha
Copy link
Member

M1cha commented Apr 8, 2017

@feherneoh he's using the initial config which uses the linux addr. but you're right, some devices don't like booting from there.

@chengyuhui
Copy link
Author

Still nothing.. Both with and without DEFINES += WITH_2NDSTAGE_DISPLAY_DMA_TRIGGER

@feherneoh
Copy link

@micha I know, but still, the address is invalid.
SD800/801 uses 0x00000000 for bootimage, 0x00008000 for Linux.
0x80200000 and 0x80208000 are used by msm8960, msm8930, apq8064 and similar SoCs.

So it's not about using Linux or LK address, it's about using addresses of another SoC

@feherneoh
Copy link

Additional info: this phone has 2GB of RAM, so those addresses are outside of the available range
0x80000000 > 0x00000000-0x7FFFFFFF

@chengyuhui
Copy link
Author

After checking in kernel source

CMDLINE="console=ttyHSL0,115200,n8 androidboot.hardware=bacon user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.selinux=permissive"
BASE="0x00000000"
PAGESIZE="2048"
RAMDISK_OFFSET="0x02000000"
TAGS_OFFSET="0x01e00000"

@feherneoh
Copy link

That means I was right, and you are using invalid addresses. Did you create the config manually instead of using create_device?

@chengyuhui
Copy link
Author

create_device.

@feherneoh
Copy link

Fix the addresses manually, then do an "rm -rf out" and build again

@chengyuhui
Copy link
Author

Now I can boot into UEFI GUI but no ROM or recovery is shown (long press power button and select “Reboot to recovery" boots into the ROM)

@M1cha
Copy link
Member

M1cha commented Apr 22, 2017

that's normal, just continue following the porting guide

@chengyuhui
Copy link
Author

Now I have flashed the uefi_boot.img into my device.
But how can I continue with only "Fastboot" and "Reboot" options?

@z3ntu
Copy link
Contributor

z3ntu commented Apr 22, 2017

@chengyuhui
Copy link
Author

sc
Internal OS and TWRP is recognized, bot not booting.

@chengyuhui
Copy link
Author

And it gives me

[1] harry@arch-vm> diffatags atags                                                                                                                                                 
Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /memory/secure_region has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /memory/adsp_region has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /memory/qsecom_region has a reg or ranges property, but no unit name
FATAL ERROR: Couldn't open "/home/harry/efidroid/out/target/motorola/victara/lk_kernel/dtbpatched_out/*.dtb": No such file or directory

when trying to compare FDT patches

@chengyuhui
Copy link
Author

boot.zip contains the boot.img in case you need it.

@M1cha
Copy link
Member

M1cha commented Apr 22, 2017

for build/:

diff --git a/tools/diffatags b/tools/diffatags
index 2a1dd99f7..b9f18696f 100755
--- a/tools/diffatags
+++ b/tools/diffatags
@@ -15,9 +15,9 @@
 # limitations under the License.
 
 DTSOUT="$1"
-DTBPATCHOUT="$TOP/out/target/$EFIDROID_DEVICEID/lk_kernel/dtbpatched_out"
+DTBPATCHOUT="$TOP/out/device/$EFIDROID_DEVICEID/lk_kernel/dtbpatched_out"
 if [ -f "$DTBPATCHOUT" ];then
-    DTBPATCHOUT="$TOP/out/target/$EFIDROID_DEVICEID/lk_kernel/fdtpatched_out"
+    DTBPATCHOUT="$TOP/out/device/$EFIDROID_DEVICEID/lk_kernel/fdtpatched_out"
 fi
 
 set -e

@chengyuhui
Copy link
Author

result;

Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /memory/secure_region has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /memory/adsp_region has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /memory/qsecom_region has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/qcom,smp2p-modem has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/qcom,smp2p-adsp has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/qcom,smp2p-wcnss has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/rmtfs_sharedmem has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/dsp_sharedmem has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/mdm_sharedmem has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/sound has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/qcom,spmi@fc4c0000/qcom,pm8841@5/qcom,krait-regulator-pmic@2000 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /soc/qcom,avtimer has a reg or ranges property, but no unit name
Warning (unit_address_vs_reg): Node /soc/qcom,lpm-levels/qcom,cpu-modes/qcom,cpu-mode@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /soc/qcom,lpm-levels/qcom,cpu-modes/qcom,cpu-mode@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /soc/qcom,lpm-levels/qcom,cpu-modes/qcom,cpu-mode@2 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /soc/qcom,lpm-levels/qcom,cpu-modes/qcom,cpu-mode@3 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /soc/qcom,lpm-levels/qcom,system-modes/qcom,system-mode@0 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /soc/qcom,lpm-levels/qcom,system-modes/qcom,system-mode@1 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /soc/i2c@f9966000 has a unit name, but no reg property
Warning (unit_address_vs_reg): Node /soc/ti,c55-ctrl has a reg or ranges property, but no unit name

@chengyuhui
Copy link
Author

chengyuhui commented Apr 22, 2017

I'm wondering if it's about LOKI (after looking in other issues)

Kernel source: https://github.com/MoKee/android_kernel_motorola_victara_retcn

@M1cha
Copy link
Member

M1cha commented Apr 22, 2017

your log is perfectly fine now. the warnings are normal.
and LOKI is not yet supported.

@chengyuhui
Copy link
Author

Any thoughts on the error message in screenshot?

@chengyuhui
Copy link
Author

chengyuhui commented Apr 26, 2017 via email

@chengyuhui
Copy link
Author

chengyuhui commented May 4, 2017 via email

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

4 participants