logo

bootstrap-initrd

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

bootstrap-e2fsprogs.sh (541B)


  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. tar xof /e2fsprogs-*.tar.gz
  9. cd ./e2fsprogs-*/
  10. # workaround bug in utils-std ln(1)
  11. ed lib/et/Makefile.in <<'EOF'
  12. /LINK_INSTALL_FLAGS
  13. c
  14. $(LN) $(LINK_INSTALL_FLAGS) et/com_err.h ./com_err.h )
  15. .
  16. p
  17. w
  18. q
  19. EOF
  20. LD=tcc ./configure --disable-nls --disable-backtrace
  21. # Replace __GNUC_PREREQ calls with 1
  22. ed lib/ext2fs/rbtree.h <<EOF
  23. 101
  24. c
  25. #if 1
  26. .
  27. p
  28. 179
  29. c
  30. #if 1
  31. .
  32. w
  33. q
  34. EOF
  35. make clean
  36. make
  37. make install INSTALL=install
  38. cd ..
  39. rm -fr ./e2fsprogs-*/