From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH] ARM: Add support for semihosting
Date: Tue, 20 Oct 2015 18:14:19 -0700 [thread overview]
Message-ID: <CAHQ1cqH=X8gACCkY5rnmg+y46za1zRD6bjk9j2x8PoWC+0LJjA@mail.gmail.com> (raw)
In-Reply-To: <20151019073643.GI14476@pengutronix.de>
>> +Not all of the I/O primitives neccessary to implement a full
>> +filesystem are exposed in ARM semihosting API and because of that some
>> +aspects of filesystem funcionality are missing. Implementation does
>> +not have support for listing directories. This means a
>> +:ref:`command_ls` to a SMHFS-mounted path will show an empty
>> +directory. Nevertheless, the files are there.
>
> Is adding ls support a matter of implementing it? Does the semihosting
> protocol support ls?
Unfortunately the protocol doesn't support any directory related
operations. It is possible to implement custom semihosting "syscalls"
and it wouldn't be that hard to add support of those to OpenOCD, but
that would leave out other debugging tools.
>
>> +
>> +Example::
>> +
>> + mount -t smhfs /dev/null /mnt/smhfs
>
> Are actions on the host required to do that? Maybe some example for
> using this with openocd would be useful.
I completely forgot to add that to the documentation. Will fix that in
the next version of the patch.
>> +
>> + if (semihosting_remove(pathname) != 0)
>> + return semihosting_errno();
>
> Are the errnos semihosting returns compatible with the barebox errnos?
I can't speak for any implementation other that OpenOCD's, but what
that tool does is it returns the value of host's 'errno' after
executing a corresponding syscall.
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-10-21 1:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 5:33 Andrey Smirnov
2015-10-19 7:26 ` Antony Pavlov
2015-10-19 17:48 ` Andrey Smirnov
2015-10-19 7:36 ` Sascha Hauer
2015-10-21 1:14 ` Andrey Smirnov [this message]
2015-10-21 7:26 ` Sascha Hauer
Reply instructions:
You may reply publicly 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='CAHQ1cqH=X8gACCkY5rnmg+y46za1zRD6bjk9j2x8PoWC+0LJjA@mail.gmail.com' \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox