6

I'd really like to get to know debian packaging for the RPi

I have read several useful tutorials on how to crosscompile with tools from

https://github.com/raspberrypi/tools/tree/master/arm-bcm2708

and some on setting up crosstool-ng

This lets me compile hello_world.c nicely for the Raspberry Pi - but i have a hard time working out how to get make and other build tools working.

Also read tutorials on how to run a qemu chroot environment, where i can debootstrap an raspbian install - this should make things simpler - but with some extra administration, and added overhead from the Qemu layer. (http://superpiadventures.com/2012/07/development-environment/ is one good tutorial)

Reading about debian crosscompilation, it should be able to define a target architecture, and do something like "dpkg-buildpackage -aarmv6h" on x86_64 Debian, using source .debs i find on non-raspbian repositories. (http://www.debian.org/doc/manuals/maint-guide/build.en.html)

I'm not clever enough to get it set up myself - perhaps a kind reader has written or found a useful tutorial on crosscompiling .deb packages ?

Thanks.

4

The recommended way to build .deb packages targeting Debian or Rasbian is to compile the package on the machine or inside an emulated machine. Thus the recommended way to cross-compile a .deb for Raspberry Pi is to emulate a complete system using qemu on a X86 machine and use it to do the compiles. http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/

There is true cross-compile support build into the latest Debian and Ubuntu sbuild tool that you may use to compile or cross compile .deb packages, you can read how to use the cross compile features of sbuild by following the latest Debian/Ubuntu wiki guides, assuming you are running the latest Debian or Ubuntu developement branch. http://wiki.debian.org/CrossBuildPackagingGuidelines https://wiki.ubuntu.com/CrossBuilding

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.