Here's my attempt to create an OpenWrt Build System on FreeBSD:-
# Install required pkgs
cat <<EOF | xargs pkg install -y
git
bash
gmake
gtar
gcc
gawk
ncurses
findutils
patch
wget
getopt
coreutils
EOF
# Build and install GNU time
wget https://ftp.gnu.org/gnu/time/time-1.9.tar.gz
tar zxf time-1.9.tar.gz
cd time-1.9
./configure
make
make install
mv /usr/local/bin/time /usr/local/bin/gtime
# Install OpenWrt Build System
mkdir ~/OpenWrt-BuildSystem
cd ~/OpenWrt-BuildSystem
git clone https://github.com/openwrt/openwrt.git
cd openwrt
# patch mkhash.c
wget 'https://bugs.openwrt.org/index.php?getfile=292' -O patchfile
patch scripts/mkhash.c -i patchfile -o scripts/mkhash.c
# Let's go!!!
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
If anyone here uses FreeBSD, could you see how far it gets?
tmomas
August 5, 2018, 6:12am
2
1 Like
Great! After I'd spent a while trying to get GNU time working....
Could you also include the FreeBSD patch for mkhash.c ?
[https://bugs.openwrt.org/index.php?getfile=292 ]
Any chance of this patch being added?
mbo2o
August 6, 2018, 6:04am
5
You know it is still the weekend in some timezones. It has been less than 24hrs since you asked
Login to bugs and vote for it
Also link the task instead of the file so others can vote to help your cause
Sorry, didn't mean to be pushy just wondered if anyone had noticed my request.
I'm not sure what you mean by 'login to bugs' also not sure about any task ID.
I'm pretty new to all this stuff.
mbo2o
August 6, 2018, 7:11am
7
You posted a link from bugs.openwrt.org
Do I need to register, or do I use the same details as I use for logging on here? The problem is obviously known about, since a patch is already available. Am I just supposed to ask for it to be incorporated?
mbo2o
August 6, 2018, 3:56pm
9
Yes you need to register
Not necessary to ask, just add your vote.
If you have any info to help in progressing task you can add that , such as you can confirm you tested and it worked for you, if that is the case.
Have you actually tested it yourself, it is not clear from your post.
jow
August 6, 2018, 4:11pm
10
Note that votes have no influence on when and how fast a bug gets fixed.
The thing is the bug was fixed almost a year ago, but the fix has never been implemented.
mbo2o
August 7, 2018, 11:33pm
12
Yes, but have you tested it and can you confirm the patch works?
Yes, i can download and install the OpenWrt Build System on FreeBSD without any errors once the patch to mkhash.c is applied.
1 Like
dawei
June 5, 2019, 2:28am
14
I use the script, get the following error:
gmake[8]: Entering directory '/usr/home/xiangsiwei/openwrt-v18.06.2/build_dir/host/xz-5.2.4/src/xzdec'
/usr/bin/env bash ../../libtool --tag=CC --mode=link gcc -D_THREAD_SAFE -pthread -fvisibility=hidden -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -O2 -I/usr/home/xiangsiwei/openwrt-v18.06.2/staging_dir/host/include -L/usr/home/xiangsiwei/openwrt-v18.06.2/staging_dir/host/lib -o xzdec xzdec-xzdec.o xzdec-tuklib_progname.o xzdec-tuklib_exit.o ../../src/liblzma/liblzma.la -lintl
libtool: link: gcc -D_THREAD_SAFE -pthread -fvisibility=hidden -Wall -Wextra -Wvla -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls -O2 -I/usr/home/xiangsiwei/openwrt-v18.06.2/staging_dir/host/include -o xzdec xzdec-xzdec.o xzdec-tuklib_progname.o xzdec-tuklib_exit.o -L/usr/home/xiangsiwei/openwrt-v18.06.2/staging_dir/host/lib ../../src/liblzma/.libs/liblzma.a -lintl -pthread
/usr/local/bin/ld: ../../src/liblzma/.libs/liblzma.a(liblzma_la-sha256.o): in function `transform':
sha256.c:(.text+0x68): undefined reference to `bswap32'
/usr/local/bin/ld: sha256.c:(.text+0x106): undefined reference to `bswap32'
/usr/local/bin/ld: sha256.c:(.text+0x183): undefined reference to `bswap32'
/usr/local/bin/ld: sha256.c:(.text+0x205): undefined reference to `bswap32'
/usr/local/bin/ld: sha256.c:(.text+0x27b): undefined reference to `bswap32'
/usr/local/bin/ld: ../../src/liblzma/.libs/liblzma.a(liblzma_la-sha256.o):sha256.c:(.text+0x2f5): more undefined references to `bswap32' follow
/usr/local/bin/ld: ../../src/liblzma/.libs/liblzma.a(liblzma_la-sha256.o): in function `lzma_sha256_finish':
sha256.c:(.text+0x151f): undefined reference to `bswap64'
/usr/local/bin/ld: sha256.c:(.text+0x154a): undefined reference to `bswap32'
collect2: error: ld returned 1 exit status
gmake[8]: *** [Makefile:501: xzdec] Error 1
ogogon
May 17, 2020, 9:08am
15
Please tell me, did you manage to solve this problem?
Ogogon.
tmomas
Closed
May 27, 2020, 9:08am
16
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.