logo

bootstrap-initrd

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

iproute2.sh (631B)


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