diff --git a/kura/distrib/src/main/resources/common/customize-installation.sh b/kura/distrib/src/main/resources/common/customize-installation.sh index 5c0e2f6a551..05371c01536 100644 --- a/kura/distrib/src/main/resources/common/customize-installation.sh +++ b/kura/distrib/src/main/resources/common/customize-installation.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2023 Eurotech and/or its affiliates and others +# Copyright (c) 2023, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -12,9 +12,37 @@ # Eurotech # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if uname -m | grep -q arm ; then + destination="/usr/lib/arm-linux-gnueabihf/libudev.so.1" + link_name="/usr/lib/arm-linux-gnueabihf/libudev.so.0" + fi + if uname -m | grep -q aarch ; then + destination="/usr/lib/aarch64-linux-gnu/libudev.so.1" + link_name="/usr/lib/aarch64-linux-gnu/libudev.so.0" + fi + if uname -m | grep -q x86_64 ; then + destination="/usr/lib/x86_64-linux-gnu/libudev.so.1" + link_name="/usr/lib/x86_64-linux-gnu/libudev.so.0" + fi + + if [ -f "${destination}" ] && [ ! -f "${link_name}" ]; then + echo "Setting up symlink ${link_name} -> ${destination}" + ln -sf "${destination}" "${link_name}" + fi +} + KURA_PLATFORM=$( uname -m ) sed -i "s/kura_platform/${KURA_PLATFORM}/g" "/opt/eclipse/kura/framework/kura.properties" +setup_libudev + BOARD="generic-device" if uname -a | grep -q 'raspberry' > /dev/null 2>&1 diff --git a/kura/distrib/src/main/resources/intel-up2-ubuntu-20-nn/kura_install.sh b/kura/distrib/src/main/resources/intel-up2-ubuntu-20-nn/kura_install.sh index 737122546ed..9c670405f2d 100644 --- a/kura/distrib/src/main/resources/intel-up2-ubuntu-20-nn/kura_install.sh +++ b/kura/distrib/src/main/resources/intel-up2-ubuntu-20-nn/kura_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011, 2022 Eurotech and/or its affiliates and others +# Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -12,8 +12,22 @@ # Eurotech # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if [ ! -f /usr/lib/x86_64-linux-gnu/libudev.so.0 ] && [ -f /usr/lib/x86_64-linux-gnu/libudev.so.1 ]; then + ln -sf /usr/lib/x86_64-linux-gnu/libudev.so.1 /usr/lib/x86_64-linux-gnu/libudev.so.0 + fi +} + INSTALL_DIR=/opt/eclipse +setup_libudev + #create known kura install location ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura diff --git a/kura/distrib/src/main/resources/intel-up2-ubuntu-20/kura_install.sh b/kura/distrib/src/main/resources/intel-up2-ubuntu-20/kura_install.sh index cd53273ca28..74a87d2e84f 100644 --- a/kura/distrib/src/main/resources/intel-up2-ubuntu-20/kura_install.sh +++ b/kura/distrib/src/main/resources/intel-up2-ubuntu-20/kura_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2022, 2023 Eurotech and/or its affiliates and others +# Copyright (c) 2022, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -12,8 +12,22 @@ # Eurotech # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if [ ! -f /usr/lib/x86_64-linux-gnu/libudev.so.0 ] && [ -f /usr/lib/x86_64-linux-gnu/libudev.so.1 ]; then + ln -sf /usr/lib/x86_64-linux-gnu/libudev.so.1 /usr/lib/x86_64-linux-gnu/libudev.so.0 + fi +} + INSTALL_DIR=/opt/eclipse +setup_libudev + #create known kura install location ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura diff --git a/kura/distrib/src/main/resources/nvidia-jetson-nano-nn/kura_install.sh b/kura/distrib/src/main/resources/nvidia-jetson-nano-nn/kura_install.sh index 4e0d8b3c581..f88ee1c78dd 100755 --- a/kura/distrib/src/main/resources/nvidia-jetson-nano-nn/kura_install.sh +++ b/kura/distrib/src/main/resources/nvidia-jetson-nano-nn/kura_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011, 2021 Eurotech and/or its affiliates and others +# Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -13,8 +13,22 @@ # Cavium # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if [ ! -f /usr/lib/aarch64-linux-gnu/libudev.so.0 ] && [ -f /usr/lib/aarch64-linux-gnu/libudev.so.1 ]; then + ln -sf /usr/lib/aarch64-linux-gnu/libudev.so.1 /usr/lib/aarch64-linux-gnu/libudev.so.0 + fi +} + INSTALL_DIR=/opt/eclipse +setup_libudev + #create known kura install location ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura diff --git a/kura/distrib/src/main/resources/nvidia-jetson-nano/kura_install.sh b/kura/distrib/src/main/resources/nvidia-jetson-nano/kura_install.sh index a91e73c54ca..c42ebcfc7ff 100755 --- a/kura/distrib/src/main/resources/nvidia-jetson-nano/kura_install.sh +++ b/kura/distrib/src/main/resources/nvidia-jetson-nano/kura_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2022, 2023 Eurotech and/or its affiliates and others +# Copyright (c) 2022, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -12,8 +12,22 @@ # Eurotech # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if [ ! -f /usr/lib/aarch64-linux-gnu/libudev.so.0 ] && [ -f /usr/lib/aarch64-linux-gnu/libudev.so.1 ]; then + ln -sf /usr/lib/aarch64-linux-gnu/libudev.so.1 /usr/lib/aarch64-linux-gnu/libudev.so.0 + fi +} + INSTALL_DIR=/opt/eclipse +setup_libudev + #create known kura install location ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura diff --git a/kura/distrib/src/main/resources/raspberry-pi-arm64-nn/kura_install.sh b/kura/distrib/src/main/resources/raspberry-pi-arm64-nn/kura_install.sh index 80ae57ba158..c288d91250b 100644 --- a/kura/distrib/src/main/resources/raspberry-pi-arm64-nn/kura_install.sh +++ b/kura/distrib/src/main/resources/raspberry-pi-arm64-nn/kura_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others +# Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -12,8 +12,22 @@ # Eurotech # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if [ ! -f /usr/lib/aarch64-linux-gnu/libudev.so.0 ] && [ -f /usr/lib/aarch64-linux-gnu/libudev.so.1 ]; then + ln -sf /usr/lib/aarch64-linux-gnu/libudev.so.1 /usr/lib/aarch64-linux-gnu/libudev.so.0 + fi +} + INSTALL_DIR=/opt/eclipse +setup_libudev + #create known kura install location ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura diff --git a/kura/distrib/src/main/resources/raspberry-pi-arm64/kura_install.sh b/kura/distrib/src/main/resources/raspberry-pi-arm64/kura_install.sh index c20044a020f..5b8becc1825 100644 --- a/kura/distrib/src/main/resources/raspberry-pi-arm64/kura_install.sh +++ b/kura/distrib/src/main/resources/raspberry-pi-arm64/kura_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2022, 2023 Eurotech and/or its affiliates and others +# Copyright (c) 2022, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -12,8 +12,22 @@ # Eurotech # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if [ ! -f /usr/lib/aarch64-linux-gnu/libudev.so.0 ] && [ -f /usr/lib/aarch64-linux-gnu/libudev.so.1 ]; then + ln -sf /usr/lib/aarch64-linux-gnu/libudev.so.1 /usr/lib/aarch64-linux-gnu/libudev.so.0 + fi +} + INSTALL_DIR=/opt/eclipse +setup_libudev + #create known kura install location ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura diff --git a/kura/distrib/src/main/resources/raspberry-pi-armhf-nn/kura_install.sh b/kura/distrib/src/main/resources/raspberry-pi-armhf-nn/kura_install.sh index 80ae57ba158..4c2cfd7fa60 100755 --- a/kura/distrib/src/main/resources/raspberry-pi-armhf-nn/kura_install.sh +++ b/kura/distrib/src/main/resources/raspberry-pi-armhf-nn/kura_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others +# Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -12,6 +12,18 @@ # Eurotech # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if [ ! -f /usr/lib/arm-linux-gnueabihf/libudev.so.0 ] && [ -f /usr/lib/arm-linux-gnueabihf/libudev.so.1 ]; then + ln -sf /usr/lib/arm-linux-gnueabihf/libudev.so.1 /usr/lib/arm-linux-gnueabihf/libudev.so.0 + fi +} + INSTALL_DIR=/opt/eclipse #create known kura install location diff --git a/kura/distrib/src/main/resources/raspberry-pi-armhf/kura_install.sh b/kura/distrib/src/main/resources/raspberry-pi-armhf/kura_install.sh index 6f9f9d76928..cd60c105026 100755 --- a/kura/distrib/src/main/resources/raspberry-pi-armhf/kura_install.sh +++ b/kura/distrib/src/main/resources/raspberry-pi-armhf/kura_install.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011, 2023 Eurotech and/or its affiliates and others +# Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others # # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 @@ -12,8 +12,22 @@ # Eurotech # +setup_libudev() { + # create soft link for libudev.so.0 to make it retrocompatible + # https://unix.stackexchange.com/questions/156776/arch-ubuntu-so-whats-the-deal-with-libudev-so-0 + if [ ! -f /lib/libudev.so.0 ] && [ -f /lib/libudev.so.1 ]; then + ln -sf /lib/libudev.so.1 /lib/libudev.so.0 + fi + + if [ ! -f /usr/lib/arm-linux-gnueabihf/libudev.so.0 ] && [ -f /usr/lib/arm-linux-gnueabihf/libudev.so.1 ]; then + ln -sf /usr/lib/arm-linux-gnueabihf/libudev.so.1 /usr/lib/arm-linux-gnueabihf/libudev.so.0 + fi +} + INSTALL_DIR=/opt/eclipse +setup_libudev + #create known kura install location ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura