diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..67f7553 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,16 @@ +[submodule "Jetpack"] + path = Jetpack + url = https://git.spirirobotics.com/dchvs/Jetpack.git + branch = cti-jetpack-4.4.1 +[submodule "CTI-L4T"] + path = CTI-L4T + url = https://git.spirirobotics.com/dchvs/CTI-L4T.git + branch = 4.4.1/feature/install-script-on-level2-directory +[submodule "li-mt9m021"] + path = li-mt9m021 + url = https://git.spirirobotics.com/dchvs/li-mt9m021.git + branch = jetpack-4.4.1 +[submodule "eg25-g"] + path = eg25-g + url = https://git.spirirobotics.com/dchvs/eg25-g.git + branch = master diff --git a/CTI-L4T b/CTI-L4T new file mode 160000 index 0000000..af2e8ef --- /dev/null +++ b/CTI-L4T @@ -0,0 +1 @@ +Subproject commit af2e8ef832d4e4b7efa2a8ce4aa710c8d87beff5 diff --git a/Jetpack b/Jetpack new file mode 160000 index 0000000..f578b99 --- /dev/null +++ b/Jetpack @@ -0,0 +1 @@ +Subproject commit f578b9924372cc7439f7122be030fc9e93a28203 diff --git a/README.md b/README.md new file mode 100644 index 0000000..b8e7f03 --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ + +## Spiri cameras project installation + +```bash +LINUX_FOR_TEGRA= +cd $LINUX_FOR_TEGRA + +# Clone the repository to the workspace +git clone --recurse-submodules https://git.spirirobotics.com/dchvs/spiri-project.git +cd spiri-project +git checkout 4.4.1/tx2-cti/camera-driver-dev +git submodule update --init --recursive --remote + +# Install the CTI BSP +cd CTI-L4T/ +sudo ./install.sh + +# Install the Jetpack+CTI 4.4.1 and Driver MT9M021 to source/ directory +cd $LINUX_FOR_TEGRA +mkdir source/ && cd source/ +cp -r ../spiri-project/Jetpack/* . +cp -r ../spiri-project/li-mt9m021/ . + +# Compile the sources +cd $LINUX_FOR_TEGRA +mkdir -p builds/build_ && cd builds/build_ + +mkdir build modules +make -C ../../source/kernel/kernel-4.9/ ARCH=arm64 O=$PWD/build/ tegra_defconfig +make -C ../../source/kernel/kernel-4.9/ ARCH=arm64 O=$PWD/build/ menuconfig +make -C ../../source/kernel/kernel-4.9/ ARCH=arm64 O=$PWD/build/ CROSS_COMPILE=${CROSS_COMPILE} -j8 --output-sync=target zImage dtbs modules +make -C ../../source/kernel/kernel-4.9/ ARCH=arm64 O=$PWD/build/ modules_install INSTALL_MOD_PATH=$PWD/modules +``` + +## Flash the Spiri MU +```bash +# Backup the default Kernel +cp -r ../../kernel/dtb/ ../../kernel/backup_dtb/ +cp ../../kernel/Image ../../kernel/backup_Image +sudo mv ../../rootfs/lib/modules/4.9.140-tegra/ ../../rootfs/lib/modules/backup_4.9.140-tegra/ + +# Install the Kernel +cp build/arch/arm64/boot/dts/* ../../kernel/dtb/ +cp build/arch/arm64/boot/Image ../../kernel/ +sudo make -C ../../source/kernel/kernel-4.9/ ARCH=arm64 O=$PWD/build/ modules_install INSTALL_MOD_PATH=$PWD/../../rootfs/ + +# Flash the Spiri MU +cd $LINUX_FOR_TEGRA +sudo ./flash.sh jetson-tx2 mmcblk0p1 +``` + +## Capture test +```bash +# Sender endpoint +gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12,framerate=(fraction)30/1' ! omxh264enc control-rate=2 bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=$HOST_IP port=5000 sync=false async=false + +# Receiver endpoint +gst-launch-1.0 udpsrc port=5000 ! "application/x-rtp,media=(string)video,payload=(int)96,clock-rate=(int)90000,encoding-name=(string)H264" ! rtph264depay ! queue ! avdec_h264 ! xvimagesink sync=true async=false +``` + diff --git a/doc/spiri_cameras_1.jpeg b/doc/spiri_cameras_1.jpeg new file mode 100644 index 0000000..9c16192 Binary files /dev/null and b/doc/spiri_cameras_1.jpeg differ diff --git a/doc/spiri_cameras_diagram.png b/doc/spiri_cameras_diagram.png new file mode 100644 index 0000000..b58014e Binary files /dev/null and b/doc/spiri_cameras_diagram.png differ diff --git a/eg25-g b/eg25-g new file mode 160000 index 0000000..480df7a --- /dev/null +++ b/eg25-g @@ -0,0 +1 @@ +Subproject commit 480df7a9f40a98df7355970373aed26792c74e1c diff --git a/li-mt9m021 b/li-mt9m021 new file mode 160000 index 0000000..6b9e2b6 --- /dev/null +++ b/li-mt9m021 @@ -0,0 +1 @@ +Subproject commit 6b9e2b6b54c1d03ca81339ef91ad24ab4722a89b