ktkd / linux-5.7-h6-mainline

Linux kernel config and patches for Generic H6 tvbox( Tanix TX6 , T95 MAX and posible others) based on allwinner H6 CPU
16 stars 2 forks source link

Adapting patches to new builds #4

Open robustini opened 1 year ago

robustini commented 1 year ago

Thank you for your epic work! I am using your img, it works fine except for the wifi but it is not a problem. Also in my "MX10 Pro" (H6) it doesn't boot from emmc, while new versions of Armbian for the Tanix-TX6 do it without problems. But with these versions unfortunately your patch is not compatible, could you make it so?

ktkd commented 1 year ago

Hi Marco, it is deprecated. But I think I can update this repository to newest version of kernel and additional patches. Do you have serial console cable attached to your tvbox? Please let me know and attach boot logs.

On Fri, Jan 27, 2023, 09:54 Marco Robustini @.***> wrote:

Thank you for your epic work! I am using your img, it works fine except for the wifi but it is not a problem. Also in my "MX10 Pro" (H6) it doesn't boot from emmc, while new versions https://github.com/smlinux/armbian-tanix-tx6 of Armbian for the Tanix-TX6 do it without problems. But with these versions unfortunately your patch is not compatible, could you make it so?

— Reply to this email directly, view it on GitHub https://github.com/ktkd/linux-5.7-h6-mainline/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWHS2RJ5ZSM6ETWDFWEKRTWUNWKXANCNFSM6AAAAAAUILLQKI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

robustini commented 1 year ago

@ktkd thanks for the reply! I don't have the serial console connected, but from what I see I could put it in, the pins are the ones on the left. How do I log the serial output? I mean with what software? Do you need the log produced with your image or with the one from the repo I linked? Regards, Marco

20230124_152854

ktkd commented 1 year ago

You can log by any serial terminal app, like minicom in Linux or putty serial/hyper terminal or something like that in windows.

Better if you are provide boot log from both of images.

On Fri, Jan 27, 2023, 10:08 Marco Robustini @.***> wrote:

@ktkd https://github.com/ktkd thanks for the reply! I don't have the serial console connected, but from what I see I could put it in, the pins are the ones on the left. How do I log the serial output? I mean with what software? Do you need the log produced with your image or with the one from the repo I linked? Regards, Marco

[image: 20230124_152854] https://user-images.githubusercontent.com/3864712/215028286-32f81934-cd9d-41ff-ba4a-7291a6e5dc32.jpg

— Reply to this email directly, view it on GitHub https://github.com/ktkd/linux-5.7-h6-mainline/issues/4#issuecomment-1406106762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWHS2RKWUGSPTBUSHZAGNTWUNX6XANCNFSM6AAAAAAUILLQKI . You are receiving this because you were mentioned.Message ID: @.***>

robustini commented 1 year ago

You might find the following useful the logs in /var/log from the boot with MicroSD? These are with your image. It would be enough for me if it could boot from emmc, I don't care so much about having your patch for new kernels, although it would be wonderful. The copy operation on the emmc goes smoothly, but on boot I see nothing. Surely with the serial monitor you would be able to tell where it crashes, what I don't understand is why with the other image instead it works without problems. For me your patch is important because it enables all four USB present, I could not find any other image with this feature. Preparing the serial connection.

logs.zip

robustini commented 1 year ago

These are the logs from MicroSD of the image with the new kernel. This also boots from emmc but only two USB ports work. I am soldering the pins for serial now.

logs_new.zip

robustini commented 1 year ago

Well, with the serial monitor it is now clear why your image does not boot from emmc with this tvbox:

U-Boot SPL 2019.10-armbian (Feb 17 2020 - 09:43:45 +0100) DRAM:This DRAM setup is currently not supported.

resetting ...

In loop... With the other image:

U-Boot SPL 2022.10-armbian (Jan 26 2023 - 05:19:42 -0800) DRAM: 4096 MiB Trying to boot from MMC2

Here the serial monitor output of the other image with boot from emmc and with yours with boot from MicroSD, don't ask me why it didn't log the kernel output. I am also noticing that in my opinion the temperature sensor is not good for this tvbox with the dtb of the Tanix-TX6, because it shows me very high temperatures (over 90°) when the cpu cooling fin is lukewarm.

logs_serial.zip

robustini commented 1 year ago

@ktkd if you don't want to do an update that would definitely take time I would just need a more updated u-boot on your image, how can I replace it? That could make the DRAM recognized I think.

ktkd commented 1 year ago

"DRAM:This DRAM setup is currently not supported." yep, you need to replace uboot. something like that -

dd if=u-boot-sunxi-with-spl-h6-noname.bin of=/dev/sdb bs=1024 seek=8

where sdb is your sd/emmc device.

robustini commented 1 year ago

"DRAM:This DRAM setup is currently not supported." yep, you need to replace uboot. something like that -

dd if=u-boot-sunxi-with-spl-h6-noname.bin of=/dev/sdb bs=1024 seek=8

where sdb is your sd/emmc device.

Wouldn't it be easier that way?

sudo apt-get install linux-u-boot-sunxi-default

robustini commented 1 year ago

"DRAM:This DRAM setup is currently not supported." yep, you need to replace uboot. something like that -

dd if=u-boot-sunxi-with-spl-h6-noname.bin of=/dev/sdb bs=1024 seek=8

where sdb is your sd/emmc device.

I tried as you say but I can't update it. It doesn't give me any errors when running, but when I start from emmc I get U-Boot 2019, when the one on your MicroSD is 2020. Where can I find a bin updated to 2022?

dd if=u-boot-sunxi-with-spl-h6-noname.bin of=/dev/mmcblk2p1 bs=1024 seek=8

ktkd commented 1 year ago

i can look at this, only on next week. because currently far away from lab and need to "touch" hardware.

robustini commented 1 year ago

Oh yesssss! :P

U-Boot SPL 2022.10-armbian (Jan 14 2023 - 06:57:19 +0000) DRAM: 4096 MiB Trying to boot from MMC2 NOTICE: BL31: v2.4(debug):e2c509a3 NOTICE: BL31: Built : 06:57:17, Jan 14 2023 NOTICE: BL31: Detected Allwinner H6 SoC (1728) NOTICE: BL31: Found U-Boot DTB at 0xc0700f0, model: Tanix TX6 INFO: ARM GICv2 driver initialized INFO: PMIC: Probing AXP805 on I2C ERROR: Start clear bit timeout ERROR: PMIC: Cannot write AXP805 register ff INFO: BL31: Platform setup done INFO: BL31: Initializing runtime services INFO: BL31: cortex_a53: CPU workaround for 855873 was applied WARNING: BL31: cortex_a53: CPU workaround for 1530924 was missing! NOTICE: PSCI: System suspend is unavailable INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x4a000000 INFO: SPSR = 0x3c9

robustini commented 1 year ago

Your ready img has 2020 u-boot, but if you choose from armbian-config to update it to SD/emmc or simply to copy and boot from emmc it installs a 2019 version, damn. This is the correct line in shell to install the new u-boot 2022:

sudo dd if=/dev/zero of=/dev/mmcblk2 bs=1k count=1023 seek=1 status=noxfer sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk2 bs=1024 seek=8 status=noxfer

Obviously you have to target the correct device, I also updated it on the MicroSD and it works.

u-boot-sunxi-with-spl.zip

robustini commented 1 year ago

@ktkd now if I find out how to make wifi work with XR819 I am even more excited. I have already converted dtb to dts but I wouldn't know where to try to make changes. Suggestions?

robustini commented 1 year ago

@ktkd what i attach is the dts of my tvbox "MX10 Pro" extracted from the Android system. I'm trying to figure out why the wifi (XR819) with your compiled image doesn't work, while everything else works superfine. Do you notice anything I should change in your patched "sun50i-h6-generic.dtb" for the wifi to start working here?

pi@mx10pro:~$ nmcli radio WIFI-HW WIFI WWAN-HW WWAN enabled enabled enabled enabled

But with "nmcli dev wifi list" I don't see any network available, so I don't know if the wifi module actually works or not. With "modprobe xradio_wlan" doesn't return anything, back to the prompt. In the boot logs I don't see any wifi devices detected.

mx10pro_android.zip

Zolous commented 1 year ago

i can look at this, only on next week. because currently far away from lab and need to "touch" hardware.

Is there any chance this is still on your radar at all? I've been trying to adapt the patch, specifically the USB3 functionality, and have just been running into walls

robustini commented 1 year ago

i can look at this, only on next week. because currently far away from lab and need to "touch" hardware.

Is there any chance this is still on your radar at all? I've been trying to adapt the patch, specifically the USB3 functionality, and have just been running into walls

Me too, I'm currently using it with this build and without wifi, it doesn't give me any problems, all the USB ports work, but it would be helpful to have it aligned with something newer.