Buildroot - 构建了一个文件系统,如何登录?引导挂起

jul*_*mme 2 linux embedded boot embedded-linux buildroot

有人可以帮助我理解我需要如何配置buildroot,以便我能够成功启动自己的文件系统并登录到它?

我有一个(貌似)工作内核,现在我创建了自己的文件系统(除了将控制台设置为ttyAMA0之外,没有真正更改构建根目录中的任何设置),但启动过程似乎挂起而没有任何问题:

....
[    3.130000] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    3.140000] Freeing init memory: 144K
Starting logging: OK
Starting network...
ip: RTNETLINK answers: Operation not permitted
ip: SIOCSIFFLAGS: Permission denied
Run Code Online (Sandbox Code Playgroud)

这里可以看到整个启动日志:http://paste.ubuntu.com/1364407/

我知道/ etc/inittab控制启动过程,内容如下所示:

# Startup the system
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_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 sttyAMA0::respawn:/sbin/getty -L ttyAMA0 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)

有关我的配置有什么问题的建议吗?在创建自己的Linux系统时,我可以在哪里获得关于"通常必要的配置"的概述?

Tho*_*oni 6

This problem was raised by the submitter on the Buildroot mailing list. The solution was that the submitter was using Buildroot the contents of output/target directory directly as its root filesystem, even though the Buildroot documentation explicitly tells not to do so. This is because Buildroot does not run as root, and therefore cannot create device files or adjust permissions/ownerships properly in output/target. These steps are done when creating the root filesystem images, thanks to a magic tool called fakeroot.

Therefore, if someone wants the root filesystem to extract on a SD card partition or something like that, one should ask Buildroot to generate a tar image, and then extract it as root in the SD card partition.

Since this problem was quite common, we have now added a file in output/target called THIS_IS_NOT_YOUR_ROOT_FILESYTEM which contains details about this issue. See http://git.buildroot.net/buildroot/commit/?id=9226a9907c4eb0fffab777f50e88b74aa14d1737.