我正在使用当前的 OpenEmbedded 系统:http://git.openembedded.org/openembedded-core/tree/
(就其价值而言,我还从http://git.openembedded.org/meta-openembedded/tree/和http://git.yoctoproject.org/cgit/cgit.cgi/meta-xilinx/tree/.)
我已经建立了一套食谱和一个发行版(改编自几年前与 OpenEmbedded 一起使用的一组旧食谱),其启动如下:
...
[ 2.441070] EXT3-fs (ram0): error: couldn't mount because of unsupported optional features (240)
[ 2.450891] EXT2-fs (ram0): error: couldn't mount because of unsupported optional features (240)
[ 2.466262] EXT4-fs (ram0): mounted filesystem with ordered data mode. Opts: (null)
[ 2.474002] VFS: Mounted root (ext4 filesystem) on device 1:0.
[ 2.480845] devtmpfs: mounted
[ 2.484107] Freeing unused kernel memory: 200K (c066f000 - c06a1000)
INIT: version 2.88 booting
[ 3.200537] EXT4-fs (ram0): re-mounted. Opts: data=ordered
bootlogd: cannot allocate pseudo tty: No such file or directory
[ 3.341168] random: dd urandom read with 9 bits of entropy available
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
chown: unknown user/group root:root
INIT: Entering runlevel: 5
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCSIFADDR: No such device
Starting Dropbear SSH server: dropbear.
Starting HOSTAP Daemon: nl80211 not found.
Starting syslogd/klogd: done
Starting tcf-agent: OK
MYDISTRO 0.1 zc706-zynq7 /dev/ttyPS0
zc706-zynq7 login: [ 8.338466] macb e000b000.ps7-ethernet eth0: link up (1000/Full)
zc706-zynq7 login: root
Password:
Login incorrect
zc706-zynq7 login:
(不用介意“没有这样的设备”错误 - 我可以稍后修复。)
这里的问题是,通常的登录方法用户名=“root”(甚至不需要密码)不起作用。看来 root 用户根本不存在!任何预期的 root 密码(例如空、“root”、“admin”等)都不起作用。我进不去这个系统
经过一些试验和错误调试后,我更改了conf/distro/mydistro.conf以注释掉这些行:
...
# The following features are required by eglibc for a clean build of the sdk.
#DISTRO_FEATURES_LIBC = "libc-libm libc-backtrace libc-spawn libc-locale-code libc-getlogin libc-posix-regexp libc-ftraverse libc-posix-clang-wchar libc-posix-wchar-io libc-inet libc-crypt libc-nsswitch libc-utmp"
#DISTRO_FEATURES = "ext4 usbhost wifi pci ipv4 ipv6 largefile ${DISTRO_FEATURES_LIBC}"
这会导致使用默认的 DISTRO_FEATUREShttp://git.openembedded.org/openembedded-core/tree/meta/conf/distro/include/default-distrovars.inc(其中包括来自http://git.openembedded.org/openembedded-core/tree/meta/conf/distro/defaultsetup.conf,这又包含在http://git.openembedded.org/openembedded-core/tree/meta/conf/bitbake.conf第 682 行)。
现在它像这样启动:
[ 2.446482] EXT3-fs (ram0): error: couldn't mount because of unsupported optional features (240)
[ 2.456386] EXT2-fs (ram0): error: couldn't mount because of unsupported optional features (240)
[ 2.471774] EXT4-fs (ram0): mounted filesystem with ordered data mode. Opts: (null)
[ 2.479516] VFS: Mounted root (ext4 filesystem) on device 1:0.
[ 2.486308] devtmpfs: mounted
[ 2.489626] Freeing unused kernel memory: 200K (c066f000 - c06a1000)
INIT: version 2.88 booting
[ 3.203046] EXT4-fs (ram0): re-mounted. Opts: data=ordered
bootlogd: cannot allocate pseudo tty: No such file or directory
[ 3.345494] random: dd urandom read with 8 bits of entropy available
INIT: Entering runlevel: 5
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCSIFADDR: No such device
Starting Dropbear SSH server: dropbear.
Starting HOSTAP Daemon: nl80211 not found.
Starting syslogd/klogd: done
Starting tcf-agent: OK
MYDISTRO 0.1 zc706-zynq7 /dev/ttyPS0
zc706-zynq7 login: [ 8.348120] macb e000b000.ps7-ethernet eth0: link up (1000/Full)
zc706-zynq7 login: root
root@zc706-zynq7:~#
是的,root 帐户可以工作了!
现在的问题是:使 root 帐户正常工作的 DISTRO_FEATURE 缺少的关键是什么?