Subject: Re: exec init
To: None <Lin.Colin@iac.com.tw>
From: David Brownlee <abs@NetBSD.org>
List: port-arm
Date: 05/19/2004 11:48:42
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-777055741-1084963722=:168
Content-Type: TEXT/PLAIN; charset=big5; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Mon, 17 May 2004 Lin.Colin@iac.com.tw wrote:

> My OMAP porting is ready to exec init. However, there has been one proble=
m 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". T=
hey all can be executed.
> The kernel configuration has options "EXEC_ELF32".
> Kernel can exec both "/usr/src/obj/destdir.evbarm/rescue/init" and the in=
it 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:
> =09for (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?

 =09That is a dynamically linked init - you'll need the contents
 =09of /lib and /libexec. Alternatively test /rescue/init.

--=20
 =09=09David/absolute          -- www.netbsd.org: No hype required --
--0-777055741-1084963722=:168--