[Hamara-devel] Cross-compile armv6 for hamara.

Vikas Tara vik at hamaralinux.org
Thu Dec 18 16:16:49 GMT 2014


On 17/12/14 10:28, Vikas Tara wrote:
> On 14/12/14 08:11, shantanu at hamaralinux.org wrote:
>>
>> Hello Everyone,
>>
>> As all of you are aware our repository for amrv7 is ready and we are 
>> now working on creating armv6 repository. We are facing some problems 
>> while cross compiling armv6 packages for hamara distribution.
>>
>> Below are the steps we used to create debootstrap for cross compiling.
>>
>> ####################################################
>> sudo apt-get install qemu-user-static debootstrap
>> basedir=`pwd`/wheezyarmel-chroot
>> export architecture="armel"
>> mkdir -pv ${basedir}
>> cd ${basedir}
>> debootstrap --foreign --arch $architecture wheezy wheezy-$architecture
>> #debootstrap --arch armel trusty /mnt/min_buntu 
>> http://archive.wheezy.com/wheezy
>> cp -v /usr/bin/qemu-arm-static wheezy-$architecture/usr/bin/
>> LANG=C chroot wheezy-$architecture /debootstrap/debootstrap 
>> --second-stage
>>
>> echo "dummy" > wheezy-$architecture/etc/hostname
>>
>> cp /etc/apt/sources.list  wheezy-$architecture/etc/apt/
>>
>> cat << EOF > wheezy-$architecture/etc/network/interfaces
>> auto eth0
>> iface eth0 inet dhcp
>> EOF
>>
>> cat << EOF > wheezy-$architecture/etc/hosts
>> 127.0.0.1       precise    localhost
>> ::1             localhost ip6-localhost ip6-loopback
>> fe00::0         ip6-localnet
>> ff00::0         ip6-mcastprefix
>> ff02::1         ip6-allnodes
>> ff02::2         ip6-allrouters
>> EOF
>>
>> export LC_ALL=C
>> mount -o bind /dev wheezy-$architecture/dev
>> mount -t proc proc wheezy-$architecture/proc
>> mount -t sysfs sys wheezy-$architecture/sys
>> chroot wheezy-$architecture
>> apt-get update
>> apt-get install locales
>> addgroup --system admin
>> useradd -s /bin/bash -g admin -m -k /dev/null user
>> passwd root
>>
>> ############################################################
>> We successfully can create debootstrap environment for 
>> cross-compiling, however while building .debs we face multiple 
>> dependencies problems.
>>
>> Process to reproduce the problem.
>>
>> 1.) Create debootstrap following above steps
>> 2.) Copy .gnupg from any build server to debootstrap's root directory.
>> 3.) git clone hamara helper and execute /bin/bash make-anna (for 
>> example)
>>
>> Can I request some help/ideas on this.
> I am about to start work on this - can you raise bugs for the 
> dependency issues you have already seen?
> ___

Just to update everyone, I spoke to Shantanu offline and we experimented 
with using a debian chroot where we can satisfy the dependencies required
to port our packages to arm v6.

We finally agreed however to create a debian build server for the 
purpose of porting everything in one go and then returning to the chroot 
approach - as we would
have a complete hamara arm v6 repo by that point.





More information about the Hamara-devel mailing list