AC100

Differences between revisions 64 and 65
Revision 64 as of 2011-12-14 17:55:35
Size: 14321
Editor: cs27034007
Comment: Consolidated everything around 11.10 with known issues, reformatted to follow ubuntu wiki style
Revision 65 as of 2011-12-14 18:10:10
Size: 14369
Editor: cs27034007
Comment: Fix small mistakes based on feedback
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
=== Equipment required for installation === === Installation requirements ===
Line 94: Line 94:
The file [[attachment:zramswap.conf]] can be placed in /etc/init/ and will make Upstart configure and enable zram swap on bootup: The file [[attachment:zramswap.conf]] can be placed in /etc/init/ and will make Upstart configure and enable ZRAM on bootup:
Line 161: Line 161:
This part is best done immediately after startup, before logging in to Gnome or another GUI. This part is best done immediately after startup, before logging in to Gnome or another GUI. Replace the 'username' in the following command with your own:

Status of the Ubuntu port to the AC100/Dynabook Tegra based netbook

This page collects information necessary to get a working Ubuntu port on the AC100.


Installing Ubuntu 11.10 on the AC100

Installation requirements

Installation equipment

  • Mini-usb cable
  • Host computer with linux (virtual or physical)
  • Usb-stick or sd-card (min. 1GB)
  • About 1-2h of your life (depending on the download-time)

Files to download

For the installation, you will need to download these things:

Oneiric Installer

There are two AC100 related files in the oneiric release directory:

Get them both and make sure that the md5sum corresponds after the download.

nvflash

The bootimage needs to be flashed via a mini-USB cable and using the nvflash tool.
This image when booted will set up the internal storage using a tarball provided on a USB stick or SD card.

The link contains instructions on how to easily install nvflash to your current debian-based linux-distro.

Installation

The installation is done in two phases:

Flashing the bootimage

  • Make sure the battery is full on the AC100, or that the charger is connected.
  • Shut down the AC100.
  • Connect the mini-usb from the AC100 to your host computer. The mini-usb socket is on the right side, left of the power-connector.
  • Put netbook in recovery mode by booting with CTRL and ESC buttons held down. The screen stays off while the power led lights up.
  • On your host computer, open a terminal and run:

    nvflash --bl /usr/lib/nvflash/fastboot.bin --download 6 /path/to/ubuntu-11.10-preinstalled-desktop-armel+ac100.bootimg
    NOTE: the path and name of fastboot.bin might vary, the guide uses version from http://share.grandou.net

  • Once nvflash is finished and prints out a message stating success, turn off the AC100 by pressing on the power button for several seconds.

Installing the preinstalled rootfs

  • Copy ubuntu-11.10-preinstalled-desktop-armel+ac100.tar.gz to a USB stick as a regular file on the first partition. NOTE: DO NOT UNPACK OR DD THE TARBALL, JUST COPY! Make sure the md5sum is alright after copying to the media.

  • Reboot with the USB stick inserted and follow the simple instructions. Overall it does one reboot and in total can take about 20-30 minutes.

Notes on installation

  • To do an install to external media the installer also supports installing from USB key to SD card (not the other way around !). To do such an install put the tarball on the USB key and make sure an empty SD card is in the slot before starting the installation, the installer will offer you to install to a partition on mmcblk1 (SD card) instead of mmcblk0 (internal eMMC drive).

Known issues and tips for Ubuntu 11.10

Updated packages take long to appear

The package cache may need to be cleared for updates to appear after a fresh install:

sudo mv /etc/apt/sources.list /etc/apt/sources.list.real
sudo apt-get update
sudo mv /etc/apt/sources.list.real /etc/apt/sources.list
sudo apt-get update

RAM and swap

Since the AC100 only has 512Mb of RAM some applications will complain when the RAM gets full. The default install does not have any swap or compressed ram enabled. Compressed ram may not be completely stable, and the internal MMC is not very fast. You can, however, enable either or both.

ZRAM compressed swap

ZRAM is a compressed ramdisk that can be enabled when using the latest Linux kernels. In effect, the ZRAM ramdisk can be used as a way to fit more applications into the AC100 RAM. ZRAM disks are also quicker to use than to enable a swap device on flash.

The file zramswap.conf can be placed in /etc/init/ and will make Upstart configure and enable ZRAM on bootup:

sudo wget -O /etc/init/zramswap.conf 'https://wiki.ubuntu.com/ARM/TEGRA/AC100?action=AttachFile&do=get&target=zramswap.conf'

Enabling swap

The default installation leaves partitions 3 and 4 from default partition layout of the Android system unused. You can overwrite them and use them as swap:

sudo umount /dev/mmcblk0p3
sudo umount /dev/mmcblk0p4
sudo mkswap /dev/mmcblk0p3 && sudo bash -c "echo '/dev/mmcblk0p3 none swap sw 0 0' >> /etc/fstab"
sudo mkswap /dev/mmcblk0p4 && sudo bash -c "echo '/dev/mmcblk0p4 none swap sw 0 0' >> /etc/fstab"
sudo swapon -a

Installing Adobe Flash

An Adobe Flash installer is not yet available in the official repositories although there is a version that works on the AC100. You can install it for all users:

sudo wget -O /usr/lib/mozilla/plugins/libflashplayer.so http://kotelett.no/ac100/phh/Android2.2/libflashplayer.so

Sound from speakers

After installation, upgrade all packages and make sure that the kernel 1001 was installed and reboot into it. Now you can enable audio through the speakers:

sudo amixer set 'SpeakerOut Mux',0 "Speaker Mix"
sudo amixer set 'Line',0 unmute
sudo -H alsactl store

NOTE: The unmute command needs to be verified. You can use alsamixer to unmute all speakers.

Unused partitions

Partitions 3 (300MB), 4 (400MB), 5 (2MB), and 6 (1200MB) are not used by default and can be used for any purpose. Beyond using them as swap as suggested above, you may want to zero out partition 5 to prevent it from appearing in file managers etc. NOTE: older versions had dualboot that used this partition, this is however no longer possible:

sudo umount /dev/mmcblk0p5
sudo dd if=/dev/zero of=/dev/mmcblk0p5

Also, the larger partition can be reformatted and taken into use:

sudo umount /dev/mmcblk0p6
sudo mkfs.ext4 /dev/mmcblk0p6

Encryption

Although the installer offers you the choice of an encrypted home, the kernel in the installer does not support it. To enable encryption as it would have been enabled, encrypt both your home and swap (if you enabled it above). After installation, upgrade all packages and make sure that the kernel 1001 was installed and reboot into it. Then make sure that encryption is enabled on your system:

sudo modprobe ecryptfs
sudo apt-get install ecryptfs-utils cryptsetup
sudo bash -c "echo ecryptfs >> /etc/modules"

Encrypted swap

The first two commands are necessary for the encryption process to skip encryption ZRAM which would not make any sense.

sudo swapoff -a
sudo swapon -a
sudo ecryptfs-setup-swap

Encrypted home

This part is best done immediately after startup, before logging in to Gnome or another GUI. Replace the 'username' in the following command with your own:

sudo ecryptfs-migrate-home -u username

Follow the instructions given (log out when finished, log in again, and remove the backup if everything worked).

A Note About Fragmentation

The effort the bring hardware support has always been fragmented. We are thankful for phh who did the initial bringup of a working linux kernel on the ac100 and made Linux4Tegra work on the older root filesystems ogra who built all Ubuntu root filesystems and the official oneiric images, marvin24 who has put effort in porting the Chrome OS kernel to the AC100, and the many others who were involved.

The downside of this fragmentation is that documentation is fragmented too. The goal of this wiki is to provide good quality information for the latest and most promising effort.

Wiki maintainers: don't reference the old "wetpaint" wiki. It is virtually unmaintained and will cause confusion. Information about the inner workings of the device and drivers must go here: http://ac100.grandou.net/

Hardware

The AC100 netbook

The AC100 is an nVidia Tegra2 based device which has Android 2.1 as factory default. It has dual ARM Cortex-A9 cores at 1 GHz and nVidia GPU technology on its System On Chip (SoC). Some models come with 3G modems and the eMMC flash storage comes in various sizes.

Strengths

  • Very slim and light
  • Long battery life
  • HDMI out

Weaknesses

  • Slow eMMC storage (not an SSD)
  • Only 512MB of RAM
  • No VGA out (must use a displaylink device for most projectors)

Features known to work on Ubuntu: webcam, touchpad, 3G modem, WiFi, OpenGL ES (proprietary), indicator LEDs, card reader, audio, suspend/resume, HDMI out (with the proprietary nvidia drivers)

Incomplete support: video acceleration.

For details and a list of models, see http://ac100.grandou.net/models

Boot loader

The current first stage bootloader is Android Fastboot which uses the kernel and initramfs images found on partition 6 of the device. The partition can be written via the mini-USB port from another computer using the closed source nvflash utility from nvidia or opensource putusb, or updated from an already running system. The boot partition can be handled using the abootimg tool.

The ac100 PPA has a kernel that reads the (nvidia-proprietary format) main partition table, so kernel upgrades are possible. The flash-kernel package in the PPA takes care of this (note that all packages from the PPA are integrated in the oneiric images linked above, in oneiric the PPA will only be used for post-release updates of single packages).

U-Boot

The default boot loader is inflexible, and there is interest in adding U-Boot as a second stage boot loader. There are Tegra based U-Boot using devices but there's no working AC100 image yet that can handle the eMMC or the screen to be actually useful for a wider audience.

Kernel development

As of early September 2011 a 2.6.38-chromeos kernel fork is used in Ubuntu and included in the Oneiric archives. It supports suspend/resume and sound from the headphones is working, speakers do not yet.

Work is done to upstream AC100 support patches in 3.x kernels so we can use mainline eventually.

The kernel tree the Ubuntu package is based on is at https://gitorious.org/~marvin24/ac100/marvin24s-kernel

Graphics

Latest Linux4Tegra SDK from Nvidia is 12alpha1 for kernel 2.6.38. This is not installed by default.

WebGL

Chromium browser v 13 from the Oneiric Ocelot archive works with some WebGL demos if passed --use-gl=egl --ignore-gpu-blacklist at the command line.

http://www.khronos.org/webgl/wiki/Demo_Repository

GLES demos

The native visual ID for all EGL fbconfigs seems to be returned as 0. This is bug acknowledged by NVidia.

eglGetConfigAttrib(ed, &config, EGL_NATIVE_VISUAL_ID, &id); //id = 0

so most GLES apps will not work as there appears to be no visual with that ID.

Example of change needed in es2tri.c and eglut_x11.c from the mesa-utils-extra package

- visInfo = XGetVisualInfo(x_dpy, VisualIDMask, &visTemplate, &num_visuals); + visInfo = XGetVisualInfo(x_dpy, VisualNoMask, &visTemplate, &num_visuals);

Some vertex and fragment shaders may show compile errors with the L4T driver. Mercifully, the error messages are usually informative enough to help fix the problem.

Example of change needed in es2gears.c from the mesa-utils-extra package

  static const char fragment_shader[] =
+ "#ifdef GL_ES\n"
+ "precision mediump float\n;"
+ "#endif\n"
  "varying vec4 Color;\n"

It is vital that none of the Mesa library equivalents of libGLESv2.so, libGLESv1_CM.so or libEGL.so are loaded by your target application at runtime. Doing this will make the application fail around the context creation step.

A good way to check is to run:

ldd ./name_of_gles_app | grep GL

All entries on the list should point to files in /usr/lib/nvidia-tegra.

Screen depth

By default, the L4T driver provides a 32-bit screen depth, which should be fully compatible with GLES.

It may be possible to improve performance by setting a depth of 16-bit in /etc/X11/xorg.conf

Section "Screen"
 Identifier "<myscreen>"
 Device "Tegra"
 DefaultDepth 16
EndSection

Suspend

Suspend and resume functionality is fully supported in recent kernels. However, audio will stop working following a suspend.

This is included in the installation by default, only use the hack below if you did not use the final release of the Ubuntu installer.

People who have installed a daily image of Oneiric can fix suspend by editing /boot/bootimg.cfg to remove the lp0_vec=... argument, then running sudo flash-kernel followed by a reboot.

Contact

Only put here links that are still relevant for present and future development and do not lead to unnecessary work and confusion. In particular, try to avoid the wetpaint wiki.

CategoryHardware

ARM/TEGRA/AC100 (last edited 2021-07-13 10:07:57 by ogra)