ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.7k stars 1.83k forks source link

cannot access '/dev/dvb': No such file or directory #341

Closed Unicorn9x closed 2 years ago

Unicorn9x commented 2 years ago

Dear Ophub and all, I'm using Armbian_22.05.0_Aml_s905x3_jammy_5.10.118_server_2022.05.29 on H96_Max_X3. I plug in the MyGica-T230C USB for TVHeadend. Mapping /dev/dvb as instructed in Portainer image

But TVHeadend couldn't see it in TV adapters image

On Armbian I tried:

dmesg image

lsusb image

ls /dev/dvb image

I think the driver is not installed? or the module is not loaded?

I found the Linux / raspberry driver here: https://www.mygica.com/support/ Also found a patch file here for armbian: https://github.com/bschwehn/armbian-build/blob/master/patch/kernel/sunxi-dev/v3-2-2-dvbsky-Add-support-for-MyGica-T230C-v2.patch

Could you tell me how I can install the driver or do anything to use this MyGica-T230C USB device? Thank you in advance!

ophub commented 2 years ago

The usb you insert is in different devices, and the same device may display different names when inserted, such as sda, sdb, etc., use the df command to view your specific name

Unicorn9x commented 2 years ago

df

Hi Ophub, Thank you for your reply!

I tried df image

ls /dev image The device is a DVB tuner so it doesn't display in the list?

still don't know how should I proceed?

ophub commented 2 years ago

The system does not recognize your disk format, use the format supported by linux

Unicorn9x commented 2 years ago

can somebody help me? :(

MX10-AC2N commented 2 years ago

Hi @Unicorn9x Have you tried installing the full firmware with armbian-config. Maybe it will add the drivers you are missing.. Good luck

Unicorn9x commented 2 years ago

Hi @Unicorn9x Have you tried installing the full firmware with armbian-config. Maybe it will add the drivers you are missing.. Good luck

Hi bro @MX10-AC2N Thanks for your reply I tried in armbian-config but it run for a few seconds with this screen and back to the selection menu image

I tried in the CLI, it's error: image

Do you know how to proceed?

MX10-AC2N commented 2 years ago

It's strange

sudo apt show armbian-firmware*
Package: armbian-firmware
Version: 22.05.1
Priority: optional
Section: kernel
Maintainer: Igor Pecovnik <igor.pecovnik@****l.com>
Installed-Size: 1 024 B
Replaces: linux-firmware, firmware-brcm80211, firmware-ralink, firmware-samsung, firmware-realtek, armbian-firmware-full
Download-Size: 8 002 kB
APT-Sources: http://apt.armbian.com bullseye/main arm64 Packages
Description: Linux firmware

Package: armbian-firmware-full
Version: 22.05.1
Priority: optional
Section: kernel
Maintainer: Igor Pecovnik <igor.pecovnik@****l.com>
Installed-Size: 1 024 B
Replaces: linux-firmware, firmware-brcm80211, firmware-ralink, firmware-samsung, firmware-realtek, armbian-firmware
Download-Size: 261 MB
APT-Sources: http://apt.armbian.com bullseye/main arm64 Packages
Description: Linux firmware-full
 cat /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

deb http://security.debian.org/ bullseye-security main contrib non-free
deb-src http://security.debian.org/ bullseye-security main contrib non-free
cat /etc/apt/sources.list.d/armbian.list
deb http://apt.armbian.com bullseye main bullseye-utils bullseye-desktop

You can try armbian-config => Personal => Reconfigure apt

Unicorn9x commented 2 years ago

It's strange

sudo apt show armbian-firmware*
Package: armbian-firmware
Version: 22.05.1
Priority: optional
Section: kernel
Maintainer: Igor Pecovnik <igor.pecovnik@****l.com>
Installed-Size: 1 024 B
Replaces: linux-firmware, firmware-brcm80211, firmware-ralink, firmware-samsung, firmware-realtek, armbian-firmware-full
Download-Size: 8 002 kB
APT-Sources: http://apt.armbian.com bullseye/main arm64 Packages
Description: Linux firmware

Package: armbian-firmware-full
Version: 22.05.1
Priority: optional
Section: kernel
Maintainer: Igor Pecovnik <igor.pecovnik@****l.com>
Installed-Size: 1 024 B
Replaces: linux-firmware, firmware-brcm80211, firmware-ralink, firmware-samsung, firmware-realtek, armbian-firmware
Download-Size: 261 MB
APT-Sources: http://apt.armbian.com bullseye/main arm64 Packages
Description: Linux firmware-full
 cat /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

deb http://security.debian.org/ bullseye-security main contrib non-free
deb-src http://security.debian.org/ bullseye-security main contrib non-free
cat /etc/apt/sources.list.d/armbian.list
deb http://apt.armbian.com bullseye main bullseye-utils bullseye-desktop

You can try armbian-config => Personal => Reconfigure apt

Hi bro, thank you! I switched from jammy to bullseye and followed your instruction, I'm able to install arm-firmware-full. Sudo reboot => But the ls /dev/dvb still blank.

I found this thread https://tvheadend.org/boards/5/topics/28100 According to https://www.linuxtv.org/wiki/index.php/Geniatech_T230C I need the driver dvb_usb_cxusb I clone the git and use the instruction here to build the driver: https://github.com/crazycat69/media_build and I stuck with the error. Could you shed some light so I can proceed? image

MX10-AC2N commented 2 years ago
Preparing to compile for kernel version 5.10.119
File not found: /lib/modules/5.10.119-ophub/build/.config at ./scripts/make_kconfig.pl line33, <IN> line 4.

Search in /lib/modules if there is any folder 5.10.119 .. file not found it's the problem.. you need a config file here /lib/modules/5.10.119-ophub/build/.config

Unicorn9x commented 2 years ago

/lib/modules

I checked with the modules found here https://github.com/ophub/kernel/tree/main/pub/stable/5.10.119 There is a symbolic link and couldn't located the .config file. Hi @ophub could you help with this? I try to build the driver but it's missing something here. image image

ophub commented 2 years ago

ls /boot/config-$(uname -r)

Unicorn9x commented 2 years ago

ls /boot/config-$(uname -r) image

ok, so I understand the basics. I put a symbolic link .config to your config file in /boot/ ln -s /boot/config-$(uname -r) .config

then run the ./build command again, now it's run for a while then I see this, check line 561 couldn't see what is still missing? really appreciate your support! @ophub @MX10-AC2N image

Unicorn9x commented 2 years ago

I tried with this https://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers similar error: image

ophub commented 2 years ago

The V4L-DVB Device Drivers official website has a detailed compilation tutorial, you can ask questions in his Q&A area. I haven't used this and don't know how his error should be fixed.

https://www.linuxtv.org/wiki/index.php/Talk:How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

MX10-AC2N commented 2 years ago

from https://www.linuxtv.org/wiki/index.php/Talk:How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers Finally, let's make sure we have the /lib/modules/`uname -r`/build directory pointing to THE HEADERS... NOT THE KERNEL SOURCE.

MX10-AC2N commented 2 years ago

The headers files in the kernel is installed in the /usr/local/include directory.. Good luck..

Unicorn9x commented 2 years ago

from https://www.linuxtv.org/wiki/index.php/Talk:How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers Finally, let's make sure we have the /lib/modules/`uname -r`/build directory pointing to THE HEADERS... NOT THE KERNEL SOURCE.

thank bro! Took me a few days to understand the issue to try again. So what I did are:

image 1/ use armbian_config to install the Linux kernel header file

2/ cd /usr/lib/modules/5.10.119-ophub/ image

symlink folder build to the new Linux header downloaded in step 1 => this linux kernel header have the correct file structure ln -s /usr/src/linux-headers-5.10.110-meson64 build

=> build running for real now (around 10 - 15 mins), but still error at this line:

CC [M] /root/media_build/v4l/mceusb.o /root/media_build/v4l/mceusb.c: In function 'mceusb_dev_probe': /root/media_build/v4l/mceusb.c:1731:9: error: too few arguments to function 'usb _maxpacket' 1731 | maxp = usb_maxpacket(dev, pipe); | ^~~~~~~~~~~~~ In file included from /root/media_build/v4l/mceusb.c:29: ./include/linux/usb.h:1982:1: note: declared here 1982 | usb_maxpacket(struct usb_device *udev, int pipe, int is_out) | ^~~~~~~~~~~~~ make[3]: *** [scripts/Makefile.build:280: /root/media_build/v4l/mceusb.o] Error 1 make[2]: *** [Makefile:1822: /root/media_build/v4l] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-5.10.110-meson64' make[1]: *** [Makefile:53: default] Error 2 make[1]: Leaving directory '/root/media_build/v4l' make: *** [Makefile:26: all] Error 2 build failed at ./build line 533

image

Man, I just want to plug a DVB USB for tvheadend to use it but so many problems T_T!

Unicorn9x commented 2 years ago

Great news! Today I was able to compile the kernel and enable the DVB usb device. Thank you @ophub and @MX10-AC2N ! I followed the guideline here https://github.com/ophub/amlogic-s9xxx-armbian/issues/363#issuecomment-1147067790

1/ Forked the repo. Added a bunch of configs for DVB devices. https://github.com/Unicorn9x/amlogic-s9xxx-armbian/blob/main/compile-kernel/tools/config/config-5.10.122

2/ Compile custom kernel, update then woah laaa \m/ USB device recognized and running smoothly now on TVheadend!

image

karnadii commented 1 year ago

Great news! Today I was able to compile the kernel and enable the DVB usb device. Thank you @ophub and @MX10-AC2N ! I followed the guideline here #363 (comment)

1/ Forked the repo. Added a bunch of configs for DVB devices. https://github.com/Unicorn9x/amlogic-s9xxx-armbian/blob/main/compile-kernel/tools/config/config-5.10.122

2/ Compile custom kernel, update then woah laaa \m/ USB device recognized and running smoothly now on TVheadend!

image

hello, I want my mygica t230 to work on this armbian as well, did I just need to compile the kernel with your config and then build armbian with the kernel I just compiled?

Unicorn9x commented 1 year ago

Great news! Today I was able to compile the kernel and enable the DVB usb device. Thank you @ophub and @MX10-AC2N ! I followed the guideline here #363 (comment) 1/ Forked the repo. Added a bunch of configs for DVB devices. https://github.com/Unicorn9x/amlogic-s9xxx-armbian/blob/main/compile-kernel/tools/config/config-5.10.122 2/ Compile custom kernel, update then woah laaa \m/ USB device recognized and running smoothly now on TVheadend! image

hello, I want my mygica t230 to work on this armbian as well, did I just need to compile the kernel with your config and then build armbian with the kernel I just compiled?

that's correct, bro

piotrekcrash commented 1 year ago

@Unicorn9x @ophub is that possible that USB DVB will be enabled in Standard Releases?

karnadii commented 1 year ago

Agree, support for dvb device like mygica t230c or t230a would be great.

piotrekcrash commented 1 year ago

I'm using multiple Panasonic mn8847 (Xbox One USB Tuner) in the current setup it will be great to migrate with this to S905 Box with Armbian.

martinlanger90 commented 1 year ago

Please enable USB DVB drivers in kernel in standard release @ophub as @piotrekcrash mentioned.

Unicorn9x commented 1 year ago

Please enable USB DVB drivers in kernel in standard release @ophub as @piotrekcrash mentioned.

@Unicorn9x @ophub is that possible that USB DVB will be enabled in Standard Releases?

I sent pull request but got rejected so I guess we have to do some self service here

karnadii commented 1 year ago

Please enable USB DVB drivers in kernel in standard release @ophub as @piotrekcrash mentioned.

@Unicorn9x @ophub is that possible that USB DVB will be enabled in Standard Releases?

I sent pull request but got rejected so I guess we have to do some self service here

Could you release the latest kernel on your fork with the dvb enabled config? I try to compile it myself with no luck @Unicorn9x

ophub commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/pull/385

@Unicorn9x In this merge, you modified compile-kernel.yml to point to your own repo. I understand that this is your own test. You accidentally clicked the wrong submission.

If you are modifying config-x.y to add a configuration, you only need to modify the config file. You can add dvb to several LTS kernel (5.4/5.10/5.15/6.1) configuration files and resubmit the merge.

Unicorn9x commented 1 year ago

385

@Unicorn9x In this merge, you modified compile-kernel.yml to point to your own repo. I understand that this is your own test. You accidentally clicked the wrong submission.

If you are modifying config-x.y to add a configuration, you only need to modify the config file. You can add dvb to several LTS kernel (5.4/5.10/5.15/6.1) configuration files and resubmit the merge.

Thank you, I resubmitted the merge, please check and add @ophub image

Hopefully, we got a standard release with DVB support. Please use Debian only, because the Ubuntu release doesn't have the drivers. @piotrekcrash @karnadii @martinlanger90

ophub commented 1 year ago

It has been merged, 5.4 and 6.1 are also added, the family bucket

ophub commented 1 year ago

The option you added has not been compiled and tested, right? A bunch of question marks. Make menuconfig must be selected first, and the compilation test is passed before submitting the merge

martinlanger90 commented 1 year ago

as soon as the next version comes out, ill test on S905d (KI Pro) and see if it detects my DVB-C USB device

ophub commented 1 year ago

The kernel repo has been updated, you update the latest kernel test armbian-update -k 5.10.163 or armbian-update -k 5.15.88

Unicorn9x commented 1 year ago

The kernel repo has been updated, you update the latest kernel test armbian-update -k 5.10.163 or armbian-update -k 5.15.88

I reflashed the os to test and can confirm it's working as expected. Tested on Mygica T230C and Newsky DVB-T2 USB TV Receiver => both appeared in ls /dev/dvb image Thank you, bro! and happy lunar new year!

ophub commented 1 year ago

ok

piotrekcrash commented 1 year ago

@Unicorn9x @ophub I can also confirm that my tuner: Panasonic MN88472 works properly with the newest version: image

After configuration in TVHeadend, all work properly. Thanks!

@Unicorn9x do you plan maybe to make the same Pull Request for kernel 6.X.X configuration?

Unicorn9x commented 1 year ago

@Unicorn9x do you plan maybe to make the same Pull Request for kernel 6.X.X configuration?

I don't use that kernel and have no HW to test so I will pass.

piotrekcrash commented 1 year ago

@ophub thx - I can see that you already added DVB support to 6.x.x also. Will test it in the next few days.

ophub commented 1 year ago

The packaged armbian system uses the unifreq packaged kernel that I dumped in 5.15/6.1, and neither of these two kernels has added dvb support. You need to use the kernel template to compile it yourself, or download the kernel packaged in releases and update it to armbian.

There is no dvb support added in the kernel warehouse. Add dvb support in releases: kernel_5.15.xx_6.1.xx

piotrekcrash commented 1 year ago

@ophub I already installed the newest release and updated the kernel to 6.1.7 (armbian-update) but USB-DVB tuner is not working.
image

On kernel 5.15..88 (Armbian_23.02.0_amlogic_s905w_jammy_5.15.88_server_2023.01.18) USB-DVB Tuner is recognized properly: image

ophub commented 1 year ago

see above description

piotrekcrash commented 1 year ago

@ophub Sorry - You have a right and I wrongly understood. When installed kernel from your Releases (6.1.7) USB-DVB is recognized properly: image Thanks for your work and support!

intropedro commented 1 year ago

Hello @Unicorn9x @piotrekcrash,

I'm trying to make the dvb of the Mecool KI Pro work but I can't. These are not usb, they are internal (R848, avl6211, and avl6862).

I have been reading this thread and from what I have understood in the end just putting the 5.10, 5.4 or manually the 5.15 or 6.1 kernel (As I describe here https://github.com/ophub/amlogic-s9xxx-armbian/issues/1001#issuecomment-1417862393) already worked for you. Or did you have to do something else?

Alwais /dev/dvb not exist and in the dmesg there is nothing of dvb

Unicorn9x commented 1 year ago

Hello @intropedro , Regarding this issue, I suspect you need a driver for your device, you must find a linux driver support your dvb card on google and compile + install to your armbian then the kernel can pick it up to run, which is very troublesome. Buy a separate dvb usb is easier than this to be honest...