logo

bootstrap-initrd

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

iproute2.sh (639B)


  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. cd /extras/iproute2-*/
  12. ./configure --prefix /usr
  13. # tc(1) requires flex (or at least a lex with -o)
  14. # -maxdepth 1 is unsupported by both sbase and heirloom find(1)
  15. printf '%s\n' \
  16. '/SUBDIRS=/s;tc ;;' \
  17. '/iproute2 -maxdepth 1/s;install;\# install;' \
  18. w q | ed Makefile
  19. # Requires static_assert which is guarded behind C11
  20. export CFLAGS="${CFLAGS} -std=c11"
  21. unset MAKE
  22. make clean
  23. make HOSTCC=$CC
  24. make install
  25. cd -