logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://anongit.hacktivis.me/git/bootstrap-initrd.git/

iproute2.sh (691B)


  1. #!/bin/sh
  2. set -ex
  3. die() {
  4. echo "die: $@"
  5. exit 1
  6. }
  7. # With pdpmake-2.0.3:
  8. # pdpmake: don't know how to make %.c
  9. command -v make || die "Run /extras/make.sh"
  10. command -v pkg-config || die "Run /extras/pkgconf-lite.sh"
  11. tar xof /distfiles/iproute2-*.tar.gz
  12. cd ./iproute2-*/
  13. ./configure --prefix /usr
  14. # tc(1) requires flex (or at least a lex with -o)
  15. # -maxdepth 1 is unsupported by both sbase and heirloom find(1)
  16. printf '%s\n' \
  17. '/SUBDIRS=/s;tc ;;' \
  18. '/iproute2 -maxdepth 1/s;install;\# install;' \
  19. w q | ed Makefile
  20. # Requires static_assert which is guarded behind C11
  21. export CFLAGS="${CFLAGS} -std=c11"
  22. unset MAKE
  23. make clean
  24. make HOSTCC=$CC
  25. make install
  26. cd ..
  27. rm -r ./iproute2-*/