So im working on a project that pushes docker containers with machine learning codes from
Azure Cloud onto the Jetson TX2 with something called Azure IoT Edge.
the latest Jetpack brings Nvidia Docker and Azure IoT Edge installation from repo is clean.
great!
so i went and bought an E-Con 13 mp camera… the e-CAM131_CUTX2
im a newb so was hoping the camera would just “come up” on a brand new flash from Jetpack 4.2.1
then i went on the e-con website and realized their directions tell me to
- switch my development machine to Ubuntu 14.04 down from 18.04
- build a custom kernel + their patch and flash or use their quickstart kernel and flash
needless to say I DONT WANT TO DO THAT! :)
- ill lose all the cool stuff that comes with jetpack 4.2.1 that i dont know how to use yet.
- the older kernel as i recall doesnt run nvidia docker out of the box.
- who knows how this will affect Azure IoT Edge and the ONNX ML modules.
- ?
So i went to our friend from Jetson Hacks.
He has a video showing how to build a custom kernel on the device itself.
based on this i figure i can
- Download the L4T 32.2 Kernel sources
- Manually go line by line through e-Cons LT4 28.2 patch and find the places in the 32.2 Kernel
that need to be changed. - Make the new Kernel as per Jetson Hacks on device method and swap it out and I can keep all the fresh stuff from Jetpack 4.2.1 as well as get my camera working.
So far ive gone through the attached patch file and kinda see how it can work but i got to this one point and i dont think i understand DIFF syntax well enough. can someone interpret this for me?
can i ignore this DIFF and keep going?
here is the patch file
https://aidevkitsa.blob.core.windows.net/e-cam131-cutx2-jetson-tx2-28-2-1-kernel-patch/e-CAM131_CUTX2_JETSON_TX2_28.2.1_kernel.patch
here is the part im stuck at…
diff --git a/kernel/kernel-4.4/drivers/media/platform/tegra/camera/camera_common.c b/kernel/kernel-4.4/drivers/media/platform/tegra/camera/camera_common.c
index 625fa06..fa25804 100644
--- a/kernel/kernel-4.4/drivers/media/platform/tegra/camera/camera_common.c
+++ b/kernel/kernel-4.4/drivers/media/platform/tegra/camera/camera_common.c
@@ -36,6 +36,7 @@
#define HDR_ENABLE 0x1
static const struct camera_common_colorfmt camera_common_color_fmts[] = {
+#if 0
{
MEDIA_BUS_FMT_SRGGB12_1X12,
V4L2_COLORSPACE_SRGB,
@@ -70,6 +71,13 @@ static const struct camera_common_colorfmt camera_common_color_fmts[] = {
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_XRGGB10P,
},
+#endif
+ /* e-con camera only supports UYVY format */
+ {
+ MEDIA_BUS_FMT_UYVY8_1X16,
+ V4L2_COLORSPACE_SRGB,
+ V4L2_PIX_FMT_UYVY,
+ },
};
static const char *camera_common_csi_io_pads[] = {
@@ -498,8 +506,10 @@ int camera_common_try_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
err = v4l2_g_ctrl(s_data->ctrl_handler, &hdr_control);
if (err < 0) {
- dev_err(sd->dev, "could not find device ctrl.\n");
- return err;
+ /* Error check removed to add support for NON HDR cameras */
+ //dev_err(sd->dev, "could not find device ctrl.\n");
+ //return err;
+ err = 0;
}
/* mode_type can be filled in sensor driver */
can anyone help me understand?