AC100
Size: 7998
Comment:
|
Size: 17362
Comment: Added 12.04 beta1 headline that will in time replace 11.10, and some minor cleanup
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
This page collects information necessary to get a working Ubuntu port on the AC100 using '''only open source''' components and everything in the official archives (or temporarily in PPAs) | Ubuntu on AC100 is currently an official demonstration of the Ubuntu ARM port and works fairly well. This page collects information necessary to get a working Ubuntu 11.10 port on the AC100. |
Line 6: | Line 6: |
<<TableOfContents(2)>> ---- == Installer == === Prerequisites === {{attachment:ac100-install.jpg|Installation prerequisites|align="top"}} '''Required for installation''' |
<<TableOfContents(3)>> == Installing Ubuntu 11.10 on the AC100 == === Installation requirements === {{attachment:ac100-install.jpg|Installation equipment|align="top"}} |
Line 20: | Line 17: |
* host computer with linux (virtual or physical) * usb-stick or sd-card (min. 1GB) <<BR>> |
* 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) |
Line 26: | Line 25: |
<<BR>><<BR>> | |
Line 28: | Line 27: |
There are two AC100 related files in the [[http://cdimage.ubuntu.com/daily-preinstalled/current/|daily image directory]]:<<BR>> . [[http://cdimage.ubuntu.com/daily-preinstalled/current/oneiric-preinstalled-desktop-armel+ac100.bootimg|Bootimage]]<<BR>> . [[http://cdimage.ubuntu.com/daily-preinstalled/current/oneiric-preinstalled-desktop-armel+ac100.tar.gz|Preinstalled rootfs]]<<BR>> Get them both and make sure that the [[http://cdimage.ubuntu.com/daily-preinstalled/current/MD5SUMS|md5sum]] corresponds after the download. <<BR>><<BR>> |
There are two AC100 related files in the [[http://cdimage.ubuntu.com/releases/11.10/release/|oneiric release directory]]: . [[http://cdimage.ubuntu.com/releases/11.10/release/ubuntu-11.10-preinstalled-desktop-armel+ac100.bootimg|Bootimage]] . [[http://cdimage.ubuntu.com/releases/11.10/release/ubuntu-11.10-preinstalled-desktop-armel+ac100.tar.gz|Preinstalled rootfs]] Get them both and make sure that the [[http://cdimage.ubuntu.com/releases/11.10/release/MD5SUMS|md5sum]] corresponds after the download. |
Line 36: | Line 36: |
The bootimage needs to be flashed via a mini-USB 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.<<BR>> |
The bootimage needs to be flashed via a mini-USB cable and using the nvflash tool.<<BR>> This image when booted will set up the internal storage using a tarball provided on a USB stick or SD card. |
Line 41: | Line 42: |
The link contains instructions on how to easily install nvflash to your current debian-based linux-distro.<<BR>> <<BR>> <<BR>> |
The link contains instructions on how to easily install nvflash to your current debian-based linux-distro. |
Line 48: | Line 49: |
Line 50: | Line 52: |
* Make sure the battery is full on the AC100, or that the charger is connected. | |
Line 51: | Line 54: |
* Connect the mini-usb from the AC100 to your host computer. * Put netbook in recovery mode by booting with ctrl and esc buttons held down. The screen stays off while the power led lights up. |
* 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. |
Line 54: | Line 57: |
{{{nvflash --bl /usr/lib/nvflash/bootloader.bin --download 6 /path/to/oneiric-preinstalled-desktop-armel+ac100.bootimg}}}<<BR>>NOTE: the path and name of bootloader.bin might vary, the guide uses version from [[http://ac100.grandou.net/nvflash#debian_ubuntu_package|http://share.grandou.net]] | {{{nvflash --bl /usr/lib/nvflash/fastboot.bin --download 6 /path/to/ubuntu-11.10-preinstalled-desktop-armel+ac100.bootimg}}}<<BR>>''NOTE:'' the path and name of fastboot.bin might vary, the guide uses version from [[http://ac100.grandou.net/nvflash#debian_ubuntu_package|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. |
Line 58: | Line 63: |
* Copy oneiric-preinstalled-desktop-armel+ac100.tar.gz to a USB stick as a regular file on the first partition.<<BR>>Do not unpack or dd it, simply copy! Make sure the [[http://cdimage.ubuntu.com/daily-preinstalled/current/MD5SUMS|md5sum]] is alright after copying to the media. | * 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 [[http://cdimage.ubuntu.com/releases/11.10/release/MD5SUMS|md5sum]] is alright after copying to the media. |
Line 60: | Line 65: |
==== Notes on installation ==== * Oneiric is still in beta, and random errors might (read: probably will) occur. * If the locale/keymap selection freezes, start again and select keymap after the installation has finished and rebooted <<BR>><<BR>> ---- |
'''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). * Although the installer offers the possibility to encrypt your home, this does not work. See the end of this document for instructions on enabling encryption. * By default, only audio through headphones is enabled after the install, and will stop working after suspend/resume. See the end of this document for instructions on enabling audio through speakers. * The package cache will be stuck for a while after the installation. Updates will start appearing after a day or so. |
Line 71: | Line 78: |
''phh'' who provided a solution based on (now) older L4T releases, ''ogra'' who made Ubuntu work without proprietary daemon, ''marvin24'' who has put effort in porting Chrome OS to the AC100, |
''phh'' who did the initial bringup of a working linux kernel on the ac100 and made Linux''''''4Tegra 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, |
Line 79: | Line 86: |
Line 82: | Line 90: |
---- |
|
Line 88: | Line 94: |
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. Some models come with 3G modems and the eMMC flash storage comes in various sizes. | 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. |
Line 91: | Line 98: |
Line 93: | Line 101: |
* HDMI out | * HDMI out - when using the Nvidia driver |
Line 96: | Line 105: |
Line 97: | Line 107: |
* Only 512MB of RAM | |
Line 99: | Line 110: |
Features known to work on Ubuntu: webcam, touchpad, 3G modem, WiFi, OpenGL ES (proprietary), indicator LEDs, card reader Incomplete support: video acceleration, HDMI out, audio |
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. |
Line 105: | Line 116: |
---- | |
Line 112: | Line 122: |
The [[https://launchpad.net/~ac100/+archive/ppa|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. | The [[https://launchpad.net/~ac100/+archive/ppa|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). |
Line 115: | Line 126: |
Line 118: | Line 130: |
---- == Kernel == As of early September 2011 a 2.3.38-chromeos kernel fork is used in Ubuntu and included in the Oneiric archives. It does not support suspend/resume and sound yet. |
== 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. |
Line 128: | Line 139: |
---- == Adobe Flash == Dropping this library into ~/.mozilla/plugins allows flash playback. It warns though that it is out of date. http://kotelett.no/ac100/phh/Android2.2/libflashplayer.so ---- == Graphics == Latest Linux4Tegra SDK from Nvidia is 12alpha1 for kernel 2.6.38. === WebGL === |
== Known issues and tips for Ubuntu 11.10 == === Graphics === The Linux''''''4Tegra binary drivers from Nvidia are not installed by default. https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-tegra/12~beta1-0ubuntu1/+build/3019146/+files/nvidia-tegra_12%7Ebeta1-0ubuntu1_armel.deb - last version that are known to work on Ubuntu 11.10 Oneiric. '''HDMI''' HDMI out work with the Nvidia L4T beta driver installed. If you connect a large screen then you may need to use a tool like ''arandr'' to overlap the screens in order for both screens to be inside the drivers maximum 2048x2048 pixel boundary. '''WebGL''' |
Line 148: | Line 160: |
=== GLES demos === | '''GLES demos''' |
Line 156: | Line 169: |
Example of change needed in es2tri.c from the mesa-utils-extra package | Example of change needed in es2tri.c and eglut_x11.c from the mesa-utils-extra package |
Line 161: | Line 174: |
=== Screen depth === In the Xorg config file, a depth should be set as 16 or else not even the limited support for GLES as seen above is available. |
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[] =`<<BR>> `+ "#ifdef GL_ES\n"`<<BR>> `+ "precision mediump float\n;"`<<BR>> `+ "#endif\n"`<<BR>> ` "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 (nvidia-tegra) 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 |
Line 172: | Line 205: |
---- | === 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}}} === Enabling ZRAM compressed swap === /!\ '''This happens automatically with the 12.04 (precise) images from the alpha2 images on (former precise images are known to not work automatically due to parameter changes of the zram module, you can edit /etc/init/zram.conf there to use the new naming (see modinfo zram)), only use this method on oneiric (11.10)''' Since the AC100 only has 512Mb of RAM some applications will complain when the RAM gets full. The default 11.10 install does not have any swap or compressed RAM enabled. Compressed RAM may not be completely stable, but is much faster than the internal MMC. You can, however, enable either or both, and by these instructions ZRAM will have higher priority. 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 [[attachment: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'}}} === Making use of extra partitions === The default installation leaves some partitions unused. Typically these are the partitions 3 (300MB), 4 (400MB), 5 (2MB) and 6 (1200MB) from the default partition layout of the Android 2.2 system from Toshiba. Before doing anything, verify that these are indeed the partition numbers on your system as they may be vary from model to model and may change with newer kernels. To find out, first see which partitions are currently in use and their size: {{{sudo mount}}}<<BR>> {{{sudo df -h}}} The root (currently mounted as /, typically partition 7) and boot (is not mountable and begins with some 'ANDROID' and 'Ubuntu Boot Img' if you {{{head}}} it, typically partition 2) should not be touched. Unmount the other partitions you wish to use (replace X with the partition number): {{{sudo umount /dev/mmcblk0pX}}} '''Emptying the partitions''' To simply prevent them showing up in file managers or unity, you can overwrite them with zeroes (replace X with the partition number): {{{sudo dd if=/dev/zero of=/dev/mmcblk0pX}}} '''Using the partitions as swap''' /!\ '''Attention:''' MMC devices have a limited life cycle for writing to them, using such devices for swap space where you have enormous amounts of constant writes '''will significantly shorten the life cycle of these devices'''. The built in MMC is '''not replaceable''', use the method below '''at your own risk'''. To use them as swap create a swap system on them (replace X with the partition number): {{{sudo mkswap /dev/mmcblk0pX}}} Then add the UUID given in the output of the previous command to fstab to automatically be used at boot (replace Y with the UUID): {{{sudo bash -c "echo 'UUID=Y none swap sw 0 0' >> /etc/fstab"}}}<<BR>> {{{sudo swapon -a}}} '''Reformatting the partitions for storage''' To use an extra partition for storage that can be mounted in file managers, create an ext4 file system on the partition (replace X with the partition number): {{{sudo mkfs.ext4 /dev/mmcblk0pX}}} If you want it to be automatically mounted at boot, continue by finding out its UUID (replace X with the partition number): {{{sudo blkid -o value -s UUID /dev/mmcblk0pX}}} Then add the UUID given in the output of the previous command to fstab to automatically be used at boot (replace Y with the UUID and Z with the mount point): {{{sudo bash -c "echo 'UUID=Y Z ext4 defaults 0 0' >> /etc/fstab"}}} === 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"}}}<<BR>> {{{sudo amixer set 'Line',0 unmute}}}<<BR>> {{{sudo -H alsactl store}}} ''NOTE:'' The unmute command needs to be verified. You can use {{{alsamixer}}} to unmute all speakers. ''NOTE:!! You still need to fiddle a bit with alsamixer settings to get sound to work (Right/Left Headphone Mux + SpeakerOut (N) Mux) === Encryption === /!\ '''Attention:''' Installing the cryptsetup package may make the initrd to big for the device to boot after a kernel upgrade and such '''will render the system unbootable'''. Use encryption only if you really know what you are doing and '''totally at your own risk'''. 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}}}<<BR>> {{{sudo apt-get install ecryptfs-utils cryptsetup}}}<<BR>> {{{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}}}<<BR>> {{{sudo swapon -a}}}<<BR>> {{{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). == Known issues and tips for Ubuntu 12.04 beta1 == This section will in time replace the one above. === Graphics === The nvidia-tegra package is not yet available for armhf. For now, just stay with the default open source driver. === Sound === Set the following mixer settings should using '{{{alsamixer}}}': * Master: OO * Headphone: OO * Speaker: OO * Speaker Mix DAC2SPK: OO * SpeakerOut Mux: Speaker Mix * SpeakerOut N Mux: LN/-R * A-D Amp Mux: AB Amp * DACL2HP: OO * DACR2HP: OO * Int Spk: OO * Left Headphone Mux: HP Left Mix * Right Headphone Mux: HP Right Mix |
Line 176: | Line 344: |
IRC: #ac100 on freenode Mailing list archives: https://lists.launchpad.net/ac100/ Launchpad team: https://launchpad.net/~ac100 ---- |
* IRC: #ac100 on freenode: http://webchat.freenode.net/?channels=ac100 * Mailing list and archives: https://lists.launchpad.net/ac100/ * Launchpad team: https://launchpad.net/~ac100 |
Line 185: | Line 350: |
Line 186: | Line 352: |
* Detailed info, useful for developers and power users: http://ac100.grandou.net/ | * Detailed info, useful for developers and power users but not specific to ubuntu: http://ac100.grandou.net/ |
Line 188: | Line 354: |
---- |
Status of the Ubuntu port to the AC100/Dynabook Tegra based netbook
Ubuntu on AC100 is currently an official demonstration of the Ubuntu ARM port and works fairly well. This page collects information necessary to get a working Ubuntu 11.10 port on the AC100.
Contents
Installing Ubuntu 11.10 on the AC100
Installation requirements
- 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).
- Although the installer offers the possibility to encrypt your home, this does not work. See the end of this document for instructions on enabling encryption.
- By default, only audio through headphones is enabled after the install, and will stop working after suspend/resume. See the end of this document for instructions on enabling audio through speakers.
- The package cache will be stuck for a while after the installation. Updates will start appearing after a day or so.
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 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 - when using the Nvidia driver
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
Known issues and tips for Ubuntu 11.10
Graphics
The Linux4Tegra binary drivers from Nvidia are not installed by default.
https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-tegra/12~beta1-0ubuntu1/+build/3019146/+files/nvidia-tegra_12%7Ebeta1-0ubuntu1_armel.deb - last version that are known to work on Ubuntu 11.10 Oneiric.
HDMI
HDMI out work with the Nvidia L4T beta driver installed. If you connect a large screen then you may need to use a tool like arandr to overlap the screens in order for both screens to be inside the drivers maximum 2048x2048 pixel boundary.
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 (nvidia-tegra) 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
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
Enabling ZRAM compressed swap
This happens automatically with the 12.04 (precise) images from the alpha2 images on (former precise images are known to not work automatically due to parameter changes of the zram module, you can edit /etc/init/zram.conf there to use the new naming (see modinfo zram)), only use this method on oneiric (11.10)
Since the AC100 only has 512Mb of RAM some applications will complain when the RAM gets full. The default 11.10 install does not have any swap or compressed RAM enabled. Compressed RAM may not be completely stable, but is much faster than the internal MMC. You can, however, enable either or both, and by these instructions ZRAM will have higher priority.
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'
Making use of extra partitions
The default installation leaves some partitions unused. Typically these are the partitions 3 (300MB), 4 (400MB), 5 (2MB) and 6 (1200MB) from the default partition layout of the Android 2.2 system from Toshiba. Before doing anything, verify that these are indeed the partition numbers on your system as they may be vary from model to model and may change with newer kernels. To find out, first see which partitions are currently in use and their size:
sudo mount
sudo df -h
The root (currently mounted as /, typically partition 7) and boot (is not mountable and begins with some 'ANDROID' and 'Ubuntu Boot Img' if you head it, typically partition 2) should not be touched. Unmount the other partitions you wish to use (replace X with the partition number):
sudo umount /dev/mmcblk0pX
Emptying the partitions
To simply prevent them showing up in file managers or unity, you can overwrite them with zeroes (replace X with the partition number):
sudo dd if=/dev/zero of=/dev/mmcblk0pX
Using the partitions as swap
Attention: MMC devices have a limited life cycle for writing to them, using such devices for swap space where you have enormous amounts of constant writes will significantly shorten the life cycle of these devices. The built in MMC is not replaceable, use the method below at your own risk.
To use them as swap create a swap system on them (replace X with the partition number):
sudo mkswap /dev/mmcblk0pX
Then add the UUID given in the output of the previous command to fstab to automatically be used at boot (replace Y with the UUID):
sudo bash -c "echo 'UUID=Y none swap sw 0 0' >> /etc/fstab"
sudo swapon -a
Reformatting the partitions for storage
To use an extra partition for storage that can be mounted in file managers, create an ext4 file system on the partition (replace X with the partition number):
sudo mkfs.ext4 /dev/mmcblk0pX
If you want it to be automatically mounted at boot, continue by finding out its UUID (replace X with the partition number):
sudo blkid -o value -s UUID /dev/mmcblk0pX
Then add the UUID given in the output of the previous command to fstab to automatically be used at boot (replace Y with the UUID and Z with the mount point):
sudo bash -c "echo 'UUID=Y Z ext4 defaults 0 0' >> /etc/fstab"
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. NOTE:!! You still need to fiddle a bit with alsamixer settings to get sound to work (Right/Left Headphone Mux + SpeakerOut (N) Mux)
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 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 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).
This section will in time replace the one above.
The nvidia-tegra package is not yet available for armhf. For now, just stay with the default open source driver.
Set the following mixer settings should using 'alsamixer': SpeakerOut Mux: Speaker Mix SpeakerOut N Mux: LN/-R
IRC: #ac100 on freenode: http://webchat.freenode.net/?channels=ac100 Mailing list and archives: https://lists.launchpad.net/ac100/ Launchpad team: https://launchpad.net/~ac100
Encryption
Attention: Installing the cryptsetup package may make the initrd to big for the device to boot after a kernel upgrade and such will render the system unbootable. Use encryption only if you really know what you are doing and totally at your own risk.
sudo apt-get install ecryptfs-utils cryptsetup
sudo bash -c "echo ecryptfs >> /etc/modules"
sudo swapon -a
sudo ecryptfs-setup-swap Known issues and tips for Ubuntu 12.04 beta1
Graphics
Sound
Contact
Misc links
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.
Detailed info, useful for developers and power users but not specific to ubuntu: http://ac100.grandou.net/
IRC-logs for #ac100 @ irc.freenode.net can be found here: http://ac100.tunk.org/logs/
ARM/TEGRA/AC100 (last edited 2021-07-13 10:07:57 by ogra)