Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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,
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
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
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...
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.