rootfs-post-build-script 1.0 KB

1234567891011121314151617181920212223242526272829303132
  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. rm -rf \
  26. "${target_dir}/etc/init.d/S01logging" \
  27. "${target_dir}/etc/init.d/S20urandom" \
  28. "${target_dir}/etc/init.d/S40network" \
  29. "${target_dir}/etc/init.d/S40xorg" \
  30. "${target_dir}/etc/init.d/S50sshd" \
  31. ;