Building OpenWrt on FreeBSD

Is it possible to build OpenWrt on FreeBSD?

This guide shows what you need, and even says
The build system works on Linux, BSD or MacOSX operating system. A case-sensitive filesystem is required.

Just wondered if anyone has tried it and what you might need to do to build it successfully...

An initial concern is that I would need to use gmake rather than make, but I wouldn't want to change any Makefiles, so can I set some global variable before I start so that make would be interpreted as gmake?
 
I see there is a BSDmakefile in addition to a Makefile. Does it take precedence? ie if I run make() does it first look for a BSDmakefile before looking for a Makefile?
 
According to https://wiki.openwrt.org/doc/howto/buildroot.exigence

you need to
Code:
git clone https://github.com/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a

This is what I get:
root@Vbox:~/openwrt # ./scripts/update -a

Updating feed 'packages' from 'https://git.openwrt.org/feed/packages.git' ...
Already up to date.
Create index file './feeds/packages.index'
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... failed.
Checking 'find'... failed.
Checking 'bash'... ok.
Checking 'patch'... failed.
Checking 'diff'... ok.
Checking 'cp'... failed.
Checking 'seq'... failed.
Checking 'awk'... failed.
Checking 'grep'... ok.
Checking 'getopt'... failed.
Checking 'stat'... failed.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'time'... failed.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Prerequisite check failed. Use FORCE=1 to override.
gmake: *** [/root/openwrt/include/toplevel.mk:168: staging_dir/host/.prereq-build] Error 1
awk: calling undefined function asort
input record number 828, file
source line number 11
/bin/sh: mkhash: not found
awk: calling undefined function asort
source line number 11
/bin/sh: mkhash: not found
Updating feed 'luci' from 'https://git.openwrt.org/project/luci.git' ...
Already up to date.
Create index file './feeds/luci.index'
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... failed.
Checking 'find'... failed.
Checking 'bash'... ok.
Checking 'patch'... failed.
Checking 'diff'... ok.
Checking 'cp'... failed.
Checking 'seq'... failed.
Checking 'awk'... failed.
Checking 'grep'... ok.
Checking 'getopt'... failed.
Checking 'stat'... failed.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'time'... failed.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Prerequisite check failed. Use FORCE=1 to override.
gmake: *** [/root/openwrt/include/toplevel.mk:168: staging_dir/host/.prereq-build] Error 1
awk: calling undefined function asort
input record number 112, file
source line number 11
/bin/sh: mkhash: not found
awk: calling undefined function asort
source line number 11
/bin/sh: mkhash: not found
Updating feed 'routing' from 'https://git.openwrt.org/feed/routing.git' ...
Already up to date.
Create index file './feeds/routing.index'
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... failed.
Checking 'find'... failed.
Checking 'bash'... ok.
Checking 'patch'... failed.
Checking 'diff'... ok.
Checking 'cp'... failed.
Checking 'seq'... failed.
Checking 'awk'... failed.
Checking 'grep'... ok.
Checking 'getopt'... failed.
Checking 'stat'... failed.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'time'... failed.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Prerequisite check failed. Use FORCE=1 to override.
gmake: *** [/root/openwrt/include/toplevel.mk:168: staging_dir/host/.prereq-build] Error 1
awk: calling undefined function asort
input record number 36, file
source line number 11
/bin/sh: mkhash: not found
awk: calling undefined function asort
source line number 11
/bin/sh: mkhash: not found
Updating feed 'telephony' from 'https://git.openwrt.org/feed/telephony.git' ...
Already up to date.
Create index file './feeds/telephony.index'
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... failed.
Checking 'find'... failed.
Checking 'bash'... ok.
Checking 'patch'... failed.
Checking 'diff'... ok.
Checking 'cp'... failed.
Checking 'seq'... failed.
Checking 'awk'... failed.
Checking 'grep'... ok.
Checking 'getopt'... failed.
Checking 'stat'... failed.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'time'... failed.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Prerequisite check failed. Use FORCE=1 to override.
gmake: *** [/root/openwrt/include/toplevel.mk:168: staging_dir/host/.prereq-build] Error 1
awk: calling undefined function asort
input record number 35, file
source line number 11
/bin/sh: mkhash: not found
awk: calling undefined function asort
source line number 11
/bin/sh: mkhash: not found

Would sysutils/coreutils stop some of these fails?
 
After installing coreutils and various individual GNU utils, I'm almost there:-
Create index file './feeds/packages.index'
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'time'... failed.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Prerequisite check failed. Use FORCE=1 to override.

Any ideas as to why 'time' might have failed?
 
Back
Top