Hi NXP,
I want to change switch uart4 to A53 and change debug console from uart2 to uart1.
I have referenced these two pages:
https://community.nxp.com/t5/Blogs/How-to-Change-i-MX8MM-evk-Linux-Debug-UART/ba-p/1243938#M40
https://community.nxp.com/t5/i-MX-Processors/IMX8MP-EVK-Change-u-boot-debug-console-UART2-gt-UART1/m...
I follow the patch in link above to modify in, except
+++ rel_imx_5.4.70_2.3.0_uart4/imx-atf/plat/imx/imx8m/imx8mm/include/platform_def.h 2021-03-10 16:57:07.299870347 +0800
Environments:
SW: SDK 5.10.72_2.2.0
HW: imx8mp evk
Build SDK 5.10.72_2.2.0 with core image
$ bitbake core-image-base
Build SDK and install toolcahin
$ bitbake meta-toolchain
Copy imx-atf, u-boot-imx, imx-boot, linux-imx from SDK to outside for building standalone.
For u-boot:
I modify imx-atf and u-boot-imx as attached patch files and build standalone with command:
$ source /opt/fsl-imx-xwayland/5.10-hardknott/environment-setup-cortexa53-crypto-poky-linux
1. build imx-atf
$ unset LDFLAGS
$ make PLAT=imx8mp bl31
2. build u-boot
$ export ARCH=arm64
$ make clean
$ make imx8mp_evk_defconfig
$ unset LDFLAGS
$ make
3. copy files to imx-boot
$ cp imx-atf/build/imx8mp/release/bl31.bin imx-boot/iMX8M
$ cp u-boot-imx/u-boot-nodtb.bin imx-boot/iMX8M
$ cp u-boot-imx/arch/arm/dts/imx8mp-evk.dtb imx-boot/iMX8M
$ cp u-boot-imx/spl/u-boot-spl.bin imx-boot/iMX8M
4. build imx-boot to generate flash.bin
$ export ARCH=arm64
$ make SOC=iMX8MP flash_spl_uboot
5. write flash.bin in sdcard
To write release image in sdcard with uuu first, then write flash.bin with dd command.
$ sudo dd if=imx-boot/iMX8M/flash.bin of=/dev/sdb bs=1k seek=32 conv=sync
For kernel:
I modify linux-imx as attached patch file and build standalone with command:
$ source /opt/fsl-imx-xwayland/5.10-hardknott/environment-setup-cortexa53-crypto-poky-linux
1. build kernel
$ export ARCH=arm64
$ make clean
$ make imx_v8_defconfig
$ make
2. replace Image and dtb in boot partition of sdcard
$ sudo cp linux-imx/arch/arm64/boot/Image /media/<user>/boot
$ sudo cp linux-imx/arch/arm64/boot/dts/freescale/imx8mp-evk.dtb /media/<user>/boot
$ sudo umount /media/<user>/boot
$ sudo umount /media/<user>/root
Finally boot from sdcard:
Connect debug port with micro-usb cable to PC.
Launch four terminals for those four COM ports.
It should boot successfully becase I can see the login terminal in uart1 after power on for a while.
However, I cannot see any debug messages in all the four COM ports.
What cound I miss?
Please help me to make it work correctly.
Best Regards,
hi,
Hello,
The only change that you have done differently may be causing this, could you share which version of imx-atf are you using?
In 5.4.70_2.3.0 it is indeed defined at plat/imx/imx8m/imx8mp/include/platform_def.h
https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/imx8mp/include/platform_def.h...
Best regards,
Aldo.