logo

bootstrap-initrd

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

genext2fs.sh (959B)


  1. #!/bin/sh
  2. set -ex
  3. die() {
  4. echo "die: $@"
  5. exit 1
  6. }
  7. cd /extras/genext2fs-*/
  8. # Cleaned up after ./configure --disable-libarchive CC=tcc
  9. cat >config.h <<EOF
  10. #define HAVE_DIRENT_H 1
  11. #define HAVE_FCNTL_H 1
  12. #define HAVE_GETLINE 1
  13. #define HAVE_GETOPT_H 1
  14. #define HAVE_GETOPT_LONG 1
  15. #define HAVE_INTTYPES_H 1
  16. #define HAVE_LIBGEN_H 1
  17. #define HAVE_LIMITS_H 1
  18. #define HAVE_MEMORY_H 1
  19. #define HAVE_SNPRINTF 1
  20. #define HAVE_STDDEF_H 1
  21. #define HAVE_STDINT_H 1
  22. #define HAVE_STDIO_H 1
  23. #define HAVE_STDLIB_H 1
  24. #define HAVE_STRINGS_H 1
  25. #define HAVE_STRING_H 1
  26. #define HAVE_STRTOF 1
  27. #define HAVE_STRUCT_STAT_ST_RDEV 1
  28. #define HAVE_SYS_STAT_H 1
  29. #define HAVE_SYS_TYPES_H 1
  30. #define HAVE_UNISTD_H 1
  31. #define HAVE_VSNPRINTF 1
  32. #define HAVE_WCHAR_H 1
  33. #define MAJOR_IN_SYSMACROS 1
  34. #define STDC_HEADERS 1
  35. /* Version number of package */
  36. #define VERSION "1.4.2"
  37. EOF
  38. ${CC} ${CFLAGS} -I./ -o /bin/genext2fs genext2fs.c
  39. # Needs md5sum
  40. #ln -s /bin/genext2fs ./genext2fs
  41. #./test.sh
  42. cd -