* Re: ADS860 - unable to load kernel- Bad magic number
[not found] <Iq959772845498.03218@webmail1.inner-21cn.com>
@ 2004-02-26 17:24 ` Bob Beck
2004-02-27 16:32 ` Marius Groeger
0 siblings, 1 reply; 13+ messages in thread
From: Bob Beck @ 2004-02-26 17:24 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: m.venkatraj
On Fri, 2004-02-27 at 21:45, li wrote:
>
> which kernel image did you download into the target via tftp?
> vmlinux.gz is just gzip version of vmlinux Here i downloaded
> zImage.embedded, which has the following features: ELF 32-bit MSB
> executable, PowerPC or cisco 4500, version 1 (SYSV), staticlly linked,
> not stripped. then, with the offset 0x10000 from loadaddr, the kernel
> is up.
What is the difference between vmlinux and zImage.embedded ?
Bob
> > I am a linux-newbie working on a parallel track on the MPC 860, on
> > a ADS board. I am facing difficulty in getting the kernel to load.
> > This is what I have done so far:
> >
> > - built a cross-toolchain using Dan Kegel's crosstool.
> > - built u-boot-1.0.1 and flashed it to the board using BDI2000
> > - built linus-2.4.22, (with the below mentioned patch on last attempt).
> >
> > The compilation goes through fine, I get "vmlinux" on the top-dir,
> > and also a vmlinux.gz in the arch/ppc/boot/images if I do a "make
> > zImage".
> >
> > When I configure bootp, and bootup the board, u-boot comes up fine,
> > the tftp download of the kernel image goes through fine too. Then I
> > am stuck with a "Bad Magic Number". Some initial digup led me to a
> > mismatched image header magic number.
> >
> > Could anyone please help me with how to go ahead? Am I missing
> > something?
> >
> > Also thanks to everyone whose postings on this and other lists
> > helped me get started!
> >
> > -----Original Message-----
> > From: Xavier Miville [mailto:xmiville@oerlikon.ca]
> > Sent: Thursday, February 26, 2004 9:58 PM
> > Subject: RE: PCI daughter card with USB on a 405GP
> >
> > You will need to apply the corresponding linuxppc patch
> > (/pub/linux/kernel/ports/ppc/2.4) to 2.4.22. The zvmlinux doesn't seem
> > to be built with only 2.4.22.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ADS860 - unable to load kernel- Bad magic number
2004-02-27 16:32 ` Marius Groeger
@ 2004-02-26 22:22 ` Bob Beck
2004-02-27 17:29 ` Marius Groeger
0 siblings, 1 reply; 13+ messages in thread
From: Bob Beck @ 2004-02-26 22:22 UTC (permalink / raw)
To: mgroeger; +Cc: linuxppc-embedded
On Sat, 2004-02-28 at 06:32, Marius Groeger wrote:
> On Thu, 27 Feb 2004, Bob Beck wrote:
>
> > What is the difference between vmlinux and zImage.embedded ?
>
> vmlinux is the plain kernel ELF image. You can use it to analyse the kernel
> code or symbols, but you cannot boot it as-is.
>
> zImage.embedded is the compressed kernel image plus some glue code used as a
> bridge between the firmware and the kernel.
>
On my proprietary board (PPC 603). I do not have access to flash
so I am loading vmlinux into RAM and jumping to 0x10000. It is
running into problems in mmu_off.
Should I be loading zImage.embedded instead ?
Bob
I can see
> Regards,
> Marius
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ADS860 - unable to load kernel- Bad magic number
2004-02-27 17:29 ` Marius Groeger
@ 2004-02-26 22:38 ` Bob Beck
2004-02-27 19:32 ` Dan Malek
0 siblings, 1 reply; 13+ messages in thread
From: Bob Beck @ 2004-02-26 22:38 UTC (permalink / raw)
To: mgroeger; +Cc: linuxppc-embedded
On Sat, 2004-02-28 at 07:29, Marius Groeger wrote:
> On Thu, 27 Feb 2004, Bob Beck wrote:
>
> > On Sat, 2004-02-28 at 06:32, Marius Groeger wrote:
> > > On Thu, 27 Feb 2004, Bob Beck wrote:
> > >
> > > > What is the difference between vmlinux and zImage.embedded ?
> > >
> > > vmlinux is the plain kernel ELF image. You can use it to analyse the kernel
> > > code or symbols, but you cannot boot it as-is.
> > >
> > > zImage.embedded is the compressed kernel image plus some glue code used as a
> > > bridge between the firmware and the kernel.
> > >
> >
> > On my proprietary board (PPC 603). I do not have access to flash
> > so I am loading vmlinux into RAM and jumping to 0x10000. It is
> > running into problems in mmu_off.
> >
> > Should I be loading zImage.embedded instead ?
>
> Yes you can try that, but then you will have to modify the code in
> arch/ppc/boot/... to match the specifics of your board.
>
> Another popular way to go is to port u-boot to your platform first.
> U-boot accepts kernel pImages which you get by doing a "make pImage"
> in the kernel source dir.
>
> You will have to know your tools and hardware quite well either way,
> be prepared to learn a lot.
>
> Good Luck,
> Marius
Thanks. What is the difference between zImage.embedded and vmlinux.gz
generated by the kernel build ?
This is the file used by U-Boot's mkImage command to produce a
vmlinux.img file.
Bob
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ADS860 - unable to load kernel- Bad magic number
2004-02-27 19:32 ` Dan Malek
@ 2004-02-27 1:32 ` Bob Beck
2004-02-27 21:05 ` Dan Malek
0 siblings, 1 reply; 13+ messages in thread
From: Bob Beck @ 2004-02-27 1:32 UTC (permalink / raw)
To: dan; +Cc: mgroeger, linuxppc-embedded
On Sat, 2004-02-28 at 09:32, Dan Malek wrote:
> Bob Beck wrote:
>
> > Thanks. What is the difference between zImage.embedded and vmlinux.gz
> > generated by the kernel build ?
>
> Huge. The vmlinux.gz is just the gzipped kernel. The zImage contains
> the 'bootloader' code that can perform some processor initialization,
> uncompresses the vmlinux.gz, locates it properly in memory, sets initial
> registers, then jumps to the start of the kernel.
Does this mean I should put zImage.embedded into 1 place in memory,
vmlinux.gz into a different place in memory and jump to the start of
zImage.embedded ?
Currently, we are not using U-Boot. We load the binaries into RAM
using a hand rolled program and jump to 0x10000.
Bob
>
> > This is the file used by U-Boot's mkImage command to produce a
> > vmlinux.img file.
>
> If you are building for u-boot, you should 'make uImage' and use
> the uImage that is created.
>
>
> -- Dan
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* ADS860 - unable to load kernel- Bad magic number
@ 2004-02-27 4:34 m.venkatraj
2004-02-27 4:45 ` John Zhou
2004-02-27 8:07 ` song sam
0 siblings, 2 replies; 13+ messages in thread
From: m.venkatraj @ 2004-02-27 4:34 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
I am a linux-newbie working on a parallel track on the MPC 860, on a ADS
board. I am facing difficulty in getting the kernel to load. This is what I
have done so far:
- built a cross-toolchain using Dan Kegel's crosstool.
- built u-boot-1.0.1 and flashed it to the board using BDI2000
- built linus-2.4.22, (with the below mentioned patch on last attempt).
The compilation goes through fine, I get "vmlinux" on the top-dir, and also
a vmlinux.gz in the arch/ppc/boot/images if I do a "make zImage".
When I configure bootp, and bootup the board, u-boot comes up fine, the tftp
download of the kernel image goes through fine too. Then I am stuck with a
"Bad Magic Number". Some initial digup led me to a mismatched image header
magic number.
Could anyone please help me with how to go ahead? Am I missing something?
Also thanks to everyone whose postings on this and other lists helped me get
started!
Venkatraj M.
Tektronix.
-----Original Message-----
From: Xavier Miville [mailto:xmiville@oerlikon.ca]
Sent: Thursday, February 26, 2004 9:58 PM
To: Sudeep, V
Cc: samsongshzu@yahoo.com.cn; wd@denx.de; mporter@kernel.crashing.org;
laurent.mohin@acterna.com; linuxppc-embedded@lists.linuxppc.org
Subject: RE: PCI daughter card with USB on a 405GP
You will need to apply the corresponding linuxppc patch
(/pub/linux/kernel/ports/ppc/2.4) to 2.4.22. The zvmlinux doesn't seem
to be built with only 2.4.22.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: ADS860 - unable to load kernel- Bad magic number
2004-02-27 4:34 ADS860 - unable to load kernel- Bad magic number m.venkatraj
@ 2004-02-27 4:45 ` John Zhou
2004-02-27 8:07 ` song sam
1 sibling, 0 replies; 13+ messages in thread
From: John Zhou @ 2004-02-27 4:45 UTC (permalink / raw)
To: m.venkatraj, linuxppc-embedded
(1) you can seenv verify=n, then boot image. if it is OK, then the
length of image when you burned into flash is short for several bytes.
(2) you'd better take a look at doc of www.denx.de/...
good luck for you!
-----Original Message-----
From: m.venkatraj@exgate.tek.com
Sent: Friday, February 27, 2004 12:35 PM
Subject: ADS860 - unable to load kernel- Bad magic number
I am a linux-newbie working on a parallel track on the MPC 860, on a ADS
board. I am facing difficulty in getting the kernel to load. This is
what I have done so far:
- built a cross-toolchain using Dan Kegel's crosstool.
- built u-boot-1.0.1 and flashed it to the board using BDI2000
- built linus-2.4.22, (with the below mentioned patch on last attempt).
The compilation goes through fine, I get "vmlinux" on the top-dir, and
also a vmlinux.gz in the arch/ppc/boot/images if I do a "make zImage".
When I configure bootp, and bootup the board, u-boot comes up fine, the
tftp download of the kernel image goes through fine too. Then I am stuck
with a "Bad Magic Number". Some initial digup led me to a mismatched
image header magic number.
Could anyone please help me with how to go ahead? Am I missing
something?
Also thanks to everyone whose postings on this and other lists helped me
get started!
-----Original Message-----
From: Xavier Miville [mailto:xmiville@oerlikon.ca]
Sent: Thursday, February 26, 2004 9:58 PM
Subject: RE: PCI daughter card with USB on a 405GP
You will need to apply the corresponding linuxppc patch
(/pub/linux/kernel/ports/ppc/2.4) to 2.4.22. The zvmlinux doesn't seem
to be built with only 2.4.22.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ADS860 - unable to load kernel- Bad magic number
2004-02-27 4:34 ADS860 - unable to load kernel- Bad magic number m.venkatraj
2004-02-27 4:45 ` John Zhou
@ 2004-02-27 8:07 ` song sam
1 sibling, 0 replies; 13+ messages in thread
From: song sam @ 2004-02-27 8:07 UTC (permalink / raw)
To: m.venkatraj; +Cc: linuxppc-embedded
m.venkatraj@exgate.tek.com wrote:
> The compilation goes through fine, I get "vmlinux" on the top-dir, and
> also a vmlinux.gz in the arch/ppc/boot/images if I do a "make zImage".
>
> When I configure bootp, and bootup the board, u-boot comes up fine,
> the tftp download of the kernel image goes through fine too. Then I
> am stuck with a "Bad Magic Number". Some initial digup led me to a
> mismatched image header magic number.
This is really a FAQ on U-BOOT.Note,U-BOOT can only
boot LINUX kernel and RAMDISK in its format-by mkimage
tools.You should convert vmlinux.gz as its required
format.Detailes pls see README in u-boot root
directory.Also,reading the following document
carefully is very helpful:
http://www.denx.de/twiki/bin/view/DULG/Manual
Best regards,
Sam
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: ADS860 - unable to load kernel- Bad magic number
@ 2004-02-27 8:27 Demke, Torsten
0 siblings, 0 replies; 13+ messages in thread
From: Demke, Torsten @ 2004-02-27 8:27 UTC (permalink / raw)
To: m.venkatraj, linuxppc-embedded
Hi,
when using u-boot you need an Linux image which is
created with "mkimage" tool.
Try "make uImage" which will create this
image in arch/ppc/boot/image.
See also:
(http://www.denx.de/twiki/bin/view/DULG/Manual)
Regards,
Torsten
> -----Original Message-----
> From: m.venkatraj@exgate.tek.com [mailto:m.venkatraj@exgate.tek.com]
> Sent: Freitag, 27. Februar 2004 05:35
> To: linuxppc-embedded@lists.linuxppc.org
> Subject: ADS860 - unable to load kernel- Bad magic number
>
>
>
> Hi,
>
> I am a linux-newbie working on a parallel track on the MPC
> 860, on a ADS
> board. I am facing difficulty in getting the kernel to load.
> This is what I
> have done so far:
>
> - built a cross-toolchain using Dan Kegel's crosstool.
> - built u-boot-1.0.1 and flashed it to the board using BDI2000
> - built linus-2.4.22, (with the below mentioned patch on last
> attempt).
>
> The compilation goes through fine, I get "vmlinux" on the
> top-dir, and also
> a vmlinux.gz in the arch/ppc/boot/images if I do a "make zImage".
>
> When I configure bootp, and bootup the board, u-boot comes up
> fine, the tftp
> download of the kernel image goes through fine too. Then I am
> stuck with a
> "Bad Magic Number". Some initial digup led me to a mismatched
> image header
> magic number.
>
> Could anyone please help me with how to go ahead? Am I
> missing something?
>
> Also thanks to everyone whose postings on this and other
> lists helped me get
> started!
>
> Venkatraj M.
> Tektronix.
>
> -----Original Message-----
> From: Xavier Miville [mailto:xmiville@oerlikon.ca]
> Sent: Thursday, February 26, 2004 9:58 PM
> To: Sudeep, V
> Cc: samsongshzu@yahoo.com.cn; wd@denx.de; mporter@kernel.crashing.org;
> laurent.mohin@acterna.com; linuxppc-embedded@lists.linuxppc.org
> Subject: RE: PCI daughter card with USB on a 405GP
>
>
>
> You will need to apply the corresponding linuxppc patch
> (/pub/linux/kernel/ports/ppc/2.4) to 2.4.22. The zvmlinux doesn't seem
> to be built with only 2.4.22.
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: ADS860 - unable to load kernel- Bad magic number
@ 2004-02-27 9:14 m.venkatraj
0 siblings, 0 replies; 13+ messages in thread
From: m.venkatraj @ 2004-02-27 9:14 UTC (permalink / raw)
To: Torsten.Demke, linuxppc-embedded
Thanks for all the suggestions! mkimage did the trick.
Best regards
Venkatraj
> when using u-boot you need an Linux image which is
> created with "mkimage" tool.
>
> Try "make uImage" which will create this
> image in arch/ppc/boot/image.
>
> See also:
> (http://www.denx.de/twiki/bin/view/DULG/Manual)
>
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ADS860 - unable to load kernel- Bad magic number
2004-02-26 17:24 ` Bob Beck
@ 2004-02-27 16:32 ` Marius Groeger
2004-02-26 22:22 ` Bob Beck
0 siblings, 1 reply; 13+ messages in thread
From: Marius Groeger @ 2004-02-27 16:32 UTC (permalink / raw)
To: Bob Beck; +Cc: linuxppc-embedded
On Thu, 27 Feb 2004, Bob Beck wrote:
> What is the difference between vmlinux and zImage.embedded ?
vmlinux is the plain kernel ELF image. You can use it to analyse the kernel
code or symbols, but you cannot boot it as-is.
zImage.embedded is the compressed kernel image plus some glue code used as a
bridge between the firmware and the kernel.
Regards,
Marius
--
Marius Groeger <mgroeger@sysgo.com>
Project Manager
SYSGO Real-Time Solutions AG | Embedded and Real-Time Software
Am Pfaffenstein 14
55270 Klein-Winternheim, Germany
Voice: +49-6136-9948-0 | FAX: +49-6136-9948-10
www.sysgo.com | www.elinos.com | www.osek.de
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ADS860 - unable to load kernel- Bad magic number
2004-02-26 22:22 ` Bob Beck
@ 2004-02-27 17:29 ` Marius Groeger
2004-02-26 22:38 ` Bob Beck
0 siblings, 1 reply; 13+ messages in thread
From: Marius Groeger @ 2004-02-27 17:29 UTC (permalink / raw)
To: Bob Beck; +Cc: linuxppc-embedded
On Thu, 27 Feb 2004, Bob Beck wrote:
> On Sat, 2004-02-28 at 06:32, Marius Groeger wrote:
> > On Thu, 27 Feb 2004, Bob Beck wrote:
> >
> > > What is the difference between vmlinux and zImage.embedded ?
> >
> > vmlinux is the plain kernel ELF image. You can use it to analyse the kernel
> > code or symbols, but you cannot boot it as-is.
> >
> > zImage.embedded is the compressed kernel image plus some glue code used as a
> > bridge between the firmware and the kernel.
> >
>
> On my proprietary board (PPC 603). I do not have access to flash
> so I am loading vmlinux into RAM and jumping to 0x10000. It is
> running into problems in mmu_off.
>
> Should I be loading zImage.embedded instead ?
Yes you can try that, but then you will have to modify the code in
arch/ppc/boot/... to match the specifics of your board.
Another popular way to go is to port u-boot to your platform first.
U-boot accepts kernel pImages which you get by doing a "make pImage"
in the kernel source dir.
You will have to know your tools and hardware quite well either way,
be prepared to learn a lot.
Good Luck,
Marius
--
Marius Groeger <mgroeger@sysgo.com>
Project Manager
SYSGO Real-Time Solutions AG | Embedded and Real-Time Software
Am Pfaffenstein 14
55270 Klein-Winternheim, Germany
Voice: +49-6136-9948-0 | FAX: +49-6136-9948-10
www.sysgo.com | www.elinos.com | www.osek.de
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ADS860 - unable to load kernel- Bad magic number
2004-02-26 22:38 ` Bob Beck
@ 2004-02-27 19:32 ` Dan Malek
2004-02-27 1:32 ` Bob Beck
0 siblings, 1 reply; 13+ messages in thread
From: Dan Malek @ 2004-02-27 19:32 UTC (permalink / raw)
To: Bob Beck; +Cc: mgroeger, linuxppc-embedded
Bob Beck wrote:
> Thanks. What is the difference between zImage.embedded and vmlinux.gz
> generated by the kernel build ?
Huge. The vmlinux.gz is just the gzipped kernel. The zImage contains
the 'bootloader' code that can perform some processor initialization,
uncompresses the vmlinux.gz, locates it properly in memory, sets initial
registers, then jumps to the start of the kernel.
> This is the file used by U-Boot's mkImage command to produce a
> vmlinux.img file.
If you are building for u-boot, you should 'make uImage' and use
the uImage that is created.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: ADS860 - unable to load kernel- Bad magic number
2004-02-27 1:32 ` Bob Beck
@ 2004-02-27 21:05 ` Dan Malek
0 siblings, 0 replies; 13+ messages in thread
From: Dan Malek @ 2004-02-27 21:05 UTC (permalink / raw)
To: Bob Beck; +Cc: mgroeger, linuxppc-embedded
Bob Beck wrote:
> Does this mean I should put zImage.embedded into 1 place in memory,
> vmlinux.gz into a different place in memory and jump to the start of
> zImage.embedded ?
No. zImage.embedded contains everything.
objcopy -O binary zImage.embedded zImage.bin
load zImage.bin at a high address like 4MB or above.
Jump to the first location.
You will have to update some of the files in arch/ppc/boot/simple
to create a configuration descriptor for your board. There are
plenty of examples to copy.
> Currently, we are not using U-Boot. We load the binaries into RAM
> using a hand rolled program and jump to 0x10000.
That's guaranteed not to work. Something has to initialize the
environment before the Linux kernel starts running. This is
accomplished by the boot roms (u-boot is good for this), or the
bootloader wrappers in the arch/ppc/boot directories.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-02-27 21:05 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-27 4:34 ADS860 - unable to load kernel- Bad magic number m.venkatraj
2004-02-27 4:45 ` John Zhou
2004-02-27 8:07 ` song sam
-- strict thread matches above, loose matches on Subject: below --
2004-02-27 9:14 m.venkatraj
2004-02-27 8:27 Demke, Torsten
[not found] <Iq959772845498.03218@webmail1.inner-21cn.com>
2004-02-26 17:24 ` Bob Beck
2004-02-27 16:32 ` Marius Groeger
2004-02-26 22:22 ` Bob Beck
2004-02-27 17:29 ` Marius Groeger
2004-02-26 22:38 ` Bob Beck
2004-02-27 19:32 ` Dan Malek
2004-02-27 1:32 ` Bob Beck
2004-02-27 21:05 ` Dan Malek
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).