efidroid / projectmanagement

EFIDroid Project Management
118 stars 12 forks source link

Moto X 2014 support #105

Closed kmod-midori closed 4 years ago

kmod-midori commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

kmod-midori commented 7 years ago

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

feherneoh commented 7 years ago

@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 commented 7 years ago

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

kmod-midori commented 7 years ago

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 commented 7 years ago

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

kmod-midori commented 7 years ago

create_device.

feherneoh commented 7 years ago

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

kmod-midori commented 7 years ago

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 commented 7 years ago

that's normal, just continue following the porting guide

kmod-midori commented 7 years ago

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

z3ntu commented 7 years ago

Create a ota server to use with the app. See https://github.com/efidroid/projectmanagement/wiki/%5BEFIDroid%5D-Porting-a-new-device#local-ota-server-for-using-efidroid-manager-with-a-new-device

kmod-midori commented 7 years ago

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

kmod-midori commented 7 years ago

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

kmod-midori commented 7 years ago

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

M1cha commented 7 years ago

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
kmod-midori commented 7 years ago

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
kmod-midori commented 7 years ago

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 commented 7 years ago

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

kmod-midori commented 7 years ago

Any thoughts on the error message in screenshot?

kmod-midori commented 7 years ago

After looking into device tree, I think there shouldn't be LOKI……

2017年4月22日 21:06,"Michael Zimmermann" notifications@github.com写道:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/efidroid/projectmanagement/issues/105#issuecomment-296372071, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUVaLOwl8B0B0gRA04DoidDPG6qWgLIks5ryftrgaJpZM4MxLBG .

kmod-midori commented 7 years ago

Can someone help me to examine that boot.img?

2017年4月26日 13:57,"Harry Cheng" chengyuhui1@gmail.com写道:

After looking into device tree, I think there shouldn't be LOKI……

2017年4月22日 21:06,"Michael Zimmermann" notifications@github.com写道:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/efidroid/projectmanagement/issues/105#issuecomment-296372071, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUVaLOwl8B0B0gRA04DoidDPG6qWgLIks5ryftrgaJpZM4MxLBG .