hi Franco
haven't looked at this for a few years now, i kinda remember had to change some source in the lexer,
good on yer for finding. i've been meaning to get back to this, cuz i have a another use for my wm8650 but have so many other things to do.....
so can't help atm. but encourage you to press on.
BTW, are you trying to recompile a newer kernel, or the old known one, i forget the kernel no. (i don't have that disk with all that running atm to check)
cheers anyway
fred
--
You received this message because you are subscribed to the Google Groups "VT8500/WM8505 Linux Kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vt8500-wm8505-linux...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vt8500-wm8505-linux-kernel/f3820cd1-df69-47aa-a616-f3f3bfead01dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vt8500-wm8505-linux-kernel/c62fff5d-71e6-4769-a9d7-f6af44a4d5c0n%40googlegroups.com.
Something that I'm still not being able to figure out, is why does the Ethernet and the internal USB WiFi adapter and the serial console still not work. I know that they do actually work because on Android I can succesfully use them, but not here on debian. I think I included the necesary stuff to make the ethernet work, and I'm sure that I included the corect drivers for my internal adapter (I dissasembled the laptop to check with the IC markings), but still, after executing systemctl start wlgpio and verify that everithing is ok with systemctl status wlgpio, still, no Wireless networks show up on nmtui and no new network adapters show on nmcli. I even took the extra step of building the kernel again, this time including the drivers for a Ralink adapter I have, and this time I was able to connect to the internet and install some packages.
Also, I forgot to add that it seems that the Linux kernel is only running with 128MB of ram, where I have 256MB. I can confirm that from android and the bootloader messages. Is there i have to change on the kernel to add those extra 128MB?
Thanks for the suggestions Alexey. I'm now able to use the serial console and also now I have a working ethernet connection.I still dont know whats stopping me from haveing a working keyboard on Linux 5.15, but from comparing the dmesg from Linux 4.14 and Linux 5.15, I can see that now I have one USB hub missing, probably the one in charge of the keyboard and mousepad (i think is the holtek one, but I'm not sure). I dont really know what to do there, so I hear any ideas from you. I've also disabled all i8042 related stuff, so no more of that too.
[ 1.030000] uhci_hcd: USB Universal Host Controller Interface driver [ 1.040000] platform-uhci: probe of d8007b00.uhci failed with error -2
About the wifi, I havent tried downloading the fw from linux-firmware git because now on linux 5.15 i get different error messages. This time, no errors about the firmware not being ready or any checksum errors, but instead it seems to fail to gain an IP address. The difference from my previous tests is that I now included the firmware-realtek package in the multistrap.conf file, so all the firmware files get preinstalled onto the rootfs. Whats weird, is that from the debug messages I can see that it tries to load the rtl8192cufw_TMSC.bin firmware file, but whats a bit weird is that in the chip markings of the internal adaptor i can see written "RTL8188CTV". There are firmware files listed as rtl8188efw.bin and rtl8188eufw.bin. It would make more sense loading one of those files instead of the one is actually loading, but I may be wrong. I attach the dmesg file so you can take a look at the errors. I have attempted to connect to my home network, then to my mobile hotspot, then i tried switching the gpio to reset the adaptor and it automatically tried again to connect to my home network, and after that the system got really slow and unstable, so I had to turn off the gpio pin again to gain acces to the system back again.I also changed some things on the config file. No big changes, I just disabled some uneeded stuff (I hope)
While I wait for any responses on the forums I posted, I wanted to try to install a different driver instead of using the one is in the linux kernel. I wanted to try with this driver, but the instructions on the readme are for rebuilding the kernel on the target system, something that will take ages on the WM8650. I also don't know how to include it when building the kernel. I'm already looking for some guide on the internet, but if anyone can guide me on how to do it I'll appreciate it.
Ok, I think i found something that could work. Using this git, I've been able to compile the kernel module, and now I have the .ko file, but I don't know where to put it so when I build the kernel it gets included.So far, I did this (in the same order):In kernel_5.15/:make cleanmake mrpropermake ARCH=arm menuconfigmake ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- CFLAGS="-march=armv5te -mtune=arm926ej-s" -j6 zImagemake ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- CFLAGS="-march=armv5te -mtune=arm926ej-s" -j6 modules
In rtl8192eu-linux/:make cleanmake ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- CFLAGS="-march=armv5te -mtune=arm926ej-s" KVER="5.15.64-g0ae752685214-dirty" KSRC="/home/fpp/Documentos/kernel-5.15/" -j6
Now, I have what i think is the compiled kernel module named 8192eu.ko in rtl8192eu-linux/, but I don't know how to proceed.
I'm starting to give up on the wifi thing. I cant seem to find a good "fixed" repository of the rtl8192cu driver to compile, and the one I found avobe didnt work since it is for the eu version, not the cu version of the adapter. I also tried the rtl8xxxu driver, this time, standalone (no rtl8192cu support), and i did get more promising results, mainly no firmware checksum errors/firmware readyness, but I still wasnt able to connect to any wifi (authentication timed out).Anyway, i want to keep going on this, so I installed xfce, openbox and LightDM and now i have a very nice gui. There are some things that i still want to try to get working, such as backlight/contrast control, webcam, and (hopefully) audio.
About the webcam, i was able to find the correct gpio pin to power it on (pin 7) and i can see the device listed on lsusb: ID 090c:037c Silicon Motion 300k pixel camera, but i cant seem to connect to it using webcam (v4l2: open /dev/video0: no such file or directory). I have enabled under "Cameras and Video Grabbers support" and "Video4Linux2 userspace api support" under "Device Drivers > Multimedia Support", but maybe I need another driver for the webcam itself.
Regarding the backlight and contrast control, I'm kinda lost there. I have tried to echo to some of the sysfs files that i think would control something with the backlight or contrast, but i always got permission errors.
Also, I cant find anything related to backlight on sysfs. There is a PWM folder, but its empty, i dont know if I'm missing something. I have included the pwm controller support when building the kernel.
Also, i noticed that if i reduce the mem argument on the bootargs, I get a "better graphical performance". is there any explanation for that? or maybe its a false positive?
As I said in the previous message, that resulted in compile errors.Regarding other things, I have been having some "issues" that i think are important to address. I'm getting too many "segmentation fault" messages, specially when using apt. Its not something specific to one installation, but instead is something that appears to be in all the installations I do.
I don't know if it has to do with the fact that I might be "loading too much" this little CPU with all the packages and dependencies, or if there are issues with kernel 5.15. Add to that that apparently i cannot seem to properly compile kernel 4.14.
In most cases i get a "garbage screen" right after the "Loading kernel" message from u-boot.
I figured out that it had to do with my 32gb SD card (i think), so I switched to a slower, smaller 8gb unbranded Micro SD card.
Which userspace are you using?
What are the issues you get trying to compile it? Could you please post the errors and the full diff of any local modifications you made to the sources?
Garbage screen sounds like the kernel trying to claim a memory region for the display adapter while it’s still using that region
Sounds like an SDHC/SDXC issue. The controller won’t work with too new cards
El miércoles, 9 de agosto de 2023 a la(s) 01:02:45 UTC-3, alc...@gmail.com escribió:Which userspace are you using?I'm using Debian 11, built using multistrap. I basically took wh0's bookconfig and I'm using that to create my rootfs.
What are the issues you get trying to compile it? Could you please post the errors and the full diff of any local modifications you made to the sources?Actually none. The compilation finishes with no errors. The problems are when I try to boot the compiled kernel. Since I thought maybe one of my modification were messing things up, i decided to clone the wholetesting-alchark branch again and not touch anythingGarbage screen sounds like the kernel trying to claim a memory region for the display adapter while it’s still using that regionNow that you mention it, i tried to remove the mem argument and now it started to boot. It seems that using the mem argument with a value higher than 249M makes things go boom. Even on 249M, it prints garbage on the screen but then it seems to recover and continue with the kernel execution. Here is the serial output when using mem=249M:Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.0-rc2-329699-gdd86784db672 (fpp@FPP-PC) (gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)) #2 Tue Aug 8 21:13:32 -03 2023
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Wondermedia WM8650-MID Tablet
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 63246
[ 0.000000] Kernel command line: root=/dev/mmcblk0p2 rw rootwait mem=249M console=ttyWMT0,115200
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 245020K/254976K available (5120K kernel code, 204K rwdata, 776K rodata, 1024K init, 242K bss, 9956K reserved, 0K cma-reserved, 0K highmem)
Sounds like an SDHC/SDXC issue. The controller won’t work with too new cardsWell it actually does now. It didnt worked because I was using the mem=256M. With mem=249M it works.
armel or armhf architecture?
0K cma-reserved is fishy. Please try adding something like ‘cma=8MB’ to the kernel command line, or alternatively set CONFIG_CMA_SIZE_MBYTES in config
This log looks perfectly normal, up until it just cannot execute /sbin/init. Do you have a symlink to systemd there or something executable?
Now, that seems to have made something change regarding the 256MB problem. Now it can boot with 256MB of ram, but there is some garbage on the bottom of the screen that changes while booting. Text that goes over that area gets corrupted:
Sounds like there is overlap between the framebuffer memory region and something else in memory, which shouldn't happen. Does it persist if you set aside a larger chunk of memory for CMA, like 64MB?
Another random guess is that there is something wrong with the alignment of the starting memory address of the framebuffer region - would be great to check which address it tries to use. Maybe try enabling CONFIG_CMA_DEBUG and look for /proc/cmainfo?
Sounds like there is overlap between the framebuffer memory region and something else in memory, which shouldn't happen. Does it persist if you set aside a larger chunk of memory for CMA, like 64MB?Ok, cma=64M allowed me to boot with 256MB of ram. Here is the initial kernel output:
Another random guess is that there is something wrong with the alignment of the starting memory address of the framebuffer region - would be great to check which address it tries to use. Maybe try enabling CONFIG_CMA_DEBUG and look for /proc/cmainfo?Ok, I wasn't able to find /proc/cmainfo, but I do have /sys/kernel/debug/cma (CONFIG_CMA_DEBUGFS). I can't find how to have that cmainfo file.
Sounds good! Does the display corruption issue still persist with a larger CMA pool?
Another way to check would be to just go and add a printk in drivers/video/fbdev/wm8505fb.c after line 338 to show what it gets in fb_mem_phys and fb_mem_len
Sounds like an SDHC/SDXC issue. The controller won’t work with too new cardsWell it actually does now. It didnt worked because I was using the mem=256M. With mem=249M it works.That’s great, though I believe SDXC support only appeared in WM8850 :) Not sure about SDHC.Best,Alexey
--
You received this message because you are subscribed to the Google Groups "VT8500/WM8505 Linux Kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vt8500-wm8505-linux...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vt8500-wm8505-linux-kernel/CABjd4YwQpQaUDigoW-qntxq0os-pGQv0O0XtCewjEEddSQAn0w%40mail.gmail.com.
Actually the first sign of a problem is here - "devtmpfs: error mounting -2" - which suggests there's no /dev directory in your mounted root, or it's not accessible. Are you sure your root is ok?
Another issue might be userspace vs kernel features incompatibility. I've seen elsewhere in your pasted boot logs messages like "tmpfs: Unknown parameter 'mode'", which suggest your userspace is trying to use tmpfs feature your kernel does not support - either obsolete removed ones, or (more likely) ones not present in your kernel build config, or perhaps even too recent ones not present in your kernel version (shouldn't happen with deb11+kernel5.15, but may VERY easily happen with deb11+kernel4.14), even if your log ultimately says "Mounted root...".
I have lots of similar issues with my nokia n810 development setup ; it has omap2420 soc - that's arm11, which should be armv6, but even SO I had to use older release (deb9-armel I think, but can't verify till tomorrow evening) to get a +/- stable userspace. Especially watch out for systemd - it expects things from kernel you may have problems with in <5.x.
Anyway, afaict your kernel is built with auto-devtmpfs mount which already fails before any /sbin/init; i'd start checking there. That has nothing to do with any userspace/debX/systemd issues.
It MIGHT be caused by some kind of incompatibility between your kernel and ext4 root partition. ext2/2/4 has lots of features; you'd be surprised what kinds of problems can pop up when you do a carefree mkfs.ext4 under kernel6.X (or flash such a prebuilt deb11 image to your sd) and then try to mount that in kernel4.X/5.X ...
It should be like `printk(KERN_EMERG "FB_DEBUG: ...\n", ...);`, i.e. with no comma after the log level macro. It concatenates it at the beginning of the message, not as a separate argument.
fb0: wm8505-fb frame buffer at 0xf100000-0xf276fff
Well, when using 8mb of cma, I had half of the screen good, and the other half had some garbage. With 16mb of cma, no graphical issues (at least on tty1, no gui), but fb_info prints the same for both cases.
Okay, then it’s not about alignment. Are there any errors in dmesg when the corruption appears?
On Fri, 4 Aug 2023 at 00:42, Franco Palombo <ffpp...@hotmail.com> wrote:Something that I'm still not being able to figure out, is why does the Ethernet and the internal USB WiFi adapter and the serial console still not work. I know that they do actually work because on Android I can succesfully use them, but not here on debian. I think I included the necesary stuff to make the ethernet work, and I'm sure that I included the corect drivers for my internal adapter (I dissasembled the laptop to check with the IC markings), but still, after executing systemctl start wlgpio and verify that everithing is ok with systemctl status wlgpio, still, no Wireless networks show up on nmtui and no new network adapters show on nmcli. I even took the extra step of building the kernel again, this time including the drivers for a Ralink adapter I have, and this time I was able to connect to the internet and install some packages.For Ethernet on WM8650 you need the VIA Rhine driver, looks like you’ve missed that one:CONFIG_NET_VENDOR_VIA=y# CONFIG_VIA_RHINE is not setCONFIG_VIA_VELOCITY=yBest,Alexey