免费注册 查看新帖 |

Chinaunix

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

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

论坛徽章:
0
11 [报告]
发表于 2010-10-22 15:22 |只看该作者
你的启动参数是不是要传递一个 init=/init 命令,看你的信息里面好像没有传
star316 发表于 2010-10-22 14:48



    我用内核 printk的 方法

发现zImage已经执行到了 调用 /sbin/init的地方了

所以我认为应该不是命令行参数少init=/init的问题

论坛徽章:
0
12 [报告]
发表于 2010-10-22 15:26 |只看该作者
不替代呢?
用新编译器编译busybox呢?
T-Bagwell 发表于 2010-10-22 13:42



    试过了,不替代 重新做busybox,问题依旧:

.............................................
console [ttymxc0] enabled
brd: 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
i2c /dev entries driver
Driver for 1-wire Dallas network protocol.
TCP cubic registered
NET: Registered protocol family 17
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 96K
Kernel panic - not syncing: Attempted to kill init!


并且我还试了一下 helloworld程序改为进到主函数里面就来个while(1);
但是还是出现Kernel panic - not syncing: Attempted to kill init!

感觉好像kernel的启动进程 根本就没有启动起来

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
13 [报告]
发表于 2010-10-22 15:30 |只看该作者
文件系统的img发出来看一下吧?
一般应该是
有/init
/dev/下有console  null

论坛徽章:
0
14 [报告]
发表于 2010-10-22 15:34 |只看该作者
rootfs
|-- bin
|   |-- addgroup -> busybox
|   |-- adduser -> busybox
|   |-- ash -> busybox
|   |-- busybox
|   |-- cat -> busybox
|   |-- catv -> busybox
|   |-- chattr -> busybox
|   |-- chgrp -> busybox
|   |-- chmod -> busybox
|   |-- chown -> busybox
|   |-- cp -> busybox
|   |-- cpio -> busybox
|   |-- cttyhack -> busybox
|   |-- date -> busybox
|   |-- dd -> busybox
|   |-- delgroup -> busybox
|   |-- deluser -> busybox
|   |-- df -> busybox
|   |-- dmesg -> busybox
|   |-- dnsdomainname -> busybox
|   |-- dumpkmap -> busybox
|   |-- echo -> busybox
|   |-- ed -> busybox
|   |-- egrep -> busybox
|   |-- false -> busybox
|   |-- fdflush -> busybox
|   |-- fgrep -> busybox
|   |-- fsync -> busybox
|   |-- getopt -> busybox
|   |-- grep -> busybox
|   |-- gunzip -> busybox
|   |-- gzip -> busybox
|   |-- hostname -> busybox
|   |-- hush -> busybox
|   |-- ionice -> busybox
|   |-- ip -> busybox
|   |-- ipaddr -> busybox
|   |-- ipcalc -> busybox
|   |-- iplink -> busybox
|   |-- iproute -> busybox
|   |-- iprule -> busybox
|   |-- iptunnel -> busybox
|   |-- kill -> busybox
|   |-- linux32 -> busybox
|   |-- linux64 -> busybox
|   |-- ln -> busybox
|   |-- login -> busybox
|   |-- ls -> busybox
|   |-- lsattr -> busybox
|   |-- lzop -> busybox
|   |-- makemime -> busybox
|   |-- mkdir -> busybox
|   |-- mknod -> busybox
|   |-- mktemp -> busybox
|   |-- more -> busybox
|   |-- mount -> busybox
|   |-- mountpoint -> busybox
|   |-- mt -> busybox
|   |-- mv -> busybox
|   |-- netstat -> busybox
|   |-- nice -> busybox
|   |-- pidof -> busybox
|   |-- ping -> busybox
|   |-- ping6 -> busybox
|   |-- pipe_progress -> busybox
|   |-- printenv -> busybox
|   |-- ps -> busybox
|   |-- pwd -> busybox
|   |-- reformime -> busybox
|   |-- rev -> busybox
|   |-- rm -> busybox
|   |-- rmdir -> busybox
|   |-- rpm -> busybox
|   |-- run-parts -> busybox
|   |-- scriptreplay -> busybox
|   |-- sed -> busybox
|   |-- setarch -> busybox
|   |-- sh -> busybox
|   |-- sleep -> busybox
|   |-- stat -> busybox
|   |-- stty -> busybox
|   |-- su -> busybox
|   |-- sync -> busybox
|   |-- tar -> busybox
|   |-- touch -> busybox
|   |-- true -> busybox
|   |-- umount -> busybox
|   |-- uname -> busybox
|   |-- usleep -> busybox
|   |-- vi -> busybox
|   |-- watch -> busybox
|   `-- zcat -> busybox
|-- boot
|-- dev
|   |-- console
|   |-- null
|   `-- ttymxc0
|-- etc
|   |-- fstab
|   |-- group
|   |-- init.d
|   |   `-- rcS
|   |-- inittab
|   |-- mdev.conf
|   |-- passwd
|   |-- profile
|   `-- shadow
|-- home
|-- init -> bin/busybox
|-- lib
|   `-- modules
|-- linuxrc -> bin/busybox
|-- mnt
|   |-- data
|   |-- etc
|   |-- jiffs2
|   |-- temp
|   `-- yaffs
|-- proc
|-- root
|-- sbin
|   |-- acpid -> ../bin/busybox
|   |-- adjtimex -> ../bin/busybox
|   |-- arp -> ../bin/busybox
|   |-- blkid -> ../bin/busybox
|   |-- bootchartd -> ../bin/busybox
|   |-- depmod -> ../bin/busybox
|   |-- devmem -> ../bin/busybox
|   |-- fbsplash -> ../bin/busybox
|   |-- fdisk -> ../bin/busybox
|   |-- findfs -> ../bin/busybox
|   |-- freeramdisk -> ../bin/busybox
|   |-- fsck -> ../bin/busybox
|   |-- fsck.minix -> ../bin/busybox
|   |-- getty -> ../bin/busybox
|   |-- halt -> ../bin/busybox
|   |-- hdparm -> ../bin/busybox
|   |-- hwclock -> ../bin/busybox
|   |-- ifconfig -> ../bin/busybox
|   |-- ifdown -> ../bin/busybox
|   |-- ifenslave -> ../bin/busybox
|   |-- ifup -> ../bin/busybox
|   |-- init -> ../bin/busybox
|   |-- insmod -> ../bin/busybox
|   |-- klogd -> ../bin/busybox
|   |-- loadkmap -> ../bin/busybox
|   |-- logread -> ../bin/busybox
|   |-- losetup -> ../bin/busybox
|   |-- lsmod -> ../bin/busybox
|   |-- makedevs -> ../bin/busybox
|   |-- man -> ../bin/busybox
|   |-- mdev -> ../bin/busybox
|   |-- mkdosfs -> ../bin/busybox
|   |-- mke2fs -> ../bin/busybox
|   |-- mkfs.ext2 -> ../bin/busybox
|   |-- mkfs.minix -> ../bin/busybox
|   |-- mkfs.vfat -> ../bin/busybox
|   |-- mkswap -> ../bin/busybox
|   |-- modinfo -> ../bin/busybox
|   |-- modprobe -> ../bin/busybox
|   |-- nameif -> ../bin/busybox
|   |-- pivot_root -> ../bin/busybox
|   |-- poweroff -> ../bin/busybox
|   |-- raidautorun -> ../bin/busybox
|   |-- reboot -> ../bin/busybox
|   |-- rmmod -> ../bin/busybox
|   |-- route -> ../bin/busybox
|   |-- runlevel -> ../bin/busybox
|   |-- setconsole -> ../bin/busybox
|   |-- slattach -> ../bin/busybox
|   |-- start-stop-daemon -> ../bin/busybox
|   |-- sulogin -> ../bin/busybox
|   |-- swapoff -> ../bin/busybox
|   |-- swapon -> ../bin/busybox
|   |-- switch_root -> ../bin/busybox
|   |-- sysctl -> ../bin/busybox
|   |-- syslogd -> ../bin/busybox
|   |-- tunctl -> ../bin/busybox
|   |-- udhcpc -> ../bin/busybox
|   |-- vconfig -> ../bin/busybox
|   |-- watchdog -> ../bin/busybox
|   `-- zcip -> ../bin/busybox
|-- sys
|-- tmp
|-- usr
|   |-- bin
|   |   |-- [ -> ../../bin/busybox
|   |   |-- [[ -> ../../bin/busybox
|   |   |-- arping -> ../../bin/busybox
|   |   |-- awk -> ../../bin/busybox
|   |   |-- basename -> ../../bin/busybox
|   |   |-- beep -> ../../bin/busybox
|   |   |-- bunzip2 -> ../../bin/busybox
|   |   |-- bzcat -> ../../bin/busybox
|   |   |-- bzip2 -> ../../bin/busybox
|   |   |-- cal -> ../../bin/busybox
|   |   |-- chat -> ../../bin/busybox
|   |   |-- chpst -> ../../bin/busybox
|   |   |-- chrt -> ../../bin/busybox
|   |   |-- chvt -> ../../bin/busybox
|   |   |-- cksum -> ../../bin/busybox
|   |   |-- clear -> ../../bin/busybox
|   |   |-- cmp -> ../../bin/busybox
|   |   |-- comm -> ../../bin/busybox
|   |   |-- crontab -> ../../bin/busybox
|   |   |-- cryptpw -> ../../bin/busybox
|   |   |-- cut -> ../../bin/busybox
|   |   |-- dc -> ../../bin/busybox
|   |   |-- deallocvt -> ../../bin/busybox
|   |   |-- diff -> ../../bin/busybox
|   |   |-- dirname -> ../../bin/busybox
|   |   |-- dos2unix -> ../../bin/busybox
|   |   |-- du -> ../../bin/busybox
|   |   |-- dumpleases -> ../../bin/busybox
|   |   |-- eject -> ../../bin/busybox
|   |   |-- env -> ../../bin/busybox
|   |   |-- envdir -> ../../bin/busybox
|   |   |-- envuidgid -> ../../bin/busybox
|   |   |-- ether-wake -> ../../bin/busybox
|   |   |-- expand -> ../../bin/busybox
|   |   |-- expr -> ../../bin/busybox
|   |   |-- fdformat -> ../../bin/busybox
|   |   |-- fgconsole -> ../../bin/busybox
|   |   |-- find -> ../../bin/busybox
|   |   |-- flock -> ../../bin/busybox
|   |   |-- fold -> ../../bin/busybox
|   |   |-- free -> ../../bin/busybox
|   |   |-- ftpget -> ../../bin/busybox
|   |   |-- ftpput -> ../../bin/busybox
|   |   |-- fuser -> ../../bin/busybox
|   |   |-- hd -> ../../bin/busybox
|   |   |-- head -> ../../bin/busybox
|   |   |-- hexdump -> ../../bin/busybox
|   |   |-- hostid -> ../../bin/busybox
|   |   |-- id -> ../../bin/busybox
|   |   |-- ifplugd -> ../../bin/busybox
|   |   |-- install -> ../../bin/busybox
|   |   |-- ipcrm -> ../../bin/busybox
|   |   |-- ipcs -> ../../bin/busybox
|   |   |-- kbd_mode -> ../../bin/busybox
|   |   |-- killall -> ../../bin/busybox
|   |   |-- killall5 -> ../../bin/busybox
|   |   |-- last -> ../../bin/busybox
|   |   |-- length -> ../../bin/busybox
|   |   |-- less -> ../../bin/busybox
|   |   |-- logger -> ../../bin/busybox
|   |   |-- logname -> ../../bin/busybox
|   |   |-- lpq -> ../../bin/busybox
|   |   |-- lpr -> ../../bin/busybox
|   |   |-- lspci -> ../../bin/busybox
|   |   |-- lsusb -> ../../bin/busybox
|   |   |-- lzcat -> ../../bin/busybox
|   |   |-- lzma -> ../../bin/busybox
|   |   |-- lzopcat -> ../../bin/busybox
|   |   |-- md5sum -> ../../bin/busybox
|   |   |-- mesg -> ../../bin/busybox
|   |   |-- microcom -> ../../bin/busybox
|   |   |-- mkfifo -> ../../bin/busybox
|   |   |-- mkpasswd -> ../../bin/busybox
|   |   |-- nc -> ../../bin/busybox
|   |   |-- nmeter -> ../../bin/busybox
|   |   |-- nohup -> ../../bin/busybox
|   |   |-- nslookup -> ../../bin/busybox
|   |   |-- od -> ../../bin/busybox
|   |   |-- openvt -> ../../bin/busybox
|   |   |-- passwd -> ../../bin/busybox
|   |   |-- patch -> ../../bin/busybox
|   |   |-- pgrep -> ../../bin/busybox
|   |   |-- pkill -> ../../bin/busybox
|   |   |-- printf -> ../../bin/busybox
|   |   |-- pscan -> ../../bin/busybox
|   |   |-- readahead -> ../../bin/busybox
|   |   |-- readlink -> ../../bin/busybox
|   |   |-- realpath -> ../../bin/busybox
|   |   |-- renice -> ../../bin/busybox
|   |   |-- reset -> ../../bin/busybox
|   |   |-- resize -> ../../bin/busybox
|   |   |-- rpm2cpio -> ../../bin/busybox
|   |   |-- rtcwake -> ../../bin/busybox
|   |   |-- runsv -> ../../bin/busybox
|   |   |-- runsvdir -> ../../bin/busybox
|   |   |-- rx -> ../../bin/busybox
|   |   |-- script -> ../../bin/busybox
|   |   |-- seq -> ../../bin/busybox
|   |   |-- setkeycodes -> ../../bin/busybox
|   |   |-- setsid -> ../../bin/busybox
|   |   |-- setuidgid -> ../../bin/busybox
|   |   |-- sha1sum -> ../../bin/busybox
|   |   |-- sha256sum -> ../../bin/busybox
|   |   |-- sha512sum -> ../../bin/busybox
|   |   |-- showkey -> ../../bin/busybox
|   |   |-- smemcap -> ../../bin/busybox
|   |   |-- softlimit -> ../../bin/busybox
|   |   |-- sort -> ../../bin/busybox
|   |   |-- split -> ../../bin/busybox
|   |   |-- strings -> ../../bin/busybox
|   |   |-- sum -> ../../bin/busybox
|   |   |-- sv -> ../../bin/busybox
|   |   |-- tac -> ../../bin/busybox
|   |   |-- tail -> ../../bin/busybox
|   |   |-- tcpsvd -> ../../bin/busybox
|   |   |-- tee -> ../../bin/busybox
|   |   |-- telnet -> ../../bin/busybox
|   |   |-- test -> ../../bin/busybox
|   |   |-- tftp -> ../../bin/busybox
|   |   |-- tftpd -> ../../bin/busybox
|   |   |-- time -> ../../bin/busybox
|   |   |-- timeout -> ../../bin/busybox
|   |   |-- top -> ../../bin/busybox
|   |   |-- tr -> ../../bin/busybox
|   |   |-- traceroute -> ../../bin/busybox
|   |   |-- traceroute6 -> ../../bin/busybox
|   |   |-- tty -> ../../bin/busybox
|   |   |-- ttysize -> ../../bin/busybox
|   |   |-- udpsvd -> ../../bin/busybox
|   |   |-- unexpand -> ../../bin/busybox
|   |   |-- uniq -> ../../bin/busybox
|   |   |-- unix2dos -> ../../bin/busybox
|   |   |-- unlzma -> ../../bin/busybox
|   |   |-- unlzop -> ../../bin/busybox
|   |   |-- unxz -> ../../bin/busybox
|   |   |-- unzip -> ../../bin/busybox
|   |   |-- uptime -> ../../bin/busybox
|   |   |-- uudecode -> ../../bin/busybox
|   |   |-- uuencode -> ../../bin/busybox
|   |   |-- vlock -> ../../bin/busybox
|   |   |-- volname -> ../../bin/busybox
|   |   |-- wall -> ../../bin/busybox
|   |   |-- wc -> ../../bin/busybox
|   |   |-- wget -> ../../bin/busybox
|   |   |-- which -> ../../bin/busybox
|   |   |-- who -> ../../bin/busybox
|   |   |-- whoami -> ../../bin/busybox
|   |   |-- xargs -> ../../bin/busybox
|   |   |-- xz -> ../../bin/busybox
|   |   |-- xzcat -> ../../bin/busybox
|   |   `-- yes -> ../../bin/busybox
|   |-- lib
|   `-- sbin
|       |-- brctl -> ../../bin/busybox
|       |-- chpasswd -> ../../bin/busybox
|       |-- chroot -> ../../bin/busybox
|       |-- crond -> ../../bin/busybox
|       |-- dhcprelay -> ../../bin/busybox
|       |-- dnsd -> ../../bin/busybox
|       |-- fakeidentd -> ../../bin/busybox
|       |-- fbset -> ../../bin/busybox
|       |-- ftpd -> ../../bin/busybox
|       |-- httpd -> ../../bin/busybox
|       |-- inetd -> ../../bin/busybox
|       |-- loadfont -> ../../bin/busybox
|       |-- lpd -> ../../bin/busybox
|       |-- ntpd -> ../../bin/busybox
|       |-- popmaildir -> ../../bin/busybox
|       |-- rdate -> ../../bin/busybox
|       |-- rdev -> ../../bin/busybox
|       |-- readprofile -> ../../bin/busybox
|       |-- sendmail -> ../../bin/busybox
|       |-- setfont -> ../../bin/busybox
|       |-- setlogcons -> ../../bin/busybox
|       |-- svlogd -> ../../bin/busybox
|       |-- telnetd -> ../../bin/busybox
|       `-- udhcpd -> ../../bin/busybox
`-- var
    |-- lib
    |-- lock
    |-- log
    |-- run
    `-- tmp

init.img.gz

1.48 MB, 下载次数: 26

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
15 [报告]
发表于 2010-10-22 15:45 |只看该作者
文件系统什么格式的?
cramfs?
yaffs?
ext2?

看上去像是ext2啊

论坛徽章:
0
16 [报告]
发表于 2010-10-22 16:04 |只看该作者
ext2的:
创建过程
dd if=/dev/zero of=init.img bs=4096 count=1024
/sbin/mke2fs -F -m 0 -b 4096 init.img 1024
mkdir ram
mount init.img ram/ -o loop
cp -frv rootfs/* ram/
umount ram
gzip -9 < init.img > init.img.gz
cp init.img.gz /mnt/share/

你可以解压后挂载看看有什么问题

再就是 dev下 除了
mknod dev/console c 5 1
mknod dev/null c 1 3
我又弄了mknod dev/ttymxc0 c 207 16 和驱动里的名字对应,驱动里支持8个串口,
我需要自己 mknod ttymxc0 ....ttymxc7么?、

另外 这个系统在使用的时候 是自动做链接 ttyS0 ...么? 然后才可以在应用中用 ttyS0 或 ttyS1
我理解的对么?菜鸟 见笑了

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

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
18 [报告]
发表于 2010-10-22 16:55 |只看该作者
本帖最后由 T-Bagwell 于 2010-10-22 16:56 编辑

你的kernel支持cramfs不?
可以先做成cramfs试试
如果他没有去跑你的init,那应该是有两种可能
1.kernel就挂了
2.文件系统没挂载上

不好说呀,我经验尚浅
可以在ext2的代码里面的fops的read上面加一下打印,看看有没有执行你的文件

论坛徽章:
0
19 [报告]
发表于 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
20 [报告]
发表于 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)

似乎有点联系
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP