i.MX6SL Kernel Entry Point

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

i.MX6SL Kernel Entry Point

Jump to solution
4,071 Views
kvb
Contributor III

I've got a custom board based around the i.MX6SoloLite EVK and am trying to build linux kernel 3.0.35 using LTIB.  I have build the kernel successfully and loaded it onto the board via tftp.  When I try to boot the kernel I get the following:

=> run bootcmd_mmc

mmc0(part 0) is current device

MMC read: dev # 0, block # 2048, count 8192 ... 8192 blocks read: OK

## Booting kernel from Legacy Image at 80800000 ...

   Image Name:   Linux-3.0.35-2666-gbdde708

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    3585076 Bytes = 3.4 MiB

   Load Address: 10008000

   Entry Point:  10008000

   Verifying Checksum ...

Then the board resets back into U-Boot.  I've got a custom U-Boot build for our board that is NOT build using LTIB.  Clearly the 'Load Address' and the 'Entry Point' are not correct for the i.MX6SL processor.  Are these configured in LTIB?  I've not been able to find where I can define this addresses.  Any advice?

Labels (2)
Tags (3)
0 Kudos
1 Solution
2,802 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

This issue can be closed

View solution in original post

0 Kudos
10 Replies
2,803 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

This issue can be closed

0 Kudos
2,804 Views
fabio_estevam
NXP Employee
NXP Employee

The kernel should be generated with the correct LOADADDR:

make -j4 uImage LOADADDR=0x80008000

Also, if you use U-boot 2014.04 the default kernel type is zImage, which makes things a bit easier.

0 Kudos
2,804 Views
kvb
Contributor III

Hello FabioEstevam

Thanks for the reply.

The kernel should be generated with the correct LOADADDR:

make -j4 uImage LOADADDR=0x80008000

Is this something that is not done by LTIB?  Do you know of settings in LTIB which I can modify to the LOADADDR?  Or is this something that I have to do outside of LTIB?  Seems odd that I would have to regenerate the uImage since LTIB generates one for me already.

Also, if you use U-boot 2014.04 the default kernel type is zImage, which makes things a bit easier.

I think an upgrade is in the future, but for now I'm stuck using the 2013.10 version.

Thanks for your help!

0 Kudos
2,804 Views
LeonardoSandova
Specialist I

Hi Kevin,

I believe it can be done on LTIB, but I have not done it trough it (take a look at ./config/platform/imx/kernel-3.0.35.spec.in, you may add there the %Install body).

Leo

0 Kudos
2,804 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Kevin,

Sorry, but I don't use LTIB and I build the kernel manually.

Regards,

Fabio Estevam

0 Kudos
2,804 Views
LeonardoSandova
Specialist I

?This is done in U-boot. Try setting the correct value into the loadaddr variable.

Leo

0 Kudos
2,804 Views
kvb
Contributor III

Hi Leo,

I *thought* I did that...

=> print

baudrate=115200

bootfile=uImage

ethact=FEC

ethaddr=12:34:56:78:9a:bc

ethprime=FEC

ipaddr=192.168.1.123

loadaddr=80800000

serverip=192.168.1.105

stderr=serial

stdin=serial

stdout=serial

Is this not what you mean?

0 Kudos
2,804 Views
LeonardoSandova
Specialist I

Yes, that is what I meant. For some reason, u-boot is not constructing bootargs based on that variable. Make sure there are not fixed values on this process.

Leo

0 Kudos
2,804 Views
kvb
Contributor III

LeonardoSandovalGonzalez,

Do you know if LTIB provides a means to override the configuration for the Load Address and Entry Point contained in the header of a uImage?  If it does, can you provide some direction as to where one can find it?  If not, can you provide a manual method to override these settings?

Thanks,

Kevin

0 Kudos
2,804 Views
kvb
Contributor III

It looks to me like the header on the kernel image contains the entry-point and the load-address...U-Boot appears to look these items up from the header of the image file.  I'm using the uImage file created from LTIB...perhaps I need to use the zImage?  I'm not completely sure the differences...

(from the u-boot-imx source code common/image.c in function image_print_contents)

printf("%sLoad Address: %08x\n", p, image_get_load(hdr));

  printf("%sEntry Point:  %08x\n", p, image_get_ep(hdr));

I do not see anywhere in the source that has that address hardcoded.  FWIW here's my boot command for booting from mmc (all these are in environment variables):

bootargs=root=/dev/mmcblk0p1 rootwait rw max17135:pass=2,vcom=-2030000 video=mxcepdcfb:E060SCM,bpp=16

bootargs_base=setenv bootargs console=ttymxc0,115200

bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootwait rw max17135:pass=2,vcom=-2030000 video=mxcepdcfb:E060SCM,bpp=16

bootcmd_mmc=run bootargs_base bootargs_mmc;mmc dev 0;mmc read ${loadaddr} 800 2000; bootm

bootcmd=run bootcmd_mmc

**note that all of the above was from the i.MX6SoloLite EVK Linux Users Guide and I don't expect it fully work, but I do expect it to load the kernel; I expect the kernel to crash elsewhere

then while running U-Boot I type:  run bootcmd.


It does appear that in the bootcmd_mmc env variable, the expression ${loadaddr} is being expanded properly because it is loading the contents of the mmc to that address.

So do you know how the header of the uImage file is generated?  Is this LTIB's doing? 

0 Kudos