Re: [EXT] Re: Bugs in SSH module

2021-01-25 Thread nerijus--- via
Hi,

it is written in the email you quoted:
you can pass QEMU configure "--disable-libssh".

Regards,
Nerijus

On Mon, 25 Jan 2021 02:12:25 + Sawyer Liu  wrote:

> Hello peter,
>   How to disable libssh for QEMU? Thanks. 
> 
> 
> Best Regards
> Sawyer Liu(刘维峰)
> 
> -Original Message-
> From: Peter Maydell  
> Sent: Friday, January 22, 2021 18:23
> To: Sawyer Liu 
> Cc: qemu-discuss@nongnu.org
> Subject: [EXT] Re: Bugs in SSH module
> 
> Caution: EXT Email
> 
> On Fri, 22 Jan 2021 at 03:49, Sawyer Liu  wrote:
> >I found same question, see 
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fqemu%2F%2Bbug%2F1838763&data=04%7C01%7Csawyer.liu%40nxp.com%7Ce0fe76b8e8c6425ecadb08d8bebfc750%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637469078177645478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=zY4s4CwGEGxriaU4vjYSxhHmP%2F7H%2FyizIaGv16YDGAQ%3D&reserved=0.
> >  The status is “Won’t Fix”. Do you have any result?
> 
> The only feature that compiling QEMU with libssh adds is support for a 'ssh' 
> block backend. That means you can pass '-drive file=ssh://host/path/to/file' 
> to get QEMU to open a disk image on a remote machine.
> 
> If you don't need to use that feature, you can pass QEMU configure 
> "--disable-libssh". QEMU will then just not try to use the Ubuntu libssh.
> 
> There seems to be some confusion in this thread about whether the problem is 
> libssh or libssl. These are two different libraries. The bug report you give 
> the URL for is for libssh.
> 
> thanks
> -- PMM




RE: [EXT] Re: Bugs in SSH module

2021-01-25 Thread Sawyer Liu
Hello Nerijus,
Sorry, I am newer for QEMU, could you tell me details how to config 
QEMU? Thanks. 

Best Regards
Sawyer Liu(刘维峰)

-Original Message-
From: Nerijus Baliunas  
Sent: Monday, January 25, 2021 16:42
To: Sawyer Liu 
Cc: qemu-discuss@nongnu.org
Subject: Re: [EXT] Re: Bugs in SSH module

Caution: EXT Email

Hi,

it is written in the email you quoted:
you can pass QEMU configure "--disable-libssh".

Regards,
Nerijus

On Mon, 25 Jan 2021 02:12:25 + Sawyer Liu  wrote:

> Hello peter,
>   How to disable libssh for QEMU? Thanks.
>
>
> Best Regards
> Sawyer Liu(Áõά·å)
>
> -Original Message-
> From: Peter Maydell 
> Sent: Friday, January 22, 2021 18:23
> To: Sawyer Liu 
> Cc: qemu-discuss@nongnu.org
> Subject: [EXT] Re: Bugs in SSH module
>
> Caution: EXT Email
>
> On Fri, 22 Jan 2021 at 03:49, Sawyer Liu  wrote:
> >I found same question, see 
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fqemu%2F%2Bbug%2F1838763&data=04%7C01%7Csawyer.liu%40nxp.com%7C99cf5778385f4e32f45a08d8c10d2728%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637471609539122288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=voxHT4Tiiimm%2BxtoWLPEc8AbN4OyVj3PI1H7svrOuGk%3D&reserved=0.
> >  The status is ¡°Won¡¯t Fix¡±. Do you have any result?
>
> The only feature that compiling QEMU with libssh adds is support for a 'ssh' 
> block backend. That means you can pass '-drive file=ssh://host/path/to/file' 
> to get QEMU to open a disk image on a remote machine.
>
> If you don't need to use that feature, you can pass QEMU configure 
> "--disable-libssh". QEMU will then just not try to use the Ubuntu libssh.
>
> There seems to be some confusion in this thread about whether the problem is 
> libssh or libssl. These are two different libraries. The bug report you give 
> the URL for is for libssh.
>
> thanks
> -- PMM



Re: [EXT] Re: Bugs in SSH module

2021-01-25 Thread Berto Furth
I believe we're talking about when you run "configure" to compile QEMU from the 
source code. It's not a parameter you pass to QEMU itself.

So when you compile QEMU from the source code you first run something like...

configure --disable-libssh 
make

Run "configure --help" to see all the available options.

Then QEMU will compile without trying to use libssh and hopefully you'll avoid 
all those errors.

Good luck!

On Mon, 25 Jan 2021, at 20:04, Sawyer Liu wrote:
> Hello Nerijus,
>   Sorry, I am newer for QEMU, could you tell me details how to config 
> QEMU? Thanks. 
> 
> Best Regards
> Sawyer Liu(刘维峰)
> 
> -Original Message-
> From: Nerijus Baliunas  
> Sent: Monday, January 25, 2021 16:42
> To: Sawyer Liu 
> Cc: qemu-discuss@nongnu.org
> Subject: Re: [EXT] Re: Bugs in SSH module
> 
> Caution: EXT Email
> 
> Hi,
> 
> it is written in the email you quoted:
> you can pass QEMU configure "--disable-libssh".
> 
> Regards,
> Nerijus
> 
> On Mon, 25 Jan 2021 02:12:25 + Sawyer Liu  wrote:
> 
> > Hello peter,
> >   How to disable libssh for QEMU? Thanks.
> >
> >
> > Best Regards
> > Sawyer Liu(Áõά·å)
> >
> > -Original Message-
> > From: Peter Maydell 
> > Sent: Friday, January 22, 2021 18:23
> > To: Sawyer Liu 
> > Cc: qemu-discuss@nongnu.org
> > Subject: [EXT] Re: Bugs in SSH module
> >
> > Caution: EXT Email
> >
> > On Fri, 22 Jan 2021 at 03:49, Sawyer Liu  wrote:
> > >I found same question, see 
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fqemu%2F%2Bbug%2F1838763&data=04%7C01%7Csawyer.liu%40nxp.com%7C99cf5778385f4e32f45a08d8c10d2728%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637471609539122288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=voxHT4Tiiimm%2BxtoWLPEc8AbN4OyVj3PI1H7svrOuGk%3D&reserved=0.
> > >  The status is ¡°Won¡¯t Fix¡±. Do you have any result?
> >
> > The only feature that compiling QEMU with libssh adds is support for a 
> > 'ssh' block backend. That means you can pass '-drive 
> > file=ssh://host/path/to/file' to get QEMU to open a disk image on a remote 
> > machine.
> >
> > If you don't need to use that feature, you can pass QEMU configure 
> > "--disable-libssh". QEMU will then just not try to use the Ubuntu libssh.
> >
> > There seems to be some confusion in this thread about whether the problem 
> > is libssh or libssl. These are two different libraries. The bug report you 
> > give the URL for is for libssh.
> >
> > thanks
> > -- PMM
> 
>



On emulating Raspberry Pi

2021-01-25 Thread Дилян Палаузов
Hello,

I download the Rapsberry OS
image 
https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-01-12/2021-01-11-raspios-buster-armhf.zip

the kernel kernel-qemu-4.19.50-buster and versatile-pb-buster.dtb
from https://github.com/dhruvvyas90/qemu-rpi-kernel and run with
version 5.2.0:


$ 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=./2021-01-
11-raspios-buster-armhf.img,index=0,media=disk -serial stdio


1. On the running system I type “sudo poweroff”.  Why do I get this
error, instead of clean shutdown:

[  OK  ] Removed slice system-systemd\x2dfsck.slice.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
[  OK  ] Started Power-Off.
[  OK  ] Reached target Power-Off.
reboot: System halted
Kernel panic - not syncing: Attempted to kill init! exitcode=0x

CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.19.50+ #1
Hardware name: ARM-Versatile (Device Tree Support)
[] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[] (show_stack) from [] (panic+0xc8/0x240)
[] (panic) from [] (do_exit+0x950/0x9fc)
[] (do_exit) from [] (sys_reboot+0x1a0/0x1f0)
[] (sys_reboot) from [] (ret_fast_syscall+0x0/0x54)
Exception stack(0xcf823fa8 to 0xcf823ff0)
3fa0:     fee1dead 28121969 4321fedc 26f8ad00
3fc0:    0058 0fff be905c08  00424b80
3fe0: 00436e3c be905b88 004214a8 b6e54a38
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x
 ]---


2. The raspberry Pi OS image has two partitions, fdisk -l

2021-01-11-raspios-buster-armhf.img18192  532479   524288  256M  c W95 
FAT32 (LBA)
2021-01-11-raspios-buster-armhf.img2  532480 7741439  7208960  3.4G 83 Linux


so I can mount the first one it with

sudo mount -o offset=4194304 -t vfat 2021-01-11-raspios-buster-armhf.img disk/

It contains: $ ls

bcm2708-rpi-b.dtb*   bcm2709-rpi-2-b.dtb*   bcm2711-rpi-4-b.dtb*  
fixup4cd.dat*  fixup_db.dat*  kernel.img*start4x.elf*
bcm2708-rpi-b-plus.dtb*  bcm2710-rpi-2-b.dtb*   bcm2711-rpi-cm4.dtb*  
fixup4.dat*fixup_x.dat*   LICENCE.broadcom*  start_cd.elf*
bcm2708-rpi-b-rev1.dtb*  bcm2710-rpi-3-b.dtb*   bootcode.bin* 
fixup4db.dat*  issue.txt* overlays/  start_db.elf*
bcm2708-rpi-cm.dtb*  bcm2710-rpi-3-b-plus.dtb*  cmdline.txt*  
fixup4x.dat*   kernel7.img*   start4cd.elf*  start.elf*
bcm2708-rpi-zero.dtb*bcm2710-rpi-cm3.dtb*   config.txt*   
fixup_cd.dat*  kernel7l.img*  start4db.elf*  start_x.elf*
bcm2708-rpi-zero-w.dtb*  bcm2711-rpi-400.dtb*   COPYING.linux*
fixup.dat* kernel8.img*   start4.elf*


Why does the internet say, that the bundled in the raw image kernels cannot be 
used with Qemu, but the one I have written above must be used?

Can youn give me a suggestion, how to run Qemu 5.2, so that it emulates 
Rasberry 3A+, Raspberry 3B, and Rapsberry 3B+ with WiFi card?

Thanks
  Дилян




file permission error during make after source change

2021-01-25 Thread ckim
Hello,

I added a debug print code in the source (5.1.0) in hw/arm/virt.c and tried
'make',

But it gives me error telling me some files are not writable.

I found those files under aarch64-softmmu and trace are not writeable for
normal user.

For example aarch64-softmmu/config-devices.mak.old and
trace/generated-tcg-tracers.h-timestamp are two of those files.

What is the proper way of 'make' after the source change? 

(because I could run 'make' and 'sudo make install' before, I'm curis why
second 'make' is not possible)

Thank you

Chan Kim

 

 



RE: file permission error during make after source change

2021-01-25 Thread ckim
I found just 'sudo make' solves it.

Chan Kim

 

From: c...@etri.re.kr  
Sent: Tuesday, January 26, 2021 11:42 AM
To: 'qemu-discuss' 
Subject: file permission error during make after source change

 

Hello,

I added a debug print code in the source (5.1.0) in hw/arm/virt.c and tried
'make',

But it gives me error telling me some files are not writable.

I found those files under aarch64-softmmu and trace are not writeable for
normal user.

For example aarch64-softmmu/config-devices.mak.old and
trace/generated-tcg-tracers.h-timestamp are two of those files.

What is the proper way of 'make' after the source change? 

(because I could run 'make' and 'sudo make install' before, I'm curis why
second 'make' is not possible)

Thank you

Chan Kim

 

 



qemu hello world prints nothing..

2021-01-25 Thread ckim
Hello all,

 

I wish someone could help me here. Running a simple program on qemu is not
easy for me.

I tried to run baremetal hello world program and found this web page. 

(https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-usi
ng-qemu/)

This page is somewhat so old, but I decided to give it a try.

 

I followed the content except I changed 

" LDR sp, =stack_top" 

to

"ldr x5, stack_top

msr sp_el0, x5"

(I'm not sure if this is ok BTW.)

 

And I used aarch64-elf- tool (this is for baremetal).

So the compile is ok until test.elf and test.bin.

 

When I execute 

"qemu-system-aarch64 -M virt -cpu cortex-a57 -kernel test.bin -nographic"

nothing comes out.

What can be wrong? 

 

Chan Kim