Saturday, September 1, 2012

Arch Linux for WM8650 kernel/modules update

I got some time to update my build of the kernel and modules for the WM8650 netbooks. The main features of the updated kernel and modules are:
  • Includes all my previous patches to improve Ethernet compatibility, get battery readings, remove  some nasty debug messages, etc.
  • I have included a lot of drivers missing in my first builds: more wireless dongles, Bluetooth dongles, USB to serial adapters, ipv6, etc.
You can grab the updated kernel (and wmt_scriptcmd) here, and the updated kernel modules here. Extract the kernel to the root of the BOOT partition and the kernel modules to the root of the ARCH_SYS partition (as explained on steps 2 and 4 here).

I had no time to make modifications to the RT5370 driver to build it inside the kernel tree, so it's not included in the kernel modules I posted above. But don't panic, finally I got it to build, and it looks like it's working. I have not an RT5370 dongle to test if it works, but now insmod returns no errors when I load the module, so I suppose it should work. To install this module, first download it here. Then insert the SD card in your computer and unpack the driver (as usual replace /run/media/doragasu/ARCH_SYS/ with the path where the system partition of the SD card is mounted):
tar -xjf wm8650-rt5370_driver.tar.bz2 -C /run/media/doragasu/ARCH_SYS/
Then boot ArchLinux in your netbook and load the module using insmod (with root privileges):
insmod /lib/modules/2.6.32.9-test/kernel/drivers/net/wireless/rt5370sta.ko
As usual you can add this line to /etc/rc.local if you want the module to load each boot. You can also create a script lo load it whenever you want. Don't forget to enable the module with the gpio command!

In my netbook the module loads perfectly and outputs these messages:
rtusb init rt2870 --->
usbcore: registered new interface driver rt2870
Note the driver is the same for RT2870 and RT5370 chipsets. If you try this driver, please confirm if it works.

I also wanted to upgrade the entire distro to the latest version, but unfortunately I'm pretty busy and I have no time to do it. It was nice playing with this netbook, but I'd like to move to other projects, so I think I will not be releasing updates for it anymore.

I hope this updated kernel solves most of the problems with Ethernet, drivers, etc.

Enjoy!

42 comments:

  1. Hey Doragasu!

    Tried this files. wired ethernet & wifi seem to be working for me now. Battery always reads as 0/low battery, but that is not a big problem and will look at this later. Many thanks for your efforts!

    ReplyDelete
    Replies
    1. Glad to hear it's working :-). Did you use the RT5370 driver? Did you fix the battery problem?

      To get it working you might have to change the wmt.gpi.bat boot variable.

      Delete
    2. you mean it's not included in your new kernel? I want to use it in console mode only but the screen is polluted by warning "low battery" every 3 seconds. When you say "you might have to change wmt.gpi.bat" it's durung the kernel config?
      thanks for help

      Delete
    3. It's a kernel variable that must be changed by the bootscript and stored in the internal flash. You can try the bootscript I'm posting below, but be warned: as this scripts overwrites a variable stored in the nand flash, it's HIGHLY recommended to backup variables first. To do so, you can follow this post I wrote at Slatedroid: http://www.slatedroid.com/topic/34131-help-to-get-default-environment-for-wm8650-netbooks/

      Changing this variable might break battery readings in Android/WinCE, so you have been warned, make a backup first, so you can restore the default values if something goes wrong. Once you have made a backup, follow these steps:
      1.- Download the modified boot script: http://www.mediafire.com/download.php?1f98gw6f0at6ety
      2.- Replace the default wmt_scriptcmd in the BOOT partition of the SD with downloaded one (you have to extract it first).
      3.- Start Linux on your netbook, hopefully, battery readings should work now.
      4.- Power off the netbook and restore the original wmt_scriptcmd to the BOOT partition. If you fail to do this step, everything should continue working, but each time you boot Linux, U-Boot config will be overwritten (with the same configuration, but overwritten anyway) and in the long run, you can damage the flash partition used to store U-Boot environment.

      Delete
    4. I have noticed I forgot to add a command to the script. Please try again with this one:
      http://www.mediafire.com/?8elo8alu86uaxvu

      Delete
    5. sorry for the very late reply, thank you it worked with your second file.

      Delete
  2. Hello again,

    I have tried to get the RT5370 driver working and got the following error after using

    insmod /lib/modules/2.6.32.9-test/kernel/drivers/net/wireless/rt5370sta.ko

    Error: could not insert module /lib/modules/2.6.32.9-test/kernel/drivers/net/wireless/rt5370sta.ko: Unknown symbol in module


    ReplyDelete
    Replies
    1. I had that error when using the module with a not matching kernel. Are you using BOTH the kernel and the module posted in this entry?

      Delete
    2. Oh I see. My mistake, I am still using the kernel that you gave me in the comments of "Building WM8650 Netbook Kernel" <:)
      If I use the one from this update guide the ethernet does not work so I reverted back.

      Delete
  3. I have a netbook WM8650 / rtl5370 ( http://dx.com/p/7-0-tft-lcd-android-2-2-via-8650-cpu-wifi-umpc-netbook-black-349-79mhz-2gb-3-usb-sd-lan-70760 ) and working perfect.
    Tks for all,
    jhmc

    ReplyDelete
  4. Dear Doragasu, I enjoyed this system booting on SD card. The question is: is there any possibility to boot the system by NAND flash? I'd like to have a free slot on my system. My best regards.

    ReplyDelete
  5. Hello, I have RT5370 and I installed drive from this post, but I can'n connect to WiFi, because "iwconfig: command not found" and "ifconfig -a" does not see wlan0 interface, but see ra0 interface

    ReplyDelete
  6. Hi doragasu,

    I've followed your instructions and everything seems to work. Also, RT5370 wireless is running.
    But when I tried to switch to systemd, I recognized your kernel lacks some options required. So I've built my own kernel with some patches from John Williams tutorial and CONFIG_CGROUPS enabled. That did the job, but now the wireless module doesn't work any more.
    If you find the time, could you provide your latest kernel patches and some instructions on how to build the RT5370 module?

    Thanks a lot for your great tutorials!
    gekmihesg

    ReplyDelete
    Replies
    1. Here are the patches for the kernel and the RT5370 driver: http://www.mediafire.com/?mow8zou142aefbj

      I don't know why, but the only way I got the driver to work, was building both the kernel and then the RT5370 driver using the netbook itself. Every time I tried building it using a cross compiler, the kernel refused to load the built driver. I don't remember doing anything special other than building the kernel and driver using the netbook. There must be a way to build the driver using the cross compiler, but I don't know how to do it.

      Delete
    2. Thank you, I'll give it a try.
      But could you please upload the RT5370 driver as well?
      The Ralink download page seems broken. All I get are 0 byte files...

      Delete
    3. Sure, I don't think there's a problem with that, since they have the GPL headers: http://www.mediafire.com/?ecebikxx8fsxrl8

      Delete
    4. can you make a windows toutorial of this i dont use archlinux on my pc but i would love it on my wm8650 netbok

      Delete
    5. I'm sorry, but I don't have time to play with these netbooks anymore, and also I don't use Windows...

      Delete
  7. with the new kernel and the patches it-s working on a imos brand wm8650 from dealextreme.

    Thank you so much!

    ReplyDelete
  8. I'm attempting to install arch on a 8650 tablet and I'm having trouble getting it to boot at all.
    First time around, nothing works, it crashes quickly complaining about a missing init. Init wasn't the problem, actually, linking ld-linux.so into /lib was the solution to that...which leads me to believe that a lot of the other problems are related to the current root filesystem from archlinuxarm being of the new version that shuffles things around and wont work for whatever reason..
    Does that sound along the right track? (if so, could you possibly upload a filesystem from sometime in the past that is known to work..)

    Now, the first problem that comes along is the thing complaining about not having the autofs4 and ipv6 modules...not lethal, that's fine.
    Then it says "CONFIG_CGROUPS was not set when your kernel was compiled. Systems without control groups are not supported" etc...
    That moves on until the first truly problematic error when systemd reports... Failed to start "Remount root and kernel filesystems"

    So I'm hoping that it's just a kernel issue with the new filesystem and would be most appreciative if someone uploaded an old one for this effort. Thanks for the great work doragasu.

    ReplyDelete
    Replies
    1. Unfortunately, things broke when ArchLinux moved from initscripts to systemd for the boot process. This is the image I used to record the youtube video:
      https://hotfile.com/dl/160351259/b1233a4/alarm-wm8650-2012.06.19.tar.bz2.html
      http://www.filefactory.com/file/yx57qlhy0zj/n/alarm-wm8650-2012.06.19.tar.bz2

      I uploaded it and published the links when I wrote the second chapter of my tutorial:
      http://kernelhacks.blogspot.com.es/2012/06/arch-linux-on-wm8650-netbook-ii.html

      You should be able to boot it, but installing/updating things using pacman might fail and even break things.

      It looks like you can get the most recent Arch build to work, but you'll have to build the kernel enabling CONFIG_CGROUPS. Some comments above, user gekmihesg wrote he done it successfully.

      Also have in mind the kernel I built is for netbooks, not for tablets. It doesn't support for example the touchscreen controller.

      Delete
    2. Thanks a ton guys. I hadn't seen the link for the filesystem when I looked earlier, thanks for pointing it out.
      I'll post back with my results later.

      Delete
  9. I tried to install Your pre-build Arch Linux on my WM8650 Netbook but error message displaying rapidly on screen. which is very difficult to read.

    I use Universal_Uberoid_WM8650_v10.1_www.TechKnowForum.net.7z android 2.2 firmware on my Netbook without any problem.

    please help me how to boot with arch linux.

    I can share my uzImage.bin & wmt_scriptcmd of android 2.2 if required. please guide me how to use my running android kernel to boot for arch linux.

    Thanks.

    Regards
    jags

    ReplyDelete
    Replies
    1. EDIT:
      I have tested with two types of files.

      Step 1:
      tar -xjf alarm-wm8650-boot.tar.bz2 -C /media/BOOT/
      tar -xzf ArchLinuxARM-armv5te-latest.tar.gz -C /media/ARCH_SYS/
      tar -xjf alarm-wm8650-modules.tar.bz2 -C /media/ARCH_SYS/

      step 2:
      tar -xjf wm8650-kernel_20120808.tar.bz2 -C /media/BOOT/
      tar -xzf ArchLinuxARM-armv5te-latest.tar.gz -C /media/ARCH_SYS/
      tar -xjf wm8650-modules_20120808.tar.bz2 -C /media/ARCH_SYS/

      in both cases I am getting error message on booting.
      Please note that after starting of boot I am getting Arch Linus welcome message after some time i gae the error said above. Then I need to restart my netbook to get it works again.

      regards
      jags

      Delete
    2. ArchLinuxARM-armv5te-latest.tar.gz is NOT my pre-built image, it's the latest ArchLinuxArm release, and unfortunately it will not work unless you fix the kernel and boot params. If you want to try my pre-built image, use one of these:

      https://hotfile.com/dl/160351259/b1233a4/alarm-wm8650-2012.06.19.tar.bz2.html
      http://www.filefactory.com/file/yx57qlhy0zj/n/alarm-wm8650-2012_06_19_tar_bz2

      Delete
    3. Dear doragasu,
      Thanks for your quick reply. I have started to download your image.
      alarm-wm8650-2012.06.19.tar.bz2.html. Now I want to know which kernel and module I must use with your image. I have two set one is alarm-wm8650-boot.tar.bz2 & alarm-wm8650-modules.tar.bz2 and another is wm8650-kernel_20120808.tar.bz2 & wm8650-modules_20120808.tar.bz2.

      How ever please tell me how to fix kernel and boot params to work with atest ArchLinuxArm release ArchLinuxARM-armv5te-latest.tar.gz

      Thanks again

      jags

      Delete
    4. To boot my pre-built image, use the kernel and boot script from this page. Also use the kernel modules from this page.

      I'm not developing for these netbooks anymore, so I will not provide more kernel updates and/or instructions on how to do it. It looks like some users got it working, and posted some directions. Read the comments here:
      http://kernelhacks.blogspot.com.es/2012/06/arch-linux-on-wm8650-netbook-ii.html

      Delete
  10. I used Martin Dowse's kernel and modules

    - kernel http://www.mediafire.com/download.php?79ae66vi3orttt3
    - sources http://www.mediafire.com/download.php?0za8577mzaac9r4

    And I installed usb_modeswitch & wvdial.

    Now I get My GSM modem attach to ttyUSB0, ttyUSB1, ttyUSB2
    I modify wvdial.conf file as per my USB dongle.

    But I get The PPP daemon has died. (exit code = 4)

    Can any body help me to get my 3G USB dongle running on ny arch linux netbook

    regards
    jags

    ReplyDelete
    Replies
    1. finally my 3G dongle is running. I need to run modprobe ppp_aync manualy before wvdial.
      can anybody tell me how to load ppp_aync module automatically.

      jags

      Delete
    2. this works just add these modules to MODULES in /etc/rc.conf so they will be loaded with every reboot.

      jags

      Delete
  11. after updating doragasu's arch image my netbook is not mounting usb disk automatically also no pop up file manager is coming. Can anybody help me how to fix this problem???

    regards
    jags

    ReplyDelete
  12. I found Dowse's kernel dose not have built in ppp, rather has module drivers/net/ppp_async.ko. I load module ppp_async manualy. and my pppd started working.

    But in doragasu's kernel module i could not find ppp_async.ko, may be this kernel has built in ppp. but with lsmod i dint get any ppp_* module loaded. As usual PPP daemon has died. (exit code = 4).

    can any body help me how to get pppd working with doragasu's kernel module?
    Has any body test 3G USB dongle with doragasu's kernel module?\

    regards
    jags

    ReplyDelete
  13. doragasu hello from Spain! first sorry for my English, and for my Linux! I explain my problem: I bought a notebook prixton 1001 with android 2.2 which is almost the same components as your netbook. I followed your steps Arch Linux on a WM8650 netbook to the point 5. that is the time to make the first start. the display shows "loading kernel " "starting arch linux" everything goes well until it appears

    <27>systemd[1]: failed to enumerate cgroup controllers: no such file or directory
    <30>systemd[1]: system 195 running in system mode. (+PAN -LIBWRAP -SELINUX -IMA -SYSVINIT +LIBCRYPTSEPUP +GCRYPT +ACL +X2; arch)

    Welcome to Arch Linux ARM!

    <27>systemd[1]: could not find module by name 'autofs4'
    <27>systemd[1]: failed to insert 'autofs4'
    <27>systemd[1]: could not find module by name 'ipv6'
    <27>systemd[1]: failed to insert 'ipv6'
    <30>systemd[1]: set hostname to
    <28>systemd[1]: CONFIG_CGROUPS was not set when your kernel was compiled. System without control group are not supported. we will now sleep for 10s, and then continue boot_up. expect break age and please do not file bugs. instead fix your kernel and enable CONFIG_CGROUPS. consult http:/ Opointer.de/blog/proyects/cgroups-vs-cgroups.html for more information.
    Batery low
    Batery low

    and starts repeating it without stopping

    <30>systemd[1]: starting journal service.
    <28>systemd[1]: systemd-journald. service start request repeated too quickly, refusing to start
    <27>systemd[1]: failed to start journal service

    I would appreciate to give us a solution to install linux on the notebook prixton 1001. as it is a notebook that gives many problems with android installed bearing.
    thank you very much.

    ReplyDelete
    Replies
    1. Unfortunately, latest versions of ArchLinuxArm won't work with my tutorial. You have to build a new kernel, with CONFIG_CGROUPS enabled, and also significant changes in the configuration steps are required. Some readers have reported also a change in the bootargs of the bootscript are needed.

      As an alternative, you can try the pre-built filesystem I posted in the "Arch Linux on a WM8650 netbook (II)" entry: http://kernelhacks.blogspot.com.es/2012/06/arch-linux-on-wm8650-netbook-ii.html

      It should work, but unfortunately, you will not be able to upgrade the system, and also it will likely fail when trying to install new packages (because of the outdated dependencies).

      Delete
    2. Linux runnind in my Prixton 1001!!!! Thank you so much!!!

      Delete
  14. doragasu great work, you are the master of WM8650!
    I take the full system image you posted (https://hotfile.com/dl/160351259/b1233a4/alarm-wm8650-2012.06.19.tar.bz2.html)
    and everything works except the wifi and battery that is always at 0% (and never charging)
    rt3070sta.ko I have a module that worked with my previous distribuicion but I can not insert with insmod (parameter incorrect) ....

    I can insert the modules that I need to insmod or should rebuild the kernel?

    please help this newbie in linux ......
    pdt. excuse my English

    ReplyDelete
    Replies
    1. Are you using the updated kernel and modules you can find in this blog post? I suspect you are using an old one, because the battery problem (and Ethernet and others) is supposed to be fixed in this version. It also has a lot more WiFi drivers included. If you are using an old kernel version, please follow the instructions in this blog post and update it.

      If after updating, it still doesn't work, you will have to search if the kernel includes drivers for your module. If drivers are included, you will have to enable them and rebuild the kernel. If drivers for your module are not included, you will have to find and build them.

      Good luck!

      Delete
    2. thanks for your quick response
      according to your entry on your blog, I just would have to replace the new files (kernel and modules) on the partitions??

      Delete
    3. Yes, that's it. Replace kernel in the BOOT partition, and kernel modules in the root filesystem partition with the ones you can find in this blog post. Battery problem should dissapear and *maybe* WiFi will start working.

      Delete
  15. Tried this files. wired ethernet & wifi seem to be working for me now. ... wlanakku.blogspot.de

    ReplyDelete