LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-30-2005, 10:39 PM   #1
abirami
Member
 
Registered: Aug 2004
Posts: 47

Rep: Reputation: 15
not able to port zImage to the hitachi processor


Hi all

i am trying to port zImage to the hitachi processor board
using redboot as the boot loader
i have a doubt

once i compile th kernel, i get vmlinux and zImage

when i give the following command
#file vmlinux
the output shows that the file belongs to hitachi processor
but if i give
#file zImage
the output is some corrupted data
what does this mean , i want to know whether i haven't built the zimage properly, or the cross tool chain is not proper,

can anyone tell what is the problem

thanx in advance
 
Old 03-31-2005, 06:35 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hi,

for a x86 kernel, file zImage give "x86 boot sector" 'cause file command references file type with magic number. These number can be found in /usr/share/file/magic. And I think that "sh boot sector" has an unknown magic number, that's why you got "data" as output.
Now the real problem is to know why you get a "corrupt data" answer... But if you are sure that your toolchain was correcrly built, the problem may come from "file" magic numbers

Note: have you tried to boot your kernel ???

Oliv'
 
Old 03-31-2005, 10:33 PM   #3
abirami
Member
 
Registered: Aug 2004
Posts: 47

Original Poster
Rep: Reputation: 15
thanx oliv for ur response
i don't think its related with magic number my exact doubt
is
if i give the command

#file vmlinux

OUTPUT is

vmlinux: ELF 32-bit LSB executable, Hitachi SH, version 1 (SYSV), sELŠSdēü1} linked, not stripped

for the command

#file zImage

OUTPUT is
arch/sh/boot/zImage: Linux kernel bzImage data, version 2a,22xr8÷2å

why is the difference in the output with the zimage

actually what iam doing is trying to port linux on to the hitachi processor, we ported redboot loader to the board successfully, now i have to port zImage, i built the zImage
but after loading to the board and trying to execute using go command i get some ascii values
that's y i had a doubt with the zImage
i am not able to analyse the exact problem
can u help me
 
Old 04-01-2005, 09:17 AM   #4
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
I'm not sure I can help you as my knowledge about sh arch are quite limited
So what cross compile environnement do you use. I mean just a toolchain, or a toolchain in chroot environnement (typical examples are sandbox or scratchbox).
As I don't know your board, I may ask stupid questions like: do you use official kernel sources for sh arch or modified one's...???
if you are sure of your vmlinux file... it probably comes from your "objcopy" executable which generates a corrupted zImage.
Note it may also come from your linker (ld): see /usr/src/linux/arch/sh/boot/compressed/vmlinux file type...

Last edited by Oliv'; 04-01-2005 at 09:22 AM.
 
Old 04-03-2005, 11:11 PM   #5
abirami
Member
 
Registered: Aug 2004
Posts: 47

Original Poster
Rep: Reputation: 15
i got the toolchain from the net itself, i tried with the toolchain by me also, but the result was same
i used linux-2.4.18, 2.4.28, 2.6.11, everything has the same result
you are right, zImage is from objcopy of vmlinux
and i also saw the file type of /usr/src/linux/arch/sh/boot/compressed/vmlinux
the output is

arch/sh/boot/compressed/vmlinux: ELF 32-bit LSB executable, Hitachi SH, version 1 (SYSV), statically linked, not stripped
i don't know why this doesn't happen with zImage
 
Old 04-04-2005, 06:32 AM   #6
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
here is some doc which may help you:
http://linuxsh.sourceforge.net/cgi-b...tting_20source to get a sure kernel sh patched
http://linuxsh.free.fr/faq/FAQ.html about sh kernel
http://linuxsh.sourceforge.net/docs.php3 various docs

see also when you compile your kernel if it always uses cross compile tools to create zImage

Oliv'
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to convert zImage to zImage.srec abirami Linux - Software 0 03-06-2005 11:35 PM
What is the different between vmlinux and zImage? alice95089 Linux - Software 1 02-21-2005 02:10 AM
Installing Linux on a dual processor machine (only one processor detected) rocordial Linux - Hardware 1 11-27-2004 02:16 AM
xinetd 100% utilization on one processor on a two processor system red hat 9 garnold Linux - General 0 02-02-2004 01:47 PM
make zImage error ffang Linux - Newbie 5 11-20-2003 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration