Subject: exec init
To: None <port-arm@NetBSD.org>
From: None <Lin.Colin@iac.com.tw>
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;
=
=20
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;
=
=20
/* 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];
=
=20
if (epp->ep_flags & EXEC_DESTR && error !=3D 0)
return error;
}
What's the problem?
Thanks and regards,
Colin