MK_FW firmware/video/video_ucode.bin.gen.S
make[1]: *** No rule to make target ‘firmware/video/video_ucode.bin’, needed by ‘firmware/video/video_ucode.bin.gen.o’. Stop.
Is there some dependency needs to be pulled before?
Now I’m getting following error. Can you tell what it is?
In file included from ./include/uapi/linux/stddef.h:1:0,
from ./include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from ./include/uapi/linux/types.h:13,
from ./include/linux/types.h:5,
from drivers/amvdec_ports/aml_vcodec_vfq.h:23,
from drivers/amvdec_ports/aml_vcodec_vfm.h:23,
from drivers/amvdec_ports/aml_vcodec_vfm.c:20:
drivers/amvdec_ports/aml_vcodec_vfm.c: In function ‘vdec_vf_put’:
drivers/amvdec_ports/aml_vcodec_vfm.c:60:16: error: ‘struct vframe_s’ has no member named ‘use_cnt’
atomic_set(&vf->use_cnt, 1);
^
./include/linux/compiler.h:322:17: note: in definition of macro ‘WRITE_ONCE’
union { typeof(x) __val; char __c[1]; } __u = \
^
drivers/amvdec_ports/aml_vcodec_vfm.c:60:2: note: in expansion of macro ‘atomic_set’
atomic_set(&vf->use_cnt, 1);
^~~~~~~~~~
drivers/amvdec_ports/aml_vcodec_vfm.c:60:16: error: ‘struct vframe_s’ has no member named ‘use_cnt’
atomic_set(&vf->use_cnt, 1);
^
./include/linux/compiler.h:323:30: note: in definition of macro ‘WRITE_ONCE’
{ .__val = (__force typeof(x)) (val) }; \
^
drivers/amvdec_ports/aml_vcodec_vfm.c:60:2: note: in expansion of macro ‘atomic_set’
atomic_set(&vf->use_cnt, 1);
^~~~~~~~~~
drivers/amvdec_ports/aml_vcodec_vfm.c:60:16: error: ‘struct vframe_s’ has no member named ‘use_cnt’
atomic_set(&vf->use_cnt, 1);
^
./include/linux/compiler.h:324:22: note: in definition of macro ‘WRITE_ONCE’
__write_once_size(&(x), __u.__c, sizeof(x)); \
^
drivers/amvdec_ports/aml_vcodec_vfm.c:60:2: note: in expansion of macro ‘atomic_set’
atomic_set(&vf->use_cnt, 1);
^~~~~~~~~~
drivers/amvdec_ports/aml_vcodec_vfm.c:60:16: error: ‘struct vframe_s’ has no member named ‘use_cnt’
atomic_set(&vf->use_cnt, 1);
^
./include/linux/compiler.h:324:42: note: in definition of macro ‘WRITE_ONCE’
__write_once_size(&(x), __u.__c, sizeof(x)); \
^
drivers/amvdec_ports/aml_vcodec_vfm.c:60:2: note: in expansion of macro ‘atomic_set’
atomic_set(&vf->use_cnt, 1);
^~~~~~~~~~
In file included from ./include/linux/atomic.h:4:0,
from ./include/linux/mutex.h:18,
from ./include/linux/kernfs.h:13,
from ./include/linux/sysfs.h:15,
from ./include/linux/kobject.h:21,
from ./include/linux/device.h:17,
from ./include/linux/platform_device.h:14,
from drivers/amvdec_ports/aml_vcodec_drv.h:23,
from drivers/amvdec_ports/aml_vcodec_vfm.h:24,
from drivers/amvdec_ports/aml_vcodec_vfm.c:20:
drivers/amvdec_ports/aml_vcodec_vfm.c: In function ‘video_vf_put’:
drivers/amvdec_ports/aml_vcodec_vfm.c:98:42: error: ‘struct vframe_s’ has no member named ‘use_cnt’
if (vfp && vf && atomic_dec_and_test(&vf->use_cnt))
^
./arch/arm64/include/asm/atomic.h:77:53: note: in definition of macro ‘atomic_dec_return’
#define atomic_dec_return(v) atomic_sub_return(1, (v))
^
drivers/amvdec_ports/aml_vcodec_vfm.c:98:19: note: in expansion of macro ‘atomic_dec_and_test’
if (vfp && vf && atomic_dec_and_test(&vf->use_cnt))
^~~~~~~~~~~~~~~~~~~
scripts/Makefile.build:334: recipe for target 'drivers/amvdec_ports/aml_vcodec_vfm.o' failed
make[2]: *** [drivers/amvdec_ports/aml_vcodec_vfm.o] Error 1
scripts/Makefile.build:648: recipe for target 'drivers/amvdec_ports' failed
make[1]: *** [drivers/amvdec_ports] Error 2
Makefile:1085: recipe for target 'drivers' failed
make: *** [drivers] Error 2
You can not do this, the media modules is not designed to be built-in, they are designed to be compiled as external modules, whilst they can be modified to work and be compiled as built-in, it requires many more changes.
Yes, the rootfs spec through a kernel argument would not work, because CoreELEC hard-codes deployment of SYSTEM.img squashfs into the boot sequence via the init sh script operated by busybox, see the code here. Fortunately, there is a workaround: you can add a file called post-sysroot.sh into your /flash partition and tweak the normal logic as needed, for example:
$ cat /flash/post-sysroot.sh
umount /sysroot
mount /dev/mmcblk1p2 /sysroot
mkdir ~/toolchain
tar -xJvf ~/Downloads/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz -C ~/toolchain
cd ~/toolchain
for i in $(find . -type d -name bin); do export PATH=$PWD/$i:$PATH; done
cd
git clone https://github.com/coreelec/linux-amlogic
cd linux-amlogic
# ...here goes all that make stuff
Moreover, correct me if I’m wrong, but that “build environment” (you’re talking about this, right?) is supposed to run inside a docker container, which is waaaay overkill for kernel compilation.
What do you mean? make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- defconfig. Then same thing without defconfig to start the build process.
What are you trying to do?
Just want to have the damn onboard wifi working.
It doesn’t work out of the box, neither with recent 5.x.x kernels, nor with amlogic ones, but in the latter case I can at least try to build the drivers:
(tried to compile the second one for a fresh kernel but failed)
Why build kernel? Drivers require kernel sources and some artifacts generated during kernel build. Thus, if I can’t build kernel, then I can’t build drivers either.
I posted here a few days ago, then moderator merged my thread into generic one (link to the resulting post) and since then I didn’t get any attention. No, I’m not blaming anyone here, it’s okay. Just wanted to say that now I’m trying to solve it myself. I have almost no idea what to do lol, but I’m gonna try it all before giving up (at least I’ll try these repos linked above (does it make any sense btw?)). It’d be nice if you could point me to the right direction, but I think it goes out of scope of this thread.
A little off-top, but maybe you know any other kernel that already have mt7663 supported? In theory, mt76 driver, which is provided by linux-firmware in most distros, should support it, but that wasn’t the case for me.
I look around and there is no mt7663 driver. Only in v5 kernel releases which has too much changes to backport.
That’s why I don’t see this driver tot be supported soon.