Problems encountered in compiling and installing LitmusRT

background

Recently, in the study of CPU-GPU heterogeneity, the first problem is the installation environment. I installed this environment on three machines (virtual machine, server, my own desktop ubuntu), and encountered some problems. After several setbacks, all of them were solved. I recorded the compilation process, installation problems, and encountered problems in the form of notes. Problems and solutions, and gradually write them into blogs to share with everyone, because this part of the content is really not much on the Internet.

One of our environments is to use LitmusRT's scheduler, then we must compile and install this kernel. Compile and install steps in fact, follow the instructions on the official website http://www.litmus-rt.org/installation.html. If you are lucky, you can successfully restart with litmus once. But I encountered three difficult problems when restarting or after restarting with litmus

problem

问题一:Alert! /dev/sdax does not exist. dropping to a shell!

Solution:

1), follow this article https://blog.csdn.net/pilot10/article/details/48788479 to enable disk loading

Go to the root directory of the litmus project, enter the command make menuconfig, then enter Device Drivers, enable all sub-items under SCSI device support and Fusion MPT device support, proceed recursively, and then compile the kernel

2) When editing the /etc/default/grub file, turn on the comment with GRUB_DISABLE_LINUX_UUID=true

3) Modify the hard disk to be mounted by root when litmusRT starts, here is sdb1, because sda1 cannot be found

szc@ubuntu:~$ sudo vim /boot/grub/grub.cfg

Find all lines starting with linux in the echo litmusRT kernel name (here vmlinuz-4.9.30-litmus), and change sda1 to sdb1

    menuentry 'Ubuntu, with Linux 4.9.30-litmus' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.30-litmus-advanced-3ea2036d-f3ca-4b6c-af46-97ba860f52e4' {
        ......
        linux    /boot/vmlinuz-4.9.30-litmus root=/dev/sdb1 ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US quiet
        ......
    }
    menuentry 'Ubuntu, with Linux 4.9.30-litmus (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.30-litmus-init-upstart-3ea2036d-f3ca-4b6c-af46-97ba860f52e4' {
        .....
        linux    /boot/vmlinuz-4.9.30-litmus root=/dev/sdb1 ro find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US quiet init=/sbin/upstart
        .....
    }
    menuentry 'Ubuntu, with Linux 4.9.30-litmus (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.30-litmus-recovery-3ea2036d-f3ca-4b6c-af46-97ba860f52e4' {
        .....
        linux    /boot/vmlinuz-4.9.30-litmus root=/dev/sdb1 ro recovery nomodeset find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
        .....
    }

Then update grub

szc@ubuntu:~$ sudo update-grub

How to determine the device you want to mount? After executing the second step but not executing this step, reboot into litmusRT, it will enter the bash interface, and show that /dev/sda1 cannot be found, then enter the command

ls /dev/sd

Then press tab, it will display all available devices. I don’t have sda1 here, only sdb1, so I chose to mount it on sdb1

Question 2: the initrd is too large

Solution: It is recommended to compile and install the linux 4.9.30 kernel, and then recompile and install litmus under this kernel

Problem 3: Incompatible with NVIDIA driver

Solution: After rebooting into LitmusRT, reinstall the NVIDIA driver (that is, run the NVIDIA-XXX.run file again).

After many attempts to run this file on the server, a bunch of errors were reported. First

Unable to find the kernel source tree for the currently running kernel

Then add the parameter --kernel-source-path to run the driver installation file, it still reports an error, the log file reports the error as follows

ld:cannot find /tmp/selfgz9971/NVIDIA-Linux-x86_64-450.66/kernel/nvidia.o
................

There is simply no solution.

It succeeded once on my own Ubuntu desktop. The configuration is: Ubuntu 18.04 64 bit (the same as the server version), the graphics card version is GTX 1070Ti (the server is GTX 1080Ti), and the installation files are the same, all are NVIDIA-Linux- x86_64-450.66.run.

In the virtual machine where the graphics cards are all virtualized, it fails without hesitation.

Maybe this is a metaphysical problem...

Conclusion

LitmusRT is a real-time experimental platform based on Linux. The official manual is actually more detailed, but still encountered some problems, but I have not tried to reproduce it on the desktop computer (the desktop computer can only be used the day before yesterday), I will further complete the notes and Post a blog.

Guess you like

Origin blog.csdn.net/qq_37475168/article/details/109195205