Busybox init 不启动 /etc/init.d/rcS

sel*_*fbg 3 linux buildroot busybox

我正在尝试使用 buildroot 构建嵌入式系统。一切似乎都有效。所有模块都在启动,系统稳定。问题是在系统初始化期间 /etc/init.d/rcS 没有启动。如果我手动运行它,一切正常。我的 inittab 文件中有它。

# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels.  The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id        == tty to run on, or empty for /dev/console
# runlevels == ignored
# action    == one of sysinit, respawn, askfirst, wait, and once
# process   == program to run

# Startup the system
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -o remount,rw /
null::sysinit:/bin/mkdir -p /dev/pts
null::sysinit:/bin/mkdir -p /dev/shm
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS

# Put a getty on the serial port
ttyFIQ0::respawn:/sbin/getty -L -n ttyFIQ0 115200 vt100 # GENERIC_SERIAL

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
null::shutdown:/etc/init.d/rcK
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a
Run Code Online (Sandbox Code Playgroud)

知道有什么问题吗?

Ret*_*res 6

  1. /bin/init需要在你的文件系统上。
  2. /bin/sh需要在您的文件系统上。
  3. /etc/init.d/rcS需要是可执行的,并且将#!/bin/sh作为它的第一行。