This guide describes how to get Linux onto the Toshiba AC100 in a simple and detailed way.
Contents
The AC100 is a bit of a pain in the ass for two main reasons: 1. Whacky hardware that isn't quite supported yet. 2. The Tegra Partition Table.
The proprietary (but gratis) nvflash tool allows you to download and upload partitions to your device and also repartition the AC100's eMMC Internal Storage (no, you can't just repartition from within Linux!). The other tool we use frequently is abootimg, which allows you to unpack, edit and create boot images.
I do not recommend repartitioning your eMMC at least until you have a few weeks of experience with the AC100 and you're comfortable sure you know what you are doing - repartitioning may break compatibility with pre-compiled images and if you don't know what you're doing you won't be able to recover.
The main things you have to keep in mind when putting Linux on the AC100 are:
Follow this guide exactly. http://ac100.grandou.net/backups
You need 4 things to install a Linux distribution on your AC100.
You can use one of these boot images: http://avolver.ru/ac100/kernels/
Get these from the same place you got your kernel image from. It should be an archive file (tar.gz or .zip or whatever)
This is an archive file full files which contains the basic configuration and tools for your distribution.
I use Arch Linux - Trim Slice Latest
This is for Debian, I don't know if it works. Definitely update once installed! http://freevec.org/repository/images/armhf-unstable-main.tar.lzma
SD card is recommended.
Use an EXT file system.
That is, the SD card or USB stick you just formatted.
After they're extracted there should be a /lib/modules/[kernel version] directory.
Now you need to write your kernel and initrd to the AC100's boot partition. You should have downloaded a file called something like boot.img back in step 2. To do this you need to use nvflash.
Hold down Ctrl and Esc and then press and release the power button. The AC100 should start up but the screen should stay blank.
./nvflash --bl harmony/fastboot.bin --sync
./nvflash -r --download 6 /path/to/boot.img
This assumes that your boot partition is partition 6.
Good luck!
It should start booting linux and hopefully will find your rootfs and start loading up stuff. If it stops in busybox then it is probably because it could not locate the rootfs. See "Internal Partions" for info on changing where the kernel looks to find the rootfs.
You can continue to run on the SD card, however you probably want to install to the eMMC.
To install to the eMMC you need to have access to the internal partitions. See "Internal Partitions" for more detailed information.
You need to copy a rootfs over and make a few small changes.
The easiest way to copy the rootfs is to just your SD card in another computer and copy all the contents into another directory. Do this because some files will not allow you to copy them while the system is using them.
I don't know the exact path to mount as my AC100 was second-hand and already re-partitioned - however the process is the same, just replace X.
mount /dev/mmcblk0pX /mnt
You can use rsync instead of plain cp.
cp -r /myrootfs /mnt
Edit /mnt/etc/fstab using your favourite editor (vim). Make sure it has the following:
/dev/mmcblk0p2/ext4 defaults,noatime,nodiratime 0 0 0 tmpfs /tmp tmpfs nodev,nosuid 0 0
However that first line is likely to be different for you because my partition layout is fairly non-standard. You may also want to do:
/dev/mmcblk0p5/home ext4 defaults,noatime,nodiratime 0 0 0 0
Where mmcblk0p5 is your data partition (which is partition 14 in nvflash by default).
Note that I have my partitions formatted to ext4 - you may want to format to ext4 as well. Use parted to do this, or if you have X running on your SD card then you can use gparted.
If you have default partitioning and are using the http://revolver.ru/ac100 boot images you can reflash with a "p12.img" image and it should work. Else see "Internal Partitions" for more info.
Reboot and enjoy.
The internal storage is formatted with a partition table format which I call the Tegra Partition Table. Support for this format is fairly limited so we have to use nvflash to work with partitions for the most part. However once Linux has located partitions by reading the MBR you can reformat partitions and read/write them. Getting Linux to find the partition in the first place is our biggest problem.
To make the kernel see our partitions we need to adjust the "tegrapart" kernel parameter to make sure it finds the MBR partition - from there Linux can figure out the rest of the partitions. This isn't as easy as just editing grub.cfg like on x86 - however it is not as hard as recompiling the kernel. To edit the kernel parameters we need to work with a file called bootimg.cfg which we can get by unpacking a boot image using the abootimg tool.
An interesting piece of documentation is the Tegra Partion Table example.
abootimg allows you to pack and unpack an image file.
http://gitorious.org/ac100/abootimg - you can get a git clone or just download the tarball.
Just unpack the archive (if you didn't do a git clone) and run "make"! Super simple.
First, make sure you have abootimg. If you don't have it see the section in this article which describes getting it.
After running this you should get 3 files. bootimg.cfg, initrd.img and zImage.
abootimg -x boot.img
abootimg --create modified-boot.img -f bootimg.cfg -k zImage -r initrd.img
You should now have a modified-boot.img file that you can flash using nvflash.
Note: once you have Linux running and your partitions are detected you can make new boot images and flash them from the AC100 itself by using the "dd" utility which comes standard with nearly all Linux distributions.
To learn about repartitioning you can read: http://tosh-ac100.wetpaint.com/page/Repartition+Internal+Storage
I recommend changing as little of the partition table as possible, especially not the MBR partition. Most people flat-out do not recommend repartitioning at all.
Although you can certainly do complicated compiling setups with cross-compilers and distcc, I find that the kernel can be compiled in about 45 minutes on the AC100. I use a USB hard drive, though NFS can also work.
https://gitorious.org/~marvin24/ac100/marvin24s-kernel - clone it to the USB drive or extract it to the USB drive if you get a tarball.
In the source directory run
make paz00_defconfig
make
Then wait... Then build the modules.
make modules
make modules_install
Note: If you want your modules to install to a directory of your choosing (so you can easily just zip them up) do:
INSTALL_MOD_PATH=/path/to/dir make modules_install
This is the actual kernel binary.
make zImage
The resulting zImage file will end up in arch/arm/boot
These are mostly ones that I have encountered.
No internal partitions show up in Linux!
Run "dmesg|less" and then search for "parse_tegra" and see what is complaining about. It is likely that you have no given the correct location of the MBR in the tegrapart kernel parameter.
My mouse won't move!
Try the touchpad toggle key, which is above the "7" key. Derp.
It keeps crashing!
Yeah I know. Come into the #ac100 channel on irc.freenode.net and tell us your kernel version, distribution and detailed explanation of the problem.
If you're running one of Marvin's 3.0 kernels you may want to downgrade to 3.0.8 because there is a problem with CPU stability (voltage and SMP related).
The wireless driver is pretty crashy too.