Skip to content
Advertisement

How to examine and debug Yocto’s bootloader on i.MX6Q?

I am building a trusted execution environment on IMX6Q with a Linux Yocto version in the untrusted processor mode. When I switch to non-secure for the first time after reset to load the linux kernel, I get flooded with data and prefetch abort exceptions after I jump to the kernels bootloader.It also seems like, that those exceptions occur as soon as the MMU is switched on.

Booting the Kernel without changing to non-secure state works fine.

Is it possible, that the control bits of the non-secure copy of the first-stage page tables are written with the NS-Bit cleared which causes the MMU to refuse any access to those regions ?

Where can I find the startup code that is setting up the page tables in the Yocto-BSP for IMX6Q ?

How can I debug the Linux Bootloader?

Is it possible to simply change source code of the bootloader in the build-directory of the BSP and rebuild the image?

Thanks in advance,

Paul

Advertisement

Answer

How can I debug the Linux Bootloader?

Yes, you can with beautiful printf/puts… BTW if you want to really debug with jtag in early stages of uboot you can refer to this NXP forum post

Is it possible to simply change source code of the bootloader in the build-directory of the BSP and rebuild the image?

You can easily work with the git directory of u-boot in your workbuild/tmp/work/.. dir

  1. Modify what you need
  2. compile it with bitbake -f -c compile u-boot-imx
  3. Deploy it with bitbake -f -c deploy u-boot-imx

At the end your new u-boot will be placed in usual workbuild/tmp/deploy/images/...

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement