Building armv7 on aarch64

James Thomas james.thomas at codethink.co.uk
Mon Aug 31 12:27:48 BST 2015


Hello,

Here's how to go about building armv7lhf images on aarch64 using a chroot. I
used ybd for this since there's still a small issue with the aarch

* Download an armv7 devel image (e.g jetson)
* Mount this and extract the rootfs
    mkdir /src/armv7chroot
    mount /path/to/jetson.img /mnt
    cp -r /mnt/systems/default/run/* /src/armv7chroot
* Create a script in /src/armv7chroot

    #!/bin/bash

    cd /src/armv7chroot
    cp /etc/resolv.conf etc/
    mount -o bind /dev dev/
    mount -o bind /proc proc/
    mount --bind . . && chroot .

* Now launch it with linux32

    /usr/bin/linux32 -B /src/armv7chroot/launch.sh

Now you can follow the normal baserock build process. I had to use ybd for the
build since the aarch is reported as:

    armv8l GNU/Linux

So morph still thinks you're trying to cross compile, however with ybd you can
just do

    ybd.py systems/devel-system-jetson-armv7lhf.morph armv7lhf

and everything is hunky dory. The devel system builds in 4 hours and 30 minutes
(not including download time) so seems to be pretty quick, I'll repeat the same
test on a jetson though (it's been a while since i've built from scratch there)

Next Steps
----------

* In morph treat armv8 as whatever the arch is in the system you are build, if
that is armv7*
* Start releasing armv7lhf chroot's so we can use baserock-manager-chroot (looks
like we'll need to add schroot to baserock?)

I might be able to volunteer an armv8 mustang which could then be used as an
armv7 mason, so we can start populating the public arm cache's again, I'll have
to check this since it's not mine, but it has been sat on my desk for some time
gathering dust.

-- 
Thanks
James



More information about the baserock-dev mailing list