rootfs-post-build-script 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env bash
  2. # This is run as part of:
  3. # make target-finalize
  4. # which gets called by the default target.
  5. target_dir="$1"
  6. # /dev/* entries were taken out of BusyBox inittab,
  7. # no need to do that on every boot, right?
  8. mkdir -p \
  9. "${target_dir}/mnt/9p/data" \
  10. "${target_dir}/mnt/9p/out" \
  11. "${target_dir}/mnt/9p/out_rootfs_overlay" \
  12. "${target_dir}/mnt/9p/rootfs_overlay" \
  13. "${target_dir}/mnt/overlay" \
  14. "${target_dir}/mnt/work" \
  15. "${target_dir}/mnt/upper" \
  16. "${target_dir}/dev/pts" \
  17. "${target_dir}/dev/shm" \
  18. ;
  19. # Maybe there is a cleaner way to get rid of those files,
  20. # like disabling some Buildroot packages, but no patience.
  21. #
  22. # As of 2d5f95b1839986ca6d7b568296374a2403d2693d
  23. # xorg must be removed or else we get a black screen:
  24. # https://bugs.busybox.net/show_bug.cgi?id=11066
  25. init_d="${target_dir}/etc/init.d"
  26. rm -rf \
  27. "${init_d}/S01logging" \
  28. "${init_d}/S01syslogd" \
  29. "${init_d}/S02klogd" \
  30. "${init_d}/S02sysctl" \
  31. "${init_d}/S20urandom" \
  32. "${init_d}/S40network" \
  33. "${init_d}/S40xorg" \
  34. "${init_d}/S50sshd" \
  35. ;