Sunday, 20 February 2011

State of the Kernel (git, master branch)

Just a blog to basically summarize the work that has been done since the last PowerDeveloper release of the kernel and the "January" Maverick image which ships on current systems. We are prepping an update to be released next week with a real package repository and 3D drivers for all. Stay tuned. In the meantime, here's the kernel work log.

(to be 2.6.31.14.20 - master branch)

Core
  • Operates on ALL Efika MX models (TO2, TO3, Smartbook) with a single kernel
  • The holy grail: merging of the two platforms is complete! One kernel will boot both systems. Much less is done on initialization for both platforms and boot is faster. Several redundant portions of code have been removed.
  • Serial driver updates (console polling and KGDB support)
  • A brand new battery driver
    • All properties are exported - GNOME battery display now works as expected
    • Notification of loss of conditioning and battery initialization data (batteries that report this need to be gently nudged to re-learn charge rates etc. for reliable operation)
  • Input subsystem rewritten to use real input handlers and events rather than gpio-keys which turns out not to be ideal. This improves:
    • Power key on Efika and Smartbook now provokes GNOME into asking if you want to shut down
    • Suspend and Resume are more reliable
    • Power, Wireless Switch and Lid events are watchable using "input-events" tool, as are battery insertion, low alarm and AC adapter detection (battery driver is hooked into this support)
    • Caps lock light on Smartbook is now a configurable LED trigger (if you don't care about caps lock, try using it for "mmc0" or "mmc1" status)

Display
  • A new and greatly improved HDMI driver on Smarttop.
    • More CEA modes supported
    • Reinstated culling of incompatible modes
    • For better compatibility with TVs and real HDMI monitors, the resolution selection is as follows:
      • Look for a mode matching a low field rate 1080p mode (24Hz or 30Hz progressive)
      • If not found, look for a mode matching 720p (any field rate)
      • If not found, selects resolution close to the 1st detailed timing in the EDID (native panel resolution), but this mode may have been culled because it is out of range
      • If there is no suitable mode, force 1280x720@60
      • Override "teneighty" and "seventwenty" modes with those switches to the siihdmi driver.
    • HDMI vs. DVI detection is more reliable
    • Export of EDID property in sysfs (/sys/class/graphics/fbN/edid)
    • Hotplug support and D3 power down
    • Configures SPDIF audio on Smarttop. You may need to reconfigure PulseAudio to get audio out on your TV or AV receiver.
  • Display code has been cleaned up, Smarttop platform code no longer interacts with the framebuffer clocking or display mode selection. IPU is no longer set up before a real screen mode is available.
  • 32-bit framebuffer on Smarttop (override with bpp=)
  • Backlight support on Smartbook has been improved to use fewer steps for the backlight brightness and when the backlight is at 0%, the backlight is powered down to support PixelQi screens better and save a little battery life on screen blanking.
  • Backlight keys on Smartbook now work

Updates from Mainline/Other kernel trees
  • ecryptfs and unionfs and securityfs and security key retention (for encrypted home dirs)
  • VPU and IPU updates from Freescale BSP 11.01.00 (stability)
  • Re-enabling DVFS and DVFS-PER power management
  • Audio driver now turns clocks off when it's not playing audio and has dual FIFOs for input and output. Kernel scheduling has been updated to enable rtkit to properly configure realtime process support for pulseaudio solving most audio playback issues
  • Redundant platform-specific code removed from core Linux parts (input, etc.)
  • Smarttop ethernet should now be a bit more reliable with VLAN tagging and no longer perform unaligned accesses
  • Scheduler updates to stop PulseAudio from complaining about SCHED_RESET_ON_FORK
  • Wireless driver updates
  • ARM core updates
Many many thanks go to Steve Klimaszewski and Saleem Adbulrasool for their hard work on kernel components (especially HDMI and Battery). Anyone willing may compile the kernel from the master branch on the proviso that they may not get a working system, we will be precompiling an optimized and fully packaged kernel very soon, along with all the userspace driver updates required for best performance.

Thanks for your patience!

Thursday, 17 February 2011

One Kernel to Rule Them All

This is a broadcast message to ALL Efika MX Smarttop and Smartbook developers and users who like to tinker with the kernel.

We finally completed our work on merging the two platforms together. It is now possible to build ONE kernel which supports both systems - one prefix (-efikamx) and no fiddling building two kernels slowly and natively to get your work done.

All developers are encouraged to switch to the "master" branch of the repository and reset their config to match the mx51_efikamx_defconfig (you can do this quite quickly and easily by backing up your current configuration and then using "make mx51_efikamx_defconfig" in the root of your kernel tree).

Sunday, 5 December 2010

Maverick Installer, Linux kernel (2.6.31.14.12, December 2010)

The updated Maverick installer and "rescue image" is now online on PowerDeveloper. This includes a kernel update including a cleaned up HDMI driver, several bugfixes for Smartbook and Smarttop, and a cleaned up and updated Maverick root filesystem, along with a unified firmware updater for all systems.

Firmware Update

U-Boot 2.0.6 includes support for booting both systems under the same autoscripting system that other ARM boards (Marvell Dove, Beagleboard) utilize - on boot, the firmware will scan SD card and PATA for the first partition of format VFAT (MSDOS) or ext2/3 (Linux) and try and load a file called "boot.scr". This is all U-Boot does in the latest version. This is a departure from the system used on shipping TO2 and TO3 Efika MX Smarttop systems which would simply scan SD then PATA for "uImage" and blindly load it with built-in kernel boot arguments. The net benefit is that you gain support for

  • Setting boot arguments for the kernel in an editable file on disk (SD or PATA)
  • Using Initrd ramdisks (essential for current Ubuntu installations, enabling more modular kernel images)
  • Doing any pre-boot scripting you need to perform before the kernel loads
However, blindly updating U-Boot on a TO2 or TO3 Efika MX Smarttop will instantly produce a non-booting system unless boot.scr is placed on the system to continue the boot process. It is therefore shipped as part of the Maverick installer. We recommend everyone simply update to Maverick. We will entertain individual support and extra-special requirements as needed, where trashing your existing Smarttop or Smartbook is not an option, but we really do recommend starting from scratch as there are a lot of things to fix and change and if you miss one.. the result will not be pretty.

Kernel Update (2.6.31.14.12 - efikasb-10.08.00 branch)

  • Operates on ALL Efika MX models (TO2, TO3, Smartbook)

Includes updates to GPU kernel module, many fixes to platform support for TO2 boards, Smartbook improvements such as USB suspend issue being fixed, and also the "vertical offset" display bug fixed. The packages include a modular kernel without MMC, PATA or USB support compiled in - these are modules and it is expected by the behavior of Ubuntu that these are loaded from the initial ramdisk generated upon installation.

NOTE: If you install this kernel on an older Maverick system PLEASE add the modules "pata_fsl", "ehci_hcd", "mx_sdhci", "mmc_block" to the /etc/initramfs-tools/modules file in order for them to be forcibly added to the initial ramdisk on installation.


Maverick System Update

  • Operates on ALL Efika MX models (TO2, TO3, Smartbook)

The desktop image has been updated to GNOME rather than Xfce since it is more stable and user friendly. The installed system image is not substantially bigger on disk, and includes OpenOffice. All updates to the end of November have been applied so there should be very little in terms of packages that are out of date. All systems (Smarttop TO2, TO3 and Smartbook) will boot into the installer, copy in the image to the PATA disk, reboot and ask for Language, Timezone, Keyboard settings, Username, Password, Machine Name and suchlike. This will replace the old "oem" user with one of your choice.

You may need to add yourself to the "Audio" and "Video" groups to enable sound and webcam access. You can do this as you log in to the system for the first time through the Users and Groups control panel item.

NOTE: please do not select "Encrypt my Home folder" - something is not operating correctly in the setup of ecryptfs, and the result is that it will give you a basically broken system. We realise the importance of a secure environment especially for workplaces where access to VPNs or corporate networks is only authorized with encryption enabled, and we are working on a solution.


Okay, I got the maverick-installer.img.xz file, how do I install it to my system?

Simply extract the archive (WinZip, 7-Zip, or command line at your option) and use your favorite utility here to copy it to a 2GB SD card. The utilities recommended are "dd" (or dcfldd), "flashnul" on Windows, or on an existing Ubuntu installation the Ubuntu USB Image Writer (you can find a list of imaging utilities here).

As an example with "dd", you can do the following:

xz -dc maverick-installer.img.xz | dd of=/dev/mmcblk0

Once you have this image on an SD card simply power off your system and insert the SD card. Power it back on and the system will install automatically and when complete, shut down automatically. You may then remove the SD card and boot into the installed system. It really is that simple.

If you have problems seeing the Progress of the installation (HDMI or DVI monitor not working correctly), we would much appreciate the details of your monitor. We have tested on several (upwards of 10) HDMI and DVI monitors and HDTV units with successful results, however there are reports of other monitors not working ideally. This is under investigation. If you had any problems with your monitor in the past, you may want to check on IRC or on the forums before installing a Smarttop and potentially getting no display..

Thursday, 18 November 2010

On Linaro

Genesi is planning to work very closely with Linaro, Freescale and mainline in the future.

However, right now, the Linaro MX51 kernel does NOT support the Efika MX Smartbook (netbook). The support of the Efika MX Smarttop (thin client) is still very raw and you won't get much other than an SD card, UART and a couple other niceties.

Please do not use the Linaro kernel on Genesi hardware until you hear about the support on this blog, or you'll most likely end up with a broken system.

Wednesday, 20 October 2010

Maverick status, Launchpad Project

We've created a Launchpad project to contain all the Maverick (and other distributions too) problems pertaining to our platforms. Feel free to submit bugs!

https://launchpad.net/efikamx

Maverick support is progressing. After the release and a solid week of work most of the bugs have been either solved by the Ubuntu developers or fixed where it applies to Genesi code.

Kernel packages for Efika MX Smarttop and Efika MX Smartbook are being tested as we speak (including support in flash-kernel, and a fancy U-Boot update) and a Maverick GNOME desktop build is underway. New systems will ship with these improvements before the end of the month, along with hopefully support for codec acceleration (openmax), 3D acceleration (opengles2), 2D acceleration (xorg-video-imx), and we are working on direct (not XRender) Cairo backends for OpenVG/OpenGLES2 in order to further offload the CPU and updates to several packages to improve performance (xorg-server, pixman, eglibc). Along with the GNOME desktop update (replacing Xfce as the default) we have also completed testing of the OEM configuration scripts which means every system will boot and ask for username, password, machine name, locale and timezone settings and not be fixed to the "oem" account anymore.

We're trying for a PPA but proprietary code in a from-source repository, or putting big binary blobs around, is a little intrusive, so we may simply host our own package repository.

Current issues which are showstopping the release;

  • SPI NOR driver locks up terribly meaning updating U-Boot on Efika MX Smarttop boards is needlessly complicated and involves DIP switches and unscrewing the maintenance/debug panel. We hope to solve this with a convenient, tiny SD card image including the update and flashing using MTD, once the bug has been fixed.
  • Some display bugs have been fixed for most people, but some are still experiencing strange behavior which we would like to fix. There is a point where this will drop to a low priority since we can't hold out forever on the kernel update.
    • Standard VESA modes on some panels are hopelessly garbled and show trash data
    • Some monitors do not report EDID when they are on another "channel" (for instance VIZIO televisions). In this case the Efika basically does not find an HDMI sink and fails set up a valid mode and instead tries to use the non-existant VGA port. VGA support is going to be taken out to fix this and the mode will default to 720p as normal.
  • NetworkManager applet disappears in GNOME sometimes making wireless hard to use
  • Wireless driver has grown some kind of error, but the kernel backtrace causes a division by zero making debugging difficult and spamming dmesg (this seems to be a race condition somewhere as restoring the debug dmesg spam fixes it, however it does clutter systems and make tty1 annoying to use).
Apart from those niggles which need just a few tweaks to be tested, everything is going smoothly and we hope to ship at least the distribution files and kernel support by the end of the week.

Any suggestions or comments are welcome, please direct them to the PowerDeveloper forums or to the Launchpad Project.

Sunday, 26 September 2010

Maverick, Smarttop/Smartbook kernels

All Efika MX Smarttop and MX Smartbooks are now shipping with a pre-release Ubuntu Maverick with Xfce. Source filesystems are available on PowerDeveloper.

Also shipping today: the Smartbook kernel (-efikasb, also a pre-release) and an update to the Smarttop kernel (-efikamx) built from the same point in the git tree. This is in another branch - efikasb-10.07.11.

These kernels match the Maverick support. In this sense installing them on top of Karmic systems is a bad idea. It will produce an unbootable system unless you find a way to not have udev and upstart mount their own /dev and subordinate filesystems. We will make an update in a little while that fixes this for older Linux distributions.

Known issues so far:

  • on Smarttop some DVI monitors again don't work. We are still investigating solutions which work on ALL systems
  • on Smartbook there is a ~5 pixel blank at the end of the panel and the entire display is shifted up slightly
  • Default kernel ships with devtmpfs enabled which means any systems before Ubuntu Lucid (i.e. all previously shipping with Karmic) are recommended NOT to update. We are investigating a solution to make Karmic work with it, and a kernel update for the meantime
  • Smartbook battery driver occasionally doesn't report "current_avg" properly
  • Smartbook lid close event automatically suspends the system, but when it comes back all USB devices are dead. Possibly needs a udev script to handle this.
  • No flash-kernel package support for EfikaMX in Maverick yet so no initramfs created automatically.
  • 2010-09-28 TO2 boards still have SD card detection problems (steev from Gentoo is looking into this last time I checked).
So, if you're not going to be running Maverick, the kernel you have (2.6.31-008 or 2.6.31.14 previous release) will work fine for you. Don't update with the standard kernel, get the "nodevtmpfs" version if you're using Karmic.

Major and minor fixes depending on how you look at it:

  • Several bugs with with the internal variable "pixclk_limit" have been fixed whereby a user with a 1280x720@60 mode set would find that it would corrupt the display after a few blanks or a few hours of runtime. This manifested itself either as garbage on the display for the bottom 3rd of the monitor, or a lockup, or both.
  • The kernel now supports a real 32-bit display mode but needs a recompile to activate it. The Smartbook only has a 16-bit display controller so it is probably better to run in 16-bit and let the OS dither and manage the display, as 32-bit direct mode will cause significant banding.
  • block IO scheduler now defaults to "noop" since having CFQ was soaking CPU cycles without giving any benefit (scheduling block IO to take advantage of "closer" blocks is meaningless on an SSD).
  • ramzswap is back in lieu of being able to include zram.
  • oprofile is enabled in the default configuration. You need to manually load the module before you run oprofile.
  • faster kernel memcpy and kernel preemption enabled
  • Several ARM kernel fixes due for 2.6.35 and 2.6.36 backported
  • RT2870 driver is less chatty (no dmesg lines full of empty #)
  • CRC32 performance optimization meant for 2.6.35 backported
The Maverick filesystems are current as of the freeze implemented before the Maverick beta 2. You can find them at Linux Support. The Kernels are available at Kernel Support.

UPDATE 2010-09-27: to boot the Smartbook from SD card you need to make a "boot.scr" by making a small text file (the simplest can be "run bootcmd_sdhc") and running a command line as so:

mkimage -A arm -O linux -a 0 -e 0 -T script -C none -n "Boot SDHC" -d myscript.txt boot.scr


A U-Boot unification for both platforms that relies on boot.scr for everything (thus letting you have full control over everything from the Linux side, and preconfigured scripts) is coming soon. If anyone has any ideas for preconfigured, board-specific environment variables (such as console="ttymxc0,115200" or so) that can be appended to bootargs or make scripting easier, we are all ears :)

UPDATE 2010-09-28: The Xfce Maverick is mislabeled "maverick-final" - it is not the final Maverick (not released for another 2 weeks..) nor our final update on the matter. However it is the final version for currently shipping products and will be on every new unit. I hope that clarifies it.

Thursday, 26 August 2010

EfikaMX 2.6.31.14 Kernel Update

Update to 2.6.31.14 has been committed, compiled and uploaded for all Efika MX (TO2, TO3) versions. We encourage all users and developers to grab and test this kernel (from an SD card preferably) before installing over a PATA system.

This should be at feature parity with the last TO2 version (2.6.31.12.3) regarding little tweaks and things.

Fixes included:
* Now at 2.6.31.14
* Wireless - RT2870STA backported from Linus' tree works great. You will need the Ralink firmware from their site; it is included in the modules archive. Please read the LICENSE.ralink-firmware.txt in the /lib/firmware directory.
* Much, much better ARMv7, VFP and NEON support. Will fix graphical corruption for anyone who tried Ubuntu Lucid or new versions of Pixman and may fix some weird random crashes.

We have however noticed a couple of things which may be very annoying to some people:

* External SD card does not correctly operate on TO2 boards. We are not sure why this is; some SD cards work, some don't.
* In some rare circumstances display output on DVI-to-HDMI adapters is giving a black screen. Unfortunately the fix needs a recompile of the kernel, and breaks other DVI-to-HDMI adapters and screens, and some HDMI monitors.

We would greatly appreciate any feedback users have on this, and our forums are always open (for kernel dmesg output you can paste them into PowerDeveloper forum post for posterity - pastebin etc. expires but our forums do not. Make sure you use the [code]tag[/code]).

As always the kernel source has been published, and since it is now in git, we would greatly appreciate a merge request, patch, or any comments on any problems anyone may have.