Hi
I am planning to customize the Jetson nano image based on the folder of Linux_for_Tegra in the folder of nvdia_sdk/JetPack_4.6.2_Linux_JETSON_NANO_TARGETS/
What I want to customize:
Set the first boot configuration in image instead of configuring them during the first boot process as our device DO NOT have a keyboard, mouse, and network connection. It has no way for end user to configure the device. Therefore, following items in first boot will be removed:
a) accept the terms of these licenses
b) Select language
c) Select country
d) Connect to network
e) Select time zone
f) enter user name and password, set to automatically log in.
g) Set partition size
h) Set NV power mode
Remove those unnecessary software as our application program, which needs about 9GB memory space to store the tempera videos files, will run at eMMC where the image located. Therefore, the image size is about 5GB or less. I think following software will be removed:
a) libreOffice
b) all the games.
c) all the sample code
d) our application is using gstreamer, hardware encoder and OpenCV for video capture and image processing. GPU does not be used at this moment. Any other software may be removed? Please give your suggestion.
Remove GUI related program and modules. Our application program just needs a headless image.
After flashed the image into eMMC on Jetson nano production module. It shall be able to automatically log in after boot up and run our application program without any user operation.
you may check Skipping oem-config session, by running l4t_create_default_user.sh script file before you flash the target, this will create default user accounts and accept the EULA to skip 1st time boot process configurations.
there’s configuration file to define NV power modes, you may check nvpmodel_t210.conf, please modify this file if you would like to change the configurations.
there’s xml file to define partition size, for example, $OUT/Linux_for_Tegra/bootloader/t210ref/cfg/flash_l4t_t210_spi_sd_p3448.xml.
there’re services for running initial script after system boot-up, you may check /etc/systemd/system/, please revise the service files, or adding your own scripts for your use-case.
Thank you for your kind support.
Before doing your suggestion, I flashed the Jetson nano dev kit with SDK manager by un-checking Jetson SDK components to reduce the image size. But it resulted some required components missing such as: OpenCV.
Is the SDK manager able to select the individual SDK component such as OpenCV on target only?
When I test the flashed image on dev kit by using gstreamer to stream the video from camera, it produced errors. See the log file below:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)UYVY, width=(int)2592, height=(int)1944, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)3/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-linked (-1)
Execution ended after 0:00:02.678150655
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
./stream_H264-full-10m.sh: line 6: video/x-raw, format=(string)UYVY, width=(int)2592, height=(int)1944,framerate=24/1: No such file or directory
./stream_H264-full-10m.sh: line 7: nvvidconv: command not found
./stream_H264-full-10m.sh: line 8: video/x-raw(memory:NVMM),format=(string)I420: No such file or directory
./stream_H264-full-10m.sh: line 9: nvv4l2h264enc: command not found
./stream_H264-full-10m.sh: line 10: h264parse: command not found
./stream_H264-full-10m.sh: line 11: rtph264pay: command not found
./stream_H264-full-10m.sh: line 12: udpsink: command not found
How can install the missing components for above gstreamer issue?
How can I install missed OpenCV?
may I know which JetPack release you’re working with?
there’re DEB packages you’re able to fetch via APT server, please list packages for confirmation, then you’re able to have post installation.
for example, $ sudo apt install nvidia-l4t-jetson-multimedia-api
I am using JetPack 4.6.2
After installed nvidia-l4t-jetson-multimedia-api and reboot, the issue has NOT been sorted.
This is the log
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)UYVY, width=(int)2592, height=(int)1944, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)3/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-linked (-1)
Execution ended after 0:00:02.306895598
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
./stream_H264-full-10m.sh: line 6: video/x-raw, format=(string)UYVY, width=(int)2592, height=(int)1944,framerate=24/1: No such file or directory
./stream_H264-full-10m.sh: line 7: nvvidconv: command not found
./stream_H264-full-10m.sh: line 8: video/x-raw(memory:NVMM),format=(string)I420: No such file or directory
./stream_H264-full-10m.sh: line 9: nvv4l2h264enc: command not found
./stream_H264-full-10m.sh: line 10: h264parse: command not found
./stream_H264-full-10m.sh: line 11: rtph264pay: command not found
./stream_H264-full-10m.sh: line 12: udpsink: command not found
After using the command below processed the gstreamer script file
sed -i -e 's/\r$//' stream_H264-full-10m.sh
The log message is as below:
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
gst_v4l2_video_enc_open: open trace file successfully
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000182604
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Therefore, the issue is
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
My gstreamer script is set to 24 fps at size 2592 x 1944. This is supported by the camera. I tested on on another dev kit with different image which has no internal data stream error. The command outputs for size 2592x1944 is 24 fps.
My test is using the same camera.
What is the cause to make the camera frame rate changed from 24 fps to 3 fps? How can I sort it out?
Thanks
what exactly is your script file, stream_H264-full-10m.sh process?
are you able to simply launch the stream for testing,
i.e. $ gst-launch-1.0 v4l2src device="/dev/video0" ! "video/x-raw, width=640, height=480, format=(string)UYVY" ! xvimagesink -e
this might due to the stream configuration, please review your device tree settings, you may also probe the MIPI signaling to ensure data is output to CSI brick correctly.
I have found why the frame rate dropped from 24 fps to 3 fps at full frame size (2592x1944). It the USB cable issue. It is NOT all the USB type C to USB type A cable able to work at USB 3.0 speed.
Based on above info, I created an image and boot up successfully without setting the first boot configuration. But the l4t_create_default_user.sh has no way to set default country, language, time zone. How can I setup them before flashing the image?
“Probably” there was in invalid filesystem type used when creating the original image. On your host PC, cd to the “Linux_for_Tegra/rootfs/” directory. What do you see from “df -H -T .” (the “.” is important)? I am guessing it is not ext4, which implies it probably has no capability of understanding Linux filesystem permissions; this in turn means the SUID bit cannot be preserved when creating the final image. Can I also ask if this is an eMMC Nano or an SD card dev kit?
ext4 is correct, so I’m not positive how you ended up losing SUID bits. However, you are using “-R”, and this implies reusing an existing system.img instead of creating a new one. This image might not contain ext4.
On any Jetson which is complaining about sudo, what do you see from:
ls -l `which sudo`
df -H -T
On your host PC, do you still have “Linux_for_Tegra/bootloader/system.img.raw”? It would be possible to mount this loopback and see if this was the source of the error, but first we should check the above questions. I am surprised that suid bit failed when it is ext4, but perhaps the host is ext4 while some other step is not.
The above applies to any system which fails sudo and complains about not being SUID.