免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: armips
打印 上一主题 下一主题

[操作系统] 求助!rootfs挂载启动:busybox的 init 退出了?帮忙分析下 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2010-10-22 16:10 |显示全部楼层
再就是有个现象 就是 helloworld里面 我直接就变成while(1);
居然没有拦住,现象一样,是不是没有启动起来helloworld进程就do_exit() ---  panic了

论坛徽章:
0
12 [报告]
发表于 2010-10-22 18:47 |显示全部楼层
你的kernel支持cramfs不?
可以先做成cramfs试试
如果他没有去跑你的init,那应该是有两种可能
1.kernel ...
T-Bagwell 发表于 2010-10-22 16:55



    不会做cramfs的,暂时用cpio的格式的包试了一下,结果一样,看了下fs/ext2的函数,不知道加到哪儿合适,
反过来去找run_init_process里面-->kernel_execve()  加了printk ,添加位置如下:

int kernel_execve(const char *filename, char *const argv[], char *const envp[])
{
        struct pt_regs regs;
        int ret;
printk(KERN_INFO "test point:arch/arm/kernel/sys_arm.c/kernel_execve(%s)",filename);
        memset(&regs, 0, sizeof(struct pt_regs));
        ret = do_execve((char *)filename, (char __user * __user *)argv,
                        (char __user * __user *)envp, &regs);
printk(KERN_INFO "test point:ret = %d\n",ret);
        if (ret < 0)
                goto out;
printk(KERN_INFO "test point:%d\n",1);
        /*
         * 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.
         */
        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:
printk(KERN_INFO "test point:%d\n",2);
        return ret;
}

部分打印信息如下:
Driver for 1-wire Dallas network protocol.
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
TCP cubic registered
NET: Registered protocol family 17
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/hotplug)
test point:ret = -2
test point:2
Freeing init memory: 96K
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/init)
test point:fs/exec.c/do_execve()
test point:ret = 0
test point:1
Kernel panic - not syncing: Attempted to kill init!

cpio格式的rootfs镜像默认启动/init ,我做的链接 /init --> /bin/busybox
从打印信息来看 系统对 busybox的 open_exec()成功
do_execve() 成功
应该是在汇编       "b        ret_to_user" 后就没影儿了!


难道系统的内存映射有问题?不可能吧!
有什么办法试试到底是否执行了应用程序busybox呢?  在应用里面 printf 没反应啊

论坛徽章:
0
13 [报告]
发表于 2010-10-22 18:55 |显示全部楼层
arch/arm/kernel/entry-common.S
代码片段

/*
* Ok, we need to do extra processing, enter the slow path.
*/
fast_work_pending:
        str        r0, [sp, #S_R0+S_OFF]!                @ returned r0
work_pending:
        tst        r1, #_TIF_NEED_RESCHED
        bne        work_resched
        tst        r1, #_TIF_SIGPENDING|_TIF_NOTIFY_RESUME
        beq        no_work_pending
        mov        r0, sp                                @ 'regs'
        mov        r2, why                                @ 'syscall'
        bl        do_notify_resume
        b        ret_slow_syscall                @ Check work again

work_resched:
        bl        schedule
/*
* "slow" syscall return path.  "why" tells us if this was a real syscall.
*/
ENTRY(ret_to_user)
ret_slow_syscall:
        disable_irq                                @ disable interrupts
        ldr        r1, [tsk, #TI_FLAGS]
        tst        r1, #_TIF_WORK_MASK
        bne        work_pending
no_work_pending:
        /* perform architecture specific actions before user return */
        arch_ret_to_user r1, lr

        restore_user_regs fast = 0, offset = 0
ENDPROC(ret_to_user)


昨天的启动信息:
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 100K
Kernel panic - not syncing: Attempted to kill init!
[<c0027460>] (unwind_backtrace+0x0/0xec) from [<c021d8f8>] (panic+0x6c/0xec)
[<c021d8f8>] (panic+0x6c/0xec) from [<c0036ab8>] (do_exit+0x64/0x644)
[<c0036ab8>] (do_exit+0x64/0x644) from [<c0037150>] (do_group_exit+0xb8/0xec)
[<c0037150>] (do_group_exit+0xb8/0xec) from [<c0042dc8>] (get_signal_to_deliver+
0x3c4/0x420)
[<c0042dc8>] (get_signal_to_deliver+0x3c4/0x420) from [<c002456c>] (do_notify_re
sume+0x70/0x69c)
[<c002456c>] (do_notify_resume+0x70/0x69c) from [<c0021eac>] (work_pending+0x1c/
0x20)

似乎有点联系

论坛徽章:
0
14 [报告]
发表于 2010-10-25 09:39 |显示全部楼层
试试这个
T-Bagwell 发表于 2010-10-22 19:29



    不好意思,这两天周末,板子在公司,刚刚试试

T-Bag 版主的镜像是x86的,偶的板子是 arm920T内核的,不行啊

论坛徽章:
0
15 [报告]
发表于 2010-10-25 11:49 |显示全部楼层
哦,这样啊,应该是2440或者2410了
这个可以先用cramfs试试
mkcramfs dir  img
T-Bagwell 发表于 2010-10-25 10:05


感谢 t-bagwell大侠支持

    试了一下cramfs,和 ext2 一样,还有cpio,好像都一样, 我通过在系统加载我得busybox文件头的时候 用printk打印出来文件头
对比发现是一样的,文件头加载正确的,这应该说明文件系统没有问题吧,感觉好像应该执行了busybox,就是异常退出了,可能是我得
编译器编译应用有问题,唉  路漫漫 ....

RAMDISK: cramfs filesystem found at block 0
RAMDISK: Loading 1192KiB [1 disk] into ram disk... done.
VFS: Mounted root (cramfs filesystem) readonly on device 1:0.
Freeing init memory: 96K
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/sbin/init)bprm file is:/sbin
/init
my test buf addr = c0da44a0
t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 30 a1 00 00 34 00 00 00
c4 ff 1d 00 02 00 00 05 34 00 20 00 06 00 28 00
19 00 18 00 01 00 00 70 78 87 1d 00 78 07 1e 00
78 07 1e 00 40 6d 00 00 40 6d 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 b8 f4 1d 00 b8 f4 1d 00 05 00 00 00
00 80 00 00 01 00 00 00 b8 f4 1d 00 b8 f4 1e 00
test point:fs/exec.c/do_execve()
test point:ret = 0
test point:1
Kernel panic - not syncing: Attempted to kill init!

论坛徽章:
0
16 [报告]
发表于 2010-10-25 13:36 |显示全部楼层
恩,看上去是这样的了,呵呵
对了,你的打印是在init里面加的?
编译的时候参数应该有区别了吧?
T-Bagwell 发表于 2010-10-25 12:38



    在 fs/exec.c

int prepare_binprm(struct linux_binprm *bprm)函数中

编译参数没有区别,下面 大括号中是后加入的

int prepare_binprm(struct linux_binprm *bprm)
{
        umode_t mode;
        struct inode * inode = bprm->file->f_path.dentry->d_inode;
        int retval;

        mode = inode->i_mode;
        if (bprm->file->f_op == NULL)
                return -EACCES;

        /* clear any previous set[ug]id data from a previous binary */
        bprm->cred->euid = current_euid();
        bprm->cred->egid = current_egid();

        if (!(bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID)) {
                /* Set-uid? */
                if (mode & S_ISUID) {
                        bprm->per_clear |= PER_CLEAR_ON_SETID;
                        bprm->cred->euid = inode->i_uid;
                }

                /* Set-gid? */
                /*
                 * If setgid is set but no group execute bit then this
                 * is a candidate for mandatory locking, not a setgid
                 * executable.
                 */
                if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) {
                        bprm->per_clear |= PER_CLEAR_ON_SETID;
                        bprm->cred->egid = inode->i_gid;
                }
        }

        /* fill in binprm security blob */
        retval = security_bprm_set_creds(bprm);
        if (retval)
                return retval;
        bprm->cred_prepared = 1;

        memset(bprm->buf, 0, BINPRM_BUF_SIZE);
{
        int t = 0;       
        printk("bprm file is:%s\n",bprm->filename);
        printk("my test buf addr = %08x\n", (int)bprm->buf);
        t = kernel_read(bprm->file, 0, bprm->buf, BINPRM_BUF_SIZE);
        printk("t = %d\n", t);       
        for(t=0;t<128;t++)
        {
                if((t % 16) == 0) printk("\n");
                printk("%02x ",(bprm->buf)[t]);
        }
        memset(bprm->buf, 0, BINPRM_BUF_SIZE);
}

        return kernel_read(bprm->file, 0, bprm->buf, BINPRM_BUF_SIZE);
}

论坛徽章:
0
17 [报告]
发表于 2010-10-25 16:17 |显示全部楼层
感谢 T-Bagwell 版主这几天的支持! 换了个工具链如下(busybox跑起来了)   
貌似打不开tty2,一直打印

Freeing init memory: 96K
test point:arch/arm/kernel/sys_arm.c/kernel_execve(/init)bprm file is:/init
my test buf addr = c0fde4a0
t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 48 8a 01 00 34 00 00 00
b4 bd 1c 00 02 00 00 04 34 00 20 00 05 00 28 00
1a 00 19 00 01 00 00 70 24 a6 1c 00 24 26 1d 00
24 26 1d 00 08 0c 00 00 08 0c 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 ac b2 1c 00 ac b2 1c 00 05 00 00 00
00 80 00 00 01 00 00 00 ac b2 1c 00 ac b2 1d 00
test point:fs/exec.c/do_execve()
test point:ret = 0
test point:1
init started: BusyBox v1.17.3 (2010-10-25 16:02:33 CST)
bprm file is:/etc/init.d/rcS
my test buf addr = c0fde4a0
t = 128

23 21 20 2f 62 69 6e 2f 73 68 0a 65 63 68 6f 20
22 50 72 6f 63 65 73 73 69 6e 67 20 65 74 63 2f
69 6e 69 74 2e 64 2f 72 63 2e 53 22 0a 0a 23 68
6f 73 74 6e 61 6d 65 20 24 7b 48 4f 53 54 4e 41
4d 45 7d 0a 0a 65 63 68 6f 20 22 20 4d 6f 75 6e
74 20 61 6c 6c 22 0a 2f 62 69 6e 2f 6d 6f 75 6e
74 20 2d 61 0a 0a 65 63 68 6f 20 22 20 53 74 61
72 74 20 6d 64 65 76 2e 2e 2e 2e 22 0a 2f 62 69 bprm file is:/etc/init.d/rcS
my test buf addr = c0fde4a0
t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 48 8a 01 00 34 00 00 00
b4 bd 1c 00 02 00 00 04 34 00 20 00 05 00 28 00
1a 00 19 00 01 00 00 70 24 a6 1c 00 24 26 1d 00
24 26 1d 00 08 0c 00 00 08 0c 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 ac b2 1c 00 ac b2 1c 00 05 00 00 00
00 80 00 00 01 00 00 00 ac b2 1c 00 ac b2 1d 00
test point:fs/exec.c/do_execve()Processing etc/init.d/rc.S
Mount all
bprm file is:/bin/mount
my test buf addr = c0fde4a0
t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 48 8a 01 00 34 00 00 00
b4 bd 1c 00 02 00 00 04 34 00 20 00 05 00 28 00
1a 00 19 00 01 00 00 70 24 a6 1c 00 24 26 1d 00
24 26 1d 00 08 0c 00 00 08 0c 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 ac b2 1c 00 ac b2 1c 00 05 00 00 00
00 80 00 00 01 00 00 00 ac b2 1c 00 ac b2 1d 00
test point:fs/exec.c/do_execve() Start mdev....
bprm file is:/bin/echo
my test buf addr = c0fde4a0
t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 48 8a 01 00 34 00 00 00
b4 bd 1c 00 02 00 00 04 34 00 20 00 05 00 28 00
1a 00 19 00 01 00 00 70 24 a6 1c 00 24 26 1d 00
24 26 1d 00 08 0c 00 00 08 0c 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 ac b2 1c 00 ac b2 1c 00 05 00 00 00
00 80 00 00 01 00 00 00 ac b2 1c 00 ac b2 1d 00
test point:fs/exec.c/do_execve()bprm file is:/sbin/mdev
my test buf addr = c0fde4a0
t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 48 8a 01 00 34 00 00 00
b4 bd 1c 00 02 00 00 04 34 00 20 00 05 00 28 00
1a 00 19 00 01 00 00 70 24 a6 1c 00 24 26 1d 00
24 26 1d 00 08 0c 00 00 08 0c 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 ac b2 1c 00 ac b2 1c 00 05 00 00 00
00 80 00 00 01 00 00 00 ac b2 1c 00 ac b2 1d 00
test point:fs/exec.c/do_execve()************************************************
****
RootFS by NFS, s3c2410
Created by Jacky Xu @ 2008.7.13
Enjoy it!!!
**bprm file is:/bin/sh
*********************************my test buf addr = c0fde4a0
*****************

t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 48 8a 01 00 34 00 00 00
b4 bd 1c 00 02 00 00 04 34 00 20 00 05 00 28 00
1a 00 19 00 01 00 00 70 24 a6 1c 00 24 26 1d 00
24 26 1d 00 08 0c 00 00 08 0c 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 ac b2 1c 00 ac b2 1c 00 05 00 00 00
00 80 00 00 01 00 00 00 ac b2 1c 00 ac b2 1d 00
can't open /dev/tty2: No such file or directory

Processing /etc/profile...  Set search library path
Set user path
Set PS1
bprm file is:/bin/hostname
my test buf addr = c0fde4a0
t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 48 8a 01 00 34 00 00 00
b4 bd 1c 00 02 00 00 04 34 00 20 00 05 00 28 00
1a 00 19 00 01 00 00 70 24 a6 1c 00 24 26 1d 00
24 26 1d 00 08 0c 00 00 08 0c 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 ac b2 1c 00 ac b2 1c 00 05 00 00 00
00 80 00 00 01 00 00 00 ac b2 1c 00 ac b2 1d 00
test point:fs/exec.c/do_execve()All Done

can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory

can't open /dev/tty2: No such file or directory

[root@(none) /]#
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory

bprm file is:/bin/ls
my test buf addr = c0fde0a0
t = 128

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
02 00 28 00 01 00 00 00 48 8a 01 00 34 00 00 00
b4 bd 1c 00 02 00 00 04 34 00 20 00 05 00 28 00
1a 00 19 00 01 00 00 70 24 a6 1c 00 24 26 1d 00
24 26 1d 00 08 0c 00 00 08 0c 00 00 04 00 00 00
04 00 00 00 01 00 00 00 00 00 00 00 00 80 00 00
00 80 00 00 ac b2 1c 00 ac b2 1c 00 05 00 00 00
00 80 00 00 01 00 00 00 ac b2 1c 00 ac b2 1d 00
test point:fs/exec.c/do_execve()bin      dev      home     lib      mnt      roo
t     sys      usr
boot     etc      init     linuxrc  proc     sbin     tmp      var
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty2: No such file or directory

论坛徽章:
0
18 [报告]
发表于 2010-10-25 16:33 |显示全部楼层
那就建立个tty2试试吧,呵呵
T-Bagwell 发表于 2010-10-25 16:29



    多谢!结贴!

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.35.7 (root@vmpc) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-
203) ) #3 PREEMPT Wed Oct 20 11:42:55 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: Synertronixx scb9328
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: console=ttymxc0,115200 root=/dev/ram0 rw
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 12140k/12140k available, 4244k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc1800000 - 0xf4000000   ( 808 MB)
    lowmem  : 0xc0000000 - 0xc1000000   (  16 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0021000   ( 100 kB)
      .text : 0xc0021000 - 0xc02c5000   (2704 kB)
      .data : 0xc02d6000 - 0xc02f2bc0   ( 115 kB)
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:208
MXC GPIO hardware
MXC IRQ initialized
Calibrating delay loop... 46.79 BogoMIPS (lpj=233984)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Scb9328: Adding devices
bio: create slab <bio-0> at 0
Switching to clocksource mxc_timer1
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 1000K
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
msgmni has been set to 25
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: IMX driver
imx-uart.0: ttymxc0 at MMIO 0x206000 (irq = 30) is a IMX
console [ttymxc0] enabled
brd: module loaded
loop: module loaded
physmap platform flash device: 02000000 at 10000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Support for command set 0002 not present
gen_probe: No supported Vendor Command Set found
physmap-flash physmap-flash.0: map_probe failed
console [netcon0] enabled
netconsole: network logging started
TCP cubic registered
NET: Registered protocol family 17
Freeing init memory: 100K
init started: BusyBox v1.17.3 (2010-10-25 16:02:33 CST)
Processing etc/init.d/rc.S
Mount all
Start mdev....
****************************************************
rootfs by cpio, mx9328
Created by xxxyyyzzz  @ 2010.10.25
Enjoy it!!!
****************************************************


Processing /etc/profile...  Set search library path
Set user path
Set PS1
All Done

[root@(none) /]# ls
bin      dev      home     lib      mnt      root     sys      usr
boot     etc      init     linuxrc  proc     sbin     tmp      var
[root@(none) /]# ps
PID   USER     TIME   COMMAND
    1 root       0:01 init
    2 root       0:00 [kthreadd]
    3 root       0:00 [ksoftirqd/0]
    4 root       0:00 [events/0]
    5 root       0:00 [khelper]
    8 root       0:00 [async/mgr]
   48 root       0:00 [sync_supers]
   50 root       0:00 [bdi-default]
   51 root       0:00 [kblockd/0]
   67 root       0:00 [rpciod/0]
   74 root       0:00 [kswapd0]
   75 root       0:00 [aio/0]
   76 root       0:00 [nfsiod]
   77 root       0:00 [crypto/0]
  153 root       0:00 -/bin/sh
  156 root       0:00 ps
[root@(none) /]#

论坛徽章:
0
19 [报告]
发表于 2010-11-12 09:04 |显示全部楼层
我看了半天没看明白怎么回事。。

我小白的猜测一下,不会是启动参数设置的不对吧……

printenv 之类的 ...
jn200002 发表于 2010-11-11 14:25



    回楼上,走了很多弯路后,结论是交叉编译器不对,换了一个就好用了

论坛徽章:
0
20 [报告]
发表于 2010-11-29 16:55 |显示全部楼层
是不是你下载的顺序有问题?

先下bootloader,然后Kernel,最后文件系统, 而且kernel和文件系统的版本号要 ...
duanbingnan 发表于 2010-11-12 20:26



   

感谢各位关注,已经弄好了,是交叉编译器问题

后来实际测试表明,kernel用的编译器 和 busybox的编译器没啥关系,我就是不同版本的编译器 现在好用

kernel的编译器版本不重要, 应用程序编译器很重要 主要是kernel头文件 库文件等必须对应用才能正确运行

当然 版本一样最好了

另外我的bootloader是自己编写的,先下载那个没关系的,这个也试过的,只不过是在内存里面,谁先谁后
结果一样就都行的。

祝各位兄弟们顺利!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP