Loading custom kernel and u-boot over JTAG on imx28.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Loading custom kernel and u-boot over JTAG on imx28.

2,251 Views
rootb3r
Contributor II
My goal here is to load a custom kernel and initramfs into the memory of the wink hub 1 based on imx28 board and boot it using the bootm command from u-boot shell i.e. directly from the memory.
I'm using Buildroot 2014.05 & Buildroot 2018.11 for building the u-boot, kernel & Initramfs.
So, I downloaded the u-boot 2014.01 source code and built it from scratch using the patch provided here then I downloaded the latest buildroot and build the kernel and root file system along with initramfs for the imx28 board.
Using JTAG I'm able to load the u-boot at 0x40000100, kernel at 0x42000000 and initramfs at 0x42300000 but when
I pass these addresses into the u-boot and hit bootm the kernel hangs and nothing happens...
This is the output when trying to load the kernel manually from a memory address nothing happens after decompression.
=> bootm 42000000 42300000
## Booting kernel from Legacy Image at 42000000 ...
Image Name: Linux-2.6.35.3-flex-dvt
Created: 2014-04-30 3:15:35 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1928460 Bytes = 1.8 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 42300000 ...
Image Name: Root Filesystem
Created: 2019-01-12 14:23:44 UTC
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 893637 Bytes = 872.7 KiB
Load Address: 40800000
Entry Point: 40800000
Verifying Checksum ... OK
Loading Kernel Image ... OK
 
Starting kernel ...
 

After this nothing happens.

I've checked the /include/configs/mx28evk.h for the addresses and everything seems right.
The problems I think might be:--
1. The kernel is not decompressing and booting up I've tried building the stock kernel version of Linux-2.6.35.3 and also the latest kernel for the board Linux-4.17.8  but none of them seems to boot only the kernel present in the NAND memory boots after hitting boot command from U-boot shell.
2. The UART console changes to some other UART port after the Kernel decompresses my current configuration in U-boot env is this console-fsl=ttyAM0 and  console-mainline=ttyAMA0.

3. The kernel is configured to direct output to some other UART port which I'm unable to find in the kernel configuration.
Possible Solution tried:--
1. Tried building the Kernel, U-boot & RFS on the old version of Buildroot 2014.05(This is the version used to build the stock one present in the NAND memory) and  Buildroot 2018.11 but none of them seems to work.
2. Tried building the U-boot 2018.11 manually by mimicking settings of the 2014.01 but the u-boot hangs on initializing the DRAM(don't know the reason why).
What I feel is the problem with UART console that after Kernel loads it redirects the output to some other console that I'm unable to locate.

Pls, help this is my project to load the bootloader, kernel & initramfs into the RAM and boot them.
Thanks.
Labels (2)
0 Kudos
Reply
3 Replies

1,646 Views
rootb3r
Contributor II

I have solved the problem.

I had enabled low level debugging and had redirected all printk's to Embedded ICE so it would not show any output on the UART console. 

[ ] Kernel low-level debugging functions 
      [ ] Early printk (NEW)
      [ ] Kernel low-level debugging via EmbeddedICE DCC channel (NEW)

keep it un selected as above.

Regards,
Amit.

0 Kudos
Reply

1,646 Views
igorpadykov
NXP Employee
NXP Employee

Hi r00t

nxp does not support running i.MX28 uboot/linux from jtag, this can be posted

on kernel mail list. Basic usage jtag with i.MX28 can be found on

How to use the jtag on the i.mx28* 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,646 Views
rootb3r
Contributor II

I've successfully loaded custom u-boot and kernel into RAM over JTAG also I've managed to run the kernel now but it panics as it can't find init in the initramfs. I'm using the stock uImage of the kernel made by developers of the product but they haven't linked initramfs to the kernel while compiling the kernel and so it panics.

Also, I've tried building the kernel of the same version using the same GCC ARM toolchain with initramfs linked but I'm stuck at the above error.

0 Kudos
Reply