From df6d5a1c2722a4fd99e2c986403b5d8157cc3134 Mon Sep 17 00:00:00 2001 From: Sivasubramaniyan Padmanaban Date: Tue, 26 Aug 2025 12:31:49 +0530 Subject: [PATCH 1/4] added softlink for aditof-server and usb-gadget etc. Signed-off-by: Sivasubramaniyan Padmanaban --- sdcard-images-utils/nxp/deboot.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sdcard-images-utils/nxp/deboot.sh b/sdcard-images-utils/nxp/deboot.sh index a888345d2..ed83b2b3b 100755 --- a/sdcard-images-utils/nxp/deboot.sh +++ b/sdcard-images-utils/nxp/deboot.sh @@ -286,7 +286,7 @@ chmod +x setup.sh ./setup.sh -y -b ../../build -j4 popd #cp ToF/build/apps/uvc-app/uvc-app /usr/share/systemd/ -cp ToF/build/apps/server/aditof-server /usr/share/systemd/ +#cp ToF/build/apps/server/aditof-server /usr/share/systemd/ popd popd chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/Workspace @@ -296,6 +296,7 @@ mkdir /home/${USERNAME}/Workspace/bin cp /home/${USERNAME}/Workspace/ToF/build/examples/data_collect/data_collect /home/${USERNAME}/Workspace/bin cp /home/${USERNAME}/Workspace/ToF/build/examples/first-frame/first-frame /home/${USERNAME}/Workspace/bin mv /home/${USERNAME}/Workspace/ToF/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/share/systemd/* /home/${USERNAME}/Workspace/bin +cp /home/${USERNAME}/Workspace/ToF/build/apps/server/aditof-server /home/${USERNAME}/Workspace/bin #pushd /home/${USERNAME}/Workspace/bin #chmod +x ros_install_noetic.sh @@ -385,6 +386,13 @@ sudo ln -s /home/${USERNAME}/Workspace/services/adi-tof.service /usr/lib/systemd sudo ln -s /home/${USERNAME}/Workspace/services/network-gadget.service /usr/lib/systemd/system/network-gadget.service sudo ln -s /home/${USERNAME}/Workspace/services/usb-gadget.service /usr/lib/systemd/system/usb-gadget.service +# link the shell scripts to bin files +sudo ln -s /home/${USERNAME}/Workspace/bin/aditof-server /usr/share/systemd/aditof-server +sudo rm -f /usr/share/systemd/tof-power-en.sh +sudo ln -s /home/${USERNAME}/Workspace/bin/tof-power-en.sh /usr/share/systemd/tof-power-en.sh +sudo rm -f /usr/share/systemd/usb-gadget.sh +sudo ln -s /home/${USERNAME}/Workspace/bin/usb-gadget.sh /usr/share/systemd/usb-gadget.sh + #copy the driver build in modules folderAdd commentMore actions mkdir /home/${USERNAME}/Workspace/module mv /usr/lib/modules/5.10.72-*/kernel/drivers/media/i2c/adsd3500.ko /home/${USERNAME}/Workspace/module @@ -422,9 +430,9 @@ function main() { # debootstrap 1st sudo debootstrap --arch=${TARGET_ARCH} --include="${INCLUDE_LIST}" --foreign ${DISTRO_CODE} ${ROOTFS_TMP} ${DISTRO_MIRROR} # copy libs to ${SCRIPT_DIR}/build/ubuntu/rootfs_tmp/home/temp(Make sure to add a path to .so files here) - #sudo cp /home/esptguest/SSingh/Workspace/libs/*.so ${SCRIPT_DIR}/build/ubuntu/rootfs_tmp - #echo "libs copied sucessfully" > /home/esptguest/SSingh/Workspace/libs/log.txt - #date >> /home/esptguest/SSingh/Workspace/libs/log.txt 1> /dev/null 2>&1 + sudo cp /home/esptguest/SSingh/Workspace/libs/*.so ${SCRIPT_DIR}/build/ubuntu/rootfs_tmp + echo "libs copied sucessfully" > /home/esptguest/SSingh/Workspace/libs/log.txt + date >> /home/esptguest/SSingh/Workspace/libs/log.txt 1> /dev/null 2>&1 # debootstrap 2nd sudo chroot ${ROOTFS_TMP} /debootstrap/debootstrap --second-stage From d8591513fb653f4caed8581bfe09c93dc228a95b Mon Sep 17 00:00:00 2001 From: Subham Singh Date: Tue, 26 Aug 2025 14:56:20 +0530 Subject: [PATCH 2/4] updated the create-workspace.sh file Signed-off-by: Subham Singh --- Web-UI/create-workspace.sh | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Web-UI/create-workspace.sh b/Web-UI/create-workspace.sh index 5ff83a8f2..b495a853f 100755 --- a/Web-UI/create-workspace.sh +++ b/Web-UI/create-workspace.sh @@ -47,6 +47,8 @@ else echo "Folder is either empty or does not exists." fi + + # Create Workspace directory dir_name="Workspace-$version" mkdir -p "$dir_name" @@ -62,9 +64,6 @@ cd ToF/ git submodule update --init --recursive -# delete git metadata -rm -rf .git - cd ../ cd ../ @@ -102,6 +101,26 @@ mkdir -p $dir_name/libs cp $libs_path/*.so $dir_name/libs + +# make build folder +cd ../ +mkdir -p $dir_name/ToF/build +cd $dir_name/ToF/build +cmake .. -DCMAKE_BUILD_TYPE=Release +make -j4 +cd ../../../ + +#copy bin file in workspace +mkdir -p $dir_name/bin +cp $dir_name/ToF/build/examples/data_collect/data_collect $dir_name/bin +cp $dir_name/ToF/build/examples/first-frame/first-frame $dir_name/bin +cp $dir_name/ToF/build/examples/first-frame/aditof-server $dir_name/bin +mv $dir_name/ToF/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/share/systemd/* $dir_name/bin + +# delete git metadata +rm -rf .git + +#copy module mkdir -p $dir_name/module cp $module_file_path $dir_name/module From 5183fb04de885cacf75b12919a0d21f6881b11ab Mon Sep 17 00:00:00 2001 From: Subham Singh Date: Thu, 28 Aug 2025 14:53:09 +0530 Subject: [PATCH 3/4] just create workspace without bin Signed-off-by: Subham Singh --- Web-UI/create-workspace.sh | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Web-UI/create-workspace.sh b/Web-UI/create-workspace.sh index b495a853f..9789def57 100755 --- a/Web-UI/create-workspace.sh +++ b/Web-UI/create-workspace.sh @@ -102,24 +102,6 @@ mkdir -p $dir_name/libs cp $libs_path/*.so $dir_name/libs -# make build folder -cd ../ -mkdir -p $dir_name/ToF/build -cd $dir_name/ToF/build -cmake .. -DCMAKE_BUILD_TYPE=Release -make -j4 -cd ../../../ - -#copy bin file in workspace -mkdir -p $dir_name/bin -cp $dir_name/ToF/build/examples/data_collect/data_collect $dir_name/bin -cp $dir_name/ToF/build/examples/first-frame/first-frame $dir_name/bin -cp $dir_name/ToF/build/examples/first-frame/aditof-server $dir_name/bin -mv $dir_name/ToF/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/share/systemd/* $dir_name/bin - -# delete git metadata -rm -rf .git - #copy module mkdir -p $dir_name/module From 478c544ff7d634d9bcea6dcc8f128a5610f02240 Mon Sep 17 00:00:00 2001 From: Subham Singh Date: Thu, 28 Aug 2025 15:00:59 +0530 Subject: [PATCH 4/4] changed 'web-1.0.0' with 'web' Signed-off-by: Subham Singh --- .../step1/usr/share/systemd/switch_mode_for_Win.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/share/systemd/switch_mode_for_Win.sh b/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/share/systemd/switch_mode_for_Win.sh index f3485e055..ef405762c 100755 --- a/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/share/systemd/switch_mode_for_Win.sh +++ b/sdcard-images-utils/nxp/patches/ubuntu_overlay/step1/usr/share/systemd/switch_mode_for_Win.sh @@ -1,7 +1,7 @@ #!/bin/bash # call the newtwork-switch script from web to switch the network -SCRIPT_PATH="/home/analog/web-1.0.0/network-mode-switch.sh" +SCRIPT_PATH="/home/analog/web/network-mode-switch.sh" # run script with windows sudo "$SCRIPT_PATH" 1 windows