Showing posts with label kernel. Show all posts
Showing posts with label kernel. Show all posts

Sunday, October 6, 2013

Growing GPL/FOSS Loyalty Among Chinese ARM SoC Vendors

There are visible changes in how Chinese ARM SoC vendors deal with Open Source license compliance (words) and Open Source software at all (spirit) during this year. Not only western resellers of devices based on Chinese SoCs release GPL compliance packages, but many popular SoC companies themselves established GPL compliance/loyalty/support pages. Few go beyond just adhering to word of GPL by releasing kernel source blobs (by blobs I means large tarballs devoid of any development history and support files), but also establish git repositories, release Android trees, set up public bugtrackers.

Of course, they are still not exactly GPL compliant - scrutiny of any releases would likely show missing parts, binary objects for drivers, etc. But there's definitely a difference between plucking out WiFi driver out of flash image you have on you device and downloading "official binary" from a SoC vendors. It's also a good start, and there's a hope the situation with complete source availability will improve. And as everyone watching the area knows, the industry at the whole needs to improve - Western companies may comply with GPL by providing source for kernel shims, but that doesn't help users to support vendors' hardware if they just move binary blobs to userspace.

The changes discussed didn't come by themselves and at once. Lot of people paved the road to this via gpl-violations.org, via various leaks, etc. But critical change came with emergence of Open Hardware startups. They are led by people who strongly believe in Open paradigm, but also to do their ODM-like business, they need to provide sufficient documentation/sources to the customers. So they have little choice but request that from upstream SoC vendors, in redistributable form. So, thanks Rhombus-Tech, Olimex, Cubitech!

Anyway, here're the links to Chinese companies' GPL loyalty pages I know so far. Additions and corrections are welcome.
And as extra, community projects to support some of vendor SoCs from above list:

Tuesday, January 17, 2012

New Hack Toy - Zenithink ZT-180

Recently I got new hack toy: cheap (well, depends) Chinese Zenithink ZT-180 tablet. This one seem to be (have been) pretty popular and hacker-friendly. Here's data about it:

It seems that I've got vendor model ZT180_G2 (maybe, ZT180_G0).

Button combinations to hold during power on:
  • Home+Power - Upgrade firmware from /sdcard/zt-update/
  • Left arrow (of swing double-button)+Power - Boot with debug kernel from /sdcard/zt-debug/ . Debug kernel is booted and continues with the normal boot process.
  • Right arrow (of swing double-button)+Power - Multiboot support, select one of 3 modes:
    • Android adb - kernel with ADB over USB support
    • Android mass storage - kernel with mass storage USB gadget support (tablet is presented as a mass storage when connected to host)
    • Other OS - WinCE

Random links:
  • http://www.slatedroid.com/topic/10233-zenithink-zt-180-cpu-actually-infotmic-imap210-cpu/
  • http://www.androidtablets.net/forum/infotmic-based/2354-infotmic-chips.html

Wednesday, January 4, 2012

Linux kernel Bluetooth ACL connection auto-disconnect

I finally found time to figure out why "hcitool cc" created connections die very soon (see previous posts). It turned out to be handled on the Linux kernel level. What's worse is that it's hardcoded at 2s - no provision for adjustment via sysfs for example. http://lxr.free-electrons.com/source/include/net/bluetooth/hci.h?v=3.0#L120 :

118 /* HCI timeouts */
119 #define HCI_CONNECT_TIMEOUT     (40000) /* 40 seconds */
120 #define HCI_DISCONN_TIMEOUT     (2000)  /* 2 seconds */
121 #define HCI_PAIRING_TIMEOUT     (60000) /* 60 seconds */
122 #define HCI_IDLE_TIMEOUT        (6000)  /* 6 seconds */
123 #define HCI_INIT_TIMEOUT        (10000) /* 10 seconds */
124 #define HCI_CMD_TIMEOUT         (1000)  /* 1 seconds */

Actual disconnection happens in hci_conn_timeout(). Other issue is that such disconnect reported as "Remote User Terminated Connection", which is, well, not true, as I don't terminate it, the system does. There's another status code, "Remote Device Terminated Connection due to Low Resources" which IMHO more suitable (if there's no "low resources", why do you disconnect so quickly, dear Linux?).

I quickly made a patch to be able to adjust disconnect timeout via sysfs, to experiment with low level connection more comfortably. Unfortunately, it turns out that I can extend delay to max 10s, even if set value much higher. So, something appears to call disconnect routine, even though I don't see any other references or timer manipulation %).

Tuesday, November 8, 2011

Links for November 2011

Kindle:

Linux kernel module tricks:

Sunday, February 27, 2011

WM8505 (VT8500, WM85xx) hacking timeline

I've got my hands on cheap WM8505-based Android tablet, figuring out how open to hacking it is, as usual, the information is fragmented and outdated, so I'm going to try and compile timeline:

http://www.bento-linux.org/
    git repos:

    Friday, September 7, 2007

    Back from hiatus

    Having spent August on vacation and later working with my GSoC student, Maria Zabolotnaya, I now gradually come back to speed on embedded stuff, even though I likely won't have as much time to work on this as before.

    The first aim is to get OE build again, which is "of course" broken after being away for some time and then coming back ;-). Then, process all the backlog of HH.org kernel patches and cleanup tasks. Further aims will be to automate process as much as possible (for example, I finally want to setup local Continuous Integration for OE builds, like I did for HH.org kernel), and upgrade HH.org kernel to 2.6.22 (though to that time 2.6.23 likely will be out).

    Thursday, July 19, 2007

    Initrd and initramfs with OE: snippet 1

    One of the former weak areas of OpenEmbedded was creation of small, fine-tuned, (hand)optimized initrd and initramfs images. However, during few last months, the situation vastly improved, and by now OE offers all tools needed to create initrd/initramfs per your purposed and requirements. I would like to describe them, and as that would be quite a bit of contents, going to do it describing features one by one, in "snippets".

    The first is:

    Building initramfs with OE and everything you wanted to know about initramfs but didn't bother to figure out yourself.

    IMAGE_FSTYPES = "cpio.gz"

    Yes, that's all what you need to create an initramfs image, voila. After that, you can use resulting image instead of conventional initrd (in ext2 or some other format). For the kernel to be able to boot it, you need to have CONFIG_BLK_DEV_INITRD=y in its config (contrary to its name, this option actually means "support external initrd *or* initramfs images"). As initramfs support is unconditionally builtin into kernel, you don't need any filesystem enabled for initramfs support.

    (Note that above is written for standalone initramfs image which is used in initrd-like manner. Support for initramfs which are linked into the kernel image so far is not provided OE, but would be pretty easy to add. Still, it's of more interest to vendors which work on specific products than OpenSource distros. By the way, mentioned config option is not required for builtin initramfs.)

    Note that execution of initramfs starts with /init. If you want to rebuild initrd (or otherwise conventional rootfs image) as initramfs, you'll need to pass following parameter on kernel command line to have it started properly: "rdinit=/sbin/init".

    Final note is that contrary to popular belief, initramfs does not completely covers and supersedes initrd functionally. Initramfs has relatively big memory requirements, which precludes usage of big initramfs images on low-memory systems. Specifically, initramfs is compressed, and needs to be uncompressed during startup, which already limits its size to at most half of the available RAM. But actually, ramfs, which is used as backing store for initramfs content, is pretty inefficient for such type of content (static), and that imposes even more limits. Also, my experiments show that kernel has poor error handling while uncompressing initramfs, and out of memory condition makes it just hang. So, when you need to fill memory up with lots of content, nothing would replace an initrd with builtin compression like cramfs or squashfs. Granted, that's rather adhoc need.

    Sunday, July 8, 2007

    Driver for ACX100/PCMCIA

    Thanks to Fabrice Crohas, htcblueangel maintainer, who have been tackling at acx_cs driver since we were able to achieve first WiFi ping on h4000 and htcbluenagle with the help of devmem2, the PCMCIA support for ACX100 WiFi driver now works! It took quite some time to figure out what issue with PCMCIA was and make it work after first slavemem-connected device (hx4700) had first ping, but finally we're there - ACX is support on the great majority of devices which have it (though it is still has something in store, as couple of newest device have it connected via SDIO).

    Working WiFi also means that all hardware on h4000 is supported now, and it has A- support status per HH.org classificaion, with the only missing feature being a native flash bootloader for Linux. Of course, not everything works great yet, or even fully tested, like flash write at all (but it is known to work for h6300 which has the same DiskOnChip and uses the same driver). ACX itself for one needs lot of work to make it support suspend/resume properly and PM in general.

    But all those are just things to test/bugs to fix, and not white spots in hardware information/support. We're past age of "Linux will never be able to support that device completely" for another bunch of devices, and the future is bright! ;-)

    Monday, June 25, 2007

    Power management for GPIOs

    I just committed to HH.org kernel CVS Roman Moravcik's patch for improved power management for rx3000, and among other things, he took care to setup currently unused input GPIOs as outputs, which is known trick to cut unneeded current drain on them. That's something what all other ports should be reviewed for.

    Sunday, June 24, 2007

    Defconfigman support for S3C24xx ports

    Thanks to Michal Panczyk, support for S3C24xx CPU and ports (Eten G500, iPaqs rx1950 & rx3000) added to Defconfigman. Corresponding static_defconfig's already in HH.org kernel CVS, will go to OpenEmbedded soon. (They need more review/cleanup though.)

    Blog start and older news

    I always treated blogs (and generally diaries) skeptically, but well, all tools have their uses. So, I'm going to start blogging on my Embedded Linux (well, probably not only embedded) endeavors.

    And first of all, older news, which I kept in my Handhelds.org wiki page.

  • 2005-11-13: Subscribed to the h4100-port mailing list.
  • 2005-11-29: Confirmed by bisecting that PXA suspend/resume broke in 2.6.13 comparing to 2.6.12. Turned out ot was fixed in 2.6.15
  • 2005-11-29: Subscribed to the kernel-discuss mailing list.
  • 2006-02-03: Proposal for asic3_mmc cross-machine refactor.
  • 2006-02-05: Faced strange issue with ASIC3 suspend/resume, took few months to resolve ;-)
  • 2006-05-30: Posted patch for h4000 ASIC3 suspend/resume problem, turned out to be as "simple" as initializing MSCx PXA registers after resume, what Linux kernel doesn't do (leaving that to bootloader). Anyway, this was second big issue I solved, and after that I felt "force" ;-).
  • 2006-06-03: Started to work on final version asic3_mmc cross-machine refactor, based on the previous experiments.
  • 2006-06-19: Final version of asic3_mmc cross-machine refactor posted.
  • 2006-06-21: Granted write access to !HandHelds.org Kernel CVS repository.
  • 2006-08-20: Posted RFC for common button map for all HH.org PDA-type machines.
  • 2006-08-24: Granted write access to OpenEmbedded Monotone repository.
  • 2006-09-20: Unofficial Familiar 0.8.4 release for h4000.
  • 2006-10-03: Received donation of h3900 device to support elaboration of 2.6 kernel port for it and advance userspace/distrubutions support. Contributor: Mr. Alex Deucher. Thank you!
  • 2006-10-11: Posted patch for common button map for all HH.org PDA-type machines.
  • 2006-10-18: Received donation of hx4700 device to support elaboration of 2.6 kernel port for it and advance userspace/distrubutions support. Contributor: preferred to stay anonymous, but many thanks!
  • 2006-11-09: Upgraded HH.org kernel CVS to 2.6.18.
  • 2006-11-14: Finished implementation of asic3_keys driver and making sure it works well with gpio_keys.
  • 2006-11-21: With having common linux-handhelds-2.6_*.bb and consistent names for all iPaq machines, first phase of cleaning up HH.orh-maintained machines in OE.dev is complete.
  • 2006-12-02: Upgraded HH.org kernel CVS to 2.6.19.
  • 2006-12-19: Angstrom upgraded to 2.6.16-hh8 kernel with common buttonmap support.
  • 2006-12-22: h3900 reached full "C" status, with partial "B" status, in other words, basic PDA functionality works!
  • 2006-12-28: h3900 2.6 port added to OE.dev, requested support by Angstrom.
  • 2007-01-04: Initial release of [http://sourceforge.net/projects/defconfigman/ defconfigman]
  • 2007-01-10: Started to revamp OPIE support in OE.dev, starting with cleaning up qte patchset.
  • 2007-01-18: Received new contribution: h3600 and palmtt2 devices. Thanks! Now I have access to PXA250, PXA255, PXA270, StrongArm, OMAP devices.
  • 2007-01-20: asus620 port updated in CVS. Thanks to Vincent Benony, asus620 maintainer.
  • 2007-01-21: defconfigman kernel's sound tested to work with GPE. Both h3900 and h4000 in OE.dev now have defconfigs generated by defconfigman. h4000 updated to use modules for sound.
  • 2007-02-16: Upgraded HH.org kernel CVS to 2.6.20.
  • 2007-03-05: Continuous Integration system for kernel tree set up, http://handhelds.org/~pfalcon/busyb/buildlogs/
  • 2007-03-17: Proposal to use Defconfigman-generated configs for kernel CVS, to improve consistency and CI coverage.
  • 2007-04-11: GPIODEV API RFC posted to LKML/LAKML
  • 2007-04-26: All 30 ports in HH.org CVS are buildable now (for 2.6.20)!
  • 2007-05-01: SoC base drivers RFC posted to LKML.
  • 2007-05-07: Upgraded HH.org kernel CVS to 2.6.21.
  • 2007-05-11: ipkg speedup patches committed to OE.dev
  • 2007-05-15: Mystery of PCMCIA ACX is solved, first WiFi ping on h4000!
  •