I port uClinux 2.6.17-uc1 to S3C44B0X[NOMMU, NOFP] for a long times, tools
chain downloaded arm-elf-tools-20040427.sh from
http://opensrc.sec.samsung.com/  (arm-elf-gcc 3.4.0), the uClinux just can
execute to the

linux-2.6.x/init/main.c's

run_init_process("/sbin/init");

there are some problems when run to linux-2.6.x/arch/arm/kernel/Sys_arm.c's
function: execve

=============================================================
long execve(const char *filename, char **argv, char **envp)
{
struct pt_regs regs;
int ret;

memset(&regs, 0, sizeof(struct pt_regs));
ret = do_execve((char *)filename, (char __user * __user *)argv,
  (char __user * __user *)envp, &regs);
if (ret < 0)
 goto out;

/*
 * Save argc to the register structure for userspace.
 */
regs.ARM_r0 = ret;
/*
 * We were successful.  We won't be returning to our caller, but
 * instead to user space by manipulating the kernel stack.
 */

//--------------------------- hell begin --------------------
asm( "add r0, %0, %1\n\t"
 "mov r1, %2\n\t"
 "mov r2, %3\n\t"
 "bl memmove\n\t" /* copy regs to top of stack */
 "mov r8, #0\n\t" /* not a syscall */
 "mov r9, %0\n\t" /* thread structure */
 "mov sp, r0\n\t" /* reposition stack pointer */
 "b ret_to_user"
 :
 : "r" (current_thread_info()),
   "Ir" (THREAD_START_SP - sizeof(regs)),
   "r" (&regs),
   "Ir" (sizeof(regs))
 : "r0", "r1", "r2", "r3", "ip", "lr", "memory");
out:
return ret;
}
==================================================================

I trace to:
        b ret_to_user
and pass a lots, there be:
        swi 0x900036

what's the hell?

uClinux like fall into a death cycle, it make me crazy!
Is there anybody have some idea?

THX !!!!!
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to