<div dir="ltr">I did a bit more digging, and rebuilding 4.9.153 with CONFIG_COMPAT and a few related options, had an effect - no longer do I get "exec format error" - now it just outright segfaults.<div>4.4.172 works perfectly.</div><div><br></div><div>I'm using clean mainline kernels with no additional patches.</div><div><br></div><div>chrooting to aarch64 chroots works.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 26, 2019 at 6:07 PM Stephen John Smoogen <<a href="mailto:smooge@gmail.com">smooge@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_-1118529991852361239gmail_attr">On Sat, 26 Jan 2019 at 18:45, Gordan Bobic <<a href="mailto:gordan@redsleeve.org" target="_blank">gordan@redsleeve.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Yes, they are "wrong", but not "WRONG!".<div><br></div><div>As I (possibly poorly) explained, I'm running on an aarch64 machine, but am trying to run armv5tel and armv7hl chroots.</div><div>I just dug out an old kernel I was using (4.4.72) and I can now chroot just fine.</div><div><br></div><div>So it's something that changed in the kernel, but I'm not sure what else it could be other than the page size (which I already checked).</div><div><br></div><div>I'm going to build the latest 4.4.172 with my 4.4.72 config and see if that works. If it does, I'll try to make oldconfig that on 4.9.153 and try again, see if that breaks things again. I was just hoping there might be an option I missed in 4.9 that enables/disables downward compatibility.</div><div><br></div></div></blockquote><div><br></div><div>The places I have seen where this breaks before was </div><div>* it works on only specific aarch64 devices</div><div>* it works but only after you update the firmware to a newer vendor version (because the kernel expects that to fix something else)</div><div>* it is a regression and needs to be fixed. </div><div><br></div><div>[The first one was where someone remembered it working but forgot they were working on XYZ box and then replicated in ABC and found the arch didn't have that.]</div><div><br></div><div>I am expecting it is going to be 3... but I would check on 2 also.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>Gordan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_-1118529991852361239gmail-m_3846516240500249639gmail_attr">On Sat, Jan 26, 2019 at 5:41 PM Stephan GUILLOUX <<a href="mailto:stephan.guilloux@free.fr" target="_blank">stephan.guilloux@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Wrong architecture binaries, in the chroot'ed folder ?<br>
<br>
What do you get with:<br>
<br>
file <chroot>/bin/bash<br>
<br>
On 26-Jan-19 17:49, Gordan Bobic wrote:<br>
> It's been so long since I last had to do this, that it looks like a <br>
> kernel update somewhere along the way broke this for me. :-(<br>
><br>
> What happens now:<br>
><br>
> # chroot rs7<br>
> chroot: failed to run command ‘/bin/bash’: Exec format error<br>
><br>
> I could have sworn that this was all I needed to make this work last time:<br>
> # grep 4K_PAGES config-4.9.153-1.el7.centos.aarch64<br>
> CONFIG_ARM64_4K_PAGES=y<br>
> # CONFIG_ARM64_64K_PAGES is not set<br>
><br>
> Unfortunately, now trying to chroot into either hard-float or <br>
> soft-float chroot results in the exec format error.<br>
><br>
> Looking at time stamps of various things, I had this working with <br>
> 4.4.70, but have since switched to 4.9.x kernels. Any thoughts on what <br>
> changed between 4.4 and 4.9 would be most appreciated.<br>
><br>
> What am I missing?<br>
><br>
> _______________________________________________<br>
> Arm-dev mailing list<br>
> <a href="mailto:Arm-dev@centos.org" target="_blank">Arm-dev@centos.org</a><br>
> <a href="https://lists.centos.org/mailman/listinfo/arm-dev" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/arm-dev</a><br>
_______________________________________________<br>
Arm-dev mailing list<br>
<a href="mailto:Arm-dev@centos.org" target="_blank">Arm-dev@centos.org</a><br>
<a href="https://lists.centos.org/mailman/listinfo/arm-dev" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/arm-dev</a><br>
</blockquote></div>
_______________________________________________<br>
Arm-dev mailing list<br>
<a href="mailto:Arm-dev@centos.org" target="_blank">Arm-dev@centos.org</a><br>
<a href="https://lists.centos.org/mailman/listinfo/arm-dev" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/arm-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-1118529991852361239gmail_signature"><div dir="ltr">Stephen J Smoogen.<br><br></div></div></div>
_______________________________________________<br>
Arm-dev mailing list<br>
<a href="mailto:Arm-dev@centos.org" target="_blank">Arm-dev@centos.org</a><br>
<a href="https://lists.centos.org/mailman/listinfo/arm-dev" rel="noreferrer" target="_blank">https://lists.centos.org/mailman/listinfo/arm-dev</a><br>
</blockquote></div>