Cross-compiling a kernel module?

Stanislav Sedov stas at freebsd.org
Thu Mar 27 04:52:49 UTC 2014


On Mar 26, 2014, at 3:44 PM, John-Mark Gurney <jmg at funkthat.com> wrote:

> $ cd $SRC
> $ make kernel-toolchain TARGET_ARCH=armXX
> $ make buildenv TARGET_ARCH=armXX BUILDENV_SHELL=/usr/local/bin/shell
> $ cd <moduledir>
> $ make
> 
> The buildenv command sets up the new shell with an environment that is
> the same as if you were running under a buildkernel or buildworld
> environment..  You can use this to build one off programs like bin/ls
> too.

Don’t forget to set the KERNBUILDDIR option as well to point to your
kernel object dir so the module will pick up all the right options.

--
ST4096-RIPE



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20140326/dc495551/attachment.sig>


More information about the freebsd-arm mailing list