freebsd / freebsd-wifi-build

freebsd-wifi-build
140 stars 59 forks source link

Undocumented dependency on installing to /tftpboot #4

Open katef opened 10 years ago

katef commented 10 years ago

I didn't have a /tftpboot directory, and installation failed for that reason - but without any clear message as to why. (Just strerror() for ENOENT, I think.)

I think at least the documentation ought to mention creating this - or, perhaps better, for the build scripts to bail out with /tftpboot as a missing dependency.

I created it, of course, to quieten the script. But in my case I'm serving TFTP from a different machine, so I don't actually want to install there anyway. Is there some $PREFIX-style variable could override to install elsewhere? That would be nice to mention, too.

seanbruno commented 9 years ago

No, there isn't anything that overrides /tftpboot in the tools. Want to implement one and send us a pull req?

You'll probably need to modify most of the following and come up with a variable default setting that can be overriden by env variables:

build/lib/cfg.sh:X_TFTPBOOT_KERNEL="/tftpboot/kernel.${KERNCONF}" build/bin/build_freebsd: echo "*\ Copying kernel to /tftpboot/kernel.${KERNCONF}" build/bin/build_freebsd: cp ${X_KERNEL} /tftpboot/kernel.${KERNCONF} build/bin/build_freebsd: cp ${X_KERNEL}.symbols /tftpboot/kernel.${KERNCONF}.symbols build/bin/build_fsimage:cp ${X_FSIMAGE}${X_FSIMAGE_SUFFIX} /tftpboot build/bin/build_airstation:/usr/local/bin/lzma e ${X_KERNEL} /tftpboot/kernel.${KERNCONF}.lzma || exit 1 build/bin/build_airstation: -n "FreeBSD" -d /tftpboot/kernel.${KERNCONF}.lzma \ build/bin/build_airstation: /tftpboot/kernel.${KERNCONF}.lzma.uImage \ build/bin/build_airstation: dd if=/tftpboot/kernel.${KERNCONF}.lzma.uImage bs=1048576 conv=sync; build/bin/build_airstation:) > /tftpboot/${CFGNAME}-tftp.bin build/bin/build_ubnt: -B ${UBNT_ARCH} -v ${UBNT_VERSION} -k /tftpboot/kernel.${KERNCONF}.lzma.uImage \ build/bin/build_ubnt: -C ${BIN_CFG_SIZE} -c ${X_CFGFS} -r /tftpboot/mfsroot-${CFGNAME}.img${X_FSIMAGE_SUFFIX} \ build/bin/build_ubnt: -o /tftpboot/${KERNCONF}.initial.img build/bin/build_ubnt: -o /tftpboot/${KERNCONF}.initial.img build/bin/build_uboot:/usr/local/bin/lzma e ${X_KERNEL} /tftpboot/kernel.${KERNCONF}.lzma || exit 1 build/bin/build_uboot: -n "FreeBSD" -d /tftpboot/kernel.${KERNCONF}.lzma \ build/bin/build_uboot: /tftpboot/kernel.${KERNCONF}.lzma.uImage \ build/bin/build_tplink: -o /tftpboot/${KERNCONF}.factory.bin \ build/bin/build_tplink: -o /tftpboot/${KERNCONF}.factory.bin \ build/bin/build_dlink:/usr/local/bin/lzma e ${X_KERNEL} /tftpboot/kernel.${KERNCONF}.lzma || exit 1 build/bin/build_dlink: -n "FreeBSD" -d /tftpboot/kernel.${KERNCONF}.lzma \ build/bin/build_dlink: /tftpboot/kernel.${KERNCONF}.lzma.uImage \ build/bin/build_dlink:KERN_SIZE="stat -f '%z' /tftpboot/kernel.${KERNCONF}.lzma.uImage" build/bin/build_dlink: dd if=/tftpboot/kernel.${KERNCONF}.lzma.uImage bs=1048576 conv=sync; build/bin/build_dlink:) > /tftpboot/${CFGNAME}.factory.img build/bin/build_netboot:cp ${X_KERNEL}.netboot /tftpboot/kernel.${KERNCONF}.netboot

katef commented 9 years ago

Maybe just a variable there would do. I'll try when I can.

For my own purposes I'm happy enough to grab things from /tftpboot and copy them elsewhere. The bug report was just that I thought it'd be nice to have this mentioned on the wiki page (which it now is), since otherwise it's an error at the end of a long build.

The motivation for this is part of building for non-root. Is that currently possible?

pastcompute commented 9 years ago

Hi @katef last night I managed to successfully build as non-root. I'll try and upload my scripts to github over the weekend, but in short I had to:

I also managed to work out how to cross-build from ports as well