Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmpfs: introduce USE_TMPFS=no to disable tmpfs usage for WORKDIR and package-specific working dirs; actually use $temp_dir_id for mktemp; see #5502 #5506

Conversation

rpardini
Copy link
Member

tmpfs: introduce USE_TMPFS=no to disable tmpfs usage for WORKDIR and package-specific working dirs; actually use $temp_dir_id for mktemp; see #5502

  • tmpfs: introduce USE_TMPFS=no to disable tmpfs usage for WORKDIR and package-specific working dirs; actually use $temp_dir_id for mktemp; see During build process: cp: error writing '/home/user/build/.tmp/work-XXXXXXXX: No space left on device #5502
    • USE_TMPFS=no disables usage of generic tmpfs mechanism (still possibly used for rootfs/image building, which is unrelated), for last-resort cases
    • use better/more descriptive temp_dir_id's for kernel build than k (now kernel_dest_install_dir) and kd (now kernel_debs_temp_dir)
      • specific image/dtb/headers packaging already had decent names, same for other .deb's
    • replace mktemp -d with mktemp -d --tmpdir "${temp_dir_id}-XXXXX" in prepare_temp_dir_in_workdir_and_schedule_cleanup(), so we know what's using what in tmpfs

…and package-specific working dirs; actually use `$temp_dir_id` for mktemp; see armbian#5502

- `USE_TMPFS=no` disables usage of generic tmpfs mechanism (still possibly used for rootfs/image building, which is unrelated), for last-resort cases
- use better/more descriptive `temp_dir_id`'s for kernel build than `k` (now `kernel_dest_install_dir`) and `kd` (now `kernel_debs_temp_dir`)
  - specific image/dtb/headers packaging already had decent names, same for other .deb's
- replace `mktemp -d` with `mktemp -d --tmpdir "${temp_dir_id}-XXXXX"` in `prepare_temp_dir_in_workdir_and_schedule_cleanup()`, so we know what's using what in tmpfs
@rpardini rpardini requested a review from viraniac July 24, 2023 12:18
@rpardini
Copy link
Member Author

CC'ing @viraniac who I think had also troubles with tmpfs?
Also @prahal -- this might workaround the problems in #5218

@rpardini rpardini marked this pull request as ready for review July 24, 2023 12:19
@rpardini rpardini requested a review from a team as a code owner July 24, 2023 12:19
Copy link
Collaborator

@viraniac viraniac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC'ing @viraniac who I think had also troubles with tmpfs? Also @prahal -- this might workaround the problems in #5218

I don't think I had issues with tmpfs. The memory usage shown by docker never hit above the limit mentioned in docker resources settings even when I compiled debug kernels with custom configurations that resulted into 200MB initrd file. I did had issues with initrd not fitting into the memory used in our bootscripts, but modified the same and was good to go.

Anyways coming back to the PR, the changes looks ok. Hence approving the request

@igorpecovnik igorpecovnik added the Ready to merge Reviewed, tested and ready for merge label Jul 24, 2023
@igorpecovnik igorpecovnik merged commit eab306b into armbian:main Jul 24, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge Reviewed, tested and ready for merge
Development

Successfully merging this pull request may close these issues.

During build process: cp: error writing '/home/user/build/.tmp/work-XXXXXXXX: No space left on device
3 participants