jetsonhacks / buildJetsonTX2Kernel

Build the NVIDIA Jetson TX2 Kernel on the device itself
MIT License
153 stars 116 forks source link

building kernel filled all free disk space #10

Closed gustavz closed 6 years ago

gustavz commented 6 years ago

i ran your scripts and they took about 3GB of disk space. That was all i need, now my jetson has no free disk space anymore.

Where did this space go? the folder where i executed it is very small. where are the 3GB?

Please help

jetsonhacks commented 6 years ago

After flashing the TX2, there is approximately 8GB used if the Jetson was flashed with the standard libraries, specialty libraries and samples.

The compressed kernel source files are: 138.6 MB /usr/src/public_release which are the decompressed source files: 122MB /usr/src/hardware source files: 2MB /usr/src/kernel source files and compiled object files: 3.9 GB If you set your local version to something other than 4.4.38-tegra, the compiled modules take up about 113.3 MB.

I am not sure why you are asking me to provide this information. This information is provided in the 'Notes' of the README.MD file. On a TX2 this does not kill all free disk space, typically there are over > 15GB free after building a kernel and modules.

All of this is covered in the article: http://www.jetsonhacks.com/2018/03/22/build-kernel-modules-nvidia-jetson-tx2-2/ In the YouTube video: https://www.youtube.com/watch?v=80c5j0rSN_0 You could also read the code as a last resort.

gustavz commented 6 years ago

i was using this for installing librealsense. Their installation guide used this repo as workaround for jetsons.

My jetson was all setup and running, but running through the scripts in this repo filled my remaining 3gb, probably it would have taken more, but it obviously stopped after the disk was full.

Now the Jetson won't boot due to the full disk. How can i reflash it without it booting?

I am able to do ctrl+alt+f1 and deleted some files, but still it is not able to boot. Maybe its the damaged image the kernel created...

Edit: df -h says: /dev/root is 100% used with 28 GB

gustavz commented 6 years ago

i reflashed the jetson with jetpack 3.2 and again tried to buil librealsense with the kernel patches and now source files are of this size when look at with du: 3248 /usr/src/hardware 817136 /usr/src/kernel

So more than double of yours, does this just copy everything? how can i clean the /usr/src/kernel directory?

jetsonhacks commented 6 years ago

Those are the correct sizes. You can erase all of the kernel/module files source and build files:

$ sudo rm -r /usr/src/kernel $ sudo rm -r /usr/src/hardware $ sudo rm -r /usr/src/public_release $ sudo rm -r /usr/src/source_release.tbz2

You can also delete the build kernel repository:

$ cd ~/ $ sudo rm -r buildJetsonTX2Kernel

This should remove everything installed by the buildJetsonTX2Kernel.

gustavz commented 6 years ago

a perfectly thanks! Why are those files created? as backup?

jetsonhacks commented 6 years ago

They are created to compile the kernel and module source files.

gustavz commented 6 years ago

is it also safe to delete/usr/src/linux-headers-4.4.38-tegra ?

jetsonhacks commented 6 years ago

Those are part of the stock L4T installation. You will need to determine if they are valuable to your development environment or not.