# cross-compiling basics? (Desktop to Eee netbook)



## bstamper (Aug 5, 2010)

Hello,

I'm installing FreeBSD on my Eee1000 netbook. It's going well, I have wireless running[1], SSD-friendly tweaks, etc. Now I want to start tackling X (xfce), and probably do a custom kernel and install a few ports. I would like to use my desktop to do some compiling for the netbook, but I've never done any cross-compiling before.

I've looked around the handbook and elsewhere and I haven't found a straightforward HOWTO on this. I know that I need to set environment vars TARGET=i386 and TARGET_ARCH=i386 and I need to put CPUTYPE?=prescott into make.conf[2]. I also know that I'll probably want some kind of destination directory structure that I could use repeatedly for this purpose. I don't know how to transfer things to the netbook once they're compiled, and I also wonder what my strategy would be for keeping things up-to-date.

Any thoughts are appreciated, thanks.

Brian


[1] wireless thanks to this guide: http://forums.freebsd.org/showthread.php?t=7010
[2] http://wiki.freebsd.org/AsusEee#head-0ec25ebfd5cc91803a27ffefe989f34ee19d887e


----------



## SirDice (Aug 6, 2010)

Just NFS mount /usr/src/ and /usr/obj/ and run installworld/installkernel on the netbook.


----------



## bstamper (Aug 7, 2010)

SirDice said:
			
		

> Just NFS mount /usr/src/ and /usr/obj/ and run installworld/installkernel on the netbook.



Maybe I was unclear; I want to use my desktop to do the compiling because it should be much quicker than doing it on the netbook, and a bit less wear on my netbook's SSDs. Or are you suggesting I setup the netbook as a NFS server and my desktop as a client, and mount the /usr/* filesystems that are on my netbook?

I think if I could keep the ports collection, distfiles, system/kernel source, etc. all on my desktop and use it to do the compiling work for the netbook, that'd be ideal. I guess I should mention they are both i386 and both at the same release, 8.1, but for the netbook I'd use CPUTYPE=prescott, and I would have a very different set of packages/ports installed, and I don't know how to track a separate set of run dependencies.

Brian


----------



## wblock@ (Aug 7, 2010)

You do the buildworld and buildkernel on the desktop, then NFS mount it from the netbook and do installworld and installkernel from the netbook.

Ports can probably do the same thing, although using different CPUTYPE for the two machines might be a headache.


----------



## gnemmi (Aug 7, 2010)

Written a really long time ago, all you need to know and then some more can be found on development(7)


----------



## bstamper (Aug 7, 2010)

gnemmi said:
			
		

> Written a really long time ago, all you need to know and then some more can be found on development(7)



FTW! Thank you. Now I understand the previous replies to my question.

Brian


----------



## gnemmi (Aug 8, 2010)

you are welcome mate !
have fun


----------

