stapler 0 Report post Posted February 27, 2021 A681B Linux Driver Build Issues I see that there is finally a Linux driver available on https://www.mygica.com/support/ for my A681B. I downloaded it and extracted it on a fresh Ubuntu 20.04 server install. To prep for compiling this, I did the following: sudo apt install build-essential linux-source libproc-processtable-perl The make release command outputs the following, consistent with the (outdated) instruction PDF: eric@tubuntu:~/media_build_u20.04.1_ker5.4.0_lib$ make release make -C /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l release make[1]: Entering directory '/home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l' No version yet, using 5.4.0-66-generic make[1]: Leaving directory '/home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l' After this, I get the following errors when I try to build the driver using make: eric@tubuntu:~/media_build_u20.04.1_ker5.4.0_lib$ make make -C /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l make[1]: Entering directory '/home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l' Updating/Creating .config make[2]: Entering directory '/home/eric/media_build_u20.04.1_ker5.4.0_lib/linux' Patches for 5.4.0-66-generic already applied. make[2]: Leaving directory '/home/eric/media_build_u20.04.1_ker5.4.0_lib/linux' ./scripts/make_kconfig.pl /lib/modules/5.4.0-66-generic/build /lib/modules/5.4.0-66-generic/build Preparing to compile for kernel version 5.4.0 ***WARNING:*** You do not have the full kernel sources installed. This does not prevent you from building the v4l-dvb tree if you have the kernel headers, but the full kernel source may be required in order to use make menuconfig / xconfig / qconfig. If you are experiencing problems building the v4l-dvb tree, please try building against a vanilla kernel before reporting a bug. Vanilla kernels are available at http://kernel.org. On most distros, this will compile a newly downloaded kernel: cp /boot/config-`uname -r` <your kernel dir>/.config cd <your kernel dir> make all modules_install install Please see your distro's web site for instructions to build a new kernel. WARNING: This is the V4L/DVB backport tree, with experimental drivers backported to run on legacy kernels from the development tree at: http://git.linuxtv.org/media-tree.git. It is generally safe to use it for testing a new driver or feature, but its usage on production environments is risky. Don't use it in production. You've been warned. CEC_CROS_EC: Requires at least kernel 9.255.255 V4L2_H264: Requires at least kernel 9.255.255 VIDEO_IPU3_CIO2: Requires at least kernel 9.255.255 VIDEO_OMAP3: Requires at least kernel 9.255.255 SND_BT87X: Requires at least kernel 9.255.255 INTEL_ATOMISP: Requires at least kernel 9.255.255 VIDEO_HANTRO: Requires at least kernel 9.255.255 VIDEO_ROCKCHIP_VDEC: Requires at least kernel 9.255.255 VIDEO_IPU3_IMGU: Requires at least kernel 9.255.255 ./scripts/make_myconfig.pl [ ! -f "./config-mycompat.h" ] && echo "/* empty config-mycompat.h */" > "./config-mycompat.h" || true perl scripts/make_config_compat.pl /lib/modules/5.4.0-66-generic/build ./.myconfig ./config-compat.h creating symbolic links... Kernel build directory is /lib/modules/5.4.0-66-generic/build make -C ../linux apply_patches make[2]: Entering directory '/home/eric/media_build_u20.04.1_ker5.4.0_lib/linux' Patches for 5.4.0-66-generic already applied. make[2]: Leaving directory '/home/eric/media_build_u20.04.1_ker5.4.0_lib/linux' make -C /lib/modules/5.4.0-66-generic/build M=/home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l modules make[2]: Entering directory '/usr/src/linux-headers-5.4.0-66-generic' CC [M] /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/msp3400-driver.o In file included from <command-line>: /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/compat.h:1594:19: error: redefinition of 'prandom_u32_max' 1594 | static inline u32 prandom_u32_max(u32 ep_ro) | ^~~~~~~~~~~~~~~ In file included from ./include/linux/random.h:116, from /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/compat.h:1589, from <command-line>: ./include/linux/prandom.h:76:19: note: previous definition of 'prandom_u32_max' was here 76 | static inline u32 prandom_u32_max(u32 ep_ro) | ^~~~~~~~~~~~~~~ In file included from <command-line>: /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/compat.h: In function 'prandom_u32_max': /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/compat.h:1591:21: error: implicit declaration of function 'random32'; did you mean 'prandom_u32'? [-Werror=implicit-function-declaration] 1591 | #define prandom_u32 random32 | ^~~~~~~~ /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/compat.h:1596:22: note: in expansion of macro 'prandom_u32' 1596 | return (u32)(((u64) prandom_u32() * ep_ro) >> 32); | ^~~~~~~~~~~ In file included from <command-line>: /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/compat.h: At top level: /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/compat.h:2438:19: error: redefinition of 'next_pseudo_random32' 2438 | static inline u32 next_pseudo_random32(u32 seed) | ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/random.h:116, from /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/compat.h:1589, from <command-line>: ./include/linux/prandom.h:105:19: note: previous definition of 'next_pseudo_random32' was here 105 | static inline u32 next_pseudo_random32(u32 seed) | ^~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[3]: *** [scripts/Makefile.build:271: /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l/msp3400-driver.o] Error 1 make[2]: *** [Makefile:1760: /home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-66-generic' make[1]: *** [Makefile:53: default] Error 2 make[1]: Leaving directory '/home/eric/media_build_u20.04.1_ker5.4.0_lib/v4l' make: *** [Makefile:26: all] Error 2 What am I doing wrong here? Any suggestions or help are greatly appreciated! Quote Share this post Link to post Share on other sites
kcams 1 Report post Posted October 20, 2021 (edited) Just trying to see if the driver compiles before buying one of these. Sure, I know it's an old post, but I could have used this: Ubuntu 5.4.0-88-generic #99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux For a temporary fix create a file called 'config-mycompat.h' in media_build/v4l directory that contains: #undef NEED_PRANDOM_U32_MAX #undef NEED_PRANDOM_U32 #undef NEED_NEXT_PSEUDO_RANDOM32 (complements of https://github.com/tbsdtv/linux_media/issues/211 ) Now do your make -C command. Not much linux luv here. Anyone get a A681B working on Ubuntu 20.04 and does it work OK?? Edited October 20, 2021 by kcams Quote Share this post Link to post Share on other sites
kcams 1 Report post Posted December 2, 2021 Turns out, you're going to need something else to make the driver work. The current one only works with a 5.4.0-xx kernel. I got it working with 5.4.0-37-generic. The problem is the frontend dvb modules are compiled, but you are missing source code so the frontend module is only going to load with the correct kernel and kernel headers installed/running. It would be nice if they'd provide the source code .c files so you could compile on something else, or cross compile, but I wouldn't hold your breath. Alternatively, they could always provide the code in a repo to linuxtv.org if they don't want to maintain it. Other people would fix their bugs too costing them nothing. If you want to get something linux supported, this isn't the device. You can however find one that is. Check the hardware support on mythtv or linuxtv, and you'll find the devices and limitations of what works, and what does not on each device listed. Quote Share this post Link to post Share on other sites
MechWarriorZero 0 Report post Posted February 2, 2023 I need the drivers for ubuntu Desktop that is all ready build and easy to install and not have to use the terminal commands Quote Share this post Link to post Share on other sites
MechWarriorZero 0 Report post Posted February 16, 2023 have any one has the drivers for ubuntu linx Quote Share this post Link to post Share on other sites