Subject: exec init
To: None <>
From: None <>
List: port-arm
Date: 05/17/2004 22:53:57
Hi all,
My OMAP porting is ready to exec init. However, there has been one =
problem brothering me for some days.
The root is a ramdisk stored in NOR flash.
The file formats of these init executable files are all "elf32-little". =
They all can be executed.
The kernel configuration has options "EXEC_ELF32".
Kernel can exec both "/usr/src/obj/destdir.evbarm/rescue/init" and the =
init in "/usr/obj/distrib/evbarm/instkernel/ramdisk/ramdisk.fs".
But if I put =A1=A7/usr/src/obj/destdir.evbarm/sbin/init=A1=A8(just =
22910 bytes!!!) in /sbin/, check_exec would return "ENOEXEC".
It fails in this section:
	for (i =3D 0; i < nexecs && error !=3D 0; i++) {
                int newerror;
                epp->ep_esch =3D execsw[i];
                newerror =3D (*execsw[i]->es_makecmds)(p, epp);
                /* make sure the first "interesting" error code is =
saved. */
                if (!newerror || error =3D=3D ENOEXEC)
                        error =3D newerror;
                /* if es_makecmds call was successful, update epp->ep_es =
                if (!newerror && (epp->ep_flags & EXEC_HASES) =3D=3D 0)
                        epp->ep_es =3D execsw[i];
                if (epp->ep_flags & EXEC_DESTR && error !=3D 0)
                        return error;

What's the problem?

Thanks and regards,