Hi Briefly, I have a custom board based on imx8mq processors and only have the board schematic and block diagram. So Id like to build my own android 13 distribution. Here is the android user guide I followed https://www.nxp.com/docs/en/user-guide/ANDROID_USERS_GUIDE.pdf , I got some good progress but it is not enough to have a working image file. So I started customizing the u-boot, kernel image etc. by referencing evk_8mq board (/home/ubuhdd/android_build/device/nxp/imx8m/evk_8mq ) but I stuck and spinning for a while and really need to get some guide to build android for a custom board from the beginning stage, but i couldn't find any up to date instruction. My board seems significantly different than evk_8mq board. So, Where I can start? I dont know. Please guide me how can I have a working android 13 image for my custom board, Let me share something about the progress I got so far. 1. This is my board's Block diagram,
and here is the log file I think shows my current progress:
17:42:43.484
17:42:45.929 U-Boot SPL 2022.04-gefd021be08-dirty (Jul 16 2023 - 17:27:40 +0100)
17:42:45.937 power_bd71837_init
17:42:45.937 set buck8 to 1.2v for DDR4
17:42:45.937 DDRINFO: start DRAM init
17:42:45.953 DDRINFO: DRAM rate 2400MTS
17:42:46.539 DDRINFO:ddrphy calibration done
17:42:46.539 DDRINFO: ddrmix config done
17:42:46.586 Normal Boot
17:42:46.586 Trying to boot from MMC1
17:42:46.932
17:42:46.932
17:42:46.932 U-Boot 2022.04-gefd021be08-dirty (Jul 16 2023 - 17:27:40 +0100)
17:42:46.938
17:42:46.938 CPU: i.MX8MQ rev2.1 1500 MHz (running at 1000 MHz)
17:42:46.953 CPU: Commercial temperature grade (0C to 95C) at 26C
17:42:47.113 Reset cause: POR
17:42:47.113 Model: Zafer Android 13
17:42:47.113 DRAM: 2 GiB
17:42:47.242 Core: 56 devices, 18 uclasses, devicetree: separate
17:42:47.242 MMC: FSL_SDHC: 0
17:42:47.257 Loading Environment from MMC... *** Warning - bad CRC, using default environment
17:42:47.283
17:42:47.283 Loading Environment from nowhere... OK
17:42:47.294 [*]-Video Link 0fail to find display device
17:42:47.299 probe video device failed, ret -19
17:42:47.299
17:42:47.299 [0] display-controller@32e00000, video
17:42:47.306 fail to find display device
17:42:47.306 probe video device failed, ret -19
17:42:47.311 In: serial
17:42:47.311 Out: serial
17:42:47.318 Err: serial
17:42:47.318
17:42:47.318 BuildInfo:
17:42:47.318 - ATF 2a68527
17:42:47.318
17:42:47.318 flash target is MMC:0
17:42:47.364 Net:
17:42:47.379 Warning: ethernet@30be0000 (eth0) using random MAC address - 7e:be:56:94:27:bc
17:42:47.390 eth0: ethernet@30be0000
17:42:47.390 Fastboot: Normal
17:42:47.406 Normal Boot
17:42:47.406 Hit any key to stop autoboot: 2 1 0
17:42:49.406 In boota get fastboot lock status error. Set lock status
17:42:49.414 Magic is incorrect.
17:42:49.414 Error validating A/B metadata from disk. Resetting and writing new A/B metadata to disk.
17:42:52.871 Writing A/B metadata to disk.
17:42:52.871 verify OK, boot 'boot_a'
17:42:53.380 Kernel load addr 0x40480000 size 21444 KiB
17:42:53.380 kernel @ 40480000 (42401792)
17:42:53.388 ramdisk @ 44680000 (22676311)
17:42:53.388 fdt @ 42e70400 (2934)
17:42:53.393 Moving Image from 0x40480000 to 0x40600000, end=42e70000
17:42:53.659 ## Flattened Device Tree blob at 42e70400
17:42:53.659 Booting using the fdt blob at 0x42e70400
17:42:53.664 Using Device Tree in place at 0000000042e70400, end 0000000042e73f75
17:42:53.672 fail to find display device
17:42:53.677 probe video device failed, ret -19
17:42:53.677
17:42:53.677 Starting kernel ...
17:42:53.693
17:42:53.747 [ 0.000000][ T0] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
17:42:53.753 [ 0.000000][ T0] Linux version 5.15.74-dirty (ubuhdd@ubuhdd) (Android (8508608, based on r450784e) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6), LLD 14.0.7) #7 SMP PREEMPT Mon Jul 3 02:05:18 IST 2023
17:42:53.774 [ 0.000000][ T0] Stack Depot is disabled
17:42:53.780 [ 0.000000][ T0] earlycon: ec_imx6q0 at MMIO 0x0000000030860000 (options '115200')
17:42:53.790 [ 0.000000][ T0] printk: bootconsole [ec_imx6q0] enabled
17:42:53.796 [ 0.000000][ T0] efi: UEFI not found.
17:42:53.796 [ 0.000000][ T0] Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
17:42:53.807 [ 0.000000][ T0] Modules linked in:
17:42:53.812 [ 0.000000][ T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.74-dirty #7
17:42:53.817 [ 0.000000][ T0] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
17:42:53.823 [ 0.000000][ T0] pc : __create_pgd_mapping+0x2c8/0xb10
17:42:53.828 [ 0.000000][ T0] lr : __create_pgd_mapping+0x17c/0xb10
17:42:53.834 [ 0.000000][ T0] sp : ffff80000a5a3c30
17:42:53.839 [ 0.000000][ T0] x29: ffff80000a5a3d30 x28: ffd7fffffffff77f x27: fffffbfffda37000
17:42:53.844 [ 0.000000][ T0] x26: ffff80000a7d4000 x25: 0040000000000001 x24: 0040000000000783
17:42:53.855 [ 0.000000][ T0] x23: 0068000000000703 x22: 0050000000000783 x21: ffd7fffffffff763
17:42:53.861 [ 0.000000][ T0] x20: ffff80000a7d4000 x19: 0000000000000000 x18: ffff80000a5be1b8
17:42:53.872 [ 0.000000][ T0] x17: 00000000015a1000 x16: 0000000042e72080 x15: 0000000044680000
17:42:53.877 [ 0.000000][ T0] x14: 0000000000000000 x13: 0040000000000001 x12: ffff800008010000
17:42:53.888 [ 0.000000][ T0] x11: ffff8000091d0000 x10: ffff800008010000 x9 : ffff8000091cffff
17:42:53.893 [ 0.000000][ T0] x8 : ffff800048010000 x7 : 0000000000000000 x6 : 000000000000003f
17:42:53.904 [ 0.000000][ T0] x5 : 00000fffbfffda39 x4 : ffff80000a7d6000 x3 : ffff80000a7d6000
17:42:53.910 [ 0.000000][ T0] x2 : fffffbfffda37000 x1 : 100000003ffff003 x0 : fffffbfffda36800
17:42:53.920 [ 0.000000][ T0] Call trace:
17:42:53.920 [ 0.000000][ T0] __create_pgd_mapping+0x2c8/0xb10
17:42:53.926 [ 0.000000][ T0] map_kernel_segment+0x6c/0xe4
17:42:53.931 [ 0.000000][ T0] map_kernel+0x88/0x1cc
17:42:53.937 [ 0.000000][ T0] paging_init+0x70/0xf0
17:42:53.937 [ 0.000000][ T0] setup_arch+0x134/0x210
17:42:53.942 [ 0.000000][ T0] start_kernel+0x80/0x4bc
17:42:53.947 [ 0.000000][ T0] __primary_switched+0xc0/0x7b88
17:42:53.953 [ 0.000000][ T0] Code: 54003580 aa0a03ec 52a80008 8b080148 (c8dfff6a)
17:42:53.958 [ 0.000000][ T0] ---[ end trace eeca25ab42df67c3 ]---
17:42:53.964 [ 0.000000][ T0] Kernel panic - not syncing: synchronous external abort: Fatal exception
17:42:53.974 [ 0.000000][ T0] Reboot failed -- System halted
either we can go through the my log file or any instruction for beginners to port android 13 on a custom board
Thank you, Kind regards!
Hi @Harvey021 thanks for your reply and suggestion, but I tried and couldn't achieve it on that way, because I don't know what I need to change/customize on evk board files for my board. I am looking for some light on how I can customize that evk device for my custom board.
Do you know any other device based on IMX8MQ with ddr4 and HDMI output, I may compare the evk and that custom device, and make a list all the changes, so then, I can apply the all changes to my board. It is important to have that custom board is built with android 13.
Thank you, Kind regards
About DDR4, please refer to uboot-imx/board/freescale/imx8mq_val at lf_v2022.04 · nxp-imx/uboot-imx · GitHub.
From the error log, you might also need to care about the DDR stress test.
Best regards
Harvey
What do you think about this display issue? Any suggestion to fix it?
17:42:47.294 [*]-Video Link 0fail to find display device
17:42:47.299 probe video device failed, ret -19
17:42:47.299
17:42:47.299 [0] display-controller@32e00000, video
17:42:47.306 fail to find display device
17:42:47.306 probe video device failed, ret -19
Hi @Tooght
I don't know such a guide.
My suggest will be like to tune android source code of i.MX8MQ EVK for customized board. build it as i.MX8MQ EVK board, then build result is for your customized board.
Best regards
Harvey