I have 2 laptops with P3 chips which I would like to use for testing on FreeBSD. The requirements I have established for this test are:
A. Laptop #1 will boot as diskless through pxe, so will need a i386 kernel and will run X11 from amd64 server.
B. Laptop #2 will have i386 custom (same as #1) kernel, world & various ports installed.
C. All ports for i386 will be cross-compiled on the amd64 system, and placed into repositories on amd64 as i386distfiles & i386pkg.
The steps to do all this as far as I can tell:
1: Prepare i386KRNCFG and place in /usr/src/sys/i386/conf
2: [cmd=]# cd /usr/src[/cmd]
[cmd=]# env MACHINE_ARCH=amd64 MACHINE=amd64[/cmd]
[cmd=]# env DESTDIR=/diskless/i386[/cmd]
[cmd=]# make TARGET=i386 buildworld[/CMD]
3: [cmd=]# make TARGET=i386 KERNCONF=i386KRNCFG buildkernel[/cmd]
4-a: [cmd=]# make installworld[/cmd]
4-b: [cmd=]# make installkernel KERNCONF=i386KRNCFG[/cmd]
This is all that is necessary for section A above; the pxe environemnt is now ready. As I can tell, an i386 world will need to be preserved on the amd64 system, which is under /diskless/i386.
5: immediately after step 4 and staying in the same env:
[CMD=]# cd /diskless/i386/etc && make distribution[/CMD]
6: [CMD=]# mergemaster -A i386 -D /diskless/i386[/CMD]
MY QUESTIONS:
i- Are the steps listed correct - any mistakes? Do I need to set a different MAKEOBJDIRPREFIX for the i386 build?
ii- In step 5, where will the iso be placed - is there a dir= switch?
iii- Since an i386 environemnt will always be present on the amd64 system, how should I switch into it when I want to build ports? chroot or other mechanism?
iv- How should I specify the PKGREPOSITORY, WRKDIRPREFIX etc, as well as other make.conf variables? My solution is to modify /diskless/i386/etc/make.conf then chroot to /diskless/i386 and run
This command will install the package however and don't know how to prevent that.
v- Do ports which have already been installed on the amd64 server need to be re-installed into the i386 (Laptop #1) environment? I assume yes, since the userland programs are different for i386 vs amd64.
vi- When making build world & kernel, is there any modification / flag which must be passed to the make.conf on the amd64 env?
Long list, but I hope others can benefit from this in the future, since info on this topic seems a little scarce and scattered...
A. Laptop #1 will boot as diskless through pxe, so will need a i386 kernel and will run X11 from amd64 server.
B. Laptop #2 will have i386 custom (same as #1) kernel, world & various ports installed.
C. All ports for i386 will be cross-compiled on the amd64 system, and placed into repositories on amd64 as i386distfiles & i386pkg.
The steps to do all this as far as I can tell:
1: Prepare i386KRNCFG and place in /usr/src/sys/i386/conf
2: [cmd=]# cd /usr/src[/cmd]
[cmd=]# env MACHINE_ARCH=amd64 MACHINE=amd64[/cmd]
[cmd=]# env DESTDIR=/diskless/i386[/cmd]
[cmd=]# make TARGET=i386 buildworld[/CMD]
3: [cmd=]# make TARGET=i386 KERNCONF=i386KRNCFG buildkernel[/cmd]
4-a: [cmd=]# make installworld[/cmd]
4-b: [cmd=]# make installkernel KERNCONF=i386KRNCFG[/cmd]
This is all that is necessary for section A above; the pxe environemnt is now ready. As I can tell, an i386 world will need to be preserved on the amd64 system, which is under /diskless/i386.
5: immediately after step 4 and staying in the same env:
[CMD=]# cd /diskless/i386/etc && make distribution[/CMD]
6: [CMD=]# mergemaster -A i386 -D /diskless/i386[/CMD]
MY QUESTIONS:
i- Are the steps listed correct - any mistakes? Do I need to set a different MAKEOBJDIRPREFIX for the i386 build?
ii- In step 5, where will the iso be placed - is there a dir= switch?
iii- Since an i386 environemnt will always be present on the amd64 system, how should I switch into it when I want to build ports? chroot or other mechanism?
iv- How should I specify the PKGREPOSITORY, WRKDIRPREFIX etc, as well as other make.conf variables? My solution is to modify /diskless/i386/etc/make.conf then chroot to /diskless/i386 and run
# make package-recursive -C /usr/ports/net/foo
This command will install the package however and don't know how to prevent that.
v- Do ports which have already been installed on the amd64 server need to be re-installed into the i386 (Laptop #1) environment? I assume yes, since the userland programs are different for i386 vs amd64.
vi- When making build world & kernel, is there any modification / flag which must be passed to the make.conf on the amd64 env?
Long list, but I hope others can benefit from this in the future, since info on this topic seems a little scarce and scattered...