qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: qemu + expect + Raspberry Pi = sudden stop of accepting commands


From: Philippe Mathieu-Daudé
Subject: Re: qemu + expect + Raspberry Pi = sudden stop of accepting commands
Date: Fri, 22 Jan 2021 15:26:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

Hi Dilyan,

On 1/22/21 2:01 PM, Dilyan Palauzov wrote:
> Hello,
> 
...

> root@raspberrypi:/home/pi# echo Q1
> Q1
> root@raspberrypi:/home/pi# apt-get clean
> root@raspberrypi:/home/pi#
> real    23m20.381s
> user    0m29.330s
> sys     0m3.832s
> ---------------
> 
> Thus the last commands from the expect script are not executed.
> 
> Why are the last commands from the expect script not executed any why
> does qemu terminate?  I use version 5.1.0 coming with Fedora.

Was your script working before on an earlier version?

> Any help will be highly appreciated, as I could not figure this out
> myself for several days.
> 
> Kind regards
>   Дилян
> 
> 
> 
> -------------- bootstrap script ----------
> #!/usr/bin/expect -f
> #TODO Set WIRELESS LAN COUNTRY
> set IMG "2021-01-11-raspios-buster-armhf.img"
> set lang "bg_BG"
> set TZ "Europe/Sofia"
> set URL "https://www.abc.de/t?h";
> set NTP_SERVERS "0.bg.pool.ntp.org 1.bg.pool.ntp.org 2.bg.pool.ntp.org
> 3.bg.pool.ntp.org"
> set timeout -1
> spawn qemu-system-arm -dtb ./versatile-pb-buster.dtb  -kernel
> ./kernel-qemu-4.19.50-buster -cpu arm1176 -m 256 -M versatilepb -append
> "root=/dev/sda2 rootfstype=ext4 rw"  -drive
> driver=raw,file=$IMG,index=0,media=disk -nographic
> #-netdev user,id=net0,hostfwd=tcp::10022-:22
...

> send "cat > /etc/xdg/lxsession/LXDE-pi/autostart << EOF\n"
> send "@lxpanel --profile LXDE-pi\n"
> send "@pcmanfm --desktop --profile LXDE-pi\n"
> send "#@unclutter -idle 10\n"
> send "@xset s off\n"
> send "@xset -dpms\n"
> send "@xset s noblank\n"
> send "/usr/bin/chromium-browser --no-sandbox --no-first-run --kiosk\n"
> send "EOF\n"
> send "echo Q1\n"
> expect "Q1"
> expect "# "
> send "apt-get clean\n"

My guess is apt-get is consuming the following console input.

First it is recommended to set DEBIAN_FRONTEND=noninteractive,
second you need to be sure your command is finished before
going on.

> send "cat /dev/zero > zero.file\n"
> send "sync\n"
> send "rm zero.file\n"
> expect "# "
> send "sync\n"
> send "sleep 3\n"
> send "poweroff\n"
> 
> #set background image
> #set plymouth image during boot
> #disable bluetooth, if enabled
> #disable/configure wlan

I don't think this is a QEMU problem ;)

Regards,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]