diff --git a/cmake/scripts/BeagleBoneBlack/crosscompile/make-debug-cfg.sh b/cmake/scripts/BeagleBoneBlack/crosscompile/make-debug-cfg.sh index 6661ad0..5b6d5db 100755 --- a/cmake/scripts/BeagleBoneBlack/crosscompile/make-debug-cfg.sh +++ b/cmake/scripts/BeagleBoneBlack/crosscompile/make-debug-cfg.sh @@ -3,11 +3,11 @@ counter=0 cfg_script_name="cmake-build-cfg.py" while [ ${counter} -lt 5 ] do - cd .. if [ -f ${cfg_script_name} ];then break fi counter=$((counter=counter + 1)) + cd .. done if [ "${counter}" -ge 5 ];then diff --git a/doc/README-bbb.md b/doc/README-bbb.md index 34f05cc..d70253d 100644 --- a/doc/README-bbb.md +++ b/doc/README-bbb.md @@ -22,7 +22,7 @@ more quickly. 1. SSH connection to the Beagle Bone Black working 2. Beagle Bone Black linux environment set up properly -3. `CMake` installed +3. `cmake` installed ## Setting up general prerequisites for Linux systems diff --git a/doc/README-linux.md b/doc/README-linux.md new file mode 100644 index 0000000..1de3410 --- /dev/null +++ b/doc/README-linux.md @@ -0,0 +1,51 @@ +# Raising Message Queue Size Limit + +The FSFW requires a higher message queue maximum lenght than the regular +value configured for Linux. Failure to adjust this limit will cause +errors when running FSFW applications. + +The following steps raise the maximum allowed message queue length to a higher +number permanently, which is required for some framework components. The recommended +values for the new message length is 130. + +2. Edit the /etc/sysctl.conf file +```sh +sudo nano /etc/sysctl.conf +``` +Append at end: +```sh +fs/mqueue/msg_max = +``` +Apply changes with: +```sh +sudo sysctl -p +``` + +A possible solution which only persists for the current session is +```sh +echo | sudo tee /proc/sys/fs/mqueue/msg_max +``` + +# Setting up UNIX environment for real-time functionalities + +Please note that on most UNIX environments (e.g. Ubuntu), the real time functionalities +used by the UNIX pthread module are restricted, which will lead to permission errors when creating these tasks +and configuring real-time properites like scheduling priorities. +If you use the real time scheduler in Linux, perform the following steps: + +Edit the /etc/security/limits.conf file and add following lines at the end: + +```sh + hard rtprio 99 + soft rtprio 99 +``` +The soft limit can also be set in the console with `ulimit -Sr` if the hard +limit has been increased, but it is recommended to add it to the file as well +for convenience. If adding the second line is not desired for security reasons, +the soft limit needs to be set for each session. If using an IDE like eclipse +in that case, the IDE needs to be started from the console after setting +the soft limit higher there. After adding the two lines to the file, +the computer needs to be restarted. + +It is also recommended to perform the following change so that the unlockRealtime +script does not need to be run anymore each time.