{"id":255,"date":"2011-11-06T19:37:14","date_gmt":"2011-11-06T17:37:14","guid":{"rendered":"http:\/\/blog.the-leviathan.ch\/?p=255"},"modified":"2011-11-06T19:39:55","modified_gmt":"2011-11-06T17:39:55","slug":"easiest-way-to-change-into-qemu-based-chroot-x86_64-armel","status":"publish","type":"post","link":"https:\/\/blog.the-leviathan.ch\/?p=255","title":{"rendered":"easiest way to change into qemu based chroot (x86_64 -> armel)"},"content":{"rendered":"<p>Also already dreamed of just debootstraping another architectures rootfs onto<br \/>\nan SD card but woke up unpleasently by the hard reality of binary incompatibility?<br \/>\nWell.<br \/>\nThere&#8217;s an easy way to make our dream come true after all!<br \/>\nFirst you&#8217;ll need the static qemu binary for your arch, in this case for armel it is<br \/>\n<a href=\"http:\/\/packages.debian.org\/search?searchon=contents&amp;keywords=%2Fusr%2Fbin%2Fqemu-arm-static&amp;mode=path&amp;suite=stable&amp;arch=any\">http:\/\/packages.debian.org\/search?searchon=contents&amp;keywords=%2Fusr%2Fbin%2Fqemu-arm-static&amp;mode=path&amp;suite=stable&amp;arch=any<\/a><br \/>\nIf you have some other distro then Debian running (I have done it under Gentoo) you can just extract the needed file with ark or any other app which can decompress debian packages.<br \/>\nCopy the binary into the root of the directory\/mount point you wanna debootstrap your rootfs to.<br \/>\n<em>This point requires binfmt_misc enabled within kernel! (\/proc\/sys\/fs\/binfmt_misc\/register)<\/em><br \/>\nType the following command for arm (change it if another arch is used!):<br \/>\n<code>echo ':<strong><span style=\"color: #800000;\">arm<\/span><\/strong>:M::\\x7fELF\\x01\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\x28\\x00:\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xfe\\xff\\xff\\xff:\/qemu-<span style=\"color: #800000;\"><strong>arm<\/strong><\/span>-static:' &gt; \/proc\/sys\/fs\/binfmt_misc\/register<\/code><br \/>\nNow you can debootstrap as if you would do it onto a native arch:<br \/>\n<code>debootstrap --arch armel sid arm_chroot\/ http:\/\/mirror.switch.ch\/ftp\/mirror\/debian\/<br \/>\n<\/code>Then comes the hottest part!<br \/>\nChroot into it, like it would be a native arch! ;-D<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Also already dreamed of just debootstraping another architectures rootfs onto an SD card but woke up unpleasently by the hard reality of binary incompatibility? Well. There&#8217;s an easy way to make our dream come true after all! First you&#8217;ll need the static qemu binary for your arch, in this case for armel it is http:\/\/packages.debian.org\/search?searchon=contents&amp;keywords=%2Fusr%2Fbin%2Fqemu-arm-static&amp;mode=path&amp;suite=stable&amp;arch=any &hellip; <a href=\"https:\/\/blog.the-leviathan.ch\/?p=255\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">easiest way to change into qemu based chroot (x86_64 -> armel)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-daily"],"_links":{"self":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=255"}],"version-history":[{"count":4,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/255\/revisions"}],"predecessor-version":[{"id":259,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/255\/revisions\/259"}],"wp:attachment":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}