Have started tidying up a Linux kernel for Eken M001 & similar devices (tablets and netbooks), based on the source release that came from VIA last week.

Very, very, early days yet. http://github.com/projectgus/kernel_wm8505.

Not all of the WM8505 functionality is available in source form yet, in particular VIA have chosen not to give us the video source for some reason. So there’s still quite a lot of work before this will be suitable for an Android 2.1/2.2 port. But it’s a very solid start.

EDIT: Source for all drivers is now available except for the SD/MMC driver. I suggest joining the Google Group if you’re interested in this stuff.

29 thoughts on “WM8505 Linux kernel development (Eken M001 & others)

  1. If I were you, I’d start by joining the legal@gpl-violations.org list and posting there.

    The Apad seems like a similar situation to the WM8505, given that (unless I’m wrong) it seems Rockchip is holding source and not distributing it to tablet manufacturers. Basically, you either need to try to find an entity that is based in a country where GPL compliance is enforceable (ie not China), or you need to convince Rockchip that releasing source is a good idea.

    In case of WM8505, we got lucky because VIA are reasonably committed to OSS and have hired hired Harald Welte. You can read the full thread here: http://lists.gpl-violations.org/pipermail/legal/2010-July/002159.html

    In the case of Rockchip, you might as well try (you can point to VIA as a positive example, I guess.)

    Another avenue might be to lean on Archos, who apparently use the Rockchip chipset in their “Archos 7 Home Tablet”. They’re a French company so they are exposed legally, they’ve complied with GPL before, and they probably have a bit more leverage over Rockchip.

    Good luck! – Angus

  2. Hi Angus! Thanks for the efforts in getting the sources from VIA, that is going to be really helpful for the whole community.

    What about joining forces in creating a clean kernel for 850x devices? I am currently doing some work from scratch in http://gitorious.org/linux-on-via-vt8500/vt8500-kernel, we could use the newly released sources to accelerate development (although VIA’s code is quite ugly, imho).

  3. Thanks Alexey. I saw your efforts a while back, looked impressive.

    I’m starting to agree that rebuilding from scratch, using VIA’s source as a reference, may be the way to go. Certainly lots of the WMT modifications are not done in a way that fits in with the rest of the kernel, and there’s definitely some pretty ugly code in there.

    I may well join you folks instead and help build from scratch.

    What device are you developing on at the moment?

    – Angus

  4. Angus, I’ve got a vt8500-based netbook, and use that for testing. The major difference is in the number of IRQs and DMA channels and register maps, but that can be abstracted away. Also, I am not sure whether the undocumented parts differ in any way, so that needs to be checked.

  5. Alexey, funny you say that – I just bought one of those netbooks which was advertised as WM8505. It has arrived, and it seems like it’s a VT8500. However, not even the released (old) VT8500 kernel wants to boot on it at this point, so I’m not sure. Need to hook in the serial console!

    I was happy to see that the VT8500 datasheet is a lot more complete than the WM8505 one. It actually looks like the WM8505 datasheet we have is just the VT8500 datasheet with the different parts removed, but nothing else added in place!

    I think what I may try to do with the existing source is slowly replace the ugliest bits (especially things like wmt_getsysparam and the non-standard integration with AC97/power management/gpio/etc) with better organised code, and chip away at it incrementally. I’ve come to the conclusion that this is probably less work than building it up from scratch. In particular, I’m not sure how long I’ll be dedicated to the project so keeping the kernel in “fully functional” form at all times, while making incremental cleanups, seems like a clever way to go from a future-proofing perspective.

    I see that you’re looking to get your fork merged upstream though, and maybe that’s a worthwhile goal as well. It certainly seems wasteful for us to be duplicating efforts. What are your thoughts on all this?

  6. The other nice thing about the VT8500 netbook is onboard ethernet. Any chance that the onboard u-boot might network load a kernel? That’d save a lot of SD card swapping!

  7. Angus, I believe that the best way to go is to try and merge some required code from VIA’s sources into the new kernel, fixing style issues and making sure it works. Much of the stuff they have is simply pulled from various places without thought, overall code organisation is suboptimal, so it should be more future-proof to start with a clean kernel than with their mess (and rebase/fix until merging upstream).

    As for the onboard ethernet, it seems to be hooked into u-boot, but I haven’t tried to tftpboot.

  8. Hey guys, I’ve got a WM8505 “mini laptop” and I’ve managed to get a kernel uploaded through TFTP and then got it to boot.
    Can’t remember exactly what the tricks to make it work were but on mine it certainly worked from u-boot.
    Also I’m not sure about the building from scratch or modifying the VIA code. I think it should be both.
    Start with a new code structure and all that but use VIA code wherever possible.
    It looks like wm8505 is here to stay for a while anyway so it should be something nice and if possible ready for the next WM, perhaps the WM8605 ?
    Wondermedia stuff looks good to me anyway, cheap , open source kernel, datasheets …
    Now if only VIA would release the whole source, any ideas if/when that will happen ?

  9. edo – u-boot source code is now available: http://lists.gpl-violations.org/pipermail/legal/2010-August/002208.html

    Alexey – I see your point. I haven’t had any time this week to do anything, but when I do then I’ll fork your git repository and look at what I can contribute. One thing that I’m quite keen on doing is reworking the “custom” ac97 & wm9715 support to use the standard drivers and interface.

    Marius – Great to hear. Maybe you got a WM8505 netbook instead of a VT8500 one. Although, as I said, mine has yet to work with either kernel!

  10. Hi all,

    Great work prising the code from wmt. I have been working on a tentative port to 2.6.35 android kernel, it is almost complete, but some of the “hacks” by wondermedia are appalling so there are some semantics that need sorting out before it works properly.

    Current state is that it almost boots but I have some work to do on the sd drivers.

    Is there a forum where I can contribute this?

    Cheers

  11. ginge – Great news. :). Agree the hacks are pretty nasty, as criticised by Alexey above.

    I actually worked through most of a merge to 2.6.35 a few weeks ago, before the video source came out. Got stuck because the interface had changed for the binary video components. I’m guessing you might be stuck on the same thing for the SD driver?

    I’ve been posting some of my progress on slatedroid.com, but I’m thinking that now we have at least 4 people interested then it might be worth starting a Google Group or something, just devoted to WM8505 kernel development.

    My efforts lately have been trying to understanding the various different framebuffer interfaces, with a view to getting page flipping working properly for Android. Will post up anything that I work out.

    – Angus

  12. awesome. I will drop a diff and readme over.

    Just out of interest, where can I find good information about your serial hack?

    Also I believe there is a guide that allows a partial reflash instead of flashing the bootloader section?

  13. Barry – the serial port pinout is on my “teardown” post on this blog. The comment discussion has some info about where to find a LVTTL (3.3v) serial cable. Let me know if that’s not enough to get you started (if you can, pls ask on the mailing list – this comment thread is getting crazy long!)

    Partial reflashing is a matter of rewriting the scriptcmd on the SD card so it doesn’t reflash those sections. You should be able to do this using the instructions in the README on my github.

    Lately I’ve been working with two custom scriptcmds of my own that don’t flash anything. One boots directly from a kernel on the SD card but using the Android rootfs that’s already on the flash. Another boots Android entirely from the SD card. Plus you can already boot Debian entirely from the SD card.

    I’ll post the details of those to the Google Group as soon as I can.

  14. Hello
    Can you please compile a kernel with Android 1.6 overclocked for the M001?

    See here HTC DREAM has the same system that EKEN.

    Thank you

  15. Hi! I’m struggling with eken’s audio driver. The sound played by android’s music player is normal. But when I kill mediaserver, and play wav to /dev/snd/dsp, the sound is wild and it’s frequency is seem to be changed. Does it need some init or config to make the audio device normal and can be play wav through /dev/snd/dsp at command line?

  16. Hi I just downloaded your WM8505 debian and runs it in my netbook. It runs fine at the first boot, login under root, and restarted with init 6. However, the second (and the x’rd) times I booted up, it just shows those booting progress bar with no sign of ever ending. Do you know what’s happened here? Or perhaps there are some way to disable the progress bar so I can see the kernel messages? Thx in advance

  17. Hi kha,

    I’m not sure why you posted on this blog post of all places, and I’m not entirely sure how to help you.

    I’m not sure what you mean by “my” debian build. The tablet Debian build for tablets (from a different blog post) is out of date, there are newer builds available on the slatedroid.com forums.

    If you’re looking at abrasive’s build (which happens to be hosted on my web server now), then you’re probably better off asking/looking here: http://devio.us/~nextvolume/via_arm/viewforum.php?id=4

    Good luck.

    Regards,

    Angus

  18. Hello, thanks for great debian version for wm8505! :)
    Unfortunately I have a problem, my memory has smartbook wm8505 organized differently:

    mtd0: 00d00000 00010000 “filesystem-SF ”
    mtd1: 00280000 00010000 “kernel-SF ”
    mtd2: 00050000 00010000 “u-boot-SF”
    mtd3: 00010000 00010000 “u-boot env. cfg. 1-SF”
    mtd4: 00010000 00010000 “u-boot env. cfg. 2-SF”
    mtd5: 00010000 00010000 “w-load-SF”
    mtd6: 00600000 00080000 “kernel-NAND ”
    mtd7: 00600000 00080000 “NAND-logo”
    mtd8: 01400000 00080000 “recovery-data”
    mtd9: 0c800000 00080000 “filesystem-NAND ”
    mtd10: 26a00000 00080000 “filesystem-data”
    mtd11: 06400000 00080000 “filesystem-cache”
    mtd12: 44a00000 00080000 “user-data-NAND”

    Mtd9 is 200Mb, 1Gb mtd12. In practice, the bootloader does not work, so for now I’m using one of Android running on my model.
    E ‘cmd.install can edit the script to make it work on this particular model?

    Thanks and sorry for my bad English.

  19. Hey, hate to dig up one of your old blogs, but I figured itd be the best place to ask you a question. Do you know if the pll value in the Eken Kernel source has to be a hex value? I’m workin on a kernel and id like to rework how cpu freq is calculate but I dont know he specifics on it. You got any documentation? Please and thanks =]

    Eco

  20. Hi ECOTOX,

    Glad to see the WM8505 tablets are not totally forgotten. Mine are sadly gathering dust.

    The only documentation is what’s in the datasheet and in the source files. Are you using the kernel source from github?

    Re: ‘has to be a hex value’, I’m not quite sure what you mean. The value doesn’t have to be written in hex but it does need to be in the valid range. The possible PLL register values and the clock divisors are documented a bit in the WM8505 datasheet. If you Google for “DS_WM8505_071.pdf” then you can find that.

    If that doesn’t answer your question then you could try joining the google group and emailing there, or drop me a private email (my address is on the sidebar at the top of the page.)

    Cheers,

    Angus

Leave a Reply

Your email address will not be published. Required fields are marked *