<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; Запуск ARM-ELF на x86_64]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=35008</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=35008&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Запуск ARM-ELF на x86_64».]]></description>
		<lastBuildDate>Thu, 29 May 2014 19:57:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410825#p410825</link>
			<description><![CDATA[<p><strong>andreil</strong>, это... я только что скачал тот stage3-armeb-uclibc-softfloat-2005.1.tar.bz2 и спокойно в него за&#039;chroot&#039;ился... вообще без проблем...<br />правда из-за древности обновлять её будет не легко...</p><p>[added] <br />кстати, заглянул в логи и конфигурационные скрипты gcc — похоже CHOST того stage&#039;а устарел... crossdev uclibc вот с таким tuple&#039;ом собирает: armeb-softfloat-linux-uclibceabi</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Thu, 29 May 2014 19:57:19 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410825#p410825</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410824#p410824</link>
			<description><![CDATA[<div class="quotebox"><cite>Fat-Zer пишет:</cite><blockquote><p>благо, в генте он собирается относительно просто... у меня правда с uclibc и softfloat&#039;ом кросс не завёлся, а вот gnueabi прошло на ура... если оно принципиально, то скорей всего придётся подумать...</p></blockquote></div><p>crossdev косячит с uclibc - пришлось вручную собирать. Как раз сегодня на работе и собрал. Завтра буду делать stage1...</p>]]></description>
			<author><![CDATA[null@example.com (andreil)]]></author>
			<pubDate>Thu, 29 May 2014 19:52:28 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410824#p410824</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410819#p410819</link>
			<description><![CDATA[<div class="quotebox"><cite>andreil пишет:</cite><blockquote><p>То есть всё вроде как работает, но с бинарниками из <a href="http://distfiles.gentoo.org/experimenta">http://distfiles.gentoo.org/experimenta</a> … ed/stages/ не работает</p></blockquote></div><p>ты на даты то глянь — они же древние, как гавно мамонта... давай читай хендбук с начала и кросскомпилом орудуй... =)<br />благо, в генте он собирается относительно просто... у меня правда с uclibc и softfloat&#039;ом кросс не завёлся, а вот gnueabi прошло на ура... если оно принципиально, то скорей всего придётся подумать...</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Thu, 29 May 2014 18:45:53 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410819#p410819</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410766#p410766</link>
			<description><![CDATA[<p>Собрал bysybox. Естественно, получился один бинарник и куча линков. Запустил через chroot:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # chroot .<br />/lib/ld-uClibc.so.0: Invalid ELF image for this architecture<br /></div><br />Копнув глубже, увидел, что косяк в скомпиленном busybox:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">ndreilPC root # file lib/ld-uClibc-0.9.27.so <br />lib/ld-uClibc-0.9.27.so: ELF 32-bit MSB shared object, ARM, version 1, dynamically linked, stripped<br />andreilPC root # file bin/busybox <br />bin/busybox: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), stripped</div><br />Надо компилятор иначе собирать было, где-то я скосячил <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /> ...</p><p>За сегодня с помощью buildroot собрал основу ARM-системы (для тестов). Попытался там запустить:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC target_ # chroot . /bin/busybox <br />BusyBox v1.22.1 (2014-05-28 16:33:21 FET) multi-call binary.<br />BusyBox is copyrighted by many authors between 1998-2012.<br />Licensed under GPLv2. See source distribution for detailed<br />copyright notices.<br /></div><br />То есть всё вроде как работает, но с бинарниками из <a href="http://distfiles.gentoo.org/experimental/arm/embedded/stages/">http://distfiles.gentoo.org/experimenta … ed/stages/</a> не работает <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /><br />Буду пытаться сделать из полученного костяка Gentoo... Предстоит много секаса с portage и пр...</p>]]></description>
			<author><![CDATA[null@example.com (andreil)]]></author>
			<pubDate>Thu, 29 May 2014 13:49:34 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410766#p410766</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410716#p410716</link>
			<description><![CDATA[<div class="quotebox"><cite>andreil пишет:</cite><blockquote><p>То есть оно пытается и ещё кучу пакетов установить</p></blockquote></div><p><strong>emerge --nodeps</strong> есть... но можно и ручками...</p><div class="quotebox"><cite>andreil пишет:</cite><blockquote><p>Там бинарники ТОЛЬКО для хостовой машины.</p></blockquote></div><p>так поидей и должно быть, или я не правильно понял «ТОЛЬКО»...<br /></p><div class="quotebox"><cite>andreil пишет:</cite><blockquote><p>При этом ручной запуск файла работает, то есть проблема не в хостовом qemu:</p></blockquote></div><p>попробуй с LD&#039;шными переменными поиграться, чтобы из хост системы запустить... сейчас рецепт не дам, но все необходимые ингредиенты есть в <strong>man ld.so</strong></p><div class="quotebox"><cite>andreil пишет:</cite><blockquote><p>/bin/bash: /bin/bash: cannot execute binary file</p></blockquote></div><p>гм... это похоже уже пишет сам bash из chroot&#039;а... попробуй собери статический busybox кросскомпилом и за&#039;chroot&#039;ся в него....</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Thu, 29 May 2014 10:08:12 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410716#p410716</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410694#p410694</link>
			<description><![CDATA[<p>Распаковал qemu вручную. Теперь вроде бы пытается запуститься, но с другой ошибкой:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # chroot .<br />/bin/bash: /bin/bash: cannot execute binary file</div><br />При этом ручной запуск файла работает, то есть проблема не в хостовом qemu:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # ./bin/bash<br />/lib/ld-uClibc.so.0: No such file or directory</div></p>]]></description>
			<author><![CDATA[null@example.com (andreil)]]></author>
			<pubDate>Thu, 29 May 2014 05:06:17 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410694#p410694</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410693#p410693</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>в-третьих, qemu надо было собрать так: USE=&quot;static-user&quot; emerge -1b app-emulation/qemu</p></blockquote></div><p>Пересобрал вчера - результат прежний.<br /></p><div class="quotebox"><blockquote><p>про -b или забыли или потерялось в процессе переписывания...</p></blockquote></div><p>Оно у меня в make.conf прописано:<br /></p><div class="codebox"><pre><code>EMERGE_DEFAULT_OPTS=&quot;-j3 -b&quot;</code></pre></div><div class="quotebox"><blockquote><p>чтобы оставить всё чистеньким, старый пакет можно перед этим&nbsp; удалить: ROOT=$PWD/ emerge -С qemu-user</p></blockquote></div><p>Удалил. Пытаюсь установить бинарный qemu:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # ROOT=$PWD/ emerge -K qemu&nbsp; <br />Calculating dependencies... done!</p><p>emerge: there are no ebuilds to satisfy &quot;x11-misc/shared-mime-info&quot; for /media/work/Dev/ARM/NAS/root/.<br />(dependency required by &quot;dev-libs/glib-2.38.2-r1&quot; [binary])<br />(dependency required by &quot;app-emulation/qemu-1.5.3&quot; [binary])<br />(dependency required by &quot;qemu&quot; [argument])</div><br />То есть оно пытается и ещё кучу пакетов установить <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /></p><p>И ещё - посмотрел содержимое бинарного пакета qemu, сгенерированного после emerge. Там бинарники ТОЛЬКО для хостовой машины. Попробую вручную скопировать файлы...</p>]]></description>
			<author><![CDATA[null@example.com (andreil)]]></author>
			<pubDate>Thu, 29 May 2014 04:56:44 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410693#p410693</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410651#p410651</link>
			<description><![CDATA[<div class="quotebox"><cite>andreil пишет:</cite><blockquote><p>По мануалу сделал с новом корне:Консоль<br />ROOT=$PWD/ emerge -K qemu-user<br />Об этом, опять-же, писал в первом посте - вывел список установленных бинарников  в новом корне.</p></blockquote></div><p>во-первых в хендбуке опечатка: пробел между qemu и user, поэтому и спросил... <br />во-вторых, оно устарело... и то что qemu-user замаскирован тебя не смутило?<br />в-третьих, qemu надо было собрать так: <strong>USE=&quot;static-user&quot; emerge -1b app-emulation/qemu</strong><br />про static в хендбуке упомянули, но оно устарело и нужен только static-user... про <strong>-b</strong> или забыли или потерялось в процессе переписывания...<br />потом установить его надо будет так: <strong>ROOT=$PWD/ emerge -K qemu</strong>.</p><p>чтобы оставить всё чистеньким, старый пакет можно перед этим&nbsp; удалить: <strong>ROOT=$PWD/ emerge -С qemu-user</strong></p><p>ЗЫ: пряч простынки под спойлеры или в [сode]</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Wed, 28 May 2014 17:42:18 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410651#p410651</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410581#p410581</link>
			<description><![CDATA[<div class="quotebox"><cite>Fat-Zer пишет:</cite><blockquote><p>заклинания в binfmt_misc правильные прописал? для нужной архитектуры?</p></blockquote></div><p>Установлен демон, который поставил в автозагрузку:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC andreil # cat /proc/sys/fs/binfmt_misc/*<br />enabled<br />interpreter /usr/bin/qemu-arm<br />flags: P<br />offset 0<br />magic 7f454c4601010100000000000000000002002800<br />mask ffffffffffffff00ffffffffffff00fffeffffff<br />enabled<br />interpreter /usr/bin/qemu-armeb<br />flags: P<br />offset 0<br />magic 7f454c4601020100000000000000000000020028<br />mask ffffffffffffff00fffffffffffffffffffeffff<br />cat: /proc/sys/fs/binfmt_misc/register: Недопустимый аргумент<br />enabled</div><br />Я же приводил пример запуска ARM-ELF без chroot&#039;а - всё работает, но из-за неверного корня не находит библиотеки.<br /></p><div class="quotebox"><cite>Fat-Zer пишет:</cite><blockquote><p>а собран он правильно? <strong>emerge --info qemu</strong> <br />и в chroot не забыл его поставить?</p></blockquote></div><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC andreil # emerge --info qemu<br />Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)<br />=================================================================<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System Settings<br />=================================================================<br />System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Pentium-R-_CPU_G2130_@_3.20GHz-with-gentoo-2.2<br />KiB Mem:&nbsp; &nbsp; &nbsp;3993968 total,&nbsp; &nbsp; &nbsp;48476 free<br />KiB Swap:&nbsp; &nbsp; 4194300 total,&nbsp; &nbsp;4186420 free<br />Timestamp of tree: Tue, 27 May 2014 12:15:01 +0000<br />ld GNU ld (GNU Binutils) 2.23.2<br />ccache version 3.1.9 [disabled]<br />app-shells/bash:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4.2_p45<br />dev-java/java-config:&nbsp; &nbsp; &nbsp;2.2.0<br />dev-lang/python:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2.7.5-r3, 3.2.5-r3, 3.3.3<br />dev-util/ccache:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3.1.9-r3<br />dev-util/cmake:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2.8.12.2<br />dev-util/pkgconfig:&nbsp; &nbsp; &nbsp; &nbsp;0.28<br />sys-apps/baselayout:&nbsp; &nbsp; &nbsp; 2.2<br />sys-apps/openrc:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0.12.4<br />sys-apps/sandbox:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2.6-r1<br />sys-devel/autoconf:&nbsp; &nbsp; &nbsp; &nbsp;2.13, 2.69<br />sys-devel/automake:&nbsp; &nbsp; &nbsp; &nbsp;1.11.6, 1.12.6, 1.13.4<br />sys-devel/binutils:&nbsp; &nbsp; &nbsp; &nbsp;2.23.2<br />sys-devel/gcc:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4.7.3-r1<br />sys-devel/gcc-config:&nbsp; &nbsp; &nbsp;1.7.3<br />sys-devel/libtool:&nbsp; &nbsp; &nbsp; &nbsp; 2.4.2-r1<br />sys-devel/make:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3.82-r4<br />sys-kernel/linux-headers: 3.9 (virtual/os-headers)<br />sys-libs/glibc:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2.17<br />Repositories: gentoo ago ROKO__ stuff java spot-overlay gentoo-zh steam-overlay x-portage<br />ACCEPT_KEYWORDS=&quot;amd64&quot;<br />ACCEPT_LICENSE=&quot;* -@EULA&quot;<br />CBUILD=&quot;x86_64-pc-linux-gnu&quot;<br />CFLAGS=&quot;-O2 -pipe -march=native -fomit-frame-pointer -mfpmath=sse -march=native -funroll-loops -mmmx -msse -msse2 -msse3&quot;<br />CHOST=&quot;x86_64-pc-linux-gnu&quot;<br />CONFIG_PROTECT=&quot;/etc /usr/share/config /usr/share/gnupg/qualified.txt&quot;<br />CONFIG_PROTECT_MASK=&quot;/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo&quot;<br />CXXFLAGS=&quot;-O2 -pipe -march=native -fomit-frame-pointer -mfpmath=sse -march=native -funroll-loops -mmmx -msse -msse2 -msse3&quot;<br />DISTDIR=&quot;/usr/portage/distfiles&quot;<br />EMERGE_DEFAULT_OPTS=&quot;-j3 -b&quot;<br />FCFLAGS=&quot;-O2 -pipe&quot;<br />FEATURES=&quot;assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync&quot;<br />FFLAGS=&quot;-O2 -pipe&quot;<br />GENTOO_MIRRORS=&quot;http://ftp.byfly.by/pub/gentoo-distfiles/&quot;<br />LANG=&quot;ru_RU.utf8&quot;<br />LC_ALL=&quot;&quot;<br />LDFLAGS=&quot;-Wl,-O1 -Wl,--as-needed&quot;<br />MAKEOPTS=&quot;-j3&quot;<br />PKGDIR=&quot;/usr/portage/packages&quot;<br />PORTAGE_CONFIGROOT=&quot;/&quot;<br />PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;<br />PORTAGE_TMPDIR=&quot;/var/tmp&quot;<br />PORTDIR=&quot;/usr/portage&quot;<br />PORTDIR_OVERLAY=&quot;/var/lib/layman/ago /var/lib/layman/ROKO__ /var/lib/layman/stuff /var/lib/layman/java /var/lib/layman/spot-overlay /var/lib/layman/gentoo-zh /var/lib/layman/steam /usr/local/portage&quot;<br />SYNC=&quot;rsync://ftp.byfly.by/gentoo-portage/&quot;<br />USE=&quot;10bit X aac acl acpi alsa amd64 berkdb bindist bzip2 cairo cli consolekit cracklib crypt cuda cups curl cxx dbus directfb dri dts ebook egl encode exif fam fbcon ffmpeg flac fortran gdbm gif gles gles2 gpm hddtemp hwdb iconv ipv6 jpeg kde kipi lame lcms ldap libass libnotify lm_sensors lzma mad minizip mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ntfsprogs nvidia ogg openal opengl openmp oss pam pango pcre pdf phonon plasma png ppds pulseaudio pulsesound qt3support qt4 rar readline samba sasl sdl session sqlite sse sse2 ssl startup-notification svg tcpd theora tiff tk truetype udisks unicode upower usb vdpau vlc vorbis win32 wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zip zlib&quot; ABI_X86=&quot;32 64&quot; ALSA_CARDS=&quot;hda-intel&quot; APACHE2_MODULES=&quot;authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias&quot; CALLIGRA_FEATURES=&quot;kexi words flow plan sheets stage tables krita karbon braindump author&quot; CAMERAS=&quot;ptp2&quot; COLLECTD_PLUGINS=&quot;df interface irq load memory rrdtool swap syslog&quot; CURL_SSL=&quot;openssl&quot; ELIBC=&quot;glibc&quot; GPSD_PROTOCOLS=&quot;ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx&quot; INPUT_DEVICES=&quot;keyboard mouse evdev&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LIBREOFFICE_EXTENSIONS=&quot;presenter-console presenter-minimizer&quot; LINGUAS=&quot;ru en&quot; OFFICE_IMPLEMENTATION=&quot;libreoffice&quot; PHP_TARGETS=&quot;php5-5&quot; PYTHON_SINGLE_TARGET=&quot;python2_7&quot; PYTHON_TARGETS=&quot;python3_2 python2_7&quot; QEMU_SOFTMMU_TARGETS=&quot;arm armeb&quot; QEMU_USER_TARGETS=&quot;arm armeb&quot; RUBY_TARGETS=&quot;ruby19 ruby20&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;nvidia&quot; XTABLES_ADDONS=&quot;quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account&quot;<br />Unset:&nbsp; CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON</p><p>=================================================================<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Package Settings<br />=================================================================</p><p>app-emulation/qemu-1.5.3 was built with the following:<br />USE=&quot;aio alsa caps curl filecaps jpeg ncurses opengl png pulseaudio sasl sdl seccomp threads uuid vhost-net vnc -accessibility -bluetooth -debug -fdt (-glusterfs) -gtk -iscsi -mixemu -python -rbd (-selinux) -smartcard -spice -static -static-softmmu -static-user -systemtap -tci -test -tls -usbredir -vde -virtfs -xattr -xen -xfs&quot; PYTHON_TARGETS=&quot;python2_7 -python2_6&quot; QEMU_SOFTMMU_TARGETS=&quot;(arm) (-alpha) -cris -i386 -lm32 (-m68k) -microblaze -microblazeel (-mips) -mips64 -mips64el -mipsel -moxie -or32 (-ppc) (-ppc64) -ppcemb -s390x -sh4 -sh4eb (-sparc) -sparc64 -unicore32 -x86_64 -xtensa -xtensaeb&quot; QEMU_USER_TARGETS=&quot;(arm) armeb (-alpha) -cris -i386 (-m68k) -microblaze -microblazeel (-mips) -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -or32 (-ppc) (-ppc64) -ppc64abi32 -s390x -sh4 -sh4eb (-sparc) -sparc32plus -sparc64 -unicore32 -x86_64&quot;</p><p>&gt;&gt;&gt; Attempting to run pkg_info() for &#039;app-emulation/qemu-1.5.3&#039;<br />/tmp/tmpVag2Xs/portage/app-emulation/qemu-1.5.3/temp/environment: line 190: warning: setlocale: LC_MESSAGES: cannot change locale (ru)<br />Using:<br />&nbsp; <br />&nbsp; <br />&nbsp; <br />&nbsp; &nbsp; USE=&#039;&#039;</div></p></div></div><p>По мануалу сделал с новом корне:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">ROOT=$PWD/ emerge -K qemu-user</div><br />Об этом, опять-же, писал в первом посте - вывел список установленных бинарников&nbsp; в новом корне.</p><div class="quotebox"><cite>Fat-Zer пишет:</cite><blockquote><p>распаковал его правильно? <strong>ls -l bin/bash</strong></p></blockquote></div><p>Ещё раз повторюсь - бинарники запускаются, в первом посте как раз пример запуска bin/bash.</p><div class="quotebox"><cite>Fat-Zer пишет:</cite><blockquote><p>qemu-wrapper сделал, как в хендбуке написано? ядро там правильное указано?</p></blockquote></div><p>У меня не ARM, а ARMeb, для него такой враппер не нужен вроде как...</p>]]></description>
			<author><![CDATA[null@example.com (andreil)]]></author>
			<pubDate>Wed, 28 May 2014 07:08:35 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410581#p410581</guid>
		</item>
		<item>
			<title><![CDATA[Re: Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410578#p410578</link>
			<description><![CDATA[<p>заклинания в binfmt_misc правильные прописал? для нужной архитектуры?<br /></p><div class="quotebox"><cite>andreil пишет:</cite><blockquote><p>Везде пишут, что подобная ошибка вылазит при неустановленном qemu-user, но он-то у меня стоит:</p></blockquote></div><p>а собран он правильно? <strong>emerge --info qemu</strong> <br />и в chroot не забыл его поставить?</p><div class="quotebox"><cite>andreil пишет:</cite><blockquote><p>PS: В папке &quot;root&quot; лежит содержимое архива &quot;stage3-armeb-uclibc-softfloat-2005.1.tar.bz2&quot;, скачанного с официального репозитория - то, что надо для моей железки...</p></blockquote></div><p>распаковал его правильно? <strong>ls -l bin/bash</strong></p><p>qemu-wrapper сделал, как в хендбуке написано? ядро там правильное указано?</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Wed, 28 May 2014 06:50:14 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410578#p410578</guid>
		</item>
		<item>
			<title><![CDATA[Запуск ARM-ELF на x86_64]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=410574#p410574</link>
			<description><![CDATA[<p>Понадобилось собрать систему для железки на стационарнике. Для возможности запуска ARM&#039;овских бинарников используется QEMU, в полном соответствии со <a href="http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml?part=1&amp;chap=5">статьёй</a>.<br />Файлы выполняются, о чём говорит следующее:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # uname -a<br />Linux andreilPC 3.12.13-gentoo #1 SMP Tue May 20 13:10:34 FET 2014 x86_64 Intel(R) Pentium(R) CPU G2130 @ 3.20GHz GenuineIntel GNU/Linux<br />andreilPC root # file bin/bash <br />bin/bash: ELF 32-bit MSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped<br />andreilPC root # bin/bash<br />/lib/ld-uClibc.so.0: No such file or directory<br />andreilPC root # </div><br />Но при попытке сделать <em>chroot</em> вылазит ошибка:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # chroot .<br />chroot: failed to run command ‘/bin/bash’: No such file or directory</div><br />Попытался выполнить трассировку:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;strace chroot .&nbsp; </div><div class="fancy_spoiler"><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # strace chroot .&nbsp; <br />execve(&quot;/bin/chroot&quot;, [&quot;chroot&quot;, &quot;.&quot;], [/* 68 vars */]) = 0<br />brk(0)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0x60a000<br />mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6b53aec000<br />access(&quot;/etc/ld.so.preload&quot;, R_OK)&nbsp; &nbsp; &nbsp; = -1 ENOENT (No such file or directory)<br />open(&quot;/etc/ld.so.cache&quot;, O_RDONLY|O_CLOEXEC) = 3<br />fstat(3, {st_mode=S_IFREG|0644, st_size=212270, ...}) = 0<br />mmap(NULL, 212270, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6b53ab8000<br />close(3)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br />open(&quot;/lib64/libc.so.6&quot;, O_RDONLY|O_CLOEXEC) = 3<br />read(3, &quot;\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&gt;\0\1\0\0\0\0M\2\0\0\0\0\0&quot;..., 832) = 832<br />fstat(3, {st_mode=S_IFREG|0755, st_size=1732856, ...}) = 0<br />mmap(NULL, 3845176, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6b53521000<br />mprotect(0x7f6b536c2000, 2097152, PROT_NONE) = 0<br />mmap(0x7f6b538c2000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7f6b538c2000<br />mmap(0x7f6b538c8000, 15416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6b538c8000<br />close(3)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br />mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6b53ab7000<br />mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6b53ab6000<br />mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6b53ab5000<br />arch_prctl(ARCH_SET_FS, 0x7f6b53ab6700) = 0<br />mprotect(0x7f6b538c2000, 16384, PROT_READ) = 0<br />mprotect(0x608000, 4096, PROT_READ)&nbsp; &nbsp; &nbsp;= 0<br />mprotect(0x7f6b53aed000, 4096, PROT_READ) = 0<br />munmap(0x7f6b53ab8000, 212270)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br />brk(0)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0x60a000<br />brk(0x62b000)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 0x62b000<br />open(&quot;/usr/lib64/locale/locale-archive&quot;, O_RDONLY|O_CLOEXEC) = 3<br />fstat(3, {st_mode=S_IFREG|0644, st_size=5261392, ...}) = 0<br />mmap(NULL, 5261392, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6b5301c000<br />close(3)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br />chroot(&quot;.&quot;)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 0<br />chdir(&quot;/&quot;)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br />execve(&quot;/bin/bash&quot;, [&quot;/bin/bash&quot;, &quot;-i&quot;], [/* 68 vars */]) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/share/locale/locale.alias&quot;, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/share/locale/ru_RU.utf8/LC_MESSAGES/coreutils.mo&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/share/locale/ru_RU/LC_MESSAGES/coreutils.mo&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/share/locale/ru.utf8/LC_MESSAGES/coreutils.mo&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/share/locale/ru/LC_MESSAGES/coreutils.mo&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/lib64/charset.alias&quot;, O_RDONLY|O_NOFOLLOW) = -1 ENOENT (No such file or directory)<br />write(2, &quot;chroot: &quot;, 8chroot: )&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 8<br />write(2, &quot;failed to run command \342\200\230/bin/ba&quot;..., 37failed to run command ‘/bin/bash’) = 37<br />open(&quot;/usr/share/locale/ru_RU.utf8/LC_MESSAGES/libc.mo&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/share/locale/ru_RU/LC_MESSAGES/libc.mo&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/share/locale/ru.utf8/LC_MESSAGES/libc.mo&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)<br />open(&quot;/usr/share/locale/ru/LC_MESSAGES/libc.mo&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)<br />write(2, &quot;: No such file or directory&quot;, 27: No such file or directory) = 27<br />write(2, &quot;\n&quot;, 1<br />)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1<br />close(1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br />close(2)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0<br />exit_group(127)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= ?<br />+++ exited with 127 +++</div></p></div></div><p>Судя по логу, оно не может найти <em>/bin/bash</em>. Но он же есть! Это подтверждается попыткой его прямого запуска (<br />Везде пишут, что подобная ошибка вылазит при неустановленном <em>qemu-user</em>, но он-то у меня стоит:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # ls -l usr/bin/qemu-static-armeb*<br />-rwxr-xr-x 1 root root 3196136 май 28 08:44 usr/bin/qemu-static-armeb<br />-rwxr-xr-x 1 root root 1825424 май 28 08:44 usr/bin/qemu-static-armeb-binfmt</div><br />Никак не могу понять, ЧЯДНТ <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /> </p><p>PS: В папке &quot;root&quot; лежит содержимое архива &quot;stage3-armeb-uclibc-softfloat-2005.1.tar.bz2&quot;, скачанного с официального репозитория - то, что надо для моей железки...<br />PPS: Попытка выполнить chroot с полным путём к каталогу не предлагать - тот же результат:<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">andreilPC root # chroot /media/work/Dev/ARM/NAS/root/<br />chroot: failed to run command ‘/bin/bash’: No such file or directory</div></p>]]></description>
			<author><![CDATA[null@example.com (andreil)]]></author>
			<pubDate>Wed, 28 May 2014 06:14:04 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=410574#p410574</guid>
		</item>
	</channel>
</rss>
