JetsonHacksNano/installLibrealsense

patchUbuntu.sh fails with errors about "corrupted" kernel source archive

cocasema opened this issue · 6 comments

kernel/kernel-4.9/fs/xfs/xfs_stats.c
kernel/kernel-4.9/fs/xfs/xfs_qm_syscalls.c
kernel/kernel-4.9/fs/xfs/xfs_trans_priv.h
kernel/kernel-4.9/fs/xfs/xfs_mru_cache.c
kernel/kernel-4.9/fs/xfs/xfs_ioctl.h
kernel/kernel-4.9/fs/xfs/xfs_message.h
kernel/kernel-4.9/fs/xfs/xfs_trans.c
kernel/kernel-4.9/fs/xfs/xfs_iomap.h
kernel/kernel-4.9/fs/xfs/xfs_aops.c

bzip2: Compressed file ends unexpectedly;
	perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
	Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
bash: scripts/config: No such file or directory

Just to save some time for anyone who might see the same error - this is NOT an issue with the patchUbuntu.sh (or getKernelSources.sh, or any other scripts), but with the bzip2 package update in Ubuntu. You can follow this thread for more details:

https://devtalk.nvidia.com/default/topic/1056381/jetson-agx-xavier/jetpack-4-2-xavier-install-failed/post/5355914/#5355914

A simple (but unsecure!) workaround is to temporarily downgrade bzip2 package (for U18):

sudo apt install bzip2=1.0.6-8.1 libbz2-1.0=1.0.6-8.1

patch kernel, and then update the bzip2 to the latest version:

sudo apt install bzip2 libbz2-1.0

Thanks for pointing it out! I am facing the same problem here!

But even I downgrade bzip2, I re-run patchUbuntu.sh. I got the following error. Any idea how to resolve this? Thanks!

$ ./patchUbuntu.sh
Jetson Model: jetson-nano
Jetson L4T: 32.1.0
buildModules and Kernel previously installed
Proposed source path: /usr/src/kernel/kernel-4.9
==== Kernel source appears to already be installed ===============
Patching and configuring kernel
Configuring Kernel for librealsense
Current working directory: /usr/src/kernel/kernel-4.9
bash: scripts/config: No such file or directory
make: *** No rule to make target ‘olddefconfig’. Stop.

Removing incomplete /usr/src/kernel directory and re-running patchUbuntu script helped me to proceed further.

Removing incomplete /usr/src/kernel directory and re-running patchUbuntu script helped me to proceed further.

Yes. It works! Thanks!

But my SD-card only has 32G, and patch this kernel ate all my space....and after I reboot (it succeed after all space has used) I cannot get into the system…it displayed a few lines and it becomes black screen.

I will change a bigger SD card and try again.

I had encountered the previous error above and was able to fix it with the solution given, but now I am experiencing a follow up error while running the patchUbuntu script. Here's the return:

/usr/src/kernel/nvidia/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c: In function ‘process_ctrl_msg’:
/usr/src/kernel/nvidia/drivers/net/ethernet/nvidia/pcie/tegra_vnet.c:867:11: error: ‘msg.msg_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   else if (msg.msg_id == CTRL_MSG_LINK_DOWN_ACK)
           ^
cc1: all warnings being treated as errors
scripts/Makefile.build:335: recipe for target 'drivers/net/ethernet/nvidia/pcie/tegra_vnet.o' failed
make[5]: *** [drivers/net/ethernet/nvidia/pcie/tegra_vnet.o] Error 1
scripts/Makefile.build:649: recipe for target 'drivers/net/ethernet/nvidia/pcie' failed
make[4]: *** [drivers/net/ethernet/nvidia/pcie] Error 2
scripts/Makefile.build:649: recipe for target 'drivers/net/ethernet/nvidia' failed
make[3]: *** [drivers/net/ethernet/nvidia] Error 2
scripts/Makefile.build:649: recipe for target 'drivers/net/ethernet' failed
make[2]: *** [drivers/net/ethernet] Error 2
scripts/Makefile.build:649: recipe for target 'drivers/net' failed
make[1]: *** [drivers/net] Error 2

that appears in the middle of the return, and at the end of the output:

Make did not successfully build
Please fix issues and retry build

Googling returns very little on the subject and absolutely nothing Realsense related. Any ideas on how to solve this?

Hello when trying to build the kernel module I also run into the above error. Even after downgrading to the suggested version.

sudo apt install bzip2=1.0.6-8.1 libbz2-1.0=1.0.6-8.1

When the script is executed, two erroneous actions are displayed.
errortext.txt

The first one mentioning a corrupted Tar public_sources/kernel_src.tbz2, the Second one after a few Modules.

I hope you can help me solve this problem.

A fix to bzip2 CRC issue pushed today to Ubuntu repositories.