linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* zImage works, but not vmlinux
@ 2010-05-25 15:43 f. achkar
  2010-05-25 16:54 ` Kristoffer Ericson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: f. achkar @ 2010-05-25 15:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,
I have tried to send this message some part of it was ignored, resending
sorry ...

greetings,
I'm newbie to arm linux, so pls if my issue is already addressed just
point me to that reference. I'm trying to learn, but couldn't pass the
following stage:
I have a s3c245 based board, I have a working compressed kernel image
zImage, this image boots properly via u-boot-1.1.6, however I simply
failed to load (i.e., boot vmlinux) via u-boot directly from SDRAM.

more details:

   1. I let the target boot until the message of "  Hit any key to stop
      autoboot: " for which I hit enter, (this initialized the board
      enables MMU, I-Cache, .. etc);
   2. board info as seen by u-boot
      # bdinfo
      arch_number = 0x00000648
      env_t       = 0x00000000
      boot_params = 0x30000100
      DRAM bank   = 0x00000000
      -> start    = 0x30000000
      -> size     = 0x04000000
      DRAM bank   = 0x00000001
      -> start    = 0x38000000
      -> size     = 0x04000000
      ethaddr     = ...:5B
      ip_addr     = ...200
      baudrate    = 115200 bps
   3. laod vmlinux to SDRAM :
      tftp 30008000 vmlinux
      TFTP from server ...210; our IP address is ...200
      Filename 'vmlinux'.
      Load address: 0x30008000
      Loading: T ############ .....
   4. # bootm 30008000
      ## Booting image at 30008000 ...
      Boot with Image
      do not support this address : 30008000

      Starting kernel ...

and nothing happens it probably crashed somewhere, why zImage works
while vmlinux does not?
thanks,
ferar

^ permalink raw reply	[flat|nested] 7+ messages in thread

* zImage works, but not vmlinux
  2010-05-25 15:43 zImage works, but not vmlinux f. achkar
@ 2010-05-25 16:54 ` Kristoffer Ericson
  2010-05-25 17:07   ` f. achkar
  2010-05-25 17:27 ` Seth Forshee
  2010-05-25 17:52 ` Nicolas Pitre
  2 siblings, 1 reply; 7+ messages in thread
From: Kristoffer Ericson @ 2010-05-25 16:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, May 25, 2010 at 11:43:17AM -0400, f. achkar wrote:
> Hi,
> I have tried to send this message some part of it was ignored, resending
> sorry ...
> 
> greetings,
> I'm newbie to arm linux, so pls if my issue is already addressed just
> point me to that reference. I'm trying to learn, but couldn't pass the
> following stage:
> I have a s3c245 based board, I have a working compressed kernel image
> zImage, this image boots properly via u-boot-1.1.6, however I simply
> failed to load (i.e., boot vmlinux) via u-boot directly from SDRAM.
> 
> more details:
> 
>    1. I let the target boot until the message of "  Hit any key to stop
>       autoboot: " for which I hit enter, (this initialized the board
>       enables MMU, I-Cache, .. etc);
>    2. board info as seen by u-boot
>       # bdinfo
>       arch_number = 0x00000648
>       env_t       = 0x00000000
>       boot_params = 0x30000100
>       DRAM bank   = 0x00000000
>       -> start    = 0x30000000
>       -> size     = 0x04000000
>       DRAM bank   = 0x00000001
>       -> start    = 0x38000000
>       -> size     = 0x04000000
>       ethaddr     = ...:5B
>       ip_addr     = ...200
>       baudrate    = 115200 bps
>    3. laod vmlinux to SDRAM :
>       tftp 30008000 vmlinux
>       TFTP from server ...210; our IP address is ...200
>       Filename 'vmlinux'.
>       Load address: 0x30008000
>       Loading: T ############ .....
>    4. # bootm 30008000
>       ## Booting image at 30008000 ...
>       Boot with Image
>       do not support this address : 30008000
> 
>       Starting kernel ...

Is that kernel compiled with early printk? 

> 
> and nothing happens it probably crashed somewhere, why zImage works
> while vmlinux does not?
> thanks,
> ferar
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* zImage works, but not vmlinux
  2010-05-25 16:54 ` Kristoffer Ericson
@ 2010-05-25 17:07   ` f. achkar
  2010-05-25 17:12     ` Kristoffer Ericson
  0 siblings, 1 reply; 7+ messages in thread
From: f. achkar @ 2010-05-25 17:07 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/25/2010 12:54 PM, Kristoffer Ericson wrote:
> On Tue, May 25, 2010 at 11:43:17AM -0400, f. achkar wrote:
>   
>> Hi,
>> I have tried to send this message some part of it was ignored, resending
>> sorry ...
>>
>> greetings,
>> I'm newbie to arm linux, so pls if my issue is already addressed just
>> point me to that reference. I'm trying to learn, but couldn't pass the
>> following stage:
>> I have a s3c245 based board, I have a working compressed kernel image
>> zImage, this image boots properly via u-boot-1.1.6, however I simply
>> failed to load (i.e., boot vmlinux) via u-boot directly from SDRAM.
>>
>> more details:
>>
>>    1. I let the target boot until the message of "  Hit any key to stop
>>       autoboot: " for which I hit enter, (this initialized the board
>>       enables MMU, I-Cache, .. etc);
>>    2. board info as seen by u-boot
>>       # bdinfo
>>       arch_number = 0x00000648
>>       env_t       = 0x00000000
>>       boot_params = 0x30000100
>>       DRAM bank   = 0x00000000
>>       -> start    = 0x30000000
>>       -> size     = 0x04000000
>>       DRAM bank   = 0x00000001
>>       -> start    = 0x38000000
>>       -> size     = 0x04000000
>>       ethaddr     = ...:5B
>>       ip_addr     = ...200
>>       baudrate    = 115200 bps
>>    3. laod vmlinux to SDRAM :
>>       tftp 30008000 vmlinux
>>       TFTP from server ...210; our IP address is ...200
>>       Filename 'vmlinux'.
>>       Load address: 0x30008000
>>       Loading: T ############ .....
>>    4. # bootm 30008000
>>       ## Booting image at 30008000 ...
>>       Boot with Image
>>       do not support this address : 30008000
>>
>>       Starting kernel ...
>>     
> Is that kernel compiled with early printk? 
>   
the kernel version is 2.6.21-1, and there is no early_printk support yet
for that version!
thanks
>   
>> and nothing happens it probably crashed somewhere, why zImage works
>> while vmlinux does not?
>> thanks,
>> ferar
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>     

^ permalink raw reply	[flat|nested] 7+ messages in thread

* zImage works, but not vmlinux
  2010-05-25 17:07   ` f. achkar
@ 2010-05-25 17:12     ` Kristoffer Ericson
  2010-05-25 17:30       ` f. achkar
  0 siblings, 1 reply; 7+ messages in thread
From: Kristoffer Ericson @ 2010-05-25 17:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, May 25, 2010 at 01:07:27PM -0400, f. achkar wrote:
> On 05/25/2010 12:54 PM, Kristoffer Ericson wrote:
> > On Tue, May 25, 2010 at 11:43:17AM -0400, f. achkar wrote:
> >   
> >> Hi,
> >> I have tried to send this message some part of it was ignored, resending
> >> sorry ...
> >>
> >> greetings,
> >> I'm newbie to arm linux, so pls if my issue is already addressed just
> >> point me to that reference. I'm trying to learn, but couldn't pass the
> >> following stage:
> >> I have a s3c245 based board, I have a working compressed kernel image
> >> zImage, this image boots properly via u-boot-1.1.6, however I simply
> >> failed to load (i.e., boot vmlinux) via u-boot directly from SDRAM.
> >>
> >> more details:
> >>
> >>    1. I let the target boot until the message of "  Hit any key to stop
> >>       autoboot: " for which I hit enter, (this initialized the board
> >>       enables MMU, I-Cache, .. etc);
> >>    2. board info as seen by u-boot
> >>       # bdinfo
> >>       arch_number = 0x00000648
> >>       env_t       = 0x00000000
> >>       boot_params = 0x30000100
> >>       DRAM bank   = 0x00000000
> >>       -> start    = 0x30000000
> >>       -> size     = 0x04000000
> >>       DRAM bank   = 0x00000001
> >>       -> start    = 0x38000000
> >>       -> size     = 0x04000000
> >>       ethaddr     = ...:5B
> >>       ip_addr     = ...200
> >>       baudrate    = 115200 bps
> >>    3. laod vmlinux to SDRAM :
> >>       tftp 30008000 vmlinux
> >>       TFTP from server ...210; our IP address is ...200
> >>       Filename 'vmlinux'.
> >>       Load address: 0x30008000
> >>       Loading: T ############ .....
> >>    4. # bootm 30008000
> >>       ## Booting image at 30008000 ...
> >>       Boot with Image
> >>       do not support this address : 30008000
> >>
> >>       Starting kernel ...
> >>     
> > Is that kernel compiled with early printk? 
> >   
> the kernel version is 2.6.21-1, and there is no early_printk support yet
> for that version!
> thanks

Then you should add some ascii_printk output so you get more info.
I believe its described on arm wiki.


> >   
> >> and nothing happens it probably crashed somewhere, why zImage works
> >> while vmlinux does not?
> >> thanks,
> >> ferar
> >>
> >>
> >> _______________________________________________
> >> linux-arm-kernel mailing list
> >> linux-arm-kernel at lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >>     

^ permalink raw reply	[flat|nested] 7+ messages in thread

* zImage works, but not vmlinux
  2010-05-25 15:43 zImage works, but not vmlinux f. achkar
  2010-05-25 16:54 ` Kristoffer Ericson
@ 2010-05-25 17:27 ` Seth Forshee
  2010-05-25 17:52 ` Nicolas Pitre
  2 siblings, 0 replies; 7+ messages in thread
From: Seth Forshee @ 2010-05-25 17:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, May 25, 2010 at 11:43:17AM -0400, f. achkar wrote:
> Hi,
> I have tried to send this message some part of it was ignored, resending
> sorry ...
> 
> greetings,
> I'm newbie to arm linux, so pls if my issue is already addressed just
> point me to that reference. I'm trying to learn, but couldn't pass the
> following stage:
> I have a s3c245 based board, I have a working compressed kernel image
> zImage, this image boots properly via u-boot-1.1.6, however I simply
> failed to load (i.e., boot vmlinux) via u-boot directly from SDRAM.

vmlinux is an ELF image.  When you run your boot command the bootloader
is (probably) just branching execution to the address you're supplying,
which contains ELF header data rather than executable instructions.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* zImage works, but not vmlinux
  2010-05-25 17:12     ` Kristoffer Ericson
@ 2010-05-25 17:30       ` f. achkar
  0 siblings, 0 replies; 7+ messages in thread
From: f. achkar @ 2010-05-25 17:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/25/2010 01:12 PM, Kristoffer Ericson wrote:
> On Tue, May 25, 2010 at 01:07:27PM -0400, f. achkar wrote:
>   
>> On 05/25/2010 12:54 PM, Kristoffer Ericson wrote:
>>     
>>> On Tue, May 25, 2010 at 11:43:17AM -0400, f. achkar wrote:
>>>   
>>>       
>>>> Hi,
>>>> I have tried to send this message some part of it was ignored, resending
>>>> sorry ...
>>>>
>>>> greetings,
>>>> I'm newbie to arm linux, so pls if my issue is already addressed just
>>>> point me to that reference. I'm trying to learn, but couldn't pass the
>>>> following stage:
>>>> I have a s3c245 based board, I have a working compressed kernel image
>>>> zImage, this image boots properly via u-boot-1.1.6, however I simply
>>>> failed to load (i.e., boot vmlinux) via u-boot directly from SDRAM.
>>>>
>>>> more details:
>>>>
>>>>    1. I let the target boot until the message of "  Hit any key to stop
>>>>       autoboot: " for which I hit enter, (this initialized the board
>>>>       enables MMU, I-Cache, .. etc);
>>>>    2. board info as seen by u-boot
>>>>       # bdinfo
>>>>       arch_number = 0x00000648
>>>>       env_t       = 0x00000000
>>>>       boot_params = 0x30000100
>>>>       DRAM bank   = 0x00000000
>>>>       -> start    = 0x30000000
>>>>       -> size     = 0x04000000
>>>>       DRAM bank   = 0x00000001
>>>>       -> start    = 0x38000000
>>>>       -> size     = 0x04000000
>>>>       ethaddr     = ...:5B
>>>>       ip_addr     = ...200
>>>>       baudrate    = 115200 bps
>>>>    3. laod vmlinux to SDRAM :
>>>>       tftp 30008000 vmlinux
>>>>       TFTP from server ...210; our IP address is ...200
>>>>       Filename 'vmlinux'.
>>>>       Load address: 0x30008000
>>>>       Loading: T ############ .....
>>>>    4. # bootm 30008000
>>>>       ## Booting image at 30008000 ...
>>>>       Boot with Image
>>>>       do not support this address : 30008000
>>>>
>>>>       Starting kernel ...
>>>>     
>>>>         
>>> Is that kernel compiled with early printk? 
>>>   
>>>       
>> the kernel version is 2.6.21-1, and there is no early_printk support yet
>> for that version!
>> thanks
>>     
> Then you should add some ascii_printk output so you get more info.
> I believe its described on arm wiki.
>   
thanks for your approach ... pls read on:
I have j-link jtag connected to the target board I can successfully
debug via openocd + gdb various assembly codes that controls &
configures the target hardware, however when I try the same with the
vmlinux (root directory of linux source ) things don't go as expected!
I can stepi thought the initial code of the stext
(arch/arm/kernel/head.S) as per
http://www.linux-arm.org/LinuxBootLoader/SMPBoot

however when I reach :
smp_setup_processor_id();  in main.c: kernel_start , If I do in gdb
next, the control never returns to gdb, also I don't see any output on
the serial console!

that's why I have asked on how to boot or launch that same vmlinux which
I am trying to debug from within u-boot command prompt, and which simply
as mentioned hangs immediately.
To make things clear : I'm trying to LEARN how to debug remotely via
openocd (jtag) + gdb the linux kernel on an arm926ejs based target. Note
that zImage is working just fine for the same source tree of vmlinux.
thanks
ferar

>
>   
>>>   
>>>       
>>>> and nothing happens it probably crashed somewhere, why zImage works
>>>> while vmlinux does not?
>>>> thanks,
>>>> ferar
>>>>
>>>>
>>>> _______________________________________________
>>>> linux-arm-kernel mailing list
>>>> linux-arm-kernel at lists.infradead.org
>>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>>>     
>>>>         

^ permalink raw reply	[flat|nested] 7+ messages in thread

* zImage works, but not vmlinux
  2010-05-25 15:43 zImage works, but not vmlinux f. achkar
  2010-05-25 16:54 ` Kristoffer Ericson
  2010-05-25 17:27 ` Seth Forshee
@ 2010-05-25 17:52 ` Nicolas Pitre
  2 siblings, 0 replies; 7+ messages in thread
From: Nicolas Pitre @ 2010-05-25 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 25 May 2010, f. achkar wrote:

> I'm newbie to arm linux, so pls if my issue is already addressed just
> point me to that reference. I'm trying to learn, but couldn't pass the
> following stage:
> I have a s3c245 based board, I have a working compressed kernel image
> zImage, this image boots properly via u-boot-1.1.6, however I simply
> failed to load (i.e., boot vmlinux) via u-boot directly from SDRAM.

The vmlinux file isn't a bootable kernel image.

If you want a non compressed kernel then try "make Image" and use the 
resulting Image file.  Then you'll have to load it at the appropriate 
location in RAM (usually 0x8000 from the start of physical memory), 
whereas zImage does relocate itself automatically.

Why don't you want to use zImage?  Given that you're using U-Boot you 
should probably use uImage instead anyway (from 'make uImage").


Nicolas

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-25 17:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 15:43 zImage works, but not vmlinux f. achkar
2010-05-25 16:54 ` Kristoffer Ericson
2010-05-25 17:07   ` f. achkar
2010-05-25 17:12     ` Kristoffer Ericson
2010-05-25 17:30       ` f. achkar
2010-05-25 17:27 ` Seth Forshee
2010-05-25 17:52 ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).