hi:
i use initrd to implement eos in specific platform ,in
execve("/linuxrc",argv,envp_init),have some question,
plese give me help ,please see attachment !
fuchangdong
�Ѻ�����������ͬ�죡http://www.sohu.com/sas/temp/twoyear/2year.html
�Ѻ���http://www.sohu.com
hi :
i now have a question,please give me help,
i use initrd and ramdisk to complete embedded linux on my hardware.
first ,i create a initrd.img from command mkinitrd.and a bigger root fs:ram.img.gz
,to lilo it,and reboot it
at init process,do_basic_setup,this line :
kernel_thread(do_linuxrc,"/linuxrc",0);
at this function: do_linuxrc()
execve(shell,argv,envp_init);
it return -1 ,and errno is 8,this tell that it is "exec format error"
so i can't to exec linuxrc script file.
linuxrc's content is :
#!/bin/sh
ls -l
and chmod 0777 linuxrc
so i can't know what wrong with me? why initrd.img cant't be load right?
but i find :
ret = open("/linuxrc",O_RDONLY,0);
ret = success.
and infomation have :
mount root filesystem (ext2);
so i can't get reason ,please give me help?
linux is redhat 6.2
linux kernel is 2.2.12-20
after, i test this ,give me these information:
i add modprobe/insmod command in initrd.img, reboot it,
this system give me information:
" kmod:failed to load /sbin/modprobe -s -k binfmt-0000"
execve() call do_execve(),do_execve() call request_mode()
,request_mod() call exec_modprobe(),so it's path is right.
but i can see this inforamtion ,at boot ,system load script ,aout,elf binfmt.
so i can't know greater!!!
please give me help !!!
my email is [EMAIL PROTECTED]