Hi!
> Am 11.01.2015 um 12:18 schrieb Hrishikesh Murukkathampoondi
> <[email protected]>:
>
> Hi
>
> I would like to use Bitrig on an ARM board - Freescale iMX6Q SABRE Board for
> Smart Devices. Patrick helped quite a bit and though we could boot the kernel
> we could not get networking going.
>
>
> I have in the (distant) past been comfortable tinkering with Linux source on
> x86 but BSDs and cross compiling is unfamiliar to me. Any pointers would help
> a lot:
>
> My only machine (other than the development board) is a Mac running OS X.
> Would it be possible to compile Bitrig source on OS X ?
Probably not. The clang would need to be able to target bitrig… There are also
some scripts that might not work as expected… Dunno...
>
> If that is not possible, I can perhaps do this on a virtual machine. I have
> Bitrig 1.0 installed and running on a Parallels VM. Unfortunately Parallels
> does not allow me to access the physical devices of my machine when running
> Bitrig (works when Parallels is running Linux). Anyone else with a similar
> set up able to transfer files from the Bitrig VM to host?
You could try sshfs maybe. Otherwise I don’t know.
>
> Are there instructions on how to cross compile Bitrig to ARM?
Yeah, in /usr/src/Makefile.cross.
You need a cross-compile-able binutils, which you can get from packages or
ports. In our release 1.0, there’s bitrig-binutils-armcross-2.24p3-armcross.tgz.
After that is installed, run
cd /usr/src && sudo TARGET=armv7 make -f Makefile.cross cross-tools
This sets up the cross-toolchain. Optionally you can use -j4 or so to speed up
the build.
To compile a kernel, this script might help:
https://gist.github.com/Bluerise/0c272187af957412baa3
Then you can run
cd /usr/src/sys/arch/armv7/conf && config GENERIC
cd /usr/src/sys/arch/armv7/compile && armmake bsd.IMX.umg
to compile the kernel, which can be directly booted from u-boot.
>
> To boot on ARM I think I would have to build a rootfs of some kind - that
> includes uboot and the kernel? Any pointers on how to construct one of those
> would be very helpful
The miniroot? Well, our build infrastructure automatically creates those. The
magic is done in /usr/src/distrib/armv7/miniroot/.
You can also extract a ramdisk from an existing snapshot and change it
according to your needs.
>
> Thank you
> Hrishi