Monday, June 18, 2012

Arch Linux on a WM8650 netbook

UPDATE 20th November 2012: Due to recent changes in the Arch Linux boot process, this tutorial is no longer valid. You can still download an old pre-built image and install it, as I explained here. But with this old image, updating the distro (with pacman -Syu) will most likely throw some errors and maybe even break the system. Also installing applications without updating the distro (with pacman -S application_name) will likely fail because of the not updated dependencies.

If you have searched the net for a very cheap tablet, maybe you have seen a lot of  7" chinese ones featuring the WM8650 SoC. This SoC has an ARM9 CPU running at 800 MHz, a DSP, a 2D graphics accelerator and a lot of peripherals.


I don't like tablets at all, but I found some cheap chinese netbooks containing pretty much the same hardware, removing the touchscreen and replacing it with a keyboard + touchpad. I couldn't resist and bought one of these netbooks in Aliexpress. It costed me around 50€, shipping costs included. The specs of this machine are:
  • Wondermedia WM8650 SoC at 800 MHz.
  • 256 MiB DDR RAM (I think it runs @ 800 MHz, but I'm not sure).
  • 2 GB internal NAND Flash.
  • 7" 800x480 pixels TFT screen.
  • 3 USB Host ports.
  • 1 Ethernet port.
  • WiFi.
  • Headphones and microphone ports.
  • Internal 7,4V 1800mAh LiPo battery.
  • 9V 1,5A power adapter.
  • Android 2.2.

The Android distro that comes pre-installed is pretty usable even without a touchscreen. As the specs of this machine are really far from being impressive, it doesn't run butter smooth, but works very well.

Android is OK, but as an Arch Linux fan I am, I wanted to make this netbook run it, so I started searching the net to see if anybody had already made it. The only thing I found was a Debian port for these netbooks, using the kernel from a preinstalled Android distro. This Debian port works, but isn't very well optimized, and for example, boot time takes almost 2 long minutes.



The closest thing I found is an Arch Linux port for a WM8650 based tablet. This tutorial is really great and very well detailed, and my work getting the kernel built is almost entirely based on it. John has made a really good job getting the Linux kernel built for these tablets.

In this post, I will detail the process I have followed to get a base Arch Linux system running in this netbook, but I will skip the kernel build process (maybe I'll detail it in a later blog post).

OK, let's get our hands dirty. You will need a SD card. The minimum required size of the SD card is 2 GB, but I recommend using at least a 4GB card, unless you don't need a desktop environment. The steps to get Arch Linux running are:

  1. Partition and format the card. To do it, I have used gparted application. First create a very small FAT32 partition, and name it BOOT. The smallest partition gparted allowed me to create was 33 MiB, more than enough (we need less than 4 MiB). Then create a ext3 partition using the remaining space, and label it ARCH_SYS.
Partitions created in the SD card
  1. Copy the boot script (wmt_scriptcmd) and kernel (uzImage.bin) to the BOOT partition. Download them here. Then run:
tar -xjf alarm-wm8650-boot.tar.bz2 -C /run/media/doragasu/BOOT/
Make sure to replace "/run/media/doragasu/BOOT/" with the directory where the BOOT partition of the SD card is mounted.
  1. Download the root filesystem and untar it in the ARCH_SYS partition:
wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz
tar -xzf ArchLinuxARM-armv5te-latest.tar.gz -C /run/media/doragasu/ARCH_SYS/
Make sure you replace "/run/media/doragasu/ARCH_SYS/" with the directory where the Arch Linux system partition is mounted, here and from now on. Also make sure to run it as root (write sudo before the tar command if you are not root).
  1. Copy the kernel modules to the ARCH_SYS partition. Download them here, and run (as root):
tar -xjf alarm-wm8650-modules.tar.bz2 -C /run/media/doragasu/ARCH_SYS/
  1. We are ready for the first boot. Unmount the SD card, insert it in the netbook and power it on. You should see the Android robot, and then the messages Loading Kernel... and Starting Linux... should appear. In a few seconds, you should be able to see the boot messages, and finally get the login prompt. The first boot will take a lot of time because udev has some problems and eats almost all the CPU. We will fix these proplems in the next step. Default password for the root user is root.
  2. Udev needs the accept4() OS call, that is not supplied by the Android kernel I have built. To fix this, you have to install libaccept4. Download this package and put it inside the SD card (for example in /root). Then start Linux, login as root and in the console change to the directory containing the downloaded package and type:
pacman -U libaccept4-570-1-arm.pkg.tar.xz
echo /usr/local/lib/libaccept4.so >> /etc/ld.so.preload
Accept the installation of the library, and reboot. Udev should be working fine from now on, and boot time will be a lot shorter.
  1. To extend battery life, power to the internal WiFi dongle is off by default. To enable it, you need to toggle the GPIO pin controlling its power. Download this package, copy it to the SD and install it with the following command:
pacman -U wmt-gpio-1.0-1-arm.pkg.tar.xz
Upon installing this package, to enable the WiFi chip, you have to input the command:
gpio 1:6:d8110040:d8110080:d81100c0

And to disable the WiFi chip:

gpio 0:6:d8110040:d8110080:d81100c0
You can create two scripts with these commands, or if you always use WiFi, you can add the first one to /etc/rc.local, to enable WiFi each time the system boots.
  1. To read the battery charge level, use the following command:
cat /sys/class/power_supply/wmt-battery/capacity
  1. To change the screen brightness, you have to write a number between 0 and 255 (the greater, the brighter) to /sys/class/leds/lcd-backlight/brightness. For example:
echo 200 > /sys/class/power_supply/wmt-battery/capacity
You can also add this line to rc.local to set the screen brightness to your favorite level each time the system boots.

Now you have a fully functional base Arch Linux install. It's highly recommended to update your system (pacman -Syu). Then you can start installing your favorite utilities, window manager, etc., by following the instructions documented in the awesome Arch Linux Wiki.

I'll give you some hints for Arch Linux newbies. Skip them all if you are experienced with this distro. You can start by editing /etc/rc.conf. This file contains some basic configuration parameters, like for example the timezone (TIMEZONE), the hostname (HOSTNAME) and some basic network configuration parameters (that default to DHCP on the Ethernet port). Very important in this file is the last line, detailing the services started when the system boots, and the order in which they are started. I usually remove netfs from the list, replace network with networkmanager (you'll have to install it first) and add dbus (you'll need it for the window manager and some more programs). If you use networkmanager instead of network daemon, make sure you put it after dbus.

To set the locale (in case you don't want the default en_US.UTF8), you have to follow these steps:
  1. Edit /etc/locale.gen. This file details the locales generated by the system. You can replace/add the desired locales to this file. For example, to generate locales for spanish language, add:
es_ES.UTF-8 UTF-8  
es_ES ISO-8859-1  
es_ES@euro ISO-8859-15  
  1. Generate the new locales by running (with root privileges):
locale-gen
  1. Edit /etc/rc.conf and change the default locale to the desired one. Of course, the locale must be one of the included in /etc/rocale.gen. For example, for spanish:
LOCALE=es_ES.UTF-8

To change the root password, use the command passwd. To create a new user, use the command adduser. Leave the default parameters, but when asked for additional groups, enter the following:
audio,lp,storage,video,wheel,games,power,scanner

It's highly recommended to install sudo and add the user to the sudoers. Just follow these steps:
  1. Install sudo:
pacman -S sudo
  1. Allow all the users in the wheel group to use sudo. Run the visudo command, and uncomment  (remove the '#') the following line:
# %wheel ALL=(ALL) ALL
If you don't know how to use the vi editor, press the [I] key to [I]nsert text, when you finish, press [ESC] to enter command mode and write :wq to write the file and quit the editor. If you mess something up, just press [ESC] to switch to command mode, and write :!q to quit without saving changes. Then try again the visudo command.
And that's all for today. If you followed this tutorial to the end, congratulations! You should be able to launch GNU/Linux in your shiny WM8650 laptop, with the locale, timezone and (hopefully) Ethernet network properly configured. You should be also able to login as a non privileged user, and use sudo to run tasks as root. If you have questions, feel free to ask them.

What? You don't like the console? Don't worry. In the next chapter, we will learn how to install a graphical desktop environment. Stay tuned!

TROUBLESHOOTING:

I have patched the kernel to make it compatible with the environment of the Android distro that comes pre-installed in some netbooks. You should be able to boot Android (without the SD card inserted) and GNU/Linux (with the SD card inserted). It works on my netbook, but it looks like there are different hardware revisions of these netbooks, and some of them, may require to change some variables in the environment stored inside the internal Flash memory. Typical problems that may arise are for example not being able to use the Ethernet port, or losing the ability to read the internal battery level. If you experience these problems, I can provide you with a modified wmt_scriptcmd that changes some variables of the environment stored in Flash, to make the broken things work. But I'll not post it here unless someone asks for it, because if you overwrite some variables, you may break things in the Android kernel (i.e. you can loose the battery level information in Android). And if you didn't back up that variables first, you might not be able to fix these problems.

Other problem that may arise, is that WiFi may not work. WiFi in these netbooks is implemented using an internal USB WiFi dongle. The one used in my unit has a Realtek RT8188CU chipset. I had to search the net for a compatible driver (rtl8192cu) and merge it into the kernel drivers. If your netbook uses a dongle with a different chipset, WiFi may not work. Enable WiFi with the gpio command, run lsusb and show me its output. I'll try to help you to get the dongle working.

Of course you may find a lot more problems. Feel free to ask for help! You can also read the follow-up to this post: Arch Linux on a WM8650 netbook (II).

109 comments:

  1. Bit of a loss in translation here, but where those 50 euros each, or for the lot?

    ReplyDelete
    Replies
    1. 50€ each. Sure they are cheap, but 10€ each one would be a bargain.

      Delete
  2. Ive seen some of these that run WindowsCE. Would that make it easier or harder to run this? Im kind of a novice when it comes to this stuff.

    Thanks!

    ReplyDelete
    Replies
    1. Since I have not one to play with, I'm afraid I don't know the answer.

      It depends on the bootloader. I don't know what bootloader they use for Windows CE. If they use U-Boot, maybe there's no difference in the process.

      Delete
    2. Normally, Windows CE does use U-boot as Bootloader.

      Anyway, great job! I'll maybe buy one of these someday...

      (You're on Hack a Day :) http://hackaday.com/2012/06/20/cheap-arm-netbooks-have-linux-forced-upon-them/)

      Delete
  3. thanks for this my daughter received on for Christmas and imho the android os on there is fairly unusable. The app store didnt even have facebook (not great for a teenage girl) so look like this is the way forward

    Thanks

    ReplyDelete
  4. ¿Sugerencias sobre donde comprar uno de estos? ¿Ebay? ¿Meten palo en aduana?

    ¡Gracias por adelantado!

    (Te lo pongo en español por ser el blog .es y tal, y por que el envío aquí solo interesa para españoles, supongo...

    ReplyDelete
    Replies
    1. Nevermid, I was asking for some info on the buying from Spain, but bought one already (less than 60 euros at Ebay). So, in a month or so, I will be asking things here ;) (Hopefully just few things, have worked with this kind of SoCs before (Beagleboards, Pandaboards and so, but this is kinda great, as it has screen, keyboard and enclosure. And I do not need 3D accel, so...

      Delete
    2. As the question is spanish tolls related, I'll answer in spanish.

      Yo compré el mío en Aliexpress (http://www.aliexpress.com/snapshot/107367194.html), y me costó unos 50€ gastos de envío incluidos. Generalmente no tienes problemas con aduanas (yo al menos no los he tenido) porque los chinos suelen declararlo con un valor mucho menor del real, y en la descripción ponen cosas como reproductor MP3 y demás. Si compras muchos de una vez, tal vez tengas problemas, pero de 1 en 1 no creo.

      Por supuesto cuando te pongas manos a la obra no dudes en preguntar lo que quieras. Si son cosas de interés general, te pediría que a ser posible preguntes en inglés, aunque no hay problema por hacerlo en castellano.

      Delete
    3. Well, it's ordered and will come in 3/5 weeks, so be sure I will be right back to ask some questions. I am hardware engineer, so I am more confident when I need to route a board or design a little add-on than messing with the software. But I can't resist when I see gadgets this cheap. And, as you, hate tablets, so...

      Now I need to read some info about the SoC, but having a little experience with uBoot & friends, I hope it will be easy enough.

      Delete
    4. Unfortunately I couldn't find detailed info about the WM8650, because documentation isn't disclosed. You have to sign a NDA to get it :-(.

      Delete
    5. try this http://dl.dropbox.com/u/25902546/PB_WM8650_081.pdf

      Delete
    6. Thanks for the document. I already found that doc, but that's only a brochure, and useless to code low level stuff for this SoC.

      Delete
  5. This is awesome! I've been trying to put linux on one of these for months, currently it runs WinCE :/

    ReplyDelete
    Replies
    1. WinCE version won't boot from the SD Card :(

      Delete
  6. Interesting.. try to follow my guide to install it to the NAND and maybe you can gain more seconds, and a SD CARD slot ;) http://www.slatedroid.com/topic/30361-wip-install-linux-on-nand/

    ReplyDelete
  7. The Ethernet on mine is non-existent. Any chance of getting that modified script?

    ReplyDelete
    Replies
    1. WARNING: Using the script attached to this comment, could make the Android distro unable to use Ethernet port. 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 tutorial I wrote on Slatedroid: http://www.slatedroid.com/topic/34131-help-to-get-default-environment-for-wm8650-netbooks/

      Once you have made a backup, follow these steps:
      1.- Download the modified script: http://www.mediafire.com/?dcyg78ap2dk599h
      2.- Replace the default wmt_scriptcmd in the BOOT partition of the SD with downloaded one.
      3.- Start Linux on your netbook, Ethernet port should be working 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.

      Please let me know if the script works, and if is compatible with the Android distro in your netbook.

      Delete
  8. Hi, can you test if the wifi card is capable of Monitor mode and packet injection?
    Thanks!

    ReplyDelete
  9. It looks like it isn't, but I'm not experienced with aircrack-ng. Might be PEBCAK:

    $ airmon-ng start wlan0


    Interface Chipset Driver


    $ airodump-ng wlan0
    ioctl(SIOCSIWMODE) failed: Invalid argument

    ARP linktype is set to 1 (Ethernet) - expected ARPHRD_IEEE80211,
    ARPHRD_IEEE80211_FULL or ARPHRD_IEEE80211_PRISM instead. Make
    sure RFMON is enabled: run 'airmon-ng start wlan0 <#>'
    Sysfs injection support was not found either.

    Anyway, you should be able to use any compatible USB wireles dongle.

    ReplyDelete
  10. hi guys on my fourth install and keep getting the following error

    ld.so: object '/usr/local/lib/libaccept4.so' from /etc/ld.so.preload cannot be preloaded : ignored

    can any one give me a heads up as to what i am doing wrong

    Cheers

    ReplyDelete
    Replies
    1. Did you install libaccept4? (second line of step 6)

      Delete
  11. step 6 is where its failing for me any chance of some more details i may be getting a little conused

    ReplyDelete
    Replies
    1. Try reversing the order of the commands. If you already created it, delete ld.so.preload:
      rm /etc/ld.so.preload

      Then try reversing the order of the commands in step 6:
      pacman -U libaccept4-570-1-arm.pkg.tar.xz
      echo /usr/local/lib/libaccept4.so >> /etc/ld.so.preload

      Maybe the order I wrote them can cause problems. If that's the case, let me know and I'll correct it.

      Delete
    2. thanks for taking the time to reply as you suggested the order of commands is reversed

      pacman -U libaccept4-570-1-arm.pkg.tar.xz
      echo /usr/local/lib/libaccept4.so >> /etc/ld.so.preload

      worked great for me

      Delete
    3. Glad to hear it worked!

      Thanks for confirming, I'll change it right now.

      Delete
    4. i'm failing at the same point. to type the commands as shown above doesn't work.any advices for me?

      Delete
  12. Can you share the output of a lsmod / lsusb / lspci / lspcmcia for me?

    Hard to find physical info about the device :/

    ReplyDelete
    Replies
    1. http://pastebin.com/KRLe4uZH

      I also found two high resolution photographs of the internals (thanks to Homo Faciens):

      http://www.homofaciens.de/bilder/technik/wm8650_07g.jpg
      http://www.homofaciens.de/bilder/technik/wm8650_01g.jpg

      Delete
    2. Has anyone else noticed what looks like an unused USB port at the bottom of the main board? Could this be used to access low level debug features?

      Delete
    3. I have not tested it, but it looks like a serial port (TXD, RXD). USB ports usually label the data lines as D+ and D-.

      Delete
    4. It is probably just an UART for debugging purposes, so if you want to mess with uBoot, you just probably need to hook that to a transceiver and to a serial port in your PC (If you have any ;) ). The boards i've seen use to comunicate at 115200 bauds.

      If someone is trying, remember the transceiver part, or you will probably fry the netbook...

      PS (Mine arrived yesterday. Have ARCH up & running, with LXDE, and just need to compile a driver for wifi (Came with RT5370)

      See you, and thanks for all, Doragasu!

      Delete
  13. Hi

    very nice work thanks and excellent instructions. Do you have a USB to serial driver ftdi_sio.ko compiled for this kernel? I want to use it to run my weather station.

    cheers

    ReplyDelete
    Replies
    1. Updated kernel and kernel modules. Changes to the kernel:
      + Patched Ethernet initialization to support devices with wmt.eth.param=1, without having to use a modified wmt_scriptcmd.

      Changes to modules:
      + Added modules for common USB to RS232 adapters: FTDI, CP210x, pl2303 and garmin_gps.
      + Added modules for Bluetooth devices.

      Downloads:
      - Kernel: http://www.mediafire.com/?vtrmouio669z9j9
      - Modules: http://www.mediafire.com/?f735m3dc4lcc6vm

      I'm planning to put this in a new blog post, when I have time to write some more things.

      Delete
  14. Hi, thanks for the great tutorial!:)
    Do you happen to know which parameters in wmt_scriptcmd you need to modify to make the battery indicator work? I tried to set wmt.io.ts to 1:uor6150..., according to John's guidelines - but I get tons of "ERR: UOR_IICRead() Failed, errno=.5" messages, and a constant capacity of 0 then... Probably because the netbook doesn't have a touchscreen, but I have no idea what should I put there instead.
    I'd appreciate any hints, thanks!

    ReplyDelete
    Replies
    1. Are you using the kernel from John Williams? I had that problem with his kernel. I had to disable the UOR chip in the kernel configuration, and patch the battery reading code. You should not have that problem with my kernel build. For battery readings, these two variables must be set like this:

      wmt.io.bat=3:2:1000:db1:b8b:db1:d7a:d43:d0c:cd5:c9e:c67:c30:bf9:bc2:b8b
      wmt.gpi.bat=[0:0:00020000:d8110040:d8110080:d8110000:d8110480:d81104C0][1:1:00000020:d8110040:d8110080:d8110000:d8110480:d81104C0][2:0:00010000:d8110040:d8110080:d8110000: d8110480:d81104C0]

      Delete
    2. WOW, after updating wmt.gpi.bat it works, and it didn't break the Android's battery indicator!:) Many, many thanks!

      For the record, my former wmt.gpi.bat was:
      [0:0:00020000:d8110040:d8110080:d8110000:d8110480:d81104C0][1:0:00000020:d8110040:d8110080:d8110000:d8110480:d81104C0][2:1:00010000:d8110040:d8110080:d8110000: d8110480:d81104C0]

      Best regards!

      Delete
    3. BTW, would it be a problem for you to share your .config file & patches you have made to the kernel source? Your build is working great, except for the fact that I have a different WiFi adapter and would have to compile the appropriate driver - if I take John Williams' precompiled binary or try to compile with unpatched kernel sources, I get a "module_layout mismatch" while trying to load this module..

      Delete
    4. If course I'm planning to share it, but I wanted first to fix some things. Right now there are two problems inside the kernel I have not been able to solve:

      1.- Bogomips count is not properly calculated in /proc/cpuinfo. It should be about 800, but is reported as 299. I know the CPU is working at 800MHz because the programs take the same time with my kernel and with the Android one (that properly reports bogomips near to 800).
      2.- The terminals lack cursor. Cursor is working in virtual terminals inside X-Windows, but text terminals lack it. I have tried several hacks, but I can't switch it on.

      Anyway, I have not much time to continue investigating the sources, so I think I'll release them as they currently are, and maybe somebody will be able to solve this problems.

      Delete
    5. That would be great, thanks!

      As for #2, I've also noticed that and tried to find a solution, no success so far though.. I'll let you know if I come up with anything.

      Delete
  15. Are you booting to a live SDcard of ARCH or an installation? Can this netbook boot to a live SDcard?

    I need to hide the ARM's UUID. Can you write a script to disable the Linux kernel from reading the processor's UUID or die-id and not make it available to user space via some /proc/ entry?

    ReplyDelete
    Replies
    1. I'm booting Arch to a SD card. I left the internal Flash untouched, so it boots Android unless I insert the SD card with the Arch install.

      Unfortunately I don't have time to dig the kernel searching where does it expose those parameters. If you have programming skills, you can try to build the kernel yourself, and patch it to your needs. I wrote a tutorial about compiling the kernel:
      http://kernelhacks.blogspot.com.es/2012/06/building-wm8650-netbook-kernel.html

      Delete
  16. I have now completed install and have quicker boot coupled with desktop when i log int the network manager applet doenst find any wirless networks any one know why ?

    Pete

    ReplyDelete
    Replies
    1. Have you enabled WiFi with the gpio command? If it's enabled and is not working, maybe you have a different WiFi dongle inside your netbook (mine is RT8188 based). Install hwids and enable WiFi with the gpio command:

      pacman -S hwids
      gpio 1:6:d8110040:d8110080:d81100c0

      Then paste the output of the following commands:

      lsusb
      lsmod

      Delete
    2. Hi Thanks for all the help so far out put from

      lsmod

      Module Size Used by
      vfat 8632 1
      fat 43955 1 vfat

      output from lsusb

      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
      Bus 002 Device 002: ID 04d9:2ba0 Holtek Semiconductor, Inc.
      Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

      Delete
    3. Your WiFi dongle is based on the RT5370 chipset. Unfortunately the driver for that chip is not included in the available kernel. There are sources available, if you don't know how to do it, I can try to build them when I get some time.

      Delete
    4. I assumed that would be the case I am a little more experianced using Ubuntu and have seen a guide on the chip set so I may give it a try. Is it a case of compiling the driver then loading as a module ?

      Delete
    5. Yes, that's a possibility. The other way is integrating the module into the kernel tree and then enabling it and building the kernel/modules.

      Delete
    6. It seems mine has the same WiFi chip (Ralink RT5370) and the following Ethernet chip: VIA VT6105/VT6106S [Rhine-III] (rev 84)

      Delete
    7. Mine came with RT5370 too (as well as VT6105/VT6106S Ethernet module). Any ideas what can I do?

      Delete
    8. I will try posting a new kernel update that should solve problems with WiFi and Ethernet. But now I'm on holiday very far from my computer!

      Stay tuned!

      Delete
    9. I've got the same WiFi device in my netbook like pete.
      Can anyone help me to implent the driver? i'm familiar with programming...but just for embedding systems with microcontrollers and not even arm...
      I'm not sure what is necessary to get this work done, but if anyone can help me at the beginning, that would be a relief.

      Delete
    10. Read this --> http://kernelhacks.blogspot.com.es/2012/09/arch-linux-for-wm8650-kernelmodules.html

      I have updated the kernel and modules (drivers). Some users with the same WiFi device as yours have reported it's working for them.

      Delete
    11. Well, the ethernet is working now, thank you for your help, but WiFi seems not to be working, but that's not that bad at all. there are another problems, LXDE is working, but only if i start x manually.
      If i type my login into slim lxde won't start, i have to press ctrl + alt + F1, then i see the standard terminal which is asking for login.
      another problem is, that i can't install the libfm and pcmanfm packages, pacman is showing this and abord all actions:


      error: failed to commit transaction (conflicting files)
      util-linux: /bin/kill exists in filesystem
      util-linux: /bin/su exists in filesystem
      util-linux: /etc/pam.d/su exists in filesystem
      util-linux: /sbin/sulogin exists in filesystem
      util-linux: /usr/bin/mesg exists in filesystem
      util-linux: /usr/bin/utmpdump exists in filesystem
      util-linux: /usr/bin/wall exists in filesystem
      util-linux: /usr/share/man/man1/kill.1.gz exists in filesystem
      util-linux: /usr/share/man/man1/mesg.1.gz exists in filesystem
      util-linux: /usr/share/man/man1/su.1.gz exists in filesystem
      util-linux: /usr/share/man/man1/utmpdump.1.gz exists in filesystem
      util-linux: /usr/share/man/man1/wall.1.gz exists in filesystem
      util-linux: /usr/share/man/man8/sulogin.8.gz exists in filesystem
      Errors occurred, no packages were upgraded.

      Delete
    12. well, i solved the problem with installing pcmanfm.
      the only two things to solve are the WiFi that isn't working, dmesg says "rt2870: probe of 1-4:1.0 failed with error -1"
      Another Problem is, that I can't mount usb drives. lsusb either doesn't show them or show them wrong, e.g. my maxell 1GiB flash drive is listed as a Kingston 4GiB...
      any suggestion?

      Delete
    13. Are you using the updated kernel and modules I pointed in my earlier post? Have you tried manually loading the rt5370 driver using insmod?

      Also have you upgraded your system using "pacman -Syu"? I had problems with module auto-loading when I did it last time. I solved it by manually moving everything in "/lib" to "/usr/lib", and then creating a "lib" symlink pointing to "/usr/lib".

      Delete
    14. I did everything what you mentioned in your tutorials. after i configured to autoload the module at startup and toggle the GPIO to activate WiFi, it seems to work, with "iwlist ra0 scan" i found my router.
      So now, the wlan device seems to work.
      I put the line "@nm-applet" to the startup file, but it doesn't start the nm-applet, so i can't use the network manager. rc.conf is exactly like yours except of the netfs daemon...maybe i could delete this one.
      and slim won't start lxde at all, but one thing at a time.
      ArchLinux is exciting, of course, and the last days i read a lot about it, but a little bit help at the beginning isn't that bad :D

      Delete
  17. You mentioned a Debian port but did not give a reference. I prefer Debian over Arch. The Olimex single board uses the same ARM 926J processor. Previously, I could not find a Debian or Fedora port for it. Could you please give a link to the Debian port?

    ReplyDelete
    Replies
    1. http://www.slatedroid.com/topic/21211-7-wm8650-netbook-linux-port/page__st__220

      Delete
  18. Hello Doragasu,
    I cant manage to make the SD-card, my knowledge of Linux is too poor:(
    Is it possible you can place an image of it?
    Many thanks,
    Rich from Holland

    ReplyDelete
    Replies
    1. Sorry for the late reply. You can try following the instructions from the second part of the tutorial: http://kernelhacks.blogspot.com.es/2012/06/arch-linux-on-wm8650-netbook-ii.html

      It includes a prebuilt image of the filesystem and it's a lot easier to install. But be warned you still need to create the partitions in the SD card.

      Delete
  19. I have a very similar looking Crystalview 1GHZ netbook. I can't seem to get it to boot off the SD Card. Might I have to modify the boot script to get it to work on the slightly different hardware? I get a little picture of tux in the upper left corner then the android boot animation logo and then it boots into android like always.

    ReplyDelete
    Replies
    1. Sorry for the late reply. Unfortunately I don't have a netbook like yours to play with, so I don't think I can help you too much. I suppose that netbook is not WM8650 SoC based. If I'm right, to get it working you will need a different kernel, suited to the SoC in your netbook.

      Delete
    2. Thank you. You were right, it seems I have a InfoTMIC X200 inside mine.

      Delete
  20. I need the wmt_scriptcmd for this netbook ;

    http://www.sylvaniacomputers.com/product.php?id_product=45

    ethernet not detected and the memory its not 512 mb

    Some help please!

    Thanks!

    ReplyDelete
  21. netbook. http://www.sylvaniacomputers.com/product.php?id_product=45

    no ethernet
    not shows 512 mb ram

    Help please

    Thanks!

    ReplyDelete
    Replies
    1. Unfortunately I have not a laptop like yours to test. Some weeks ago, I patched the kernel to improve Ethernet compatibility. Download patched kernel and modules:

      - Kernel: http://www.mediafire.com/?67h0mdfu0r409v0
      - Modules: http://www.mediafire.com/?1qk1era4t89va11

      And repeat steps 2 and 3 of the tutorial, but with these files instead of the original ones. I hope this solves Ethernet problem.

      I'm not sure how we can get the complete amount of RAM working. Maybe we only need to pass the right value to the memtotal variable in the boot script. Have you installed other Linux/Android distros to your netbook? If you did, maybe other bootscripts could have overwritten the right value. In any case, you can try getting the values stored in the Flash. Repeat the steps depicted in this post (http://www.slatedroid.com/topic/34131-help-to-get-default-environment-for-wm8650-netbooks/) and post the results.

      Delete
    2. Now ethernet works . But the memory problem , I think that you could make a version of the wmt_scriptcmd but with the mem=512M for testing. Maybe that work. I dont have yet install android on this netbook and the factory WinCE its not working after use Arch.

      I am reading the link with the steps but looks for profecional , maybe chaging the wmt.. first and them try the other... ??

      Let me know !


      Thanks!

      Delete
    3. Modified wmt_scriptcmd with mem=470M (I don't think setting it to 512M is a good idea, since some memory space must be reserved for graphics DSP, etc.):

      http://www.mediafire.com/?t12wy8y2fhuqzy4

      Unzip it and overwrite the default one in the SD card. Please let us know if it works. 512 MB would be a nice upgrade for these netbooks.

      Delete
  22. I was happy , and begin the problems ... I use a micro SD inside a transfer SD card and a USB cheap MMC card reader . I format the first time fat and ext3 , no problem . But now that I want to test the new file that you make , its getting an error on the ext3 partition . I/O error and dont copy nothing to it. I try to reformat but still the same. Any help for this or maybe use a USB device for test the Arch again...

    Thanks!

    ReplyDelete
    Replies
    1. The wmt_scriptcmd file I uploaded must be copied to the FAT partition. Failing to copy files to the EXT3 partition could be because of a lot of reasons. I/O error sounds to me like a filesystem or hardware problem. Maybe there's a problem with the SD/MMC card reader, maybe the filesystem and/or the partition table got corrupted. Or maybe the SD card is one of that fake/counterfeit chinese SD cards that rise all kind of problems (did you buy the card at eBay?).

      You can try clearing the partition table and creating again the partitions from scratch. If that doesn't solve the problems, my guess is that either the SD or the SD/MMC card reader is damaged.

      Delete
  23. Finaly I test the wmt_scriptcmd but freeze or get standby on firts stage of "Starting Arch Linux..."

    Maybe its the amount of Ram Because I use a Uberoid V11 with patch and the memory size that they put is 468 .

    Let me know !

    Thanks!

    ReplyDelete
  24. I want to know how I boot this arch linux with a SD card but the root in USB drive . I try changing the wmt_scriptcmd but not detect the USB drive and give kernel panic.

    How could resolve this?

    Thanks!

    ReplyDelete
    Replies
    1. Maybe you can do that by replacing "root=/dev/mmcblk0p2" with "root=/dev/sdX", with X = the node in which USB device gets mounted. But I'm not sure you can achieve this without rebuilding the kernel, because usb_storage is built as a module, and I suppose you need to build it inside the kernel. Also I would recommend you increasing the rootdelay (i.e. "rootdelay=10").

      Delete
    2. Also, did you solve the RAM problem?

      Delete
  25. The RAM its not solve yet I find a patch for Uberoid that works . But linux is more complicate I dont really know where I have to change memory amount . Because all the wmt_scriptcmd files from Uberoid or linux or even WINCE7 , all have 214 or similar amount in mem boot area so the thing should be change in other file or kernel or... thats where I dont know. For example the patch ( http://www.sendspace.com/file/sqcpcz ) for uberoid have this file , env_boot that have this:

    setenv memtotal 468M
    setenv mmcid 0
    setenv lpj AUTO
    setenv ipaddr 192.168.0.2
    setenv serverip 192.168.0.1
    setenv gatewayip 192.168.0.1
    setenv netmask 255.255.255.0
    setenv kernelargs \
    setenv bootargs mem=${memtotal} root=${filesystem-NAND_mtd} noinitrd rootfstype=yaffs2 \
    rw console=ttyS0,115200n8 lpj=${lpj} ${android_bootargs} ${platform_bootargs} \
    quiet

    setenv bootcmd \
    nandrw r ${kernel-NAND_ofs} 0x1000000 ${kernel-NAND_len}\; \
    if iminfo 0x1000000\; then \
    run kernelargs\; \
    bootm 0x1000000\; \
    fi\; \
    echo No kernel found

    setenv logocmd \
    nandrw r ${wmt.nfc.mtd.u-boot-logo} ${wmt.display.logoaddr} 10000\; \
    nandrw r ${wmt.nfc.mtd.u-boot-logo2} ${wmt.display.logoaddr2} 40000\; \
    nandrw r ${wmt.nfc.mtd.kernel-logo} ${wmt.kernel.animation.addr} 80000\; \
    display init force\; \
    decompanima -f ${wmt.display.logoaddr2} 0x3000000; \
    decompanima -f ${wmt.display.logoaddr} 0x3000000

    setenv wmt.display.logoaddr 500000
    setenv wmt.display.logoaddr2 550000
    setenv wmt.kernel.animation.addr f600000
    setenv wmt.audio.i2s vt1603:f1:f2:ff:ff:100
    setenv wmt.io.pwbn 100:0:2000
    setenv wmt.eth.param 1
    setenv wmt.gpi.bat [0:0:00020000:d8110040:d8110080:d8110000:d8110480:d81104C0][1:0:00000020:d8110040:d8110080:d8110000:d8110480:d81104C0][2:1:00010000:d8110040:d8110080:d8110000: d8110480:d81104C0]
    setenv wmt.gpo.camera1 1:0:7:D8110040:D8110080:D81100C0
    setenv wmt.gpo.wifi 6:1:6:d8110040:d8110080:d81100C0
    setenv wmt.gpt.gsensor 3:8:d8110040:d8110080:d8110000:d8110480:d81104c0:83000000:d8110300:8:d8110320:6
    setenv wmt.io.bat 3:2:1000:db1:b8b:db1:d7a:d43:d0c:cd5:c9e:c67:c30:bf9:bc2:b8b
    setenv wmt.io.gsensor 1:3:4:0:1:1:-1:2:-1
    setenv wmt.sys.keypad commonboard:1:rc_1:4:c0_73:c1_72:r0_9e:r1_8b
    setenv wmt.pwbn.param 100:0:500
    setenv wmt.ui.storage 7
    setenv wmt.io.touch 1:vt1609:2:800:480
    setenv wmt.bus.i2c i2c0:1:1:i2c1:1:1
    setenv bootdelay 1
    setenv wmt_ui_hibernation 1
    setenv wmt_sys_powerhold 0
    setenv wmt.gpo.vibrator 1:1:2:D8110040:D8110080:D81100C0:1
    setenv wmt.camera.param 0:0:0
    setenv android_bootargs init=/init
    setenv platform_bootargs wmtvo=2:1:24:800:480:60
    setenv wmt.display.param 2:0:16:0:0:0
    setenv wmt.display.tmr 33000:0:40:105:800:105:5:23:480:22
    setenv wmt.display.pwm 0:25:50:99
    setenv panelres.x 800
    setenv panelres.y 480
    setenv wmt.audio.spi 1:0:0
    setenv wmt.vt160x.bat 0:1:10:0
    setenv wmt.model.no 7inch_std_vt1609_touch
    setenv wmt.io.ts.2dcal 3 -17438 67608023 11859 10 -5362731 80387
    ____________________________________________________________________________

    Thats where the memory amount "I think" make the change but where is that on linux...

    I still looking to solve Ram and external USB drive boot ...

    ReplyDelete
  26. Testing and Testing.... I dont find the right amount for memory on the wmt_scriptcmd only 212 or 244 works . WinCE7 show memory size of 368 mb . But forget that, now I really want to boot this Arch version from a USB drive but I cant . I think its the kernel (uzlmg.bin) that not have that option. Could you make a new version of the kernel with that?


    Thanks!

    ReplyDelete
    Replies
    1. I'm sorry but I'm not building customized kernels anymore. It takes time I don't have right now. You can try building it yourself. Once you set up a cross compiler, it should be easy to do following the tutorial in this blog.

      Delete
  27. Great work!
    With Archlinux this netbook is what I was looking for!
    A smart device, just for programming on the go :D
    I looked at aliexpress for the netbook and found this one

    http://www.aliexpress.com/item/Cheaper-7-inch-Notebook-Adroid-2-2-X6-7V-WM8650-WIFI-Notebook-Free-shipping/618821593.html

    and this one, that has a bigger screen but a slower processor, the description says 600Mhz. What do you think, will it run slower than the one with the 7inch screen?

    http://www.aliexpress.com/item/10-1-inch-Android2-2-WM8650-Netbook-with-DDR3-256MB-4GB-Nand-Flash-WIFI-Camera-Keyboard/599286747.html

    ReplyDelete
  28. I suppose both netbooks should work as long as they are WM8650 based, but maybe you will have to do some tweaks to the 10.1 inch one to get the right video mode and the front camera working. It's difficult to know without having one to test.

    About the 600 MHz CPU clock, I don't know if it will make a big difference. Maybe the 600 MHz CPU speed is a typo. These WM8650 based netbooks and tablets usually have a small board with the CPU + Memory soldered to a bigger PCB with the peripherals. It would be a bit strange if this netbook wouldn't use this "standard" CPU board with the "standard" CPU speed.

    ReplyDelete
  29. I guess I buy the 7inch one, because of the higher battery life (4h).
    About the CPU clock, i don't think that it's a typo, because many more sellers are offering it and everyone of them has the same specifications, 600Mhz.

    ReplyDelete
  30. hi, I asked in your video some time ago which system run better, uberoid or arch, as I see it arch looks better (I bought my netbook some days ago) but gee, I don't understand all this fancy codes, I know ubuntu and the commands it uses, but arch is a whole different history, from my understanding I can't use pacman in ubuntu, so how do I execute the codes that use that? I don't know but of course I'm willing to get a bump in the right direction

    ReplyDelete
  31. If you want to install Arch in your netbook, you only have to use pacman on your netbook's console. You don't have yo use pacman on your Ubuntu based PC.

    On your PC you have to do the steps to prepare the SD card: partitioning, formatting and copying the filesystem. All the remaining steps are done in the Arch install on your netbook.

    ReplyDelete
    Replies
    1. that's what I call a bump in the right direction, thanks, if I need to put the codes in the netbook then there's no problem at all

      Delete
  32. Hi,I tried to boot on my WM8650 as above, so at login I entered root and the answer was missing libpam.so.0. Any idea what happened? Thanks in advance.

    ReplyDelete
  33. Typo:

    tar -xjf ArchLinuxARM-armv5te-latest.tar.gz -C /run/media/doragasu/ARCH_SYS/

    should be

    tar -xzf ArchLinuxARM-armv5te-latest.tar.gz -C /run/media/doragasu/ARCH_SYS/

    ReplyDelete
  34. 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
  35. Can you please apply the required patches to the tar you are letting everyone download on the page http://kernelhacks.blogspot.in/2012/06/arch-linux-on-wm8650-netbook-ii.html
    so that the changes in the Arch Linux boot process after 20th nov 2012 wont stop user from updating dependencies and packages. Or just write a tutorial for the same

    ReplyDelete
    Replies
    1. I'm sorry but I have not the time to work on these netbooks anymore :(

      Delete
  36. Hey!! Thank you!

    I have the same but black computer than you! but i can pass from first boot, the message is: unit ssh services entered failed! hope you can help me! my mail is luisascoobydoo (at) gmail .ccom thank you!

    ReplyDelete
  37. Hello I have a netbook android 1.5 ghz 512mb ram 10 inch wanted to know if the install linux on it. grateful

    ReplyDelete
    Replies
    1. I'm sorry, but I'm not tinkering with these netbooks anymore. I don't even have a working one right now...

      Delete
  38. Hello world!:)I have a small question)Can i do tis process on my tablet( samsung galaxy tab 10.1 or p7500)?

    ReplyDelete
  39. Oh, and sorry for my english:)I'm from Bearland:)))

    ReplyDelete
    Replies
    1. i am using ubuntu to do this. but i enter the first command tar -xjf alarm-wm8650-boot.tar.bz2 -C /media/ubuntu/boot. but it gives me this error. ar (child): alarm-wm8650-boot.tar.bz2: Cannot open: No such file or directory
      tar (child): Error is not recoverable: exiting now
      tar: Child returned status 2
      tar: Error is not recoverable: exiting now.

      Delete
    2. Please read carefully the instructions. Below the command for the first step you can read:

      "Make sure to replace "/run/media/doragasu/BOOT/" with the directory where the BOOT partition of the SD card is mounted."

      Delete
  40. doragasu: Thanks for your guide, and I have ARCH on my netbook. Now, I want it installed on my nand. Can you help me out?

    ReplyDelete
    Replies
    1. PS. I delved into the comments and found a post by Wicnx (pardon me if I make a mistake but I think this was the name), and I found that I have to make wmt_scriptcmd file. When I opened it in vi, it contains strange characters, meaning it's a compiled file. How can I build one such file on my PC?

      Delete
  41. I have manually flashed my device from thwindows ce 7 that came on it to the modroid 2.2 and that worked fine but i noticed linux is a much more powerful os than android aqnd to be quite frank android sucks without aq touchscreen so i followed steps all the way up to first boot and it gives me "kernel panic - not syncing:no init found. Try passing init= option to kernel. then it freezes

    ReplyDelete
    Replies
    1. Same problem here. If you know how to make it work, please post it here!

      Delete
  42. Hello, I tried it, but I have message Kernel Panic - not syncing: No init found. Try passing init = option to kernel.
    ...
    (kernel_thread_exit+0x0/0x8)
    Please help! What can I check?

    ReplyDelete
  43. Do you have any info on how to enter ANDROID RECOVERY MODE on these netbooks? I have one that no matter what, won't boot. It boots to a black screen to be exact. Many tutorials said to enter android Recovery Mode upon boot by pressing certain Volume-up key + power button but these netbooks do not have volume buttons!.. I also read about Fn+F2+Home. Doesn't work for me.

    TIA for any tips..

    ReplyDelete
  44. Would this same kernel also work for a Wondermedia 8880 netbook? are these chipsets backwards compatible?. I have one WM888 netbook w 1GB RAM and 8GB flash storage, which came with Android Kitkat. -TIA

    ReplyDelete
  45. Looks like this guy did some truley amazing stuff, then bailed

    ReplyDelete
  46. This comment has been removed by the author.

    ReplyDelete
  47. Emm, I know that this post is kinda old, but, whatever, I'll make the try. I followed all the steps. but I'm stuck at the step 5. It won't boot. It says this in the screen:

    ...(blablabla)...
    kjournald starting. Commit interval 5 seconds
    EXT3 FS on mmcblk0p2, internal journald
    EXT3-fs: mounted filesystem with writeback data mode.
    VFS: Mounted root (ext3 filesystem) on device 179:2.
    devtmpfs: mounted
    Freeing init memory: 112K
    Kernel panic - not syncing: No init found. Try passing init= option to kernel.
    [< c002b6e4>] (unwind_backtrace+0x0/0xe0) from [< c02c3918>] (panic+0x44/0x10c)
    [< c02c3918>] (panic+0x44/0x10c) from [< c00243bc>] (init_post+0xa0/0x104)
    [< c00243bc>] (init_post+0xa0/0x104) from [< c00089e0>] (kernel_init+0xdc/0x10c)
    [< c00089e0>] (kernel_init+0xdc/0x10c) from [< c0025e68>] (kernel_thread_exit+0x0/0x8)

    That's it. I tryed making a blank /initrd folder, and only once time, it changed, and it said something like kernel too old (I was using the latest version that you published(20120624)so idk). And after that, the system freezes, but it dosent seems like, 'cause the charging battery led (i took out the battery out) is like it was dimmering a bit for a little peryod of time, ant then back, periodicaly. So, @doragasu, or anyone that had this problem, can help me? I want to do something with this crappy netbook, like, for consuming the time, and dont let it on a shelve collecting dust.
    that's it
    Regards

    ReplyDelete