Skip to content

Commit

Permalink
Add jq tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyonFlame committed Feb 17, 2023
1 parent 973e3df commit 7c9811c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions build-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
./util-scripts/dropbear.sh
./util-scripts/openssh.sh
./util-scripts/avahi.sh
./util-scripts/jq.sh
./util-scripts/package-shell.sh
./util-scripts/package-gdb.sh
25 changes: 25 additions & 0 deletions util-scripts/jq.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash -e

INSTALL_DIR=$(pwd)/out
mkdir -p ${INSTALL_DIR}
mkdir -p dl/
mkdir -p pkg/
wget -nc https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz -O dl/jq-1.6.tar.gz || true
tar xf dl/jq-1.6.tar.gz -C pkg/
cd pkg/jq-1.6

export PKG_CONFIG="${TOOLCHAIN}/bin/arm-linux-gnueabihf-pkg-config"
export CC="${TOOLCHAIN}/bin/arm-linux-gnueabihf-gcc"
export CXX="${TOOLCHAIN}/bin/arm-linux-gnueabihf-g++"
export CFLAGS="-Os"
export CXXFLAGS="-Os"

autoreconf -fi
./configure \
--host="arm-linux-gnueabihf" \
--with-oniguruma=builtin \
--disable-maintainer-mode

make -j$(($(nproc)+1))
cp jq "${INSTALL_DIR}/jq"
${TOOLCHAIN}/bin/arm-linux-gnueabihf-strip -s "${INSTALL_DIR}/jq"

0 comments on commit 7c9811c

Please sign in to comment.