From: "Mike Frysinger (vapier)" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo commit in xml/htdocs/proj/en/base/embedded/handbook: cross-qemu.xml
Date: Fri, 11 May 2012 07:42:53 +0000 (UTC) [thread overview]
Message-ID: <20120511074253.09CF02004B@flycatcher.gentoo.org> (raw)
vapier 12/05/11 07:42:53
Modified: cross-qemu.xml
Log:
include string.h for memcpy() #415211 by Vladimir
Revision Changes Path
1.5 xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml?r1=1.4&r2=1.5
Index: cross-qemu.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cross-qemu.xml 30 Aug 2010 03:59:07 -0000 1.4
+++ cross-qemu.xml 11 May 2012 07:42:52 -0000 1.5
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml,v 1.4 2010/08/30 03:59:07 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/proj/en/base/embedded/handbook/cross-qemu.xml,v 1.5 2012/05/11 07:42:52 vapier Exp $ -->
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
@@ -11,8 +11,8 @@
How To compile with QEMU user.
</abstract>
-<version>0.2</version>
-<date>2010-02-14</date>
+<version>0.3</version>
+<date>2012-05-11</date>
<section>
<title>Usage</title>
@@ -85,25 +85,25 @@
</p>
<pre caption="qemu-wrapper">
-#include <stdio.h>
+#include <string.h>
#include <unistd.h>
int main(int argc, char **argv, char **envp) {
char *newargv[argc + 3];
- newargv[0] = argv[0];
+ newargv[0] = argv[0];
newargv[1] = "-cpu";
newargv[2] = "<i>cortex-a8</i>";
-
- memcpy(&newargv[3], &argv[1], sizeof(*argv) * (argc - 1));
+
+ memcpy(&newargv[3], &argv[1], sizeof(*argv) * (argc - 1));
newargv[argc + 2] = NULL;
return execve("<i>/usr/bin/qemu-arm</i>", newargv, envp);
}
</pre>
<p>
-Compile the wrapper with <c>gcc -static qemu-wrapper.c -o qemu-wrapper</c> and
-copy into the chroot. Notice the first example arm entry in the
+Compile the wrapper with <c>gcc -static qemu-wrapper.c -O3 -s -o qemu-wrapper</c>
+and copy into the chroot. Notice the first example arm entry in the
<c>binfmt_misc</c> section uses this method.
</p>
next reply other threads:[~2012-05-11 7:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 7:42 Mike Frysinger (vapier) [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-06-15 5:55 [gentoo-commits] gentoo commit in xml/htdocs/proj/en/base/embedded/handbook: cross-qemu.xml Mike Frysinger (vapier)
2014-06-14 23:19 Mike Frysinger (vapier)
2013-12-11 7:18 Mike Frysinger (vapier)
2013-12-06 18:49 Raul Porcel (armin76)
2010-02-14 23:56 Ned Ludd (solar)
2010-02-14 23:21 Ned Ludd (solar)
2009-03-09 17:48 Alexey Shvetsov (alexxy)
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=20120511074253.09CF02004B@flycatcher.gentoo.org \
--to=vapier@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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