sergiy Posted September 30, 2021 Posted September 30, 2021 (edited) My tv box: x96max 2+. Cpu: s905x3. Gpu: mali g31. I found the suitable Armbian here: https://forum.armbian.com/topic/12162-single-armbian-image-for-rk-aml-aw-aarch64-armv8 I installed the Armbian_20.10_Arm-64_focal_current_5.9.0_desktop.img to tv box. It works. But the picture quality is not good enough and hardware decoding is not used when playing video. The panfrost driver is used for mali g31. I would like to try some other driver. In the Ubuntu repository I found the following packages: mali-midgard-dkms mali-t62x-x11-driver mali-t76x-x11-driver The mali g31 family is bifrost. In the Debian wiki I had read that bifrost is compatible with midgard. I tried to install the midgard kernel module: sudo apt install mali-midgard-dkms But I got a message “This package appears to be a binaries-only package. You will not be able to build against kernel 5.9.0-arm-64 since the package source was not provided”. That message means there is no kernel source code installed. Yes? I can not find the right kernel source code. The armbian-config does not suggest to install it too. I tried to build the midgard kernel module manually: sudo dkms install mali-midgard/16.0 And got a message: Error! Bad return status for module build on kernel: 5.9.0-arm-64 (aarch64). Consult /var/lib/dkms/mali-midgard/16.0/build/make.log for more information. make.log file: http://vps2.happyuser.info/make.log Edited September 30, 2021 by sergiy
SteeMan Posted September 30, 2021 Posted September 30, 2021 First I suggest you read the following FAQ post: https://forum.armbian.com/topic/16976-status-of-armbian-on-tv-boxes-please-read-first
SteeMan Posted September 30, 2021 Posted September 30, 2021 Then the short answer is there isn't source for these no longer supported (technically never supported as TV Boxes have never been officially supported) builds. However, you seem to have sufficient technical skills and therefore I will point you down the path of building your own kernel (and thus you will have everything you need). Review the following thread: https://forum.armbian.com/topic/9625-compiling-and-booting-mainline-linux-for-your-s9xxx-tv-box That is where I began my journey with armbian on amlogic TV Boxes. I think everything in that thread, (mostly thinking about my post with instructions) is still valid, although I have moved on to doing things differently now days. But I am running latest verisions of 5.4LTS, 5.10LTS and even 5.15.rc on various TV Boxes as I write this. So if you have the proper skills, you are not stuck with the kernel you currently have running. 1
sergiy Posted October 9, 2021 Author Posted October 9, 2021 SteeMan thank you very much! I learned how to build the kernel and I successfully did it. The default configuration did not work normally but then I guessed to copy the configuration from current kernel. Unfortunately I can not understand how to make the deb package with kernel source. I did not find in internet about it. I tried the make -j4 deb-pkg command. It made some deb files but it placed the source in linux-5.10.71_5.10.71.orig.tar.gz archive. I tried to unpack the linux-5.10.71_5.10.71.orig.tar.gz to the /usr/src directory. But the dkms did not see that source. I also tried the command: make -j4 BUILD_SOURCE=y deb-pkg It did not work. Some errors: dpkg-source: error: cannot represent change to debian/linux-libc-dev/usr/share/doc/linux-libc-dev/changelog.Debian.gz: binary file contents changed dpkg-source: error: unrepresentable changes to source dpkg-buildpackage: error: dpkg-source -i.git -b . subprocess returned exit status 1 make[1]: *** [scripts/Makefile.package:77: deb-pkg] Error 1 make: *** [Makefile:1550: deb-pkg] Error 2
sergiy Posted October 10, 2021 Author Posted October 10, 2021 I executed the command: make distclean Then I restored the .config file from backup. Then I executed again: make -j4 BUILD_SOURCE=y deb-pkg There was no error at this time. But the kernel source deb file was not generated. The following files was generated: linux-5.10.71_5.10.71-1_arm64.buildinfo linux-5.10.71_5.10.71-1_arm64.changes linux-5.10.71_5.10.71-1.diff.gz linux-5.10.71_5.10.71-1.dsc linux-5.10.71_5.10.71.orig.tar.gz linux-headers-5.10.71_5.10.71-1_arm64.deb linux-image-5.10.71_5.10.71-1_arm64.deb linux-libc-dev_5.10.71-1_arm64.deb So what is a standard way to make the kernel source deb file?
SteeMan Posted October 10, 2021 Posted October 10, 2021 I'm not at my computer right now, but you should look at scripts/package/builddeb and mkdebian if I recall correctly
SteeMan Posted October 10, 2021 Posted October 10, 2021 In rereading, your original post, I don't think you need the kernel sources. The kernel headers should be sufficient to build against. The error message you originally got was because you didn't have the source for the Mali module if I am reading that correctly
sergiy Posted October 12, 2021 Author Posted October 12, 2021 On 10/10/2021 at 11:58 PM, SteeMan said: In rereading, your original post, I don't think you need the kernel sources. The kernel headers should be sufficient to build against. The error message you originally got was because you didn't have the source for the Mali module if I am reading that correctly The source of mali midgard module was installed by the mali-midgard-dkms package and exists in the /usr/src/mali-midgard-16.0 directory. There are a many .c and .h files in that directory, so I thinks it is mali module source. The kernel headers are installed. Btw, the sudo apt install mali-midgard-dkms command shows the message: This package appears to be a binaries-only package you will not be able to build against kernel 5.10.71 since the package source was not provided. I don't know for sure what that "package source" here really means. That "package source" may be kernel related or, as you though, mali module related. I think it is kernel related.
sergiy Posted October 12, 2021 Author Posted October 12, 2021 On 10/10/2021 at 11:54 PM, SteeMan said: I'm not at my computer right now, but you should look at scripts/package/builddeb and mkdebian if I recall correctly sergiy@arm-64:~/kernel-dev/linux-5.10.71$ ./scripts/package/builddeb cp: missing destination file operand after 'debian/linux-image/boot/config-' Try 'cp --help' for more information. I don't know how to use it. The mkdebian file has the comment: Simple script to generate a debian/ directory for a Linux kernel. I think it will not help.
SteeMan Posted October 12, 2021 Posted October 12, 2021 If that message is talking about the kernel source, you do have the kernel source, it should just be an issue of putting it where your module build process is expecting it to be (or a link in that location). Between google and debugging the build process you should be able to figure this out.
Recommended Posts