0

I run Linux on QEMU with emulation whole SOC. Linux loads successfully. Busybox is init process for Linux. But when Linux run it, there are no any out in console. And it freezes on command /dev/console::sysinit:-/bin/ash from inittab file. Also I tried to run print("Hello world") program as init process, but result is the same. There are no output in console.

I see all kernel debug output in console. Also I see, that driver for UART is loaded.

Inittab content

::sysinit:/bin/busybox --install
::sysinit:/bin/mount -t devtmpfs devtmpfs /dev
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -t sysfs sysfs /sys
::sysinit:/usr/local/bin/kernloglvl 4
::sysinit:/etc/init.d/rc
::sysinit:/bin/mount -t nfs -o vers=3 -o nolock share:/srv/nfs /mnt/share
/dev/console::sysinit:-/bin/ash
::shutdown:/bin/umount -a -r
RazDva
  • 104
  • 10
  • What's your qemu command line? – nevilad Feb 17 '21 at 08:26
  • Sorry, I didn't understand the question – RazDva Feb 17 '21 at 10:09
  • How do yo run qemu? – nevilad Feb 17 '21 at 10:32
  • qemu-system-riscv64 -nographic -machine $(MACHINE) -s -S -drive file=$(SD_CARD_IMAGE),if=mtd,format=raw -bios $(ELF) -d guest_errors,unimp -smp 1 -m size=1G – RazDva Feb 17 '21 at 10:50
  • There are multiple questions in your question. First about no console output. Add "-serial stdio" to your command line. Second about freeze of inittab commands. Please add it's contents to your question, so I can see what runlevels are used. – nevilad Feb 17 '21 at 11:30
  • Whe I add ""-serial stdio", qemu says: "qemu-system-riscv64: -serial stdio: cannot use stdio by multiple character devices". Also I see kernel output in console. I don't see only init process output – RazDva Feb 17 '21 at 11:56
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/228838/discussion-between---and-nevilad). – RazDva Feb 17 '21 at 12:05
  • @0andriy you posted a link to the same question. Typo? – nevilad Feb 17 '21 at 12:29
  • This one: https://stackoverflow.com/questions/66204856/busybox-doesnt-run-console, thanks, @nevilad. – 0andriy Feb 17 '21 at 14:54

0 Answers0