BPI R2 USB or Else Camera Sugession

Which kernel Should I use for usb-input and usb camera support? In the Kernel 4.4.7 mentioned file “arch/arm/configs/mt7623n_evb_bpi_defconfig” there is no CONFIG_USB_VIDEO_CLASS and CONFIG_USB_GSPCA options. Should I add these on file?

It is easier using menuconfig (build.sh option 4 in 4.4 and “build.sh config” in my 4.14) to add these and if it works adding them optionally to defconfig.

You can search in menuconfig with / and get infos of selected option (name in .config/defconfig) with ?

Defconfig is a default config for a platform. Users normally only working in .config in kernel-root

Thanks For all of your helps.

have you got it working?

regarding to your dmesg i think you need that:

Symbol: USB_VIDEO_CLASS [=n]
Symbol: USB_VIDEO_CLASS_INPUT_EVDEV [=n] 

maybe also USB_CONFIGFS_F_UVC [=n] (Depends on: USB_SUPPORT [=y] && USB_GADGET [=n] && USB_CONFIGFS [=n])

I am building kernel again now. I activated USB_VIDEO_CLASS_INPUT_EVDEV and USB_VIDEO_CLASS from build option 4. I will turn back here after tried. Thanks.

Sorry, I am a new on this.

I build the kernel on BPI-R2 with ./build.sh option 3(Only Kernel) How Can I install it to system? Any Kernel folder is not created after building.

np, i’m also no expert at this :wink: simply learning by doing

first use option 6 (update files for SD) after option 3 then you can look in the SD-folder…you have 2 folders BPI-BOOT and BPI-ROOT

in the first you have under some subfolders the uImage-file…the kernel itself this must be as the top-folder says on the BPI-BOOT-Partiton in same directory as under SD (BPI-BOOT/bananapi/bpi-r2/linux/uImage) same for BPI-ROOT with modules (BPI-ROOT/lib/modules/4.4.70-BPI-R2-Kernel/)

easy to say…the content of BPI-Boot must be copied to BPI-Boot-partition of SD-Card and BPI-Root-content to BPI-root-partition

i said something about the directory-structure so you can backup the uImage-file and the folder containing your old modules. so if something goes wrong you can restore it

Okay Thanks. I wil try.

should I copy the files from another pc to SD card? Because I don’t see content of boot in BPI-R2

You compile it on the r2? you have to mount boot (mmcblk0p1) to use it

yes. I am compiling on r2. Becase, I have taken many error with cross compile.Isn’t it work compiled kernel with this way?

It is not good practice to have a compiler on a server/router…but for testing it’s ok.

Which host system have you used for crosscompile? Ubuntu 14.4/16.4 with the following packages should compile 4.4/4.14 well with build-scripts shipped

sudo apt-get install git make gcc-arm-linux-gnueabihf u-boot-tools

I am using kali rolling. these packages are installed on my kali. but some header files under linux folder was not found while cross compile.

Compling uboot error: linux/compiler-gcc7.h: No such file or directory (rpi-r2) ?

Anyway,then you should look to make real backup…if you have a problem with own kernel that bpi won’t boot and compile only on it,you may encouter problems got out of this without backup

the kernel building has been complited successfully but Any modules or kernel image didn’t exist in /SD/BPI-BOOT and /SD/BPI-ROOT directory after building kernel on R2. I think I should look a way for building cross compile. compilig output messages are following;

 INSTALL output/lib/firmware/mts_cdma.fw
  INSTALL output/lib/firmware/edgeport/boot.fw
  INSTALL output/lib/firmware/edgeport/boot2.fw
  INSTALL output/lib/firmware/edgeport/down.fw
  INSTALL output/lib/firmware/edgeport/down2.fw
  INSTALL output/lib/firmware/mts_edge.fw
  INSTALL output/lib/firmware/edgeport/down3.bin
  INSTALL output/lib/firmware/whiteheat_loader.fw
  INSTALL output/lib/firmware/whiteheat.fw
  INSTALL output/lib/firmware/keyspan_pda/keyspan_pda.fw
  INSTALL output/lib/firmware/keyspan_pda/xircom_pgs.fw
  DEPMOD  4.4.70-BPI-R2-Kernel
make[1]: Leaving directory '/home/pi/BPI-R2-bsp-master/linux-mt'

 Build success!

any idea about these messages?

Have you called option 6 in build.sh?

yep i have called option 6 first.

Hi. Thanks for helps. I compiled the kernel gcc-arm-linux-gnueabihf-6. It compiled succesfully. gcc-7 gives errors. Also, I have successfully activated USB CAM,

First 3 (compile) then 6 (prepare for SD)

What does usb-cam do with spidev? Spidev is spi-bus-user-driver…

I will use opencv for image processing with usb cam. according to image processing I will control a embedded system with spi. Also I need ethernet router. I am using R2 for this.

have you any idea?