commit: fa28ca02bff6dd09f544976a49de7c50febe90c6
parent 990e989ab6c0cb6127b7c337c4e02433d3eb299d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 5 May 2024 19:11:06 +0200
Add iproute2
Diffstat:
5 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -125,6 +125,7 @@ Meanwhile:
- xz: Not for anything yet, but requires working around libtool to build so including it
- lua: For oasis
- pkgconf: For iproute2
+- iproute2: Basic networking configuration
## Launching in QEMU
```
diff --git a/bootstrap-iproute2.sh b/bootstrap-iproute2.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+set -ex
+
+die() {
+ echo "die: $@"
+ exit 1
+}
+
+command -v make || die "Run /bootstrap-make.sh"
+command -v pkg-config || die "Run /bootstrap-pkgconf.sh"
+
+tar xof /iproute2-*.tar.gz
+cd ./iproute2-*/
+
+./configure --prefix /usr
+
+# tc(1) requires flex (or at least a lex with -o)
+sed -e '/SUBDIRS=/s;tc ;;' Makefile > Makefile.new
+mv Makefile.new Makefile
+# tcc doesn't seems to support static_assert
+sed -e '/static_assert/,/^$/s;^;//;' ip/ipstats.c > ip/ipstats.c.new
+mv ip/ipstats.c.new ip/ipstats.c
+
+unset MAKE
+make clean
+make HOSTCC=$CC
+make install
+
+cd ..
+rm -r ./iproute2-*/
diff --git a/distfiles.SHA512SUM b/distfiles.SHA512SUM
@@ -3,6 +3,7 @@ c44a0ce381469219548a3a27589af3fea4f22eda1ca4e9434b59fc16da81b471c29ce18e31590e08
083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3 distfiles/bzip2-1.0.8.tar.gz
0b30b0f4c4c92a10ee2da263ea44666f445d96bac86ca4afb7bbb50d8278986e4145a7bcdf3ed9f75611bb956e93e16fc0e19874498ce3ae1a00e6fbb4f910c9 distfiles/heirloom-070715.tar.bz2
1f1f10a7b49402053172cc028bbd939a46fcf933994cb867fa40e8c5bbd7b1291575b3bac254cd79dc4fce3e3a2c88fe0f890449888fda16169c8e6a2540f055 distfiles/heirloom-devtools-070527.tar.bz2
+8afbce28e3db544226987ae1979cf148515ba6a7e4a5c6beb1e58c05f3c6d01bbe81410b81ef32bea9a45788c86c7094130f56cb3f95c732906c02c05de1a370 distfiles/iproute2-6.6.0.tar.gz
40e88bec4ed5ce305d1d8882e03ed25ce9a7c9c465e24f32feb9595c50aa7653d6071d28f356b51c9e91b1edc9d82a6611105a0f57387a8df632c53b8ef4971d distfiles/linux-headers-6.6-r0.apk.aarch64
d44a3560c67225005ea51725ea3fe6c882691259800c7b5d0d802ab1e8eb79e65634b77b529c2ea60653cc31a7362329868c303617889464b8b719e83ea70299 distfiles/linux-headers-6.6-r0.apk.armhf
bb0bdb02acbdde620d7a5709d5e104b7fcdb7e44624a3befa65b3bb9589a0a71566ec260648bbadd01b116d5341eb7cd1aa7e26cea26288691816dfe1424c564 distfiles/linux-headers-6.6-r0.apk.armv7
diff --git a/fetch.sh b/fetch.sh
@@ -14,6 +14,7 @@ URLS="
https://tukaani.org/xz/xz-5.4.2.tar.gz
https://www.lua.org/ftp/lua-5.4.6.tar.gz
https://distfiles.ariadne.space/pkgconf/pkgconf-2.2.0.tar.gz
+ https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.6.0.tar.gz
"
WORKDIR="$(dirname "$0")"
diff --git a/make-root.sh b/make-root.sh
@@ -24,6 +24,7 @@ distfiles="
xz-5.4.2.tar.gz
lua-5.4.6.tar.gz
pkgconf-2.2.0.tar.gz
+ iproute2-6.6.0.tar.gz
"
local_files="
init.sh
@@ -36,6 +37,7 @@ local_files="
bootstrap-xz.sh
bootstrap-lua.sh
bootstrap-pkgconf.sh
+ bootstrap-iproute2.sh
"
WORKDIR="$(dirname "$0")"
WORKDIR="$(realpath "$WORKDIR")"