AnsweredAssumed Answered

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

Question asked by Amit Vitekar on Jan 18, 2019
Latest reply on Apr 13, 2019 by Amit Vitekar
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.

Outcomes