Skip to contentSkip to conversation

initramfs problem - /init file

DISCUSSION [email protected] 1 participant 1 message Feb 21, 2008 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi Dave,

I have just figured out the problem... an stupid error... By mistake I = took
the filesystem compiled to intel instead to ppc. I guess I forgot to as= sign
the right cross-compile toolchain. So the microprocessor can't execute = the
init file.

Now it works.
Anyway thank you for your time.

Ra=FAl Moreno

"David H. Lynch Jr." <[email protected]>
"David H. Lynch Jr."
21/02/2008 16:31
Por favor, responda a dhlii

                                                                       =

Para: [email protected] =

                                                                       =
cc linuxppc-embedded <[email protected]> =
                                                                       =

Asunto: Re: initramfs problem - /init file =

                                                                       =
Quoted 3 lines · [email protected] wrote:

Hello Dave,

thanks for your answer. I agree with you, the easy way is to assign t=

he

Quoted 1 line

rootfs directory. I gave the filesystem as a cpio file because it is =

the

Quoted 1 line

same (the kernel takes the rootfs and converts it to a cpio format), =

but

Quoted 1 line

the compilation is faster. Anyway, although now I do as you said, I s=

till

Quoted 3 lines

get the error:
"Failed to execute /init

Kernel panic - not syncing: No init found.  Try passing init=3D optio=

n to

Quoted 2 lines

kernel."
I can't understand why it happens. I check the permission of /init an=

d

Quoted 4 lines

/sbin/init and everything seems to me OK.

Any idea?

I have had the same problem.
Things I can remember:
Permissions,
console setup,
watch out for symbolic links to init.
Also is your init and executable or script ?
I think you get this failure if ANYTHING goes wrong exec'ing
init.
Like - it found init but could not execute a shell. or the shell required a library it could not find.
Or something is not quite right with your Virtual memory -
Linux exec's by forcing chained page faults.

One thing I tried was a simple "hello world" in ppc assembler -
no libraries,
and named it /init. When it succeeded I was able to narrow my
problem down..
Then tried a "hello world" in C with a static library, then
dynamic, then ...
Basically building more and more complex /init's until I isolate=
d
what was failing.

Quoted 5 lines

Ra=FAl Moreno

--
Dave Lynch
DLA Systems
Software Development:
Embedded Linux
717.627.3770 [email protected]
http://www.dlasys.net
fax: 1.253.369.9244 Cell:=

1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too=

numerous to list.

"Any intelligent fool can make things bigger and more complex... It tak= es a
touch of genius - and a lot of courage to move in the opposite directio= n."
Albert Einstein

=