IntelRealSense / realsense_mipi_platform_driver

Intel® RealSense™ camera driver for GMSL* interface
GNU General Public License v2.0
15 stars 12 forks source link

Generate deb packages for deployment #137

Closed xzhangxa closed 1 year ago

xzhangxa commented 1 year ago

Please check the updated README for the new installation on board, it's simpler than before. This should have been done before when I was still in the project though...

This is based on @jnzw 's #134 . A few old patches' names are corrected to keep the number in order for 4.6.1.

This works for both JetPack 5.0.2 and 4.6.1, since our board is on 5.0.2 the 4.6.1 deb is not really tested on board.

dmipx commented 1 year ago

@xzhangxa please rebase your PR based on latest modifications on [IntelRealSense:Jetpack-5.0.2]

xzhangxa commented 1 year ago

@xzhangxa please rebase your PR based on latest modifications on [IntelRealSense:Jetpack-5.0.2]

Done, thanks.

xzhangxa commented 1 year ago

Fixed the issue Junze reported and force pushed, please rebase #144 to include the fix or use commit in this PR when merging #144.

dmipx commented 1 year ago

@xzhangxa As you changed vermagic to 5.10.104-d457, all modules should be included in artifacts. update readme file to pack module folder tar -czf modules.tar.gz -C images/modules

Nir-Az commented 1 year ago

@xzhangxa As you changed vermagic to 5.10.104-d457, all modules should be included in artifacts. update readme file to pack module folder tar -czf modules.tar.gz -C images/modules

Please address both sides if needed (pack + unpack or just copy), I want to use this readme flow as guidance for the CI flow,

xzhangxa commented 1 year ago

Hi @dmipx @Nir-Az

But packaging all modules again is not a good idea to me, why not just use deb package? As you mentioned the source code will be public soon so we won't give only binary debs thus including all modules in it is not a concern. The CI flow change is just small if installing debs instead of copying files.

Or maybe just change the ver string back to tegra to keep it same as original Jetson kernel, so you could have both copying method and deb method work. I'm on vacation and mobile now, could you help decide and rebase this since you're the repo maintainers?

Nir-Az commented 1 year ago

Hi @dmipx @Nir-Az

But packaging all modules again is not a good idea to me, why not just use deb package? As you mentioned the source code will be public soon so we won't give only binary debs thus including all modules in it is not a concern. The CI flow change is just small if installing debs instead of copying files.

Or maybe just change the ver string back to tegra to keep it same as original Jetson kernel, so you could have both copying method and deb method work. I'm on vacation and mobile now, could you help decide and rebase this since you're the repo maintainers?

Thanks, I tried, I don't have permission to push to your fork so I opened a new PR based on yours. see #154

dmipx commented 1 year ago

the debians failed on dts step

make KERNELRELEASE=5.10.104-d457 ARCH=arm64     KBUILD_BUILD_VERSION=1 -f /home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/Makefile intdeb-pkg
sh /home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/scripts/package/builddeb
make[7]: *** No rule to make target 'debian/linux-image/usr/lib/linux-image-5.10.104-d457/../../../../../../hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0000-p3737-0000.dtb', needed by '__dtbs_install'.  Stop.
make[6]: *** [/home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/Makefile:1401: dtbs_install] Error 2
make[5]: *** [/home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/scripts/Makefile.package:87: intdeb-pkg] Error 2
make[4]: *** [/home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/Makefile:1582: intdeb-pkg] Error 2
make[3]: *** [debian/rules:13: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
dmipx commented 1 year ago

the debians failed on dts step

make KERNELRELEASE=5.10.104-d457 ARCH=arm64   KBUILD_BUILD_VERSION=1 -f /home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/Makefile intdeb-pkg
sh /home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/scripts/package/builddeb
make[7]: *** No rule to make target 'debian/linux-image/usr/lib/linux-image-5.10.104-d457/../../../../../../hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0000-p3737-0000.dtb', needed by '__dtbs_install'.  Stop.
make[6]: *** [/home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/Makefile:1401: dtbs_install] Error 2
make[5]: *** [/home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/scripts/Makefile.package:87: intdeb-pkg] Error 2
make[4]: *** [/home/dima/work/jetson-deb/perc_hw_ds5u_android-jetson_tx2/sources_5.0.2/kernel/kernel-5.10/Makefile:1582: intdeb-pkg] Error 2
make[3]: *** [debian/rules:13: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

this resolved by appling patches. This error will show when compiling jp5 as is.