Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: Dongli Zhang <dongli.zhang@oracle.com>
To: Pintu Agarwal <pintu.ping@gmail.com>
Cc: kernelnewbies@kernelnewbies.org,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	open list <linux-kernel@vger.kernel.org>,
	qemu-devel@nongnu.org, Nick Kossifidis <mick@ics.forth.gr>,
	linux-riscv@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [Qemu-devel] ssh session with qemu-arm using busybox
Date: Wed, 13 Mar 2019 07:12:55 +0800
Message-ID: <dde54d03-0231-6d3e-46ff-519df15fe077@oracle.com> (raw)
In-Reply-To: <CAOuPNLhvPypbTU+AbodYTFdGHW_Uqxj4UQvo6usNCKZh30uTig@mail.gmail.com>



On 3/13/19 1:08 AM, Pintu Agarwal wrote:
> On Tue, Mar 12, 2019 at 7:41 PM Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>>
>>
>>
>> On 12/03/2019 14:02, Pintu Agarwal wrote:
>>>>
>>>> -netdev user,id=unet,hostfwd=tcp::2222-:22 \
>>>> -net user \
>>>>
>>>> and you 'll get guest's port 22 to be forwarded to hosts port 2222, so
>>>> you can do
>>>>
>>>> ssh root@localhost:2222
>>>>
>>>> from the host.
>>>>
>>>
>>> I tried many different options, but unfortunately none worked for me.
>>> 1)
>>> qemu-system-arm -M vexpress-a9 -m 1024M -kernel
>>> ../KERNEL/linux/arch/arm/boot/zImage -dtb
>>> ../KERNEL/linux/arch/arm/boot/dts/vexpress-v2p-ca9.dtb -initrd
>>> rootfs.img.gz -append "console=ttyAMA0 root=/dev/ram rdinit=/sbin/init
>>> ip=dhcp" -nographic -smp 4 -netdev user,id=unet,hostfwd=tcp::2222-:22
>>> -net user
>>>
>>> With this the eth0 interface is removed, and I see this message
>>> (although login works):
>>> qemu-system-arm: warning: hub 0 with no nics
>>> qemu-system-arm: warning: netdev unet has no peer
>>> Booting Linux on physical CPU 0x0
>>> <skip>
>>> NET: Registered protocol family 17
>>> <skip>
>>> Run /sbin/init as init process
>>> ifconfig: SIOCSIFADDR: No such device
>>> route: SIOCADDRT: Network is unreachable
>>>
>>> But, ssh is still not working.
>>> ssh root@localhost:2222
>>> ssh: Could not resolve hostname localhost:2222: Name or service not known
>>
>> man ssh
>>
>> +
>>
>> Make sure you have sshd in your custom rootfs and has been stared.
>>
> 
> My busybox is a very minimal rootfs. It hardly contains any commands.
> Is there any precompiled busybox for arm (cpio image), available (with
> ssh, scp and networking in-built), which I can use directly to boot ?
> 
> what else I am missing to make ssh/scp working on qemu ?
> 

When I was working on arm binary rewriting/instrumentation in the university, I
use the image created by Linaro.

http://releases.linaro.org/

One example would be

https://www.linaro.org/blog/linaro-16-04-release-available-for-download-2/

or

https://releases.linaro.org/archive/ubuntu/images/developer-arm64/15.12/linaro-vivid-developer-20151215-114.tar.gz

The license should be good for academia. I do not know if there is any
restrictions on commercial/industry usage.

Thank for Linaro again for providing those images which helped me a lot when I
was in the university!

Dongli Zhang


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 14:34 Pintu Agarwal
2019-03-11 18:28 ` Nick Kossifidis
2019-03-12 14:02   ` Pintu Agarwal
2019-03-12 14:11     ` Suzuki K Poulose
2019-03-12 17:08       ` Pintu Agarwal
2019-03-12 23:12         ` Dongli Zhang [this message]
2019-03-11 19:33 ` [Qemu-devel] " BALATON Zoltan

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dde54d03-0231-6d3e-46ff-519df15fe077@oracle.com \
    --to=dongli.zhang@oracle.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mick@ics.forth.gr \
    --cc=pintu.ping@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git