Welcome, Guest. Please login or register.

Author Topic: Setting up for Local Development  (Read 271 times)

tuaris

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Setting up for Local Development
« on: June 08, 2019, 07:45:50 PM »
Is there documentation on how to setup your local environment for development?  I've recently become more interested t1n1wall after having tried OPNSense for a year after migrating from m0n0wall.   

I'd like to try to see if I can upgrade the PHP version to 7.3 and maybe integrate two missing pieces that would make this an ideal firewall appliance.  Those two piecing being the DHCP service patch I submitted and https://www.freshports.org/net/miniupnpd/.

andywhite

  • Administrator
  • Full Member
  • *****
  • Posts: 116
  • Karma: +0/-0
    • View Profile
Re: Setting up for Local Development
« Reply #1 on: June 13, 2019, 09:49:59 AM »

tuaris

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Setting up for Local Development
« Reply #2 on: June 20, 2019, 04:38:37 AM »
I was able to build a functional image using `FreeBSD 11.2-RELEASE-p10 (199506)`.  I did run into some trouble while doing so.  Specifically with WPA hostapd.  Looks like there have been some code changes to it since the release of 11.2.  The patch below resolved those issues for me.

https://sourceforge.net/p/t1n1wall/bugs/36/

Additionally I saw some error messages generated by one of the perl scripts:

Code: [Select]
Populating MiniBSD tree: /usr/t1n1wall/build11/t1n1fs/
Copy //libexec/ld-elf.so.1 -> /usr/t1n1wall/build11/t1n1fs//libexec/ld-elf.so.1 (0/0/0555)
Copy //usr/sbin/wpa_supplicant -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/wpa_supplicant (0/0/0555)
Populating MiniBSD tree: /usr/t1n1wall/build11/t1n1fs/
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/[
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/test
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/cat
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/chmod
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/cp
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/date
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/dd
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/df
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/echo
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/expr
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/hostname
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/kill
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/ls
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/ln
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/mkdir
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/mv
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/ps
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/rm
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/sh
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/sleep
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/stty
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//bin/sync
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/dhcpcd
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/camcontrol
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/kldstat
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/ifconfig
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/adjkerntz
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/dmesg
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/fastboot
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/fasthalt
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/halt
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/init
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/ipfw
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/kldload
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/kldunload
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/ldconfig
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/mdconfig
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/mdmfs
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/mount
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/mount_cd9660
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/mount_msdosfs
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/newfs
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/nologin
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/ping
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/ping6
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/reboot
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/route
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/shutdown
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/sysctl
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/umount
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/hostapd
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/fetch
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/su
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/gzip
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/gunzip
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/uptime
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/w
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/killall
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/logger
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/netstat
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/nohup
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/tail
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/tar
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/top
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/bin/touch
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/ntpd
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/ntpctl
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/ancontrol
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/arp
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/chown
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/chroot
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/diskinfo
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/ndp
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/pwd_mkdb
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/traceroute
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/sbin/traceroute6
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/local/sbin/dnsmasq
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/local/bin/dudders
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/local/bin/ez-ipupdate
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//usr/local/sbin/mpd5
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/modem-stats
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/pfctl
ERROR while copying file //bin/t1n1box
Link /usr/t1n1wall/build11/t1n1fs//bin/t1n1box -> /usr/t1n1wall/build11/t1n1fs//sbin/pflogd
Warning: one or more libraries were not found!
Populating MiniBSD tree: /usr/t1n1wall/build11/t1n1fs
Copy //lib/libc.so.7 -> /usr/t1n1wall/build11/t1n1fs/lib/libc.so.7 (0/0/0444)
Copy //lib/libcrypt.so.5 -> /usr/t1n1wall/build11/t1n1fs/lib/libcrypt.so.5 (0/0/0444)
Copy //lib/libcrypto.so.8 -> /usr/t1n1wall/build11/t1n1fs/lib/libcrypto.so.8 (0/0/0444)
Copy //lib/libelf.so.2 -> /usr/t1n1wall/build11/t1n1fs/lib/libelf.so.2 (0/0/0444)
Copy //lib/libipsec.so.4 -> /usr/t1n1wall/build11/t1n1fs/lib/libipsec.so.4 (0/0/0444)
Copy //lib/libkvm.so.7 -> /usr/t1n1wall/build11/t1n1fs/lib/libkvm.so.7 (0/0/0444)
Copy //lib/libm.so.5 -> /usr/t1n1wall/build11/t1n1fs/lib/libm.so.5 (0/0/0444)
Copy //lib/libncurses.so.8 -> /usr/t1n1wall/build11/t1n1fs/lib/libncurses.so.8 (0/0/0444)
Copy //lib/libncursesw.so.8 -> /usr/t1n1wall/build11/t1n1fs/lib/libncursesw.so.8 (0/0/0444)
Copy //lib/libpcap.so.8 -> /usr/t1n1wall/build11/t1n1fs/lib/libpcap.so.8 (0/0/0444)
Copy //lib/libthr.so.3 -> /usr/t1n1wall/build11/t1n1fs/lib/libthr.so.3 (0/0/0444)
Copy //lib/libutil.so.9 -> /usr/t1n1wall/build11/t1n1fs/lib/libutil.so.9 (0/0/0444)
Copy //lib/libz.so.6 -> /usr/t1n1wall/build11/t1n1fs/lib/libz.so.6 (0/0/0444)
Copy //usr/lib/libpam.so.6 -> /usr/t1n1wall/build11/t1n1fs/usr/lib/libpam.so.6 (0/0/0444)
Copy //usr/lib/libssl.so.8 -> /usr/t1n1wall/build11/t1n1fs/usr/lib/libssl.so.8 (0/0/0444)
Copy //usr/local/lib/libreadline.so.7 -> /usr/t1n1wall/build11/t1n1fs/usr/local/lib/libreadline.so.7 (0/0/0644)
Finished Stage 4

I think those errors get generted by this line (in `4crunch.sh`):

Code: [Select]
perl $MW_BUILDPATH/freebsd11/build/minibsd/mkmini.pl $MW_BUILDPATH/freebsd11/build/minibsd/t1n1box.files  / $MW_BUILDPATH/t1n1fs/
Also this line is a little weird too.

Code: [Select]
Warning: one or more libraries were not found!
Not sure if that's a problem.  So far my built images operates exactly as your release images (PPTP VPN bug and all  ;) )

andywhite

  • Administrator
  • Full Member
  • *****
  • Posts: 116
  • Karma: +0/-0
    • View Profile
Re: Setting up for Local Development
« Reply #3 on: July 03, 2019, 11:54:53 PM »
Those errors are harmless, they are because those perl scripts weren't intended for a single binary like t1n1box.  I should fix up those errors....

andywhite

  • Administrator
  • Full Member
  • *****
  • Posts: 116
  • Karma: +0/-0
    • View Profile
Re: Setting up for Local Development
« Reply #4 on: July 05, 2019, 12:37:49 AM »
i've fixed them