无法登录buildroot

unable to login buildroot

我使用 buildroot 并编译 linux kenrenl,当我 运行 QEMU 时,我无法登录到 builroot,因为我看不到登录消息 "Welcome to buildroot",

ata2.01: NODEV after polling detection
ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
ata1.01: NODEV after polling detection
ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
ata1.00: 11502 sectors, multi 16: LBA48 
ata1.00: configured for MWDMA2
ata2.00: configured for MWDMA2
scsi 0:0:0:0: Direct-Access     ATA      QEMU HARDDISK    2.5+ PQ: 0 
ANSI: 5
sd 0:0:0:0: [sda] 11502 512-byte logical blocks: (5.89 MB/5.62 MiB)
scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.5+ PQ: 0 
ANSI: 5
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't 
support DPO or FUA
sd 0:0:0:0: [sda] Attached SCSI disk
input: ImExPS/2 Generic Explorer Mouse as 
/devices/platform/i8042/serio1/input/input3
EXT4-fs (sda): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (sda): mounting ext2 file system using the ext4 subsystem
EXT4-fs (sda): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext2 filesystem) readonly on device 8:0.
devtmpfs: mounted
Freeing unused kernel memory: 832K (ffffffff8186e000 - 
ffffffff8193e000)
Write protecting the kernel read-only data: 8192k
Freeing unused kernel memory: 1212K (ffff8800014d1000 - 
ffff880001600000)
Freeing unused kernel memory: 536K (ffff88000177a000 - 
ffff880001800000)
random: fast init done
EXT4-fs (sda): warning: mounting unchecked fs, running e2fsck is 
recommended
EXT4-fs (sda): re-mounted. Opts: 
block_validity,barrier,user_xattr,errors=remount-ro
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

### here, i was unable to see message command for login,

QEMU:

qemu-system-x86_64 -hda buildroot/buildroot 2017.02.2/output/images/rootfs.ext2  -m 2G -smp 2 -nographic -kernel buildroot/buildroot-2017.02.2/output/images/bzImage -append "console=ttyS0 root=/dev/sda debug earlyprintk=serial slub_debug=QUZ"

我不明白为什么我看不到消息 "Welcome to buildroot" ??

也许您需要修改引导加载程序参数..将控制台设置为 ttyS? 或者您可以修改 rootfs.tar,在 rootfs 中,编辑 etc/inittab 例如,将 ttymxc1 更改为 ttymxc0:

# Put a getty on the serial port
ttymxc0::respawn:/sbin/getty -L  ttymxc0 0 vt100 # GENERIC_SERIAL

如果您使用 QEMU nographic 选项,请检查以下要点:

  • BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" 在 buildroot 配置文件中
  • console=ttyS0 在 运行 QEMU
  • 时的内核参数中