How to integrate Raspberry Pis ov5647 with Jetson Nano? - linux-kernel

I'm trying to integrate ov5647 sensor with Jetson Nano, ov5647 is very basic sensor but it does not have any official support from Jetson nano.
So we need to build our own driver.
So posts in Jetson nano suggests to follow imx219.
So I followed imx219 structure for dts files
this is the process I followed:
I took all the imx219 dts files and I make a copy of them by replacing imx219 with ov5647 in file name and inside data also replaced imx219 with ov5647.
and I had written ov5647.c driver and compiled
after that created an Image and flashed to SD card but after all these change, still when
I try to load ov5647.ko (dynamic module). It loads but this driver is not being uilized by any other devices. it shows 0 in lsmod, which means my dts files not all making any effect in Jetson Nano can anyone tell me what are mistakes I had done.
Zip file for files which I had changed:
https://drive.google.com/file/d/1uB9S4_KcY9pt_GFCBYAK9wJ0HZfGI4wR/view?usp=sharing

Related

ESP 32 Flash Download Tool showing SPIFFS partition not found

I have created a custom code for ESp32 in Arduino IDE. I flashed the program directly from IDE using UART with the help of TTL. I'm looking for an alternative method to flash the firmware of ESP32.
I'm trying to flash the esp32 binary file generated from Arduino IDE, using the flash downloader tool.
https://www.espressif.com/en/support/download/other-tools
I have used the configuration settings as follows
This settings flashed the firmware and the board reset worked perfectly. The SPIFFS did not however work.
Please find the log attached.
Also attached the reset log after flashing for reference
Thanks for the help.

Moving custom library build to other machine of similar architecture

I am currently setting up a microcontroller with several libraries which need to be built from source. Using pre-built binaries is not an option due to the system architecture. Building dependencies takes a lot of time and I want to avoid having to do it again for every similar device I need to setup in the future.
Thus, my question is, how can I migrate custom built binaries to another machine of similar architecture?
Any solution that would mirror the whole system to another drive works, too.
Note: For my current use case I am running Ubuntu 18.04 off a MicroSD plugged into a Jetson Nano
Any solution that would mirror the whole system to another drive works, too.
Proposed Solution :
Create a backup of the MicroSD card which has all required binaries installed
Use the backup to mirror the stuff into different MicroSD cards.
Backing Up Your SD card
Connect the SDcard to your laptop
Use dd command to take a backup of your MicroSD card
sudo dd if=/dev/sdxx of=backup.img status=progress
Restoring your backup to a New SD Card
Connect the New SDcard to your laptop
Use dd command to restore the backup to New MicroSD card
sudo dd if=backup.img of=/dev/sdxx status=progress
Note: Your SD card may also show up as /dev/mmcxx or /dev/sdxx depending on how you connect it to your laptop.
Warning: While running dd command, Please make sure that /dev/sdxx is your SD card and not your Hard Disk.
Running this command will tell you the device name of your SD card.
sudo fdisk -l
Please refer to this link for more.

How to boot Android Things 0.6.1 DevPreview in CM3L (Computer Module 3 Lite)

Actually I can boot Android Things "0.6.1 Developer Preview" in Raspberry Pi 3 (RPI3), I'm develop a project with Computer Module 3 Lite (CM3L) this have the same processor of the Raspberry Pi 3 (RPI3) but I only see the rainbow screen, never continue, I suppose the problem is relatad with DTB (Device Tree).
I try some options
1. Add DTB file for CM3 "bcm2710-rpi-cm3.dtb" on boot partition, when I do that the rainbow screen appear an the disappear but not do anything more
2. Replace the original DTB file "BCM271~1.DTB" for "bcm2710-rpi-cm3.dtb", when I do that the rainbow screen never disappear (equal to the original boot partition)
Finally i do it
The main reason by the CM3L don't start with the Android Things RPI3 is the hardware configuration, although the RPI3 and the CM3L have the same processor but the additional hardware of RPI3 (Ethernet, Wifi and Bluethoot) has a configuration on DTB file, and this configuration avoid the start, for change it, you need decompile DTB file, remove this hardware and recompile the file
Requiremets:
Linux (I use ubuntu VM on Windows)
Install Device Tree Compiler Link on this you find the DTC tool (convert tool from DTB to DTS or from DTS to DTB) to use see this answer
Procedure
Get DTB file form the microSD with Android Things (bcm2710-rpi-cm3.dtb)
Copy it on linux and decompile using DTC tool
DTC -I dtb -O dts -o bcm2710-rpi-3-b.dts bcm2710-rpi-3-b.dtb
Modify the file (search and comment some lines)
In section SOC search and comment blocks sdio_pins, bt_pins, uart0_pins and uart1_pins
In the final section sysmbols comment some definitions, sdio_pins, bt_pins, uart0_pins and uart1_pins
NOTE: You can comment like C with // or /**/
Compile the file with DTC tool
DTC -I dts -O dtb -o bcm2710-rpi-cm3.dtb bcm2710-rpi-3-b.dts
Copy bcm2710-rpi-cm3.dtb file on microSD and run CM3L
The CM3 does have GPIO. The major difference between CM3 and RP3 is the unit must boot from the onboard eMMC memory. The CM3 is an industrial SOM unit available until at least 2023 so it is ideal for industrial applications. I'd be interested in anyone who can get this to work on the CM3 as well as referrals to our customers using our Artista IoT from Apollo Displays.

Play audio file stored in SD Card memory on Zedboard

Is it possible to have a named pipe on my PS side of the Zedboard; that leads to a FIFO in the the PL side (using DMA,AXI,I2S etc) that I then revert to the audio out port and play songs from my PS side and listen from the audio out port on the PL side?
If yes then what steps are to be followed on the PS Side?
I'm guessing at mapping of user space into kernel space.
Yes, it turns out that ANALOG DEVICES has just the stuff you need.
There is a different kernel that Analog Device's maintains, which
includes both ALSA drivers
for the audio chip (ADAU1761) and the HDMI output (ADV7511).
https://github.com/analogdevicesinc/linux
there are a few zynq branches in there. Normally Xilinx pulls drivers
from there for their kernels,
but anyone can do the same.
The build instructions (if that's the sort of thing you want to do) is
at:
http://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/linux/zynq_2014r2
Or, alternatively you could just download the ready-made image for your particular board from this dropbox link:
https://www.dropbox.com/sh/yfbpj63pcenqatr/AAAt0s3xFXs47I7q5pNopheHa?dl=0
After you download the file; uncompress it with this command:
unxz -d sdimage-8G-zedboard.direct.xz
Find out the name of your SD Card with this command:
dmesg|tail
And then write the resulting image to your 8GB SD Card with this command:
sudo dd if=sdimage-8G-zedboard.direct of=/dev/sdX
where sdX is your particular SDCard which you noted from command dmesg|tail
This command will erase all the pre-existing data on the sd card so make sure you have a backup if that data is important to you.
WARNING: Please be VERY careful while using the dd command. Writing the image to the wrong /dev/sdX location could possibly lead to corruption of OS and/or the hardware also and is extremely risky.
After you burn the image; you're good to go! A full-blown graphical linux environment will turn up ( You need to connect an HDMI display; and use USB OTG port to use the mouse and keyboard)
NOTE: You can also choose between what path you want your sound to play;
whether from the headphone jack or through the HDMI cable.

cannot access /dev/video*: No such file or directory

So I'm working on a zynq z7000 card and I made a Linux Kernel on it. I put a Linaro as a Root File System. I managed to boot the card however I can only use mouse and keyboard usb devices. I tried webcam and flash drives but they are not working. when I use :
lsusb
I get the webcam device
...
Bus 001 Device 005: ID 046d:0805 Logitech, Inc. Webcam C300
However when I try
ls /dev/video*
I get
ls: cannot access /dev/video*: No such file or directory
I've used these configurations to build my image.
You need to make sure if v4l2 framework and UVC Class driver are enabled in your kernel configuration(defconfig file). Or can enable using menuconfig. Make sure the following are there:
1. CONFIG_VIDEO_V4L2=y
2. CONFIG_VIDEO_V4L2_COMMON=y
3. CONFIG_VIDEO_DEV=y
4. CONFIG_USB_VIDEO_CLASS=y

Resources